diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 5e123bd5..7e81e779 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,4 +1,4 @@ -FROM docker.io/zmkfirmware/zmk-dev-arm:3.5 +FROM docker.io/zmkfirmware/zmk-dev-arm:4.1-branch COPY .bashrc tmp RUN mv /tmp/.bashrc ~/.bashrc diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index efa8c229..f7dc8251 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -9,6 +9,7 @@ "mounts": [ "type=volume,source=zmk-root-user,target=/root", "type=volume,source=zmk-config,target=/workspaces/zmk-config", + "type=volume,source=zmk-modules,target=/workspaces/zmk-modules", "type=volume,source=zmk-zephyr,target=${containerWorkspaceFolder}/zephyr", "type=volume,source=zmk-zephyr-modules,target=${containerWorkspaceFolder}/modules", "type=volume,source=zmk-zephyr-tools,target=${containerWorkspaceFolder}/tools" diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 1df0848c..df867347 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -8,3 +8,50 @@ updates: directory: "/docs" schedule: interval: "daily" + groups: + docusaurus-major: + applies-to: "version-updates" + dependency-type: "production" + patterns: + - "@docusaurus/*" + update-types: + - "major" + docusaurus-minor-patch: + applies-to: "version-updates" + dependency-type: "production" + patterns: + - "@docusaurus/*" + update-types: + - "minor" + - "patch" + tree-sitter: + applies-to: "version-updates" + dependency-type: "production" + patterns: + - "tree-sitter-devicetree" + - "web-tree-sitter" + prod-other-major: + applies-to: "version-updates" + dependency-type: "production" + exclude-patterns: + - "@docusaurus/*" + - "tree-sitter-devicetree" + - "web-tree-sitter" + update-types: + - "major" + prod-other-minor-patch: + applies-to: "version-updates" + dependency-type: "production" + exclude-patterns: + - "@docusaurus/*" + - "tree-sitter-devicetree" + - "web-tree-sitter" + update-types: + - "minor" + - "patch" + development: + applies-to: "version-updates" + dependency-type: "development" + update-types: + - "minor" + - "patch" diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 9e523a36..147d287c 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,15 +1,9 @@ - + -## Board/Shield Check-list +## PR check-list -- [ ] This board/shield is tested working on real hardware -- [ ] Definitions follow the general style of other shields/boards upstream ([Reference](https://zmk.dev/docs/development/new-shield)) -- [ ] `.zmk.yml` metadata file added +- [ ] Branch has a [clean commit history](https://zmk.dev/docs/development/contributing/pull-requests#clean-commit-history) +- [ ] Additional tests are included, if changing behaviors/core code that is testable. - [ ] Proper Copyright + License headers added to applicable files (Generally, we stick to "The ZMK Contributors" for copyrights to help avoid churn when files get edited) -- [ ] General consistent formatting of DeviceTree files -- [ ] Keymaps do not use deprecated key defines (Check using the [upgrader tool](https://zmk.dev/docs/codes/keymap-upgrader)) -- [ ] `&pro_micro` used in favor of `&pro_micro_d/a` if applicable -- [ ] If split, no name added for the right/peripheral half -- [ ] Kconfig.defconfig file correctly wraps _all_ configuration in conditional on the shield symbol -- [ ] `.conf` file has optional extra features commented out -- [ ] Keyboard/PCB is part of a shipped group buy or is generally available in stock to purchase (OSH/personal projects without general availability should create a zmk-config repo instead) +- [ ] [Pre-commit](https://zmk.dev/docs/development/local-toolchain/pre-commit) used to check formatting of files, commit messages, etc. +- [ ] Includes any necessary [documentation changes](https://zmk.dev/docs/development/contributing/documentation). diff --git a/.github/workflows/ble-test.yml b/.github/workflows/ble-test.yml index 867c7f7e..68cb1cb3 100644 --- a/.github/workflows/ble-test.yml +++ b/.github/workflows/ble-test.yml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v7 - name: Find test directories id: test-dirs run: | @@ -35,12 +35,12 @@ jobs: test: ${{ fromJSON(needs.collect-tests.outputs.test-dirs) }} runs-on: ubuntu-latest container: - image: docker.io/zmkfirmware/zmk-build-arm:3.5 + image: docker.io/zmkfirmware/zmk-build-arm:4.1 steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v7 - name: Cache west modules - uses: actions/cache@v4 + uses: actions/cache@v5 env: cache-name: cache-zephyr-modules with: @@ -61,7 +61,7 @@ jobs: - name: Enable babblesim group filter run: west config manifest.group-filter -- +babblesim - name: Update modules (west update) - run: west update + run: west update --fetch-opt=--filter=tree:0 - name: Export Zephyr CMake package (west zephyr-export) run: west zephyr-export - name: Build BabbleSim components @@ -72,7 +72,7 @@ jobs: run: BSIM_COMPONENTS_PATH="${GITHUB_WORKSPACE}/tools/bsim/components" BSIM_OUT_PATH="${GITHUB_WORKSPACE}/tools/bsim" ./run-ble-test.sh tests/ble/${{ matrix.test }} - name: Archive artifacts if: ${{ always() }} - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: "${{ matrix.test }}-log-files" path: app/build/**/*.log diff --git a/.github/workflows/build-user-config.yml b/.github/workflows/build-user-config.yml index c3e4789d..f6839819 100644 --- a/.github/workflows/build-user-config.yml +++ b/.github/workflows/build-user-config.yml @@ -26,24 +26,32 @@ on: jobs: matrix: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 name: Fetch Build Keyboards outputs: build_matrix: ${{ env.build_matrix }} + has_valid_build_matrix: ${{ steps.fetch.outputs.has_valid_build_matrix }} steps: - name: Checkout - uses: actions/checkout@v4 - - - name: Install yaml2json - run: python3 -m pip install remarshal + uses: actions/checkout@v7 - name: Fetch Build Matrix + id: fetch run: | - echo "build_matrix=$(yaml2json '${{ inputs.build_matrix_path }}' | jq -c .)" >> $GITHUB_ENV - yaml2json "${{ inputs.build_matrix_path }}" | jq + matrix_content=$(yq -oj -I0 '${{ inputs.build_matrix_path }}') + + if [ -z "$matrix_content" ] || [ "$matrix_content" = "null" ]; then + echo "::notice file=${{inputs.build_matrix_path}},title=Empty build matrix file::To add a keyboard to the build, see https://zmk.dev/docs/user-setup#add-a-keyboard." + echo "has_valid_build_matrix=false" >> $GITHUB_OUTPUT + else + echo "build_matrix=$matrix_content" >> $GITHUB_ENV + echo "has_valid_build_matrix=true" >> $GITHUB_OUTPUT + echo "$matrix_content" + fi build: runs-on: ubuntu-latest + if: needs.matrix.outputs.has_valid_build_matrix == 'true' container: image: zmkfirmware/zmk-build-arm:stable needs: matrix @@ -52,15 +60,21 @@ jobs: fail-fast: false matrix: ${{ fromJson(needs.matrix.outputs.build_matrix) }} steps: + - name: Act Workaround # https://github.com/nektos/act/issues/973 + if: ${{ env.ACT }} + run: | + apt-get update && apt-get install -y curl unzip + curl -fsSL https://deb.nodesource.com/setup_22.x | bash && apt install -y nodejs + - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v7 - name: Create build directory run: | echo "build_dir=$(mktemp -d)" >> $GITHUB_ENV - name: Prepare variables - shell: sh -x {0} + shell: bash -x {0} env: board: ${{ matrix.board }} shield: ${{ matrix.shield }} @@ -84,7 +98,7 @@ jobs: echo "extra_west_args=${extra_west_args}" >> $GITHUB_ENV echo "extra_cmake_args=${shield:+-DSHIELD=\"$shield\"}${zmk_load_arg}" >> $GITHUB_ENV echo "display_name=${shield:+$shield - }${board}" >> $GITHUB_ENV - echo "artifact_name=${artifact_name:-${shield:+$shield-}${board}-zmk}" >> $GITHUB_ENV + echo "artifact_name=${artifact_name:-${shield:+$shield-}${board//\//_}-zmk}" >> $GITHUB_ENV - name: Copy config files to isolated temporary directory run: | @@ -94,7 +108,7 @@ jobs: fi - name: Cache west modules - uses: actions/cache@v4 + uses: actions/cache@v5 continue-on-error: true env: cache_name: cache-zephyr-${{ env.zephyr_version }}-modules @@ -117,7 +131,14 @@ jobs: - name: West Update working-directory: ${{ env.base_dir }} - run: west update + run: west update --fetch-opt=--filter=tree:0 + + - name: Check ZMK revision + working-directory: ${{ env.base_dir }} + run: | + zmk_revision=$(west list -f "{revision}" zmk) + echo "zmk_revision=${zmk_revision}" >> $GITHUB_ENV + echo "ZMK revision: ${zmk_revision}" - name: West Zephyr export working-directory: ${{ env.base_dir }} @@ -128,6 +149,38 @@ jobs: shell: sh -x {0} run: west build -s zmk/app -d "${{ env.build_dir }}" -b "${{ matrix.board }}" ${{ env.extra_west_args }} -- -DZMK_CONFIG=${{ env.base_dir }}/${{ inputs.config_path }} ${{ env.extra_cmake_args }} ${{ matrix.cmake-args }} + - name: Warn about building from main if build fails + if: failure() && env.zmk_revision == 'main' + run: | + echo "# Consider Pinning ZMK" >> $GITHUB_STEP_SUMMARY + echo "Your recent build failure might be the result of breaking changes made to ZMK's main branch." >> $GITHUB_STEP_SUMMARY + echo "Consider [pinning your ZMK version](https://zmk.dev/blog/2025/06/20/pinned-zmk) to a release for increased stability." >> $GITHUB_STEP_SUMMARY + echo "See also the [list of released versions](https://github.com/zmkfirmware/zmk/releases)." >> $GITHUB_STEP_SUMMARY + echo "If you wish to stay on main, check the most recent pending release PR for breaking changes. [Our blog](https://zmk.dev/blog) may have upgrade information if breaking changes are significant." >> $GITHUB_STEP_SUMMARY + + - name: Check if building a board without explicit ZMK compat + if: always() + working-directory: "${{ env.base_dir }}/${{ inputs.config_path }}" + run: | + if ! (grep "CONFIG_ZMK_BOARD_COMPAT=y" "${{ env.build_dir }}/zephyr/.config" > /dev/null) + then + original_board=$(echo "${{ matrix.board }}" | sed -e 's$/.*$$') + west_board=$(west boards --board-root ${{ env.base_dir }}/zmk/app/module --board-root ${{ env.base_dir }}/zmk/app --board "${original_board}") + if [ -z "$west_board" ]; then + echo "Not found the board listed with west boards. Skipping further checking." + exit 0 + fi + + west boards --board-root ${{ env.base_dir }}/zmk/app/module --board-root ${{ env.base_dir }}/zmk/app --board "${original_board}" --format "{qualifiers}" | grep "zmk" > /dev/null + if [ $? -ne 0 ] + then + echo "::warning file=build/zephyr/.config,title=Missing ZMK Compat::The selected board does not report explicit ZMK compat. Please verify you've selected the correct board and ZMK variant if one exists" + else + echo "::error file=build/zephyr/.config,title=Missing ZMK Compat::The selected board is not set up for ZMK and there is a ZMK variant available. See https://zmk.dev/blog/2025/12/09/zephyr-4-1#zmk-board-variant." + exit 1 + fi + fi + - name: ${{ env.display_name }} Kconfig file run: | if [ -f "${{ env.build_dir }}/zephyr/.config" ] @@ -164,18 +217,19 @@ jobs: fi - name: Archive (${{ env.display_name }}) - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: artifact-${{ env.artifact_name }} path: ${{ env.build_dir }}/artifacts merge: runs-on: ubuntu-latest + if: needs.matrix.outputs.has_valid_build_matrix == 'true' needs: build name: Merge Output Artifacts steps: - name: Merge Artifacts - uses: actions/upload-artifact/merge@v4 + uses: actions/upload-artifact/merge@v7 with: name: ${{ inputs.archive_name }} pattern: artifact-* diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 94904d0a..0d2a5805 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,18 +23,18 @@ jobs: if: ${{ always() }} runs-on: ubuntu-latest container: - image: docker.io/zmkfirmware/zmk-build-arm:3.5 + image: docker.io/zmkfirmware/zmk-build-arm:4.1 needs: compile-matrix strategy: matrix: include: ${{ fromJSON(needs.compile-matrix.outputs.include-list) }} steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v7 with: persist-credentials: false - name: Cache west modules - uses: actions/cache@v4 + uses: actions/cache@v5 env: cache-name: cache-zephyr-modules with: @@ -53,17 +53,17 @@ jobs: - name: Initialize workspace (west init) run: west init -l app - name: Update modules (west update) - run: west update + run: west update --fetch-opt=--filter=tree:0 - name: Export Zephyr CMake package (west zephyr-export) run: west zephyr-export - name: Use Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: node-version: "14.x" - name: Install @actions/artifact - run: npm install @actions/artifact + run: npm install @actions/artifact@5.0.3 - name: Build - uses: actions/github-script@v7 + uses: actions/github-script@v9 id: boards-list with: script: | @@ -95,7 +95,7 @@ jobs: throw new Error('Failed to build one or more configurations'); } - name: Upload artifacts - uses: actions/github-script@v7 + uses: actions/github-script@v9 continue-on-error: ${{ github.event_name == 'pull_request' }} id: boards-upload with: @@ -123,7 +123,7 @@ jobs: } const cmakeName = shieldArgs['cmake-args'] ? '-' + (shieldArgs.nickname || shieldArgs['cmake-args'].split(' ').join('')) : ''; - const artifactName = `${{ matrix.board }}${shieldArgs.shield ? '-' + shieldArgs.shield : ''}${cmakeName}-zmk`; + const artifactName = `${{ matrix.board }}${shieldArgs.shield ? '-' + shieldArgs.shield : ''}${cmakeName}-zmk`.replaceAll('/', '_'); await artifact.uploadArtifact(artifactName, files, rootDirectory, options); } catch (e) { @@ -146,7 +146,7 @@ jobs: include-list: ${{ steps.compile-list.outputs.result }} steps: - name: Join build lists - uses: actions/github-script@v7 + uses: actions/github-script@v9 id: compile-list with: script: | @@ -187,16 +187,16 @@ jobs: core-include: ${{ steps.core-list.outputs.result }} steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v7 with: persist-credentials: false - name: Use Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: node-version: "14.x" - name: Install js-yaml run: npm install js-yaml - - uses: actions/github-script@v7 + - uses: actions/github-script@v9 id: core-list with: script: | @@ -218,14 +218,14 @@ jobs: boards-include: ${{ steps.boards-list.outputs.result }} steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v7 - name: Use Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: node-version: "14.x" - name: Install js-yaml run: npm install js-yaml - - uses: actions/github-script@v7 + - uses: actions/github-script@v9 id: boards-list with: script: | @@ -277,6 +277,7 @@ jobs: ); } else { console.error("Board without keys or interconnect"); + return []; } break; case "shield": @@ -302,7 +303,7 @@ jobs: nightly-include: ${{ steps.nightly-list.outputs.result }} steps: - name: Create nightly list - uses: actions/github-script@v7 + uses: actions/github-script@v9 id: nightly-list with: script: | @@ -345,17 +346,17 @@ jobs: organized-metadata: ${{ steps.organize-metadata.outputs.result }} steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v7 with: persist-credentials: false - name: Use Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: node-version: "14.x" - name: Install js-yaml run: npm install js-yaml - name: Aggregate Metadata - uses: actions/github-script@v7 + uses: actions/github-script@v9 id: aggregate-metadata with: script: | @@ -373,7 +374,7 @@ jobs: result-encoding: string - name: Organize Metadata - uses: actions/github-script@v7 + uses: actions/github-script@v9 id: organize-metadata with: script: | @@ -427,15 +428,15 @@ jobs: core-changes: ${{ steps.core-changes.outputs.result }} steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v7 with: persist-credentials: false - - uses: tj-actions/changed-files@v45 + - uses: tj-actions/changed-files@9200e69727eb73eb060652b19946b8a2fdfb654b # pin to v45.0.8 due to https://github.com/tj-actions/changed-files/issues/2463 https://www.stepsecurity.io/blog/harden-runner-detection-tj-actions-changed-files-action-is-compromised id: changed-files with: json: true escape_json: false - - uses: actions/github-script@v7 + - uses: actions/github-script@v9 id: board-changes with: script: | @@ -443,7 +444,7 @@ jobs: const boardChanges = changedFiles.filter(f => f.startsWith('app/boards')); return boardChanges.length ? 'true' : 'false'; result-encoding: string - - uses: actions/github-script@v7 + - uses: actions/github-script@v9 id: core-changes with: script: | diff --git a/.github/workflows/doc-checks.yml b/.github/workflows/doc-checks.yml index 5885865f..a562ed39 100644 --- a/.github/workflows/doc-checks.yml +++ b/.github/workflows/doc-checks.yml @@ -14,7 +14,7 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - uses: bahmutov/npm-install@v1 with: working-directory: docs @@ -24,7 +24,7 @@ jobs: typecheck: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - uses: bahmutov/npm-install@v1 with: working-directory: docs diff --git a/.github/workflows/hardware-metadata-validation.yml b/.github/workflows/hardware-metadata-validation.yml index 3e3faa0d..406a1e63 100644 --- a/.github/workflows/hardware-metadata-validation.yml +++ b/.github/workflows/hardware-metadata-validation.yml @@ -18,9 +18,9 @@ jobs: validate-metadata: runs-on: ubuntu-latest container: - image: docker.io/zmkfirmware/zmk-dev-arm:3.5 + image: docker.io/zmkfirmware/zmk-dev-arm:4.1 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - name: Install dependencies run: pip install --break-system-packages -r app/scripts/requirements.txt - name: West init diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index cc9672f4..52b82a62 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -8,8 +8,8 @@ jobs: pre-commit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - uses: actions/checkout@v7 + - uses: actions/setup-python@v6 with: python-version: 3.x - uses: pre-commit/action@v3.0.1 diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml new file mode 100644 index 00000000..5735eea7 --- /dev/null +++ b/.github/workflows/release-please.yml @@ -0,0 +1,80 @@ +on: + push: + branches: + - main + - "v*.*-branch" + +permissions: + contents: write + pull-requests: write + +name: release-please + +jobs: + handle-commit: + name: Handle new commit + runs-on: ubuntu-latest + outputs: + release_created: ${{ steps.release.outputs.release_created }} + major: ${{ steps.release.outputs.major }} + minor: ${{ steps.release.outputs.minor }} + patch: ${{ steps.release.outputs.patch }} + steps: + - uses: googleapis/release-please-action@v5 + id: release + with: + token: ${{ secrets.ZMK_RELEASE_PLEASE_TOKEN }} + target-branch: ${{ github.ref_name }} + + release-new-version: + name: Release new version + needs: handle-commit + runs-on: ubuntu-latest + if: ${{ needs.handle-commit.outputs.release_created }} + env: + ZMK_RELEASE_PLEASE_TOKEN: ${{ secrets.ZMK_RELEASE_PLEASE_TOKEN }} + VERSION: v${{ needs.handle-commit.outputs.major }}.${{ needs.handle-commit.outputs.minor }} + steps: + - uses: actions/checkout@v7 + + - name: Create major.minor branch + if: ${{ needs.handle-commit.outputs.patch == '0' }} + run: | + git remote add gh-token-branch "https://x-access-token:$ZMK_RELEASE_PLEASE_TOKEN@github.com/${{ github.repository }}.git" + git checkout -b $VERSION-branch + git push gh-token-branch $VERSION-branch + + - name: tag major and minor versions + run: | + git config user.name github-actions[bot] + git config user.email 41898282+github-actions[bot]@users.noreply.github.com + git remote add gh-token "https://x-access-token:$ZMK_RELEASE_PLEASE_TOKEN@github.com/${{ github.repository }}.git" + git tag -d $VERSION || true + git tag -a $VERSION -m "Release $VERSION" + git push --force gh-token $VERSION + + bump-user-config-template-version: + name: Bump user config template version + needs: handle-commit + runs-on: ubuntu-latest + if: ${{ needs.handle-commit.outputs.release_created }} + env: + ZMK_RELEASE_PLEASE_TOKEN: ${{ secrets.ZMK_RELEASE_PLEASE_TOKEN }} + VERSION: v${{ needs.handle-commit.outputs.major }}.${{ needs.handle-commit.outputs.minor }} + steps: + - name: Bump user config template + run: | + if [ -z "$VERSION" ]; then + echo "VERSION is not set, exiting." + exit 1 + fi + + git clone "https://x-access-token:$ZMK_RELEASE_PLEASE_TOKEN@github.com/zmkfirmware/unified-zmk-config-template.git" + cd unified-zmk-config-template + git config user.name github-actions[bot] + git config user.email 41898282+github-actions[bot]@users.noreply.github.com + sed -i 's/^\(\s*\)revision: .*/\1revision: '"$VERSION"'/' config/west.yml + sed -i 's|uses: zmkfirmware/zmk/.github/workflows/build-user-config.yml@.*|uses: zmkfirmware/zmk/.github/workflows/build-user-config.yml@'"$VERSION"'|' .github/workflows/build.yml + git add . + git commit -m "Version bump to $VERSION" + git push origin main diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 00000000..475a37db --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,28 @@ +name: "Mark and close stale PRs in the repo" +on: + schedule: + - cron: "00 14 * * *" # runs daily at 14:00 https://crontab.guru/#00_14_*_*_* + +jobs: + stale: + runs-on: ubuntu-24.04 + steps: + - uses: actions/stale@v10.3.0 + with: + days-before-pr-stale: 300 # ~10 months + stale-pr-label: "stale" + stale-pr-message: > + This PR has been automatically marked as stale because it has not + had activity in 10 months. It will be closed in 14 days if no + further activity occurs. Feel free to give a status update or + re-open when it has been rebased and is ready for review (again). + Thanks! + days-before-pr-close: 14 + close-pr-message: > + This PR was closed because it had no activity for over 10 months. + Feel free to give a status update or re-open when it has been + rebased and is ready for review (again). + days-before-issue-stale: 1000 # ~3 years + days-before-issue-close: -1 + ascending: true # Process older PRs first + operations-per-run: 30 # Default value, listed here again to make it explicit diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0df1f0c6..20bebf3b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,12 +4,14 @@ on: push: paths: - ".github/workflows/test.yml" + - "app/run-test.sh" - "app/tests/**" - "app/src/**" - "app/include/**" pull_request: paths: - ".github/workflows/test.yml" + - "app/run-test.sh" - "app/tests/**" - "app/src/**" - "app/include/**" @@ -21,7 +23,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v7 - name: Find test directories id: test-dirs run: | @@ -35,12 +37,12 @@ jobs: test: ${{ fromJSON(needs.collect-tests.outputs.test-dirs) }} runs-on: ubuntu-latest container: - image: docker.io/zmkfirmware/zmk-build-arm:3.5 + image: docker.io/zmkfirmware/zmk-build-arm:4.1 steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v7 - name: Cache west modules - uses: actions/cache@v4 + uses: actions/cache@v5 env: cache-name: cache-zephyr-modules with: @@ -59,15 +61,15 @@ jobs: - name: Initialize workspace (west init) run: west init -l app - name: Update modules (west update) - run: west update + run: west update --fetch-opt=--filter=tree:0 - name: Export Zephyr CMake package (west zephyr-export) run: west zephyr-export - name: Test ${{ matrix.test }} working-directory: app - run: west test tests/${{ matrix.test }} + run: ZMK_TESTS_VERBOSE=1 west test tests/${{ matrix.test }} - name: Archive artifacts if: ${{ always() }} - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: "${{ matrix.test }}-log-files" path: app/build/**/*.log diff --git a/.gitignore b/.gitignore index 1ef282a9..50b8f687 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ /.west /bootloader /modules +/optional /tools /zephyr /zmk-config diff --git a/.gitlint b/.gitlint new file mode 100644 index 00000000..f5ed1479 --- /dev/null +++ b/.gitlint @@ -0,0 +1,138 @@ +# Edit this file as you like. +# +# All these sections are optional. Each section with the exception of [general] represents +# one rule and each key in it is an option for that specific rule. +# +# Rules and sections can be referenced by their full name or by id. For example +# section "[body-max-line-length]" could also be written as "[B1]". Full section names are +# used in here for clarity. +# +[general] +# Ignore certain rules, this example uses both full name and id +# ignore=title-trailing-punctuation, T3 + +# verbosity should be a value between 1 and 3, the commandline -v flags take precedence over this +# verbosity = 2 + +# By default gitlint will ignore merge, revert, fixup, fixup=amend, and squash commits. +# ignore-merge-commits=true +# ignore-revert-commits=true +# ignore-fixup-commits=true +# ignore-fixup-amend-commits=true +# ignore-squash-commits=true + +# Ignore any data sent to gitlint via stdin +# ignore-stdin=true + +# Fetch additional meta-data from the local repository when manually passing a +# commit message to gitlint via stdin or --commit-msg. Disabled by default. +# staged=true + +# Hard fail when the target commit range is empty. Note that gitlint will +# already fail by default on invalid commit ranges. This option is specifically +# to tell gitlint to fail on *valid but empty* commit ranges. +# Disabled by default. +# fail-without-commits=true + +# Whether to use Python `search` instead of `match` semantics in rules that use +# regexes. Context: https://github.com/jorisroovers/gitlint/issues/254 +# Disabled by default, but will be enabled by default in the future. +# regex-style-search=true + +# Enable debug mode (prints more output). Disabled by default. +# debug=true + +# Enable community contributed rules +# See http://jorisroovers.github.io/gitlint/contrib_rules for details +contrib=contrib-title-conventional-commits,CT1,contrib-disallow-cleanup-commits,CC2 + +# Set the extra-path where gitlint will search for user defined rules +# See http://jorisroovers.github.io/gitlint/user_defined_rules for details +# extra-path=examples/ + +[title-max-length] +line-length=80 + +# Conversely, you can also enforce minimal length of a title with the +# "title-min-length" rule: +# [title-min-length] +# min-length=5 + +# [title-must-not-contain-word] +# Comma-separated list of words that should not occur in the title. Matching is case +# insensitive. It's fine if the keyword occurs as part of a larger word (so "WIPING" +# will not cause a violation, but "WIP: my title" will. +# words=wip + +# [title-match-regex] +# python-style regex that the commit-msg title must match +# Note that the regex can contradict with other rules if not used correctly +# (e.g. title-must-not-contain-word). +# regex=^US[0-9]* + +# [body-max-line-length] +# line-length=72 + +# [body-min-length] +# min-length=5 + +# [body-is-missing] +# Whether to ignore this rule on merge commits (which typically only have a title) +# default = True +# ignore-merge-commits=false + +# [body-changed-file-mention] +# List of files that need to be explicitly mentioned in the body when they are changed +# This is useful for when developers often erroneously edit certain files or git submodules. +# By specifying this rule, developers can only change the file when they explicitly reference +# it in the commit message. +# files=gitlint-core/gitlint/rules.py,README.md + +# [body-match-regex] +# python-style regex that the commit-msg body must match. +# E.g. body must end in My-Commit-Tag: foo +# regex=My-Commit-Tag: foo$ + +# [author-valid-email] +# python-style regex that the commit author email address must match. +# For example, use the following regex if you only want to allow email addresses from foo.com +# regex=[^@]+@foo.com + +# [ignore-by-title] +# Ignore certain rules for commits of which the title matches a regex +# E.g. Match commit titles that start with "Release" +# regex=^Release(.*) + +# Ignore certain rules, you can reference them by their id or by their full name +# Use 'all' to ignore all rules +# ignore=T1,body-min-length + +# [ignore-by-body] +# Ignore certain rules for commits of which the body has a line that matches a regex +# E.g. Match bodies that have a line that that contain "release" +# regex=(.*)release(.*) +# +# Ignore certain rules, you can reference them by their id or by their full name +# Use 'all' to ignore all rules +# ignore=T1,body-min-length + +# [ignore-body-lines] +# Ignore certain lines in a commit body that match a regex. +# E.g. Ignore all lines that start with 'Co-Authored-By' +# regex=^Co-Authored-By + +# [ignore-by-author-name] +# Ignore certain rules for commits of which the author name matches a regex +# E.g. Match commits made by dependabot +# regex=(.*)dependabot(.*) +# +# Ignore certain rules, you can reference them by their id or by their full name +# Use 'all' to ignore all rules +# ignore=T1,body-min-length + +# This is a contrib rule - a community contributed rule. These are disabled by default. +# You need to explicitly enable them one-by-one by adding them to the "contrib" option +# under [general] section above. +# [contrib-title-conventional-commits] +# Specify allowed commit types. For details see: https://www.conventionalcommits.org/ +# types = bugfix,user-story,epic diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e0666ea8..f5a93ba8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,20 +4,28 @@ repos: rev: v1.5.1 hooks: - id: remove-tabs - exclude: "vendor-prefixes\\.txt$" - - repo: https://github.com/pocc/pre-commit-hooks - rev: v1.3.5 + exclude: "vendor-prefixes\\.txt$|.git/COMMIT_EDITMSG" + - repo: https://github.com/pre-commit/mirrors-clang-format + rev: v18.1.8 hooks: - id: clang-format + types_or: [c++, c] args: - -i - - repo: https://github.com/pre-commit/mirrors-prettier - rev: v2.7.1 + - repo: https://github.com/rbubley/mirrors-prettier + rev: 787fb9f542b140ba0b2aced38e6a3e68021647a3 hooks: - id: prettier - # Workaround for https://github.com/pre-commit/mirrors-prettier/issues/29 - additional_dependencies: - - prettier@2.8.7 + exclude: | + (?x)^( + .git/COMMIT_EDITMSG| + CHANGELOG.md| + .release-please-manifest.json + )$ + - repo: https://github.com/jorisroovers/gitlint + rev: v0.19.1 + hooks: + - id: gitlint - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.4.0 hooks: diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 00000000..1c861e15 --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1 @@ +{".":"0.3.0"} diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 7a1eac2a..8f93d216 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,6 +1,7 @@ { "recommendations": [ "esbenp.prettier-vscode", + "ms-python.black-formatter", "ms-python.python", "ms-vscode.cpptools", "plorefice.devicetree", diff --git a/.vscode/settings.json b/.vscode/settings.json index 924d83b1..83fb7ae3 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -3,7 +3,7 @@ "*.overlay": "dts", "*.keymap": "dts" }, - "python.formatting.provider": "black", + "python.analysis.include": ["app/scripts", "zephyr/scripts"], "[c]": { "editor.formatOnSave": true }, @@ -13,7 +13,7 @@ }, "[python]": { "editor.formatOnSave": true, - "editor.defaultFormatter": "ms-python.python" + "editor.defaultFormatter": "ms-python.black-formatter" }, "[css][json][jsonc][html][markdown][yaml]": { "editor.formatOnSave": true, diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..9e6c9ade --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,116 @@ +# Changelog + +## [0.3.0](https://github.com/zmkfirmware/zmk/compare/v0.2.1...v0.3.0) (2025-08-01) + + +### Features + +* **ble:** Add function to get profile address by index ([#2992](https://github.com/zmkfirmware/zmk/issues/2992)) ([9e905d6](https://github.com/zmkfirmware/zmk/commit/9e905d65936348824588dc3f424755353ac61186)) +* **ci:** Add stale GitHub Action to automatically close stale PRs ([#2924](https://github.com/zmkfirmware/zmk/issues/2924)) ([6d7bbc8](https://github.com/zmkfirmware/zmk/commit/6d7bbc8670d175fd63e8c834feb41f80e7b52e74)) +* **display:** nice!view individual profile status ([#2265](https://github.com/zmkfirmware/zmk/issues/2265)) ([d09087f](https://github.com/zmkfirmware/zmk/commit/d09087f4dc280b8fdb1d32d63b03cc10162b89ce)) +* Full-Duplex Wired Split ([#2766](https://github.com/zmkfirmware/zmk/issues/2766)) ([147c340](https://github.com/zmkfirmware/zmk/commit/147c340c6e8d377304acfdd64dc86cf83ebdfef2)) +* **metadata:** Add metadata to the mouse_key_press behavior ([#2950](https://github.com/zmkfirmware/zmk/issues/2950)) ([239baa4](https://github.com/zmkfirmware/zmk/commit/239baa487509ace108d36f0e5c627d61a3d95f53)) +* **pointing:** Allow peripheral input processing to stop propagation ([#2844](https://github.com/zmkfirmware/zmk/issues/2844)) ([462d48b](https://github.com/zmkfirmware/zmk/commit/462d48b78edac8bedb75666699ea4fa446d2152c)) +* **shield:** Add underglow for reviung5 ([#2191](https://github.com/zmkfirmware/zmk/issues/2191)) ([ad6a181](https://github.com/zmkfirmware/zmk/commit/ad6a181d7ec34fb6e31134f6bb991a9b2d0b8f78)) +* **shields:** Add a physical layout for a_dux ([#3000](https://github.com/zmkfirmware/zmk/issues/3000)) ([7292df0](https://github.com/zmkfirmware/zmk/commit/7292df02d4b05d783f432f8658de22d940909fe4)) +* **shields:** Add physical layouts for tester_xiao and tester_pro_micro ([#2852](https://github.com/zmkfirmware/zmk/issues/2852)) ([eb170c9](https://github.com/zmkfirmware/zmk/commit/eb170c930f56e3fb3df0b813d987abfd1dc31b9a)) +* **shields:** Add tester_pro_micro layouts ([eb170c9](https://github.com/zmkfirmware/zmk/commit/eb170c930f56e3fb3df0b813d987abfd1dc31b9a)) +* **shields:** Add tester_xiao layouts ([eb170c9](https://github.com/zmkfirmware/zmk/commit/eb170c930f56e3fb3df0b813d987abfd1dc31b9a)) +* **split:** Add full-duplex wired split support ([147c340](https://github.com/zmkfirmware/zmk/commit/147c340c6e8d377304acfdd64dc86cf83ebdfef2)) +* **split:** Runtime selection of split transport ([6b44d33](https://github.com/zmkfirmware/zmk/commit/6b44d33db2f4bad7d98e475e6f7968493b05af73)) +* **split:** Runtime selection of split transport ([#2886](https://github.com/zmkfirmware/zmk/issues/2886)) ([6b44d33](https://github.com/zmkfirmware/zmk/commit/6b44d33db2f4bad7d98e475e6f7968493b05af73)) +* **split:** Suspend/resume wired UART devices. ([6b44d33](https://github.com/zmkfirmware/zmk/commit/6b44d33db2f4bad7d98e475e6f7968493b05af73)) + + +### Bug Fixes + +* **behaviors:** Correct macro release state for parametrized ([1bac680](https://github.com/zmkfirmware/zmk/commit/1bac680c4fb4f07e43c01754b6f1e72dab455e50)) +* **behaviors:** Correct macro release state for parametrized macros ([#2942](https://github.com/zmkfirmware/zmk/issues/2942)) ([1bac680](https://github.com/zmkfirmware/zmk/commit/1bac680c4fb4f07e43c01754b6f1e72dab455e50)) +* **ble,hid:** Fix smooth scrolling over BLE ([#2998](https://github.com/zmkfirmware/zmk/issues/2998)) ([342d838](https://github.com/zmkfirmware/zmk/commit/342d83891301b1be53233a12c7723bb99cbe5ff6)), closes [#2957](https://github.com/zmkfirmware/zmk/issues/2957) +* **boards:** Disable high voltage DC-DC by default ([#2995](https://github.com/zmkfirmware/zmk/issues/2995)) ([8059e67](https://github.com/zmkfirmware/zmk/commit/8059e671b24a261939401afb5a65c4fa756adc2d)), closes [#2990](https://github.com/zmkfirmware/zmk/issues/2990) +* changed shebang to make scripts more platform independent ([#2893](https://github.com/zmkfirmware/zmk/issues/2893)) ([84772eb](https://github.com/zmkfirmware/zmk/commit/84772ebf14e5a7c67ba573a61f0a50048802c799)) +* **ci:** pin tj-actions/changed-files due to compromise ([#2874](https://github.com/zmkfirmware/zmk/issues/2874)) ([4da89bd](https://github.com/zmkfirmware/zmk/commit/4da89bd99716bf6c1d7d788f3cdaec4cee7403e9)) +* **combos:** Properly clean up all old candidates. ([#2928](https://github.com/zmkfirmware/zmk/issues/2928)) ([e3030bf](https://github.com/zmkfirmware/zmk/commit/e3030bfcc87b7f511b0ebe993fb1f1f06215982e)) +* **combos:** Restore prompts for two deprecated Kconfigs ([#2926](https://github.com/zmkfirmware/zmk/issues/2926)) ([00ff486](https://github.com/zmkfirmware/zmk/commit/00ff48693113ed74a3345aa1ac81fdea302b3a09)) +* **core:** Correctly sync BAS battery level ([#2977](https://github.com/zmkfirmware/zmk/issues/2977)) ([af96766](https://github.com/zmkfirmware/zmk/commit/af967667b0e139a963178e63028c7be341cade9e)) +* **display:** Make stock battery widget depend on the right symbol ([#2953](https://github.com/zmkfirmware/zmk/issues/2953)) ([9da5d3b](https://github.com/zmkfirmware/zmk/commit/9da5d3ba82b38b74ad798a82a838d84c52220bbe)) +* **docs:** Fix soft off waker configuration example ([#2960](https://github.com/zmkfirmware/zmk/issues/2960)) ([eb99b4e](https://github.com/zmkfirmware/zmk/commit/eb99b4ede06bc01674ce16217ebbad40bc11ec50)) +* **docs:** remove title as alt text ([#2922](https://github.com/zmkfirmware/zmk/issues/2922)) ([d9576c5](https://github.com/zmkfirmware/zmk/commit/d9576c55346acfc8eed36709aaae28f91e0d06ad)) +* Fix build with Studio and USB but not UART ([#2996](https://github.com/zmkfirmware/zmk/issues/2996)) ([cef7af4](https://github.com/zmkfirmware/zmk/commit/cef7af4408cc44c20fab93a0b2e20b3429d0a98e)) +* **hid:** Fix scroll value truncation ([#2865](https://github.com/zmkfirmware/zmk/issues/2865)) ([2c0e7da](https://github.com/zmkfirmware/zmk/commit/2c0e7daced1421c34a9d417b7d3e9bccbf0ebd7f)), closes [#2864](https://github.com/zmkfirmware/zmk/issues/2864) +* **pointing:** Avoids mutex leak for default layer toggle event ([#2934](https://github.com/zmkfirmware/zmk/issues/2934)) ([461f5c8](https://github.com/zmkfirmware/zmk/commit/461f5c832fb8854d87dca54d113d306323697219)) +* Properly override stack size on RP2040 ([147c340](https://github.com/zmkfirmware/zmk/commit/147c340c6e8d377304acfdd64dc86cf83ebdfef2)) +* **split:** add source to battery event ([#2901](https://github.com/zmkfirmware/zmk/issues/2901)) ([6f85f48](https://github.com/zmkfirmware/zmk/commit/6f85f48b19afae04f98e9abacb36ce1425b61f78)) +* **split:** Compile and run properly in wired polling mode. ([#3012](https://github.com/zmkfirmware/zmk/issues/3012)) ([2ae5185](https://github.com/zmkfirmware/zmk/commit/2ae51854192aed92af95536f79547e2928cd1bf5)) +* **split:** Conditionally build all split code ([#2884](https://github.com/zmkfirmware/zmk/issues/2884)) ([5bb39ec](https://github.com/zmkfirmware/zmk/commit/5bb39ec3eae23055593350cb3689a8240028181e)) +* **split:** Enable wired split by default if DTS is set ([#3010](https://github.com/zmkfirmware/zmk/issues/3010)) ([1530ae3](https://github.com/zmkfirmware/zmk/commit/1530ae36c22e3e2285e895737c74de5d960a5ae4)) +* **split:** Minor wired split fixes. ([6b44d33](https://github.com/zmkfirmware/zmk/commit/6b44d33db2f4bad7d98e475e6f7968493b05af73)) +* Unconditionally define HID payloads to avoid error. ([6b44d33](https://github.com/zmkfirmware/zmk/commit/6b44d33db2f4bad7d98e475e6f7968493b05af73)) + +## [0.2.1](https://github.com/zmkfirmware/zmk/compare/v0.2.0...v0.2.1) (2025-03-02) + + +### Bug Fixes + +* **behaviors:** Proper comma separated device list ([#2850](https://github.com/zmkfirmware/zmk/issues/2850)) ([f20e6ea](https://github.com/zmkfirmware/zmk/commit/f20e6ea7594b49eef1e3acc017529073a0409962)) + +## [0.2.0](https://github.com/zmkfirmware/zmk/compare/v0.1.0...v0.2.0) (2025-03-01) + + +### Features + +* Added `toggle-mode`, allowing toggle-on and toggle-off ([#2555](https://github.com/zmkfirmware/zmk/issues/2555)) ([4ef231f](https://github.com/zmkfirmware/zmk/commit/4ef231f4bba87151acfbd1cf3babd83b69813e45)) +* added toggle mode to key and layer toggles ([4ef231f](https://github.com/zmkfirmware/zmk/commit/4ef231f4bba87151acfbd1cf3babd83b69813e45)) +* **boards:** Update for mikoto board definition ([#1946](https://github.com/zmkfirmware/zmk/issues/1946)) ([b26058b](https://github.com/zmkfirmware/zmk/commit/b26058b6c7c83f8d1f095d2f9c6c3998b391a61b)) +* **core:** Make physical layout key rotation optional ([#2770](https://github.com/zmkfirmware/zmk/issues/2770)) ([c367d8f](https://github.com/zmkfirmware/zmk/commit/c367d8f636f0842b414c2b58df6101761cdd676d)) +* **display:** Add ability to set display on/off pin. ([#2814](https://github.com/zmkfirmware/zmk/issues/2814)) ([627e6db](https://github.com/zmkfirmware/zmk/commit/627e6dbec99211b3d7cce55904fb1c824ed87bf3)) +* **display:** Add config for display update period ([#2819](https://github.com/zmkfirmware/zmk/issues/2819)) ([aa3e5dd](https://github.com/zmkfirmware/zmk/commit/aa3e5dd70fdd1b364fa9ad26f14425be613d180c)) +* input processor behavior invocation ([#2714](https://github.com/zmkfirmware/zmk/issues/2714)) ([cb867f9](https://github.com/zmkfirmware/zmk/commit/cb867f92dbe4e32675c2137fc6aa914a44ecc8dc)) +* **Kconfig:** Allow overriding ZMK Kconfig defaults ([#2537](https://github.com/zmkfirmware/zmk/issues/2537)) ([40925d4](https://github.com/zmkfirmware/zmk/commit/40925d48e67b3eeaeb3e848a2287ed628de9f674)) +* **mouse:** Add mouse move and scroll support ([#2477](https://github.com/zmkfirmware/zmk/issues/2477)) ([6b40bfd](https://github.com/zmkfirmware/zmk/commit/6b40bfda53571f7a960ccc448aa87f29da7496ac)) +* **pointing:** Add behavior input processor ([cb867f9](https://github.com/zmkfirmware/zmk/commit/cb867f92dbe4e32675c2137fc6aa914a44ecc8dc)) +* **pointing:** Add pre-defined scroll scaler ([0f7c112](https://github.com/zmkfirmware/zmk/commit/0f7c11248a1ddb7c6559064c2a1e7a3c446d5d55)) +* **pointing:** Add pre-defined scroll scaler and mouse scroll tests ([#2759](https://github.com/zmkfirmware/zmk/issues/2759)) ([0f7c112](https://github.com/zmkfirmware/zmk/commit/0f7c11248a1ddb7c6559064c2a1e7a3c446d5d55)) +* **shields:** Add physical layout for Lotus58 ([#2753](https://github.com/zmkfirmware/zmk/issues/2753)) ([424e532](https://github.com/zmkfirmware/zmk/commit/424e53210ea16c2287abaf770ebf45be432d841a)) +* **studio:** Add ortho_4x10 grid layout ([#2651](https://github.com/zmkfirmware/zmk/issues/2651)) ([7e8c542](https://github.com/zmkfirmware/zmk/commit/7e8c542c94908ac011ec7272a5f8ab10d2102632)) + + +### Bug Fixes + +* allow kscan-composite to wake up device. ([#2682](https://github.com/zmkfirmware/zmk/issues/2682)) ([a8f5ab6](https://github.com/zmkfirmware/zmk/commit/a8f5ab67b5d449a2624e2de7ddfb264da778ea6c)) +* **behaviors:** Make multiple sticky keys work on same key position ([7186528](https://github.com/zmkfirmware/zmk/commit/7186528f77bf077173927c1c8506b4d434e5c371)) +* **behaviors:** Make multiple sticky keys work on same key position ([#2758](https://github.com/zmkfirmware/zmk/issues/2758)) ([7186528](https://github.com/zmkfirmware/zmk/commit/7186528f77bf077173927c1c8506b4d434e5c371)) +* **ble:** enforce maximum length for dynamic device name ([#2784](https://github.com/zmkfirmware/zmk/issues/2784)) ([ea267b0](https://github.com/zmkfirmware/zmk/commit/ea267b0f35f862b882ac568dde6365c3a0c85099)) +* **combos:** Properly report combos len with emply block ([#2739](https://github.com/zmkfirmware/zmk/issues/2739)) ([f0a77b8](https://github.com/zmkfirmware/zmk/commit/f0a77b888ac482a863386ced08e04660ddacb026)) +* **display:** Only default mono theme when 1bpp ([#2804](https://github.com/zmkfirmware/zmk/issues/2804)) ([425256b](https://github.com/zmkfirmware/zmk/commit/425256bc0de7ed08802533b170abba78ee90f546)) +* **display:** POSIX lvgl fixes ([#2812](https://github.com/zmkfirmware/zmk/issues/2812)) ([4b4a8a3](https://github.com/zmkfirmware/zmk/commit/4b4a8a35f3f90f1af75cdf5d9c26b47d4b8dcabb)) +* **drivers:** Proper static/const for data/config ([#2769](https://github.com/zmkfirmware/zmk/issues/2769)) ([6941abc](https://github.com/zmkfirmware/zmk/commit/6941abc2afab16502cff9c5149d8dc0fcd5112c9)) +* Fix warnings in nanopb encoding code ([#2643](https://github.com/zmkfirmware/zmk/issues/2643)) ([7013158](https://github.com/zmkfirmware/zmk/commit/7013158a6715d94b34e8c471ce25bb5005f3bb49)) +* Kconfig refactor now works correctly with external modules ([#2711](https://github.com/zmkfirmware/zmk/issues/2711)) ([bb48661](https://github.com/zmkfirmware/zmk/commit/bb486619a183f6df7fbb4620c80164555a22da0b)) +* **Kconfig:** Added a name to EC11's trigger mode choice ([40925d4](https://github.com/zmkfirmware/zmk/commit/40925d48e67b3eeaeb3e848a2287ed628de9f674)) +* **kscan:** Remove warning when keyboard is built without CONFIG_PM_DEVICE ([#2808](https://github.com/zmkfirmware/zmk/issues/2808)) ([8e065d5](https://github.com/zmkfirmware/zmk/commit/8e065d55b916481ef06ce37cddedb84cf1d15d99)) +* **pointing:** Complete header rename missed in refactor ([#2702](https://github.com/zmkfirmware/zmk/issues/2702)) ([84baf92](https://github.com/zmkfirmware/zmk/commit/84baf929c9bb95f255d4bafd0e57f2ec47455fca)) +* **pointing:** Temp layer threading protection. ([#2729](https://github.com/zmkfirmware/zmk/issues/2729)) ([1e3e62c](https://github.com/zmkfirmware/zmk/commit/1e3e62c13d0666d98831ee302ae2fb17e68196c9)) +* **studio:** Allow adding layers after a layer move ([#2748](https://github.com/zmkfirmware/zmk/issues/2748)) ([36508c2](https://github.com/zmkfirmware/zmk/commit/36508c27fddfb84d912e0122e313ad3904ceb946)) +* **studio:** Properly return complete keymap from RPC ([#2696](https://github.com/zmkfirmware/zmk/issues/2696)) ([0820991](https://github.com/zmkfirmware/zmk/commit/0820991901a95ab7a0eb1f1cc608a631d514e26c)) + +## 0.1.0 (2024-11-29) + + +### Features + +* **boards:** Add glove80 nexus node for extension GPIO. ([#2594](https://github.com/zmkfirmware/zmk/issues/2594)) ([fb359f5](https://github.com/zmkfirmware/zmk/commit/fb359f576619940164ca2e770b49b7b34f13428e)) +* **boards:** add nrf52833-nosd snippet ([63af296](https://github.com/zmkfirmware/zmk/commit/63af296b6efd8d677d584f372c9da9a4fedaa496)) +* **boards:** add nrf52840-nosd snippet ([4438b7b](https://github.com/zmkfirmware/zmk/commit/4438b7b835bfd1d4e89cdd955a4ab0fd2e2ae3bf)) +* **ci:** Add release-please automation with VERSION ([#2622](https://github.com/zmkfirmware/zmk/issues/2622)) ([ffa485c](https://github.com/zmkfirmware/zmk/commit/ffa485c11b48444acf3adf1e3c1cb3eed16fad94)) +* **drivers:** Support init high/low in 595 driver ([888c0d9](https://github.com/zmkfirmware/zmk/commit/888c0d966cd52f3ab5145992f61b14d6262c1951)) + + +### Bug Fixes + +* **boards:** Disable uart serial node in Xiao BLE by default ([#2672](https://github.com/zmkfirmware/zmk/issues/2672)) ([230b860](https://github.com/zmkfirmware/zmk/commit/230b860f31063774c3bcc19afb6f92479462de24)) +* **boards:** Fix typo in BT75 metadata ([c9553c3](https://github.com/zmkfirmware/zmk/commit/c9553c31e3a3f39964391b006492995b5bb09c39)) +* Disable display feature for settings_reset ([b0f5789](https://github.com/zmkfirmware/zmk/commit/b0f5789b128f0f5599341398898fdb0e0407b2d3)) +* Fix inconsistent column offset property ([c7473fc](https://github.com/zmkfirmware/zmk/commit/c7473fc32557d2d384ab78d3acf51a05488f0214)) +* include a header file for RC macros ([#2649](https://github.com/zmkfirmware/zmk/issues/2649)) ([f8eff2f](https://github.com/zmkfirmware/zmk/commit/f8eff2fe34609c91211c25113f9d7db09f7d1689)) +* **studio:** Improved error message when keyboard is missing a physical layout. ([fed66a9](https://github.com/zmkfirmware/zmk/commit/fed66a92d000f4c8e0019d9ccdd167271324e8e9)) diff --git a/app/.prettierrc.js b/app/.prettierrc.js index 2a1f0b48..2a60b0bd 100644 --- a/app/.prettierrc.js +++ b/app/.prettierrc.js @@ -1,3 +1,4 @@ module.exports = { endOfLine: "auto", + trailingComma: "es5", }; diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index fd4b7ab5..c41153cb 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) set(CONFIG_APPLICATION_DEFINED_SYSCALL true) +set(ZEPHYR_BOARD_ALIASES "boards/aliases.cmake") set(ZEPHYR_EXTRA_MODULES "${ZMK_EXTRA_MODULES};${CMAKE_CURRENT_SOURCE_DIR}/module;${CMAKE_CURRENT_SOURCE_DIR}/keymap-module") # Find Zephyr. This also loads Zephyr's build system. @@ -16,11 +17,13 @@ if(CONFIG_ZMK_BEHAVIOR_LOCAL_IDS) endif() zephyr_syscall_header(${APPLICATION_SOURCE_DIR}/include/drivers/behavior.h) +zephyr_syscall_header(${APPLICATION_SOURCE_DIR}/include/drivers/input_processor.h) zephyr_syscall_header(${APPLICATION_SOURCE_DIR}/include/drivers/ext_power.h) # Add your source file to the "app" target. This must come after # find_package(Zephyr) which defines the target. target_include_directories(app PRIVATE include) +add_subdirectory(src/boot) target_sources(app PRIVATE src/stdlib.c) target_sources(app PRIVATE src/activity.c) target_sources(app PRIVATE src/behavior.c) @@ -36,15 +39,14 @@ target_sources_ifdef(CONFIG_ZMK_GPIO_KEY_WAKEUP_TRIGGER app PRIVATE src/gpio_key target_sources(app PRIVATE src/events/activity_state_changed.c) target_sources(app PRIVATE src/events/position_state_changed.c) target_sources(app PRIVATE src/events/sensor_event.c) -target_sources(app PRIVATE src/events/mouse_button_state_changed.c) target_sources_ifdef(CONFIG_ZMK_WPM app PRIVATE src/events/wpm_state_changed.c) target_sources_ifdef(CONFIG_USB_DEVICE_STACK app PRIVATE src/events/usb_conn_state_changed.c) target_sources(app PRIVATE src/behaviors/behavior_reset.c) target_sources_ifdef(CONFIG_ZMK_EXT_POWER app PRIVATE src/behaviors/behavior_ext_power.c) target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_SOFT_OFF app PRIVATE src/behaviors/behavior_soft_off.c) +add_subdirectory_ifdef(CONFIG_ZMK_POINTING src/pointing/) if ((NOT CONFIG_ZMK_SPLIT) OR CONFIG_ZMK_SPLIT_ROLE_CENTRAL) target_sources(app PRIVATE src/hid.c) - target_sources_ifdef(CONFIG_ZMK_MOUSE app PRIVATE src/mouse.c) target_sources(app PRIVATE src/behaviors/behavior_key_press.c) target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_KEY_TOGGLE app PRIVATE src/behaviors/behavior_key_toggle.c) target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_HOLD_TAP app PRIVATE src/behaviors/behavior_hold_tap.c) @@ -64,8 +66,9 @@ if ((NOT CONFIG_ZMK_SPLIT) OR CONFIG_ZMK_SPLIT_ROLE_CENTRAL) target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_SENSOR_ROTATE_COMMON app PRIVATE src/behaviors/behavior_sensor_rotate_common.c) target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_MOUSE_KEY_PRESS app PRIVATE src/behaviors/behavior_mouse_key_press.c) target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_STUDIO_UNLOCK app PRIVATE src/behaviors/behavior_studio_unlock.c) + target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_INPUT_TWO_AXIS app PRIVATE src/behaviors/behavior_input_two_axis.c) target_sources(app PRIVATE src/combo.c) - target_sources(app PRIVATE src/behaviors/behavior_tap_dance.c) + target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_TAP_DANCE app PRIVATE src/behaviors/behavior_tap_dance.c) target_sources(app PRIVATE src/behavior_queue.c) target_sources(app PRIVATE src/conditional_layer.c) target_sources(app PRIVATE src/endpoints.c) @@ -92,9 +95,10 @@ target_sources_ifdef(CONFIG_ZMK_BATTERY_REPORTING app PRIVATE src/events/battery target_sources_ifdef(CONFIG_ZMK_BATTERY_REPORTING app PRIVATE src/battery.c) target_sources_ifdef(CONFIG_ZMK_HID_INDICATORS app PRIVATE src/events/hid_indicators_changed.c) +add_subdirectory_ifdef(CONFIG_ZMK_HID_INDICATORS src/indicators) target_sources_ifdef(CONFIG_ZMK_SPLIT app PRIVATE src/events/split_peripheral_status_changed.c) -add_subdirectory(src/split) +add_subdirectory_ifdef(CONFIG_ZMK_SPLIT src/split) target_sources_ifdef(CONFIG_USB_DEVICE_STACK app PRIVATE src/usb.c) target_sources_ifdef(CONFIG_ZMK_USB app PRIVATE src/usb_hid.c) diff --git a/app/Kconfig b/app/Kconfig index 108fcbe7..8c0675e0 100644 --- a/app/Kconfig +++ b/app/Kconfig @@ -5,6 +5,17 @@ mainmenu "ZMK Firmware" menu "ZMK" +config ZMK_BOARD_COMPAT + bool + help + Hidden symbol used to hint that a board has been specifically + set up with various ZMK requirements in mind, e.g. settings + storage, bootloader integration, etc. + + Failure to set this will warn users they may want to verify they + used a ZMK variant of an upstream board, or are using a board + properly migrated to a newer ZMK version. + menu "Basic Keyboard Setup" config ZMK_KEYBOARD_NAME @@ -31,10 +42,10 @@ config BT_DIS_PNP_VID config BT_DIS_PNP_PID default 0x615E -config BT_DIS_MODEL +config BT_DIS_MODEL_NUMBER_STR default ZMK_KEYBOARD_NAME -config BT_DIS_MANUF +config BT_DIS_MANUF_NAME_STR default "ZMK Project" # Hardware specific overrides @@ -46,7 +57,7 @@ config NRF_STORE_REBOOT_TYPE_GPREGRET bool default y -endif +endif # SOC_SERIES_NRF52X menu "HID" @@ -81,14 +92,11 @@ if ZMK_HID_REPORT_TYPE_HKRO config ZMK_HID_KEYBOARD_REPORT_SIZE int "# Keyboard Keys Reportable" - default 6 -endif +endif # ZMK_HID_REPORT_TYPE_HKRO config ZMK_HID_CONSUMER_REPORT_SIZE int "# Consumer Keys Reportable" - default 6 - choice ZMK_HID_CONSUMER_REPORT_USAGES prompt "HID Report Type" @@ -113,6 +121,8 @@ config ZMK_HID_INDICATORS Enable HID indicators, used for detecting state of Caps/Scroll/Num Lock, Kata, and Compose. +rsource "src/indicators/Kconfig" + config ZMK_HID_SEPARATE_MOD_RELEASE_REPORT bool "Release Modifiers Separately" help @@ -132,7 +142,9 @@ config ZMK_USB_BOOT bool "USB Boot Protocol Support" depends on ZMK_USB select USB_HID_BOOT_PROTOCOL - select USB_DEVICE_SOF + +config USB_DEVICE_INITIALIZE_AT_BOOT + default n if ZMK_USB @@ -142,8 +154,7 @@ config USB_NUMOF_EP_WRITE_RETRIES config USB_HID_POLL_INTERVAL_MS default 1 -#ZMK_USB -endif +endif # ZMK_USB menuconfig ZMK_BLE bool "BLE (HID over GATT)" @@ -153,6 +164,7 @@ menuconfig ZMK_BLE select BT_SMP_APP_PAIRING_ACCEPT select BT_PERIPHERAL select BT_DIS + imply BT_DEVICE_NAME_DYNAMIC imply BT_SETTINGS if !ARCH_POSIX imply SETTINGS if !ARCH_POSIX imply ZMK_BATTERY_REPORTING if !ARCH_POSIX @@ -162,17 +174,14 @@ if ZMK_BLE config ZMK_BLE_EXPERIMENTAL_CONN bool "Experimental BLE connection changes" help - Enables a combination of settings that are planned to be default in future versions of ZMK - to improve connection stability. This includes changes to timing on BLE pairing initiation, - restores use of the updated/new LLCP implementation, and disables 2M PHY support. + Enables settings that are planned to be default in future versions of ZMK + to improve connection stability. config ZMK_BLE_EXPERIMENTAL_SEC bool "Experimental BLE security changes" imply BT_SMP_ALLOW_UNAUTH_OVERWRITE help - Enables a combination of settings that are planned to be officially supported in the future. - This includes enabling BT Secure Connection passkey entry, and allows overwrite of keys from - previously paired hosts. + Enables security settings that are planned to be officially supported in the future. config ZMK_BLE_EXPERIMENTAL_FEATURES bool "Experimental BLE connection and security settings/features" @@ -191,14 +200,6 @@ config BT_SMP_ALLOW_UNAUTH_OVERWRITE config BT_CTLR_PHY_2M default n if ZMK_BLE_EXPERIMENTAL_CONN -# BT_TINYCRYPT_ECC is required for BT_SMP_SC_PAIR_ONLY when using HCI -config BT_TINYCRYPT_ECC - default y if BT_HCI && !BT_CTLR - -config SYSTEM_WORKQUEUE_STACK_SIZE - default 4096 if SOC_RP2040 - default 2048 - config ZMK_BLE_THREAD_STACK_SIZE int "BLE notify thread stack size" default 768 @@ -229,9 +230,6 @@ config BT_GATT_NOTIFY_MULTIPLE config BT_GATT_AUTO_SEC_REQ default (ZMK_SPLIT_BLE && !ZMK_SPLIT_ROLE_CENTRAL) -config BT_DEVICE_APPEARANCE - default 961 - config BT_PERIPHERAL_PREF_MIN_INT default 6 @@ -244,19 +242,20 @@ config BT_PERIPHERAL_PREF_LATENCY config BT_PERIPHERAL_PREF_TIMEOUT default 400 -#ZMK_BLE -endif +# The device name should be 16 characters or less so it fits within the +# advertising data. +config BT_DEVICE_NAME_MAX + default 16 -#Output Types -endmenu +endif # ZMK_BLE -# HID -endmenu +endmenu # Output Types + +endmenu # HID rsource "src/split/Kconfig" -#Basic Keyboard Setup -endmenu +endmenu # Basic Keyboard Setup menu "Keymaps" @@ -274,7 +273,7 @@ config ZMK_KEYMAP_LAYER_NAME_MAX_LEN int "Max Layer Name Length" default 20 -endif +endif # ZMK_KEYMAP_SETTINGS_STORAGE endmenu # Keymaps @@ -291,67 +290,51 @@ menuconfig ZMK_RGB_UNDERGLOW if ZMK_RGB_UNDERGLOW -# This default value cuts down on tons of excess .conf files, if you're using GPIO, manually disable this -config SPI - default y - config ZMK_RGB_UNDERGLOW_EXT_POWER bool "RGB underglow toggling also controls external power" - default y config ZMK_RGB_UNDERGLOW_BRT_MIN int "RGB underglow minimum brightness in percent" range 0 100 - default 0 config ZMK_RGB_UNDERGLOW_BRT_MAX int "RGB underglow maximum brightness in percent" range ZMK_RGB_UNDERGLOW_BRT_MIN 100 - default 100 config ZMK_RGB_UNDERGLOW_HUE_STEP int "RGB underglow hue step in degrees" range 0 359 - default 10 config ZMK_RGB_UNDERGLOW_SAT_STEP int "RGB underglow saturation step in percent" range 0 100 - default 10 config ZMK_RGB_UNDERGLOW_BRT_STEP int "RGB underglow brightness step in percent" range 0 100 - default 10 config ZMK_RGB_UNDERGLOW_HUE_START int "RGB underglow start hue value in degrees" range 0 359 - default 0 config ZMK_RGB_UNDERGLOW_SAT_START int "RGB underglow start saturations value in percent" range 0 100 - default 100 config ZMK_RGB_UNDERGLOW_BRT_START int "RGB underglow start brightness value in percent" range ZMK_RGB_UNDERGLOW_BRT_MIN ZMK_RGB_UNDERGLOW_BRT_MAX - default ZMK_RGB_UNDERGLOW_BRT_MAX config ZMK_RGB_UNDERGLOW_SPD_START int "RGB underglow start animation speed value" range 1 5 - default 3 config ZMK_RGB_UNDERGLOW_EFF_START int "RGB underglow start effect int value related to the effect enum list" range 0 3 - default 0 config ZMK_RGB_UNDERGLOW_ON_START bool "RGB underglow starts on by default" - default y config ZMK_RGB_UNDERGLOW_AUTO_OFF_IDLE bool "Turn off RGB underglow when keyboard goes into idle state" @@ -360,8 +343,7 @@ config ZMK_RGB_UNDERGLOW_AUTO_OFF_USB bool "Turn off RGB underglow when USB is disconnected" depends on USB_DEVICE_STACK -#ZMK_RGB_UNDERGLOW -endif +endif # ZMK_RGB_UNDERGLOW menuconfig ZMK_BACKLIGHT bool "LED backlight" @@ -372,16 +354,13 @@ if ZMK_BACKLIGHT config ZMK_BACKLIGHT_BRT_STEP int "Brightness step in percent" range 1 100 - default 20 config ZMK_BACKLIGHT_BRT_START int "Default brightness in percent" range 1 100 - default 40 config ZMK_BACKLIGHT_ON_START bool "Default backlight state" - default y config ZMK_BACKLIGHT_AUTO_OFF_IDLE bool "Turn off backlight when keyboard goes into idle state" @@ -389,19 +368,11 @@ config ZMK_BACKLIGHT_AUTO_OFF_IDLE config ZMK_BACKLIGHT_AUTO_OFF_USB bool "Turn off backlight when USB is disconnected" -#ZMK_BACKLIGHT -endif +endif # ZMK_BACKLIGHT -#Display/LED Options -endmenu +endmenu # Display/LED Options -menu "Mouse Options" - -config ZMK_MOUSE - bool "Enable ZMK mouse emulation" - -#Mouse Options -endmenu +rsource "src/pointing/Kconfig" menu "Power Management" @@ -423,7 +394,8 @@ config ZMK_BATTERY_REPORTING_FETCH_MODE_LITHIUM_VOLTAGE bool "Lithium Voltage" endchoice -endif + +endif # ZMK_BATTERY_REPORTING config ZMK_IDLE_TIMEOUT int "Milliseconds of inactivity before entering idle state (OLED shutoff, etc)" @@ -445,12 +417,10 @@ config ZMK_IDLE_SLEEP_TIMEOUT int "Milliseconds of inactivity before entering deep sleep" default 900000 -#ZMK_SLEEP -endif +endif # ZMK_SLEEP config ZMK_EXT_POWER bool "Enable support to control external power output" - default y config ZMK_PM bool @@ -472,7 +442,7 @@ config ZMK_GPIO_KEY_WAKEUP_TRIGGER default y depends on DT_HAS_ZMK_GPIO_KEY_WAKEUP_TRIGGER_ENABLED && ZMK_PM_SOFT_OFF -#Power Management +# Power Management endmenu menu "Combo options" @@ -482,14 +452,18 @@ config ZMK_COMBO_MAX_PRESSED_COMBOS default 4 config ZMK_COMBO_MAX_COMBOS_PER_KEY - int "Maximum number of combos per key" - default 5 + int "Deprecated: Max combos per key" + default 0 + help + Deprecated: Storage for combos is now determined automatically config ZMK_COMBO_MAX_KEYS_PER_COMBO - int "Maximum number of keys per combo" - default 4 + int "Deprecated: Max keys per combo" + default 0 + help + Deprecated: This is now auto-calculated based on `key-positions` in devicetree -#Combo options +# Combo options endmenu menu "Behavior Options" @@ -512,20 +486,21 @@ endmenu menu "Advanced" +rsource "src/boot/Kconfig" + menu "Initialization Priorities" if USB_DEVICE_STACK config ZMK_USB_INIT_PRIORITY int "USB Init Priority" - default 94 + default 96 config ZMK_USB_HID_INIT_PRIORITY int "USB HID Init Priority" default 95 -#USB -endif +endif # USB if ZMK_BLE || ZMK_SPLIT_BLE @@ -533,11 +508,13 @@ config ZMK_BLE_INIT_PRIORITY int "BLE Init Priority" default 50 -#ZMK_BLE || ZMK_SPLIT_BLE -endif +endif # ZMK_BLE || ZMK_SPLIT_BLE -#Initialization Priorities -endmenu +endmenu # Initialization Priorities + +config ZMK_PHYSICAL_LAYOUT_KEY_ROTATION + bool "Support rotation of keys in physical layouts" + default y menuconfig ZMK_KSCAN bool "ZMK KScan Integration" @@ -611,8 +588,7 @@ config USB_CDC_ACM_RINGBUF_SIZE config LOG_PROCESS_THREAD_STARTUP_DELAY_MS default 1000 -#ZMK_USB_LOGGING -endif +endif # ZMK_USB_LOGGING config ZMK_RTT_LOGGING bool "Enable RTT logging to help debug" @@ -628,8 +604,7 @@ if ZMK_RTT_LOGGING config SEGGER_RTT_BUFFER_SIZE_UP default 8192 -#ZMK_RTT_LOGGING -endif +endif # ZMK_RTT_LOGGING if ZMK_USB_LOGGING || ZMK_RTT_LOGGING @@ -639,11 +614,9 @@ config LOG_BUFFER_SIZE config LOG_PROCESS_THREAD_SLEEP_MS default 100 -#ZMK_USB_LOGGING || ZMK_RTT_LOGGING -endif +endif # ZMK_USB_LOGGING || ZMK_RTT_LOGGING -#Logging -endmenu +endmenu # Logging if SETTINGS @@ -659,21 +632,17 @@ config ZMK_SETTINGS_RESET_ON_START_INIT_PRIORITY Initialization priority for the settings reset on start. Must be lower priority/ higher value than FLASH_INIT_PRIORITY if using the NVS/Flash settings backend. - -endif - +endif # ZMK_SETTINGS_RESET_ON_START config ZMK_SETTINGS_SAVE_DEBOUNCE int "Milliseconds to debounce settings saves" default 60000 -#SETTINGS -endif +endif # SETTINGS config ZMK_BATTERY_REPORT_INTERVAL depends on ZMK_BATTERY_REPORTING int "Battery level report interval in seconds" - default 60 config ZMK_LOW_PRIORITY_WORK_QUEUE bool "Work queue for low priority items" @@ -688,14 +657,19 @@ config ZMK_LOW_PRIORITY_THREAD_PRIORITY int "Low priority thread priority" default 10 +endif # ZMK_LOW_PRIORITY_WORK_QUEUE + +endmenu # Advanced + +endmenu # ZMK + +if SOC_FAMILY_NORDIC_NRF + +config NRF_SOC_VALIDATE_HEADERS_DISABLED + default y + endif -#Advanced -endmenu - -#ZMK -endmenu - config KERNEL_BIN_NAME default "zmk" @@ -730,21 +704,24 @@ config ZMK_KEYMAP_SENSORS_DEFAULT_TRIGGERS_PER_ROTATION endif # ZMK_KEYMAP_SENSORS -choice CBPRINTF_IMPLEMENTATION - default CBPRINTF_NANO - -endchoice - module = ZMK module-str = zmk source "subsys/logging/Kconfig.template.log_config" +# This loads ZMK's internal board and shield Kconfigs rsource "boards/Kconfig" rsource "boards/shields/*/Kconfig.defconfig" rsource "boards/shields/*/Kconfig.shield" +# This loads custom shields defconfigs (from BOARD_ROOT) +# Duplicated from Kconfig.zephyr +osource "$(KCONFIG_BINARY_DIR)/Kconfig.shield.defconfig" + +# This loads board and shield Kconfigs found under zmk-config/config/ osource "$(ZMK_CONFIG)/boards/shields/*/Kconfig.defconfig" osource "$(ZMK_CONFIG)/boards/shields/*/Kconfig.shield" +# This loads ZMK's sensible defaults +rsource "Kconfig.defaults" source "Kconfig.zephyr" diff --git a/app/Kconfig.behaviors b/app/Kconfig.behaviors index 69419a2f..da9bcc41 100644 --- a/app/Kconfig.behaviors +++ b/app/Kconfig.behaviors @@ -51,13 +51,11 @@ if ZMK_BEHAVIOR_HOLD_TAP config ZMK_BEHAVIOR_HOLD_TAP_MAX_HELD int "Hold Tap Max Held" - default 10 help Max number of simultaneously held hold-taps config ZMK_BEHAVIOR_HOLD_TAP_MAX_CAPTURED_EVENTS int "Hold Tap Max Captured Events" - default 40 help Max number of captured system events while waiting to resolve hold taps @@ -71,8 +69,7 @@ config ZMK_BEHAVIOR_KEY_TOGGLE config ZMK_BEHAVIOR_MOUSE_KEY_PRESS bool default y - depends on DT_HAS_ZMK_BEHAVIOR_MOUSE_KEY_PRESS_ENABLED - imply ZMK_MOUSE + depends on DT_HAS_ZMK_BEHAVIOR_MOUSE_KEY_PRESS_ENABLED && ZMK_POINTING config ZMK_BEHAVIOR_STICKY_KEY bool @@ -83,7 +80,6 @@ if ZMK_BEHAVIOR_STICKY_KEY config ZMK_BEHAVIOR_STICKY_KEY_MAX_HELD int "Sticky Key Max Held" - default 10 help Max number of simultaneously held sticky keys @@ -94,6 +90,26 @@ config ZMK_BEHAVIOR_SOFT_OFF default y depends on DT_HAS_ZMK_BEHAVIOR_SOFT_OFF_ENABLED && ZMK_PM_SOFT_OFF + +config ZMK_BEHAVIOR_TAP_DANCE + bool + default y + depends on DT_HAS_ZMK_BEHAVIOR_TAP_DANCE_ENABLED + +if ZMK_BEHAVIOR_TAP_DANCE + +config ZMK_BEHAVIOR_TAP_DANCE_MAX_HELD + int "Tap-Dance Max Held" + help + Max number of simultaneously held taps-dances + +endif + +config ZMK_BEHAVIOR_INPUT_TWO_AXIS + bool + default y + depends on DT_HAS_ZMK_BEHAVIOR_INPUT_TWO_AXIS_ENABLED && ZMK_POINTING + config ZMK_BEHAVIOR_SENSOR_ROTATE_COMMON bool diff --git a/app/Kconfig.defaults b/app/Kconfig.defaults new file mode 100644 index 00000000..8800b454 --- /dev/null +++ b/app/Kconfig.defaults @@ -0,0 +1,118 @@ +# Copyright (c) 2024 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config SYSTEM_WORKQUEUE_STACK_SIZE + default 3072 if ZMK_DISPLAY + default 2048 + +# Basic +config BT_DEVICE_APPEARANCE + default 961 + +# HID +if ZMK_HID_REPORT_TYPE_HKRO + +config ZMK_HID_KEYBOARD_REPORT_SIZE + default 6 + +endif + +config ZMK_HID_CONSUMER_REPORT_SIZE + default 6 + +# Behaviors + +if ZMK_BEHAVIOR_HOLD_TAP + +config ZMK_BEHAVIOR_HOLD_TAP_MAX_HELD + default 10 + +config ZMK_BEHAVIOR_HOLD_TAP_MAX_CAPTURED_EVENTS + default 40 + +endif + +if ZMK_BEHAVIOR_STICKY_KEY + +config ZMK_BEHAVIOR_STICKY_KEY_MAX_HELD + default 10 + +endif + +if ZMK_BEHAVIOR_TAP_DANCE + +config ZMK_BEHAVIOR_TAP_DANCE_MAX_HELD + default 10 + +endif + +# Underglow +if ZMK_RGB_UNDERGLOW + +# This default value cuts down on tons of excess .conf files, if you're using GPIO, manually disable this +config SPI + default y + +config ZMK_RGB_UNDERGLOW_EXT_POWER + default y + +config ZMK_RGB_UNDERGLOW_BRT_MIN + default 0 + +config ZMK_RGB_UNDERGLOW_BRT_MAX + default 100 + +config ZMK_RGB_UNDERGLOW_HUE_STEP + default 10 + +config ZMK_RGB_UNDERGLOW_SAT_STEP + default 10 + +config ZMK_RGB_UNDERGLOW_BRT_STEP + default 10 + +config ZMK_RGB_UNDERGLOW_HUE_START + default 0 + +config ZMK_RGB_UNDERGLOW_SAT_START + default 100 + +config ZMK_RGB_UNDERGLOW_BRT_START + default ZMK_RGB_UNDERGLOW_BRT_MAX + +config ZMK_RGB_UNDERGLOW_SPD_START + default 3 + +config ZMK_RGB_UNDERGLOW_EFF_START + default 0 + +config ZMK_RGB_UNDERGLOW_ON_START + default y + +endif # ZMK_RGB_UNDERGLOW + +# Backlight +if ZMK_BACKLIGHT + +config ZMK_BACKLIGHT_BRT_STEP + default 20 + +config ZMK_BACKLIGHT_BRT_START + default 40 + +config ZMK_BACKLIGHT_ON_START + default y + +endif # ZMK_BACKLIGHT + +# Ext_power +config ZMK_EXT_POWER + default y + +# Battery +config ZMK_BATTERY_REPORT_INTERVAL + default 60 + +# Imports +rsource "src/boot/Kconfig.defaults" +rsource "src/split/Kconfig.defaults" diff --git a/app/VERSION b/app/VERSION new file mode 100644 index 00000000..07a7f21f --- /dev/null +++ b/app/VERSION @@ -0,0 +1,13 @@ +# x-release-please-start-major +VERSION_MAJOR = 0 +# x-release-please-end + +# x-release-please-start-minor +VERSION_MINOR = 3 +# x-release-please-end + +# x-release-please-start-patch +PATCHLEVEL = 0 +# x-release-please-end + +VERSION_TWEAK = 0 \ No newline at end of file diff --git a/app/boards/01space_rp2040_042lcd.conf b/app/boards/01space_rp2040_042lcd.conf deleted file mode 100644 index c520a3b7..00000000 --- a/app/boards/01space_rp2040_042lcd.conf +++ /dev/null @@ -1,6 +0,0 @@ -CONFIG_ZMK_DISPLAY=y -CONFIG_LV_FONT_UNSCII_8=n -CONFIG_ZMK_USB=y -CONFIG_I2C=y -CONFIG_I2C_DW=y -CONFIG_LV_Z_VDB_SIZE=50 diff --git a/app/boards/adafruit/kb2040/Kconfig.adafruit_kb2040 b/app/boards/adafruit/kb2040/Kconfig.adafruit_kb2040 new file mode 100644 index 00000000..528385da --- /dev/null +++ b/app/boards/adafruit/kb2040/Kconfig.adafruit_kb2040 @@ -0,0 +1,9 @@ +# Copyright (c) 2026 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config BOARD_ADAFRUIT_KB2040 + select ZMK_BOARD_COMPAT if BOARD_ADAFRUIT_KB2040_RP2040_ZMK + imply RETAINED_MEM if BOARD_ADAFRUIT_KB2040_RP2040_ZMK + imply RETENTION if BOARD_ADAFRUIT_KB2040_RP2040_ZMK + imply RETENTION_BOOT_MODE if BOARD_ADAFRUIT_KB2040_RP2040_ZMK + diff --git a/app/boards/arm/adafruit_kb2040/adafruit_kb2040.zmk.yml b/app/boards/adafruit/kb2040/adafruit_kb2040.zmk.yml similarity index 85% rename from app/boards/arm/adafruit_kb2040/adafruit_kb2040.zmk.yml rename to app/boards/adafruit/kb2040/adafruit_kb2040.zmk.yml index c8973f5c..f3a79315 100644 --- a/app/boards/arm/adafruit_kb2040/adafruit_kb2040.zmk.yml +++ b/app/boards/adafruit/kb2040/adafruit_kb2040.zmk.yml @@ -1,5 +1,5 @@ file_format: "1" -id: adafruit_kb2040 +id: adafruit_kb2040//zmk name: Adafruit KB2040 type: board arch: arm diff --git a/app/boards/sparkfun_pro_micro_rp2040.overlay b/app/boards/adafruit/kb2040/adafruit_kb2040_zmk.dts similarity index 52% rename from app/boards/sparkfun_pro_micro_rp2040.overlay rename to app/boards/adafruit/kb2040/adafruit_kb2040_zmk.dts index 72b3adca..8c05cbaf 100644 --- a/app/boards/sparkfun_pro_micro_rp2040.overlay +++ b/app/boards/adafruit/kb2040/adafruit_kb2040_zmk.dts @@ -4,4 +4,7 @@ * SPDX-License-Identifier: MIT */ +#include <../boards/adafruit/kb2040/adafruit_kb2040.dts> +#include + &pro_micro_serial { status = "disabled"; }; diff --git a/app/boards/adafruit/kb2040/adafruit_kb2040_zmk_defconfig b/app/boards/adafruit/kb2040/adafruit_kb2040_zmk_defconfig new file mode 100644 index 00000000..b7b0308b --- /dev/null +++ b/app/boards/adafruit/kb2040/adafruit_kb2040_zmk_defconfig @@ -0,0 +1,23 @@ +# SPDX-License-Identifier: MIT + +CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=125000000 + +# Enable reset by default +CONFIG_RESET=y + +# Enable clock control by default +CONFIG_CLOCK_CONTROL=y + +# Code partition needed to target the correct flash range +CONFIG_USE_DT_CODE_PARTITION=y + +# Output UF2 by default, native bootloader supports it. +CONFIG_BUILD_OUTPUT_UF2=y + +# USB HID +CONFIG_ZMK_USB=y + +# Bootloader Support +CONFIG_RETAINED_MEM=y +CONFIG_RETENTION=y +CONFIG_RETENTION_BOOT_MODE=y diff --git a/app/boards/adafruit/kb2040/board.yml b/app/boards/adafruit/kb2040/board.yml new file mode 100644 index 00000000..7ef758e0 --- /dev/null +++ b/app/boards/adafruit/kb2040/board.yml @@ -0,0 +1,5 @@ +board: + extend: adafruit_kb2040 + variants: + - name: zmk + qualifier: rp2040 diff --git a/app/boards/adafruit/qt_py_rp2040/Kconfig.adafruit_qt_py_rp2040 b/app/boards/adafruit/qt_py_rp2040/Kconfig.adafruit_qt_py_rp2040 new file mode 100644 index 00000000..266d39a1 --- /dev/null +++ b/app/boards/adafruit/qt_py_rp2040/Kconfig.adafruit_qt_py_rp2040 @@ -0,0 +1,9 @@ +# Copyright (c) 2026 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config BOARD_ADAFRUIT_QT_PY_RP2040 + select ZMK_BOARD_COMPAT if BOARD_ADAFRUIT_QT_PY_RP2040_RP2040_ZMK + imply RETAINED_MEM if BOARD_ADAFRUIT_QT_PY_RP2040_RP2040_ZMK + imply RETENTION if BOARD_ADAFRUIT_QT_PY_RP2040_RP2040_ZMK + imply RETENTION_BOOT_MODE if BOARD_ADAFRUIT_QT_PY_RP2040_RP2040_ZMK + diff --git a/app/boards/arm/adafruit_qt_py_rp2040/adafruit_qt_py_rp2040.zmk.yml b/app/boards/adafruit/qt_py_rp2040/adafruit_qt_py_rp2040.zmk.yml similarity index 82% rename from app/boards/arm/adafruit_qt_py_rp2040/adafruit_qt_py_rp2040.zmk.yml rename to app/boards/adafruit/qt_py_rp2040/adafruit_qt_py_rp2040.zmk.yml index 9b9c1450..ebda8559 100644 --- a/app/boards/arm/adafruit_qt_py_rp2040/adafruit_qt_py_rp2040.zmk.yml +++ b/app/boards/adafruit/qt_py_rp2040/adafruit_qt_py_rp2040.zmk.yml @@ -1,5 +1,5 @@ file_format: "1" -id: adafruit_qt_py_rp2040 +id: adafruit_qt_py_rp2040//zmk name: Adafruit QT Py RP2040 type: board arch: arm diff --git a/app/boards/adafruit/qt_py_rp2040/adafruit_qt_py_rp2040_zmk.dts b/app/boards/adafruit/qt_py_rp2040/adafruit_qt_py_rp2040_zmk.dts new file mode 100644 index 00000000..2a64ff75 --- /dev/null +++ b/app/boards/adafruit/qt_py_rp2040/adafruit_qt_py_rp2040_zmk.dts @@ -0,0 +1,10 @@ +/* + * Copyright (c) 2023 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include <../boards/adafruit/qt_py_rp2040/adafruit_qt_py_rp2040.dts> +#include + +&xiao_serial { status = "disabled"; }; diff --git a/app/boards/adafruit/qt_py_rp2040/adafruit_qt_py_rp2040_zmk_defconfig b/app/boards/adafruit/qt_py_rp2040/adafruit_qt_py_rp2040_zmk_defconfig new file mode 100644 index 00000000..b7b0308b --- /dev/null +++ b/app/boards/adafruit/qt_py_rp2040/adafruit_qt_py_rp2040_zmk_defconfig @@ -0,0 +1,23 @@ +# SPDX-License-Identifier: MIT + +CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=125000000 + +# Enable reset by default +CONFIG_RESET=y + +# Enable clock control by default +CONFIG_CLOCK_CONTROL=y + +# Code partition needed to target the correct flash range +CONFIG_USE_DT_CODE_PARTITION=y + +# Output UF2 by default, native bootloader supports it. +CONFIG_BUILD_OUTPUT_UF2=y + +# USB HID +CONFIG_ZMK_USB=y + +# Bootloader Support +CONFIG_RETAINED_MEM=y +CONFIG_RETENTION=y +CONFIG_RETENTION_BOOT_MODE=y diff --git a/app/boards/adafruit/qt_py_rp2040/board.yml b/app/boards/adafruit/qt_py_rp2040/board.yml new file mode 100644 index 00000000..cda7173e --- /dev/null +++ b/app/boards/adafruit/qt_py_rp2040/board.yml @@ -0,0 +1,5 @@ +board: + extend: adafruit_qt_py_rp2040 + variants: + - name: zmk + qualifier: rp2040 diff --git a/app/boards/adafruit_kb2040.conf b/app/boards/adafruit_kb2040.conf deleted file mode 100644 index 21c1893d..00000000 --- a/app/boards/adafruit_kb2040.conf +++ /dev/null @@ -1,4 +0,0 @@ -CONFIG_CONSOLE=n -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n -CONFIG_ZMK_USB=y diff --git a/app/boards/adafruit_kb2040.overlay b/app/boards/adafruit_kb2040.overlay deleted file mode 100644 index 72b3adca..00000000 --- a/app/boards/adafruit_kb2040.overlay +++ /dev/null @@ -1,7 +0,0 @@ -/* - * Copyright (c) 2023 The ZMK Contributors - * - * SPDX-License-Identifier: MIT - */ - -&pro_micro_serial { status = "disabled"; }; diff --git a/app/boards/seeeduino_xiao_rp2040.conf b/app/boards/adafruit_metro_rp2040.conf similarity index 100% rename from app/boards/seeeduino_xiao_rp2040.conf rename to app/boards/adafruit_metro_rp2040.conf diff --git a/app/boards/adafruit_qt_py_rp2040.conf b/app/boards/adafruit_qt_py_rp2040.conf deleted file mode 100644 index 21c1893d..00000000 --- a/app/boards/adafruit_qt_py_rp2040.conf +++ /dev/null @@ -1,4 +0,0 @@ -CONFIG_CONSOLE=n -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n -CONFIG_ZMK_USB=y diff --git a/app/boards/aliases.cmake b/app/boards/aliases.cmake new file mode 100644 index 00000000..d0a4d81d --- /dev/null +++ b/app/boards/aliases.cmake @@ -0,0 +1,2 @@ +# defines board aliases for shorter names (or for renaming boards) +set(mikoto_520_BOARD_ALIAS "mikoto") diff --git a/app/boards/arm/adv360pro/Kconfig b/app/boards/arm/adv360pro/Kconfig deleted file mode 100644 index 1840851c..00000000 --- a/app/boards/arm/adv360pro/Kconfig +++ /dev/null @@ -1,7 +0,0 @@ -# SPDX-License-Identifier: MIT - -config BOARD_ENABLE_DCDC - bool "Enable DCDC mode" - select SOC_DCDC_NRF52X - default y - depends on BOARD_ADV360PRO_LEFT || BOARD_ADV360PRO_RIGHT diff --git a/app/boards/arm/adv360pro/Kconfig.board b/app/boards/arm/adv360pro/Kconfig.board deleted file mode 100644 index 51ebaec0..00000000 --- a/app/boards/arm/adv360pro/Kconfig.board +++ /dev/null @@ -1,12 +0,0 @@ -# -# Copyright (c) 2023 The ZMK Contributors -# SPDX-License-Identifier: MIT -# - -config BOARD_ADV360PRO_LEFT - bool "adv360pro_left" - depends on SOC_NRF52840_QIAA - -config BOARD_ADV360PRO_RIGHT - bool "adv360pro_right" - depends on SOC_NRF52840_QIAA diff --git a/app/boards/arm/bdn9/Kconfig.board b/app/boards/arm/bdn9/Kconfig.board deleted file mode 100644 index 76a204cc..00000000 --- a/app/boards/arm/bdn9/Kconfig.board +++ /dev/null @@ -1,8 +0,0 @@ -# keeb.io BDN9 board configuration - -# Copyright (c) 2020 The ZMK Contributors -# SPDX-License-Identifier: MIT - -config BOARD_BDN9 - bool "BDN9 rev2" - depends on SOC_STM32F072XB diff --git a/app/boards/arm/bdn9/bdn9_rev2.yml b/app/boards/arm/bdn9/bdn9_rev2.yml deleted file mode 100644 index 01ebd3e0..00000000 --- a/app/boards/arm/bdn9/bdn9_rev2.yml +++ /dev/null @@ -1,11 +0,0 @@ -file_format: "1" -id: bdn9_rev2 -name: BDN9 Rev2 -type: board -arch: arm -features: - - keys - - encoder -outputs: - - usb -url: https://keeb.io/products/bdn9-rev-2-3x3-9-key-macropad-rotary-encoder-and-rgb diff --git a/app/boards/arm/bluemicro840/Kconfig.board b/app/boards/arm/bluemicro840/Kconfig.board deleted file mode 100644 index e2794015..00000000 --- a/app/boards/arm/bluemicro840/Kconfig.board +++ /dev/null @@ -1,8 +0,0 @@ -# BlueMicro840 board configuration - -# Copyright (c) 2020 Pete Johanson, Derek Schmell -# SPDX-License-Identifier: MIT - -config BOARD_BLUEMICRO840_V1 - bool "BlueMicro840_V1" - depends on SOC_NRF52840_QIAA diff --git a/app/boards/arm/boardsource_blok/boardsource_blok.zmk.yml b/app/boards/arm/boardsource_blok/boardsource_blok.zmk.yml deleted file mode 100644 index a6e91afd..00000000 --- a/app/boards/arm/boardsource_blok/boardsource_blok.zmk.yml +++ /dev/null @@ -1,9 +0,0 @@ -file_format: "1" -id: boardsource_blok -name: BoardSource blok -type: board -arch: arm -outputs: - - usb -url: https://peg.software/docs/blok -exposes: [pro_micro] diff --git a/app/boards/arm/bt60/Kconfig b/app/boards/arm/bt60/Kconfig deleted file mode 100644 index d57a6b7e..00000000 --- a/app/boards/arm/bt60/Kconfig +++ /dev/null @@ -1,7 +0,0 @@ -# SPDX-License-Identifier: MIT - -config BOARD_ENABLE_DCDC - bool "Enable DCDC mode" - select SOC_DCDC_NRF52X - default y - depends on (BOARD_BT60_V1_HS || BOARD_BT60_V1) diff --git a/app/boards/arm/bt60/Kconfig.board b/app/boards/arm/bt60/Kconfig.board deleted file mode 100644 index 24c0a8b5..00000000 --- a/app/boards/arm/bt60/Kconfig.board +++ /dev/null @@ -1,12 +0,0 @@ -# BT60 board configuration - -# Copyright (c) 2021 Polarity Works -# SPDX-License-Identifier: MIT - -config BOARD_BT60_V1 - bool "bt60" - depends on SOC_NRF52840_QIAA - -config BOARD_BT60_V1_HS - bool "bt60 hotswap" - depends on SOC_NRF52840_QIAA diff --git a/app/boards/arm/bt60/bt60_v1.zmk.yml b/app/boards/arm/bt60/bt60_v1.zmk.yml deleted file mode 100644 index 9909f191..00000000 --- a/app/boards/arm/bt60/bt60_v1.zmk.yml +++ /dev/null @@ -1,12 +0,0 @@ -file_format: "1" -id: bt60_v1 -name: BT60 V1 Soldered -type: board -arch: arm -features: - - keys - - encoder -outputs: - - usb - - ble -url: https://polarityworks.com diff --git a/app/boards/arm/ckp/Kconfig b/app/boards/arm/ckp/Kconfig deleted file mode 100644 index 7baf1486..00000000 --- a/app/boards/arm/ckp/Kconfig +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) 2022 The ZMK Contributors -# SPDX-License-Identifier: MIT - -config BOARD_ENABLE_DCDC - bool "Enable DCDC mode" - select SOC_DCDC_NRF52X - default y - depends on BOARD_BT60_V2 || BOARD_BT65_V1 || BOARD_BT75_V1 diff --git a/app/boards/arm/ckp/Kconfig.board b/app/boards/arm/ckp/Kconfig.board deleted file mode 100644 index a98a3167..00000000 --- a/app/boards/arm/ckp/Kconfig.board +++ /dev/null @@ -1,16 +0,0 @@ -# CKP boards configuration - -# Copyright (c) 2022 The ZMK Contributors -# SPDX-License-Identifier: MIT - -config BOARD_BT60_V2 - bool "bt60_v2" - depends on SOC_NRF52840_QIAA - -config BOARD_BT65_V1 - bool "bt65_v1" - depends on SOC_NRF52840_QIAA - -config BOARD_BT75_V1 - bool "bt75_v1" - depends on SOC_NRF52840_QIAA diff --git a/app/boards/arm/ckp/Kconfig.defconfig b/app/boards/arm/ckp/Kconfig.defconfig deleted file mode 100644 index 376d4619..00000000 --- a/app/boards/arm/ckp/Kconfig.defconfig +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright (c) 2022 The ZMK Contributors -# SPDX-License-Identifier: MIT - -config BOARD - default "bt60_v2" if BOARD_BT60_V2 - default "bt65_v1" if BOARD_BT65_V1 - default "bt75_v1" if BOARD_BT75_V1 -config ZMK_KEYBOARD_NAME - default "BT60 V2" if BOARD_BT60_V2 - default "BT65" if BOARD_BT65_V1 - default "BT75" if BOARD_BT75_V1 - -if BOARD_BT60_V2 || BOARD_BT65_V1 || BOARD_BT75_V1 - -if USB - -config USB_NRFX - default y - -config USB_DEVICE_STACK - default y - -endif # USB - -config BT_CTLR - default BT - -endif # BOARD_BT60_V2 || BOARD_BT65_V1 || BOARD_BT75_V1 diff --git a/app/boards/arm/corneish_zen/Kconfig b/app/boards/arm/corneish_zen/Kconfig deleted file mode 100644 index 33d92609..00000000 --- a/app/boards/arm/corneish_zen/Kconfig +++ /dev/null @@ -1,10 +0,0 @@ -# -# Copyright (c) 2022 The ZMK Contributors -# SPDX-License-Identifier: MIT -# - -config BOARD_CORNEISH_ZEN_LEFT - bool - -config BOARD_CORNEISH_ZEN_RIGHT - bool diff --git a/app/boards/arm/corneish_zen/Kconfig.board b/app/boards/arm/corneish_zen/Kconfig.board deleted file mode 100644 index ffb3ab1f..00000000 --- a/app/boards/arm/corneish_zen/Kconfig.board +++ /dev/null @@ -1,24 +0,0 @@ -# -# Copyright (c) 2022 Darryl deHaan -# SPDX-License-Identifier: MIT -# - -config BOARD_CORNEISH_ZEN_V1_LEFT - bool "corneish zen left v1" - depends on SOC_NRF52840_QIAA - select BOARD_CORNEISH_ZEN_LEFT - -config BOARD_CORNEISH_ZEN_V1_RIGHT - bool "corneish zen right v1" - depends on SOC_NRF52840_QIAA - select BOARD_CORNEISH_ZEN_RIGHT - -config BOARD_CORNEISH_ZEN_V2_LEFT - bool "corneish zen left v2" - depends on SOC_NRF52840_QIAA - select BOARD_CORNEISH_ZEN_LEFT - -config BOARD_CORNEISH_ZEN_V2_RIGHT - bool "corneish zen right v2" - depends on SOC_NRF52840_QIAA - select BOARD_CORNEISH_ZEN_RIGHT diff --git a/app/boards/arm/corneish_zen/corneish_zen_v2.yaml b/app/boards/arm/corneish_zen/corneish_zen_v2.yaml deleted file mode 100644 index 46a213d9..00000000 --- a/app/boards/arm/corneish_zen/corneish_zen_v2.yaml +++ /dev/null @@ -1,20 +0,0 @@ -identifier: corneish_zen_v2 -name: Corne-ish Zen v2 -type: keyboard -arch: arm -toolchain: - - zephyr - - gnuarmemb - - xtools -supported: - - gpio - - i2c - - counter - - spi - - usb_device - - lsm303dlhc - - nvs - - can - - kscan - - ble - - adc diff --git a/app/boards/arm/corneish_zen/corneish_zen_v2.zmk.yml b/app/boards/arm/corneish_zen/corneish_zen_v2.zmk.yml deleted file mode 100644 index 37c1cef4..00000000 --- a/app/boards/arm/corneish_zen/corneish_zen_v2.zmk.yml +++ /dev/null @@ -1,15 +0,0 @@ -file_format: "1" -id: corneish_zen_v2 -name: Corneish Zen v2 -url: https://lowprokb.ca/collections/keyboards/products/corne-ish-zen -type: board -arch: arm -features: - - keys - - display -outputs: - - usb - - ble -siblings: - - corneish_zen_v2_left - - corneish_zen_v2_right diff --git a/app/boards/arm/dz60rgb/Kconfig.board b/app/boards/arm/dz60rgb/Kconfig.board deleted file mode 100644 index ba09e2dd..00000000 --- a/app/boards/arm/dz60rgb/Kconfig.board +++ /dev/null @@ -1,6 +0,0 @@ -# Copyright (c) 2020 The ZMK Contributors -# SPDX-License-Identifier: MIT - -config BOARD_DZ60RGB_REV1 - bool "DZ60RGB Keyboard" - depends on SOC_STM32F303XC diff --git a/app/boards/arm/dz60rgb/Kconfig.defconfig b/app/boards/arm/dz60rgb/Kconfig.defconfig deleted file mode 100644 index 6e059256..00000000 --- a/app/boards/arm/dz60rgb/Kconfig.defconfig +++ /dev/null @@ -1,11 +0,0 @@ -# DZ60RGB keyboard configuration - -# Copyright (c) 2020 The ZMK Contributors -# SPDX-License-Identifier: MIT - -if BOARD_DZ60RGB_REV1 - -config ZMK_KEYBOARD_NAME - default "DZ60RGB Rev 1" - -endif # BOARD_DZ60RGB_REV1 diff --git a/app/boards/arm/dz60rgb/dz60rgb_rev1.dts b/app/boards/arm/dz60rgb/dz60rgb_rev1.dts deleted file mode 100644 index b8fac4e2..00000000 --- a/app/boards/arm/dz60rgb/dz60rgb_rev1.dts +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2020 The ZMK Contributors - * - * SPDX-License-Identifier: MIT - */ - -/dts-v1/; -#include - -#include - -/ { - model = "DZ60RGB, Rev 1"; - compatible = "dz60rgb,rev1", "st,stm32f303"; - - chosen { - zephyr,sram = &sram0; - zephyr,flash = &flash0; - zmk,kscan = &kscan0; - zmk,matrix-transform = &default_transform; - }; - - default_transform: keymap_transform_0 { - compatible = "zmk,matrix-transform"; - columns = <14>; - rows = <5>; - map = < -RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,13) -RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13) -RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,13) -RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,13) -RC(4,0) RC(4,1) RC(4,2) RC(4,5) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,13) - >; - }; - - kscan0: kscan { - compatible = "zmk,kscan-gpio-matrix"; - - diode-direction = "col2row"; - row-gpios - = <&gpioa 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpiob 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpiob 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpiob 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpiob 12 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - ; - col-gpios - = <&gpioa 6 GPIO_ACTIVE_HIGH> - , <&gpioa 7 GPIO_ACTIVE_HIGH> - , <&gpiob 0 GPIO_ACTIVE_HIGH> - , <&gpiob 13 GPIO_ACTIVE_HIGH> - , <&gpiob 15 GPIO_ACTIVE_HIGH> - , <&gpioa 8 GPIO_ACTIVE_HIGH> - , <&gpioa 15 GPIO_ACTIVE_HIGH> - , <&gpiob 3 GPIO_ACTIVE_HIGH> - , <&gpiob 4 GPIO_ACTIVE_HIGH> - , <&gpiob 5 GPIO_ACTIVE_HIGH> - , <&gpiob 8 GPIO_ACTIVE_HIGH> - , <&gpiob 9 GPIO_ACTIVE_HIGH> - , <&gpioc 13 GPIO_ACTIVE_HIGH> - , <&gpioc 14 GPIO_ACTIVE_HIGH> - ; - }; - -}; - -zephyr_udc0: &usb { - status = "okay"; -}; - -&flash0 { - /* - * For more information, see: - * http://docs.zephyrproject.org/latest/guides/dts/index.html#flash-partitions - */ - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - /* Set 6Kb of storage at the end of the 256Kb of flash */ - storage_partition: partition@3e800 { - reg = <0x0003e800 0x00001800>; - }; - }; -}; diff --git a/app/boards/arm/dz60rgb/dz60rgb_rev1.keymap b/app/boards/arm/dz60rgb/dz60rgb_rev1.keymap deleted file mode 100644 index eaf5d5da..00000000 --- a/app/boards/arm/dz60rgb/dz60rgb_rev1.keymap +++ /dev/null @@ -1,25 +0,0 @@ -#include -#include - -/ { - keymap { - compatible = "zmk,keymap"; - - default_layer { -// ------------------------------------------------------------------------------------------ -// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BSPC | -// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | "|" | -// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | -// | SHIFT | Z | X | C | V | B | N | M | , | . | SHIFT(/) | ^ | DEL | -// | CTL | WIN | ALT | SPACE | ALT | MO(1) | <- | v | -> | -// ------------------------------------------------------------------------------------------ - bindings = < - &kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC - &kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSLH - &kp CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET - &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &mt RSHFT FSLH &kp UP &kp DEL - &kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &mo 1 &kp LEFT &kp DOWN &kp RIGHT - >; - }; - }; -}; \ No newline at end of file diff --git a/app/boards/arm/dz60rgb/dz60rgb_rev1.yaml b/app/boards/arm/dz60rgb/dz60rgb_rev1.yaml deleted file mode 100644 index d2836218..00000000 --- a/app/boards/arm/dz60rgb/dz60rgb_rev1.yaml +++ /dev/null @@ -1,19 +0,0 @@ -identifier: DZ60RGB_rev1 -name: DZ60RGBREV1 -type: keyboard -arch: arm -toolchain: - - zephyr - - gnuarmemb - - xtools -ram: 40 -supported: - - gpio - - i2c - - counter - - spi - - usb_device - - lsm303dlhc - - nvs - - can - - kscan diff --git a/app/boards/arm/dz60rgb/dz60rgb_rev1_defconfig b/app/boards/arm/dz60rgb/dz60rgb_rev1_defconfig deleted file mode 100644 index 6b6c8a48..00000000 --- a/app/boards/arm/dz60rgb/dz60rgb_rev1_defconfig +++ /dev/null @@ -1,26 +0,0 @@ -# SPDX-License-Identifier: MIT - -CONFIG_SOC_SERIES_STM32F3X=y -CONFIG_SOC_STM32F303XC=y -# 72MHz system clock -CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=72000000 - -# enable GPIO -CONFIG_GPIO=y - -# clock configuration -CONFIG_CLOCK_CONTROL=y - -# Clock configuration for Cube Clock control driver -CONFIG_CLOCK_STM32_HSE_CLOCK=8000000 -CONFIG_CLOCK_STM32_SYSCLK_SRC_PLL=y -# use HSE as PLL input -CONFIG_CLOCK_STM32_PLL_SRC_HSE=y -# produce 72MHz clock at PLL output -CONFIG_CLOCK_STM32_PLL_PREDIV=1 -CONFIG_CLOCK_STM32_PLL_MULTIPLIER=9 -CONFIG_CLOCK_STM32_AHB_PRESCALER=1 -CONFIG_CLOCK_STM32_APB1_PRESCALER=2 -CONFIG_CLOCK_STM32_APB2_PRESCALER=1 - -CONFIG_ZMK_USB=y \ No newline at end of file diff --git a/app/boards/arm/ferris/Kconfig.board b/app/boards/arm/ferris/Kconfig.board deleted file mode 100644 index 70ee895d..00000000 --- a/app/boards/arm/ferris/Kconfig.board +++ /dev/null @@ -1,8 +0,0 @@ -# Ferris board configuration - -# Copyright (c) 2020 The ZMK Contributors -# SPDX-License-Identifier: MIT - -config BOARD_FERRIS - bool "Ferris rev 0.2" - depends on SOC_STM32F072XB diff --git a/app/boards/arm/glove80/Kconfig b/app/boards/arm/glove80/Kconfig deleted file mode 100644 index f1c12e7e..00000000 --- a/app/boards/arm/glove80/Kconfig +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) 2021 The ZMK Contributors -# SPDX-License-Identifier: MIT - -config BOARD_ENABLE_DCDC - bool "Enable DCDC mode" - select SOC_DCDC_NRF52X - default y - depends on (BOARD_GLOVE80_LH || BOARD_GLOVE80_RH) diff --git a/app/boards/arm/glove80/Kconfig.board b/app/boards/arm/glove80/Kconfig.board deleted file mode 100644 index f6891037..00000000 --- a/app/boards/arm/glove80/Kconfig.board +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) 2021 The ZMK Contributors -# SPDX-License-Identifier: MIT - -config BOARD_GLOVE80_LH - bool "Glove80 LH" - depends on SOC_NRF52840_QIAA - -config BOARD_GLOVE80_RH - bool "Glove80 RH" - depends on SOC_NRF52840_QIAA diff --git a/app/boards/arm/kbdfans_tofu65/Kconfig.board b/app/boards/arm/kbdfans_tofu65/Kconfig.board deleted file mode 100644 index 954166b7..00000000 --- a/app/boards/arm/kbdfans_tofu65/Kconfig.board +++ /dev/null @@ -1,6 +0,0 @@ -# Copyright (c) 2023 The ZMK Contributors -# SPDX-License-Identifier: Apache-2.0 - -config BOARD_KBDFANS_TOFU65_V2 - bool "KBDfans Tofu65 2.0" - depends on SOC_RP2040 diff --git a/app/boards/arm/mikoto/Kconfig.board b/app/boards/arm/mikoto/Kconfig.board deleted file mode 100644 index a872fa1f..00000000 --- a/app/boards/arm/mikoto/Kconfig.board +++ /dev/null @@ -1,8 +0,0 @@ -# mikoto board configuration - -# Copyright (c) 2020 The ZMK Contributors -# SPDX-License-Identifier: MIT - -config BOARD_MIKOTO_520 - bool "mikoto_520" - depends on SOC_NRF52840_QIAA diff --git a/app/boards/arm/nice60/Kconfig.board b/app/boards/arm/nice60/Kconfig.board deleted file mode 100644 index 88db9ee8..00000000 --- a/app/boards/arm/nice60/Kconfig.board +++ /dev/null @@ -1,6 +0,0 @@ -# Copyright (c) 2021 Nick Winans -# SPDX-License-Identifier: MIT - -config BOARD_NICE60 - bool "nice!60" - depends on SOC_NRF52840_QIAA diff --git a/app/boards/arm/nice_nano/Kconfig b/app/boards/arm/nice_nano/Kconfig deleted file mode 100644 index dbeb82cd..00000000 --- a/app/boards/arm/nice_nano/Kconfig +++ /dev/null @@ -1,13 +0,0 @@ -# SPDX-License-Identifier: MIT - -config BOARD_ENABLE_DCDC - bool "Enable DCDC mode" - select SOC_DCDC_NRF52X - default y - depends on (BOARD_NICE_NANO || BOARD_NICE_NANO_V2) - -config BOARD_ENABLE_DCDC_HV - bool "High voltage DCDC converter" - select SOC_DCDC_NRF52X_HV - default y - depends on (BOARD_NICE_NANO_V2) diff --git a/app/boards/arm/nice_nano/Kconfig.board b/app/boards/arm/nice_nano/Kconfig.board deleted file mode 100644 index 8dd16512..00000000 --- a/app/boards/arm/nice_nano/Kconfig.board +++ /dev/null @@ -1,13 +0,0 @@ -# nice!nano board configuration - -# Copyright (c) 2020 Pete Johanson -# SPDX-License-Identifier: MIT - -config BOARD_NICE_NANO - bool "nice!nano" - depends on SOC_NRF52840_QIAA - -config BOARD_NICE_NANO_V2 - bool "nice!nano v2" - depends on SOC_NRF52840_QIAA - diff --git a/app/boards/arm/nice_nano/Kconfig.defconfig b/app/boards/arm/nice_nano/Kconfig.defconfig deleted file mode 100644 index 63102a57..00000000 --- a/app/boards/arm/nice_nano/Kconfig.defconfig +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) 2021 The ZMK Contributors -# SPDX-License-Identifier: MIT - -if BOARD_NICE_NANO || BOARD_NICE_NANO_V2 - -config BOARD - default "nice_nano" - -if USB_DEVICE_STACK - -config USB_NRFX - default y - -endif # USB_DEVICE_STACK - -config BT_CTLR - default BT - -endif # BOARD_NICE_NANO || BOARD_NICE_NANO_V2 diff --git a/app/boards/arm/nice_nano/nice_nano_v2.yaml b/app/boards/arm/nice_nano/nice_nano_v2.yaml deleted file mode 100644 index d050ce99..00000000 --- a/app/boards/arm/nice_nano/nice_nano_v2.yaml +++ /dev/null @@ -1,15 +0,0 @@ -identifier: nice_nano_v2 -name: nice!nano v2 -type: mcu -arch: arm -toolchain: - - zephyr - - gnuarmemb - - xtools -supported: - - adc - - usb_device - - ble - - ieee802154 - - pwm - - watchdog diff --git a/app/boards/arm/nice_nano/nice_nano_v2.zmk.yml b/app/boards/arm/nice_nano/nice_nano_v2.zmk.yml deleted file mode 100644 index 3d1149a0..00000000 --- a/app/boards/arm/nice_nano/nice_nano_v2.zmk.yml +++ /dev/null @@ -1,10 +0,0 @@ -file_format: "1" -id: nice_nano_v2 -name: nice!nano v2 -type: board -arch: arm -outputs: - - usb - - ble -url: https://nicekeyboards.com/nice-nano -exposes: [pro_micro] diff --git a/app/boards/arm/nrf52840_m2/Kconfig.board b/app/boards/arm/nrf52840_m2/Kconfig.board deleted file mode 100644 index b2927ff2..00000000 --- a/app/boards/arm/nrf52840_m2/Kconfig.board +++ /dev/null @@ -1,9 +0,0 @@ -# Maker Diary nrf52840 M.2 board configuration - -# Copyright (c) 2020 The ZMK Contributors -# SPDX-License-Identifier: MIT - -config BOARD_NRF52840_M2 - bool "nrf52480_m2" - depends on SOC_NRF52840_QIAA - diff --git a/app/boards/arm/nrfmicro/Kconfig b/app/boards/arm/nrfmicro/Kconfig deleted file mode 100644 index 233ddbad..00000000 --- a/app/boards/arm/nrfmicro/Kconfig +++ /dev/null @@ -1,10 +0,0 @@ -config BOARD_ENABLE_DCDC - bool "Enable DCDC mode" - select SOC_DCDC_NRF52X - default y - depends on (BOARD_NRFMICRO_11 || BOARD_NRFMICRO_11_FLIPPED || BOARD_NRFMICRO_13 || BOARD_NRFMICRO_13_52833) - -config BOARD_NRFMICRO_CHARGER - bool "Enable battery charger" - default y - depends on (BOARD_NRFMICRO_13 || BOARD_NRFMICRO_13_52833) diff --git a/app/boards/arm/nrfmicro/Kconfig.board b/app/boards/arm/nrfmicro/Kconfig.board deleted file mode 100644 index 441de5cf..00000000 --- a/app/boards/arm/nrfmicro/Kconfig.board +++ /dev/null @@ -1,20 +0,0 @@ -# nrfmicro board configuration - -# Copyright (c) 2020 The ZMK Contributors -# SPDX-License-Identifier: MIT - -config BOARD_NRFMICRO_11 - bool "nrfmicro_11" - depends on SOC_NRF52840_QIAA - -config BOARD_NRFMICRO_11_FLIPPED - bool "nrfmicro_11_flipped" - depends on SOC_NRF52840_QIAA - -config BOARD_NRFMICRO_13 - bool "nrfmicro_13" - depends on SOC_NRF52840_QIAA - -config BOARD_NRFMICRO_13_52833 - bool "nrfmicro_13_52833" - depends on SOC_NRF52833_QIAA diff --git a/app/boards/arm/nrfmicro/nrfmicro_11_flipped_defconfig b/app/boards/arm/nrfmicro/nrfmicro_11_flipped_defconfig deleted file mode 100644 index 31cbfc9a..00000000 --- a/app/boards/arm/nrfmicro/nrfmicro_11_flipped_defconfig +++ /dev/null @@ -1,28 +0,0 @@ -# SPDX-License-Identifier: MIT - -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_NRFMICRO_11_FLIPPED=y - -# Enable MPU -CONFIG_ARM_MPU=y - -CONFIG_PINCTRL=y - -# enable GPIO -CONFIG_GPIO=y - -CONFIG_USE_DT_CODE_PARTITION=y -CONFIG_BUILD_OUTPUT_UF2=y - -CONFIG_MPU_ALLOW_FLASH_WRITE=y -CONFIG_NVS=y -CONFIG_SETTINGS_NVS=y -CONFIG_FLASH=y -CONFIG_FLASH_PAGE_LAYOUT=y -CONFIG_FLASH_MAP=y -CONFIG_CLOCK_CONTROL_NRF=y -CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y - -CONFIG_ZMK_USB=y -CONFIG_ZMK_BLE=y \ No newline at end of file diff --git a/app/boards/arm/nrfmicro/nrfmicro_13.dts b/app/boards/arm/nrfmicro/nrfmicro_13.dts deleted file mode 100644 index 0cb22e63..00000000 --- a/app/boards/arm/nrfmicro/nrfmicro_13.dts +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright (c) 2020 The ZMK Contributors - * - * SPDX-License-Identifier: MIT - */ - -/dts-v1/; -#include -#include "arduino_pro_micro_pins.dtsi" -#include "nrfmicro-pinctrl.dtsi" - -/ { - model = "nrfmicro"; - compatible = "joric,nrfmicro"; - - chosen { - zephyr,code-partition = &code_partition; - zephyr,sram = &sram0; - zephyr,flash = &flash0; - zmk,battery = &vbatt; - }; - - leds { - compatible = "gpio-leds"; - blue_led: led_0 { - gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>; - }; - }; - - // Node name must match original "EXT_POWER" label to preserve user settings. - EXT_POWER { - compatible = "zmk,ext-power-generic"; - control-gpios = <&gpio1 9 GPIO_ACTIVE_LOW>; - init-delay-ms = <50>; - }; - - vbatt: vbatt { - compatible = "zmk,battery-voltage-divider"; - io-channels = <&adc 2>; - output-ohms = <2000000>; - full-ohms = <(2000000 + 820000)>; - }; -}; - -&adc { - status = "okay"; -}; - -&gpiote { - status = "okay"; -}; - -&gpio0 { - status = "okay"; -}; - -&gpio1 { - status = "okay"; -}; - -&i2c0 { - compatible = "nordic,nrf-twi"; - pinctrl-0 = <&i2c0_default>; - pinctrl-1 = <&i2c0_sleep>; - pinctrl-names = "default", "sleep"; -}; - -&spi1 { - compatible = "nordic,nrf-spim"; - pinctrl-0 = <&spi1_default>; - pinctrl-1 = <&spi1_sleep>; - pinctrl-names = "default", "sleep"; -}; - -&uart0 { - compatible = "nordic,nrf-uarte"; - current-speed = <115200>; - pinctrl-0 = <&uart0_default>; - pinctrl-1 = <&uart0_sleep>; - pinctrl-names = "default", "sleep"; -}; - -zephyr_udc0: &usbd { - status = "okay"; -}; - - -&flash0 { - /* - * For more information, see: - * http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html - */ - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - sd_partition: partition@0 { - reg = <0x00000000 0x00026000>; - }; - code_partition: partition@26000 { - reg = <0x00026000 0x000c6000>; - }; - - /* - * The flash starting at 0x000ec000 and ending at - * 0x000f3fff is reserved for use by the application. - */ - - /* - * Storage partition will be used by FCB/LittleFS/NVS - * if enabled. - */ - storage_partition: partition@ec000 { - reg = <0x000ec000 0x00008000>; - }; - - boot_partition: partition@f4000 { - reg = <0x000f4000 0x0000c000>; - }; - }; -}; diff --git a/app/boards/arm/nrfmicro/nrfmicro_13_52833.zmk.yml b/app/boards/arm/nrfmicro/nrfmicro_13_52833.zmk.yml deleted file mode 100644 index 757ff860..00000000 --- a/app/boards/arm/nrfmicro/nrfmicro_13_52833.zmk.yml +++ /dev/null @@ -1,10 +0,0 @@ -file_format: "1" -id: nrfmicro_13_52833 -name: nRFMicro 1.3/1.4 (nRF52833) -type: board -arch: arm -outputs: - - usb - - ble -url: https://github.com/joric/nrfmicro/ -exposes: [pro_micro] diff --git a/app/boards/arm/pillbug/Kconfig.board b/app/boards/arm/pillbug/Kconfig.board deleted file mode 100644 index 70232e18..00000000 --- a/app/boards/arm/pillbug/Kconfig.board +++ /dev/null @@ -1,6 +0,0 @@ -# Copyright (c) 2022 The ZMK Contributors -# SPDX-License-Identifier: MIT - -config BOARD_PILLBUG - bool "PillBug" - depends on SOC_NRF52840_QIAA diff --git a/app/boards/arm/proton_c/Kconfig.board b/app/boards/arm/proton_c/Kconfig.board deleted file mode 100644 index 1596077f..00000000 --- a/app/boards/arm/proton_c/Kconfig.board +++ /dev/null @@ -1,8 +0,0 @@ -# QMK Proton-C board configuration - -# Copyright (c) 2020 Pete Johanson -# SPDX-License-Identifier: MIT - -config BOARD_QMK_PROTON_C - bool "QMK Proton-C" - depends on SOC_STM32F303XC diff --git a/app/boards/arm/proton_c/Kconfig.defconfig b/app/boards/arm/proton_c/Kconfig.defconfig deleted file mode 100644 index eed4b830..00000000 --- a/app/boards/arm/proton_c/Kconfig.defconfig +++ /dev/null @@ -1,11 +0,0 @@ -# QMK Proton-C board configuration - -# Copyright (c) 2020 Pete Johanson -# SPDX-License-Identifier: MIT - -if BOARD_QMK_PROTON_C - -config BOARD - default "proton_c" - -endif # BOARD_QMK_PROTON_C diff --git a/app/boards/arm/puchi_ble/Kconfig.board b/app/boards/arm/puchi_ble/Kconfig.board deleted file mode 100644 index 0f5b7f96..00000000 --- a/app/boards/arm/puchi_ble/Kconfig.board +++ /dev/null @@ -1,8 +0,0 @@ -# Puchi-BLE board configuration - -# Copyright (c) 2022 The ZMK Contributors -# SPDX-License-Identifier: MIT - -config BOARD_PUCHI_BLE_v1 - bool "puchi_ble_v1" - depends on SOC_NRF52840_QIAA diff --git a/app/boards/arm/puchi_ble/puchi_ble_v1.yaml b/app/boards/arm/puchi_ble/puchi_ble_v1.yaml deleted file mode 100644 index 18770722..00000000 --- a/app/boards/arm/puchi_ble/puchi_ble_v1.yaml +++ /dev/null @@ -1,15 +0,0 @@ -identifier: puchi_ble_v1 -name: puchi_ble_v1 -type: mcu -arch: arm -toolchain: - - zephyr - - gnuarmemb - - xtools -supported: - - adc - - usb_device - - ble - - ieee802154 - - pwm - - watchdog diff --git a/app/boards/arm/s40nc/Kconfig.board b/app/boards/arm/s40nc/Kconfig.board deleted file mode 100644 index e703d726..00000000 --- a/app/boards/arm/s40nc/Kconfig.board +++ /dev/null @@ -1,6 +0,0 @@ -# Copyright (c) 2021 The ZMK Contributors -# SPDX-License-Identifier: MIT - -config BOARD_S40NC - bool "S40NC" - depends on SOC_NRF52840_QIAA diff --git a/app/boards/blackpill_f401cc.conf b/app/boards/blackpill_f401cc.conf deleted file mode 100644 index c4252425..00000000 --- a/app/boards/blackpill_f401cc.conf +++ /dev/null @@ -1,6 +0,0 @@ -CONFIG_CONSOLE=n -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n -CONFIG_UART_INTERRUPT_DRIVEN=n -CONFIG_ZMK_USB=y -CONFIG_ZMK_KSCAN_MATRIX_POLLING=y diff --git a/app/boards/blackpill_f401ce.conf b/app/boards/blackpill_f401ce.conf deleted file mode 100644 index c4252425..00000000 --- a/app/boards/blackpill_f401ce.conf +++ /dev/null @@ -1,6 +0,0 @@ -CONFIG_CONSOLE=n -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n -CONFIG_UART_INTERRUPT_DRIVEN=n -CONFIG_ZMK_USB=y -CONFIG_ZMK_KSCAN_MATRIX_POLLING=y diff --git a/app/boards/blackpill_f411ce.conf b/app/boards/blackpill_f411ce.conf deleted file mode 100644 index c4252425..00000000 --- a/app/boards/blackpill_f411ce.conf +++ /dev/null @@ -1,6 +0,0 @@ -CONFIG_CONSOLE=n -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n -CONFIG_UART_INTERRUPT_DRIVEN=n -CONFIG_ZMK_USB=y -CONFIG_ZMK_KSCAN_MATRIX_POLLING=y diff --git a/app/boards/boardsource/blok/Kconfig.boardsource_blok b/app/boards/boardsource/blok/Kconfig.boardsource_blok new file mode 100644 index 00000000..fd3ce989 --- /dev/null +++ b/app/boards/boardsource/blok/Kconfig.boardsource_blok @@ -0,0 +1,9 @@ +# Copyright (c) 2026 Pete Johanson +# SPDX-License-Identifier: MIT + +config BOARD_BOARDSOURCE_BLOK + select ZMK_BOARD_COMPAT if BOARD_BOARDSOURCE_BLOK_RP2040_ZMK + imply RETAINED_MEM if BOARD_BOARDSOURCE_BLOK_RP2040_ZMK + imply RETENTION if BOARD_BOARDSOURCE_BLOK_RP2040_ZMK + imply RETENTION_BOOT_MODE if BOARD_BOARDSOURCE_BLOK_RP2040_ZMK + diff --git a/app/boards/boardsource/blok/board.yml b/app/boards/boardsource/blok/board.yml new file mode 100644 index 00000000..0891ee1b --- /dev/null +++ b/app/boards/boardsource/blok/board.yml @@ -0,0 +1,5 @@ +board: + extend: boardsource_blok + variants: + - name: zmk + qualifier: rp2040 diff --git a/app/boards/boardsource/blok/boardsource_blok.zmk.yml b/app/boards/boardsource/blok/boardsource_blok.zmk.yml new file mode 100644 index 00000000..dac3d4df --- /dev/null +++ b/app/boards/boardsource/blok/boardsource_blok.zmk.yml @@ -0,0 +1,9 @@ +file_format: "1" +id: boardsource_blok//zmk +name: Boardsource Blok +type: board +arch: arm +outputs: + - usb +url: https://boardsource.xyz/products/blok-rp2040-keyboard-controller +exposes: [pro_micro] diff --git a/app/boards/boardsource/blok/boardsource_blok_zmk.dts b/app/boards/boardsource/blok/boardsource_blok_zmk.dts new file mode 100644 index 00000000..c7bb7cc2 --- /dev/null +++ b/app/boards/boardsource/blok/boardsource_blok_zmk.dts @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2026 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include <../boards/boardsource/blok/boardsource_blok.dts> +#include + +&pro_micro_serial { status = "disabled"; }; + +&code_partition { + reg = <0x100 (DT_SIZE_M(16) - 0x100 - DT_SIZE_K(512))>; +}; + +&flash0 { + partitions { + storage_partition: partition@f80000 { + reg = <0xf80000 DT_SIZE_K(512)>; + read-only; + }; + }; +}; diff --git a/app/boards/boardsource/blok/boardsource_blok_zmk_defconfig b/app/boards/boardsource/blok/boardsource_blok_zmk_defconfig new file mode 100644 index 00000000..0c1a531e --- /dev/null +++ b/app/boards/boardsource/blok/boardsource_blok_zmk_defconfig @@ -0,0 +1,30 @@ +# SPDX-License-Identifier: MIT + +CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=125000000 + +CONFIG_RESET=y + +# Enable clock control by default +CONFIG_CLOCK_CONTROL=y + +# Code partition needed to target the correct flash range +CONFIG_USE_DT_CODE_PARTITION=y + +# Output UF2 by default, native bootloader supports it. +CONFIG_BUILD_OUTPUT_UF2=y + +# USB HID +CONFIG_ZMK_USB=y + +# Settings Support +CONFIG_MPU_ALLOW_FLASH_WRITE=y +CONFIG_NVS=y +CONFIG_SETTINGS_NVS=y +CONFIG_FLASH=y +CONFIG_FLASH_PAGE_LAYOUT=y +CONFIG_FLASH_MAP=y + +# Bootloader Support +CONFIG_RETAINED_MEM=y +CONFIG_RETENTION=y +CONFIG_RETENTION_BOOT_MODE=y diff --git a/app/boards/boardsource_blok.conf b/app/boards/boardsource_blok.conf deleted file mode 100644 index 21c1893d..00000000 --- a/app/boards/boardsource_blok.conf +++ /dev/null @@ -1,4 +0,0 @@ -CONFIG_CONSOLE=n -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n -CONFIG_ZMK_USB=y diff --git a/app/boards/boardsource_blok.overlay b/app/boards/boardsource_blok.overlay deleted file mode 100644 index 72b3adca..00000000 --- a/app/boards/boardsource_blok.overlay +++ /dev/null @@ -1,7 +0,0 @@ -/* - * Copyright (c) 2023 The ZMK Contributors - * - * SPDX-License-Identifier: MIT - */ - -&pro_micro_serial { status = "disabled"; }; diff --git a/app/boards/interconnects/arduino_uno/arduino_uno.zmk.yml b/app/boards/interconnects/arduino_uno/arduino_uno.zmk.yml index d6eb89a3..b06e8d54 100644 --- a/app/boards/interconnects/arduino_uno/arduino_uno.zmk.yml +++ b/app/boards/interconnects/arduino_uno/arduino_uno.zmk.yml @@ -9,10 +9,6 @@ description: | natural extension, once there were many shields designed for it, many other *boards* began to be developed that were compatible to leverage the extensive available shields. Today, many dev kits come with Uno headers to make it easy to work with them. - - Note: ZMK doesn't support boards with AVR 8-bit processors, such as the ATmega32U4, because Zephyr™ only - supports 32-bit and 64-bit platforms. As a result, boards like the original Arduino Uno Rev3 itself are - *not* supported by ZMK. node_labels: gpio: arduino_header i2c: arduino_i2c diff --git a/app/boards/interconnects/pro_micro/pro_micro.zmk.yml b/app/boards/interconnects/pro_micro/pro_micro.zmk.yml index 83aa31c7..041375ae 100644 --- a/app/boards/interconnects/pro_micro/pro_micro.zmk.yml +++ b/app/boards/interconnects/pro_micro/pro_micro.zmk.yml @@ -6,12 +6,8 @@ url: https://www.sparkfun.com/products/12640 manufacturer: SparkFun description: | The SparkFun Pro Micro grew popular as a low cost ATmega32U4 board with sufficient GPIO and peripherals - to work for many keyboard needs. Since the original Pro Micro, many pin compatible boards have appeared, - with various changes or improvements, such as the Elite-C w/ USB-C, nice!nano with nRF52840 wireless. - - Note: ZMK doesn't support boards with AVR 8-bit processors, such as the ATmega32U4, because Zephyr™ only - supports 32-bit and 64-bit platforms. As a result, controllers like the SparkFun Pro Micro and the Elite-C - are *not* supported by ZMK. + to work for many keyboard needs. Since the original Pro Micro, many pin compatible boards have appeared + with various changes or improvements. node_labels: gpio: pro_micro i2c: pro_micro_i2c diff --git a/app/boards/interconnects/seeed_xiao/seeed_xiao.zmk.yml b/app/boards/interconnects/seeed_xiao/seeed_xiao.zmk.yml index e9b20507..139cf625 100644 --- a/app/boards/interconnects/seeed_xiao/seeed_xiao.zmk.yml +++ b/app/boards/interconnects/seeed_xiao/seeed_xiao.zmk.yml @@ -5,9 +5,9 @@ type: interconnect url: https://wiki.seeedstudio.com/Seeeduino-XIAO/ manufacturer: Seeed description: | - The Seeed(uino) XIAO is a popular smaller format micro-controller, that has gained popularity as an alternative + The Seeed Studio XIAO is a popular smaller format micro-controller, that has gained popularity as an alternative to the SparkFun Pro Micro. Since its creation, several pin compatible controllers, such - as the Seeeduino XIAO BLE, Adafruit QT Py and Adafruit QT Py RP2040, have become available. + as the Seeed Studio XIAO nRF52840 (also known as XIAO BLE), Adafruit QT Py and Adafruit QT Py RP2040, have become available. node_labels: gpio: xiao_d i2c: xiao_i2c diff --git a/app/boards/joric/nrfmicro/Kconfig.nrfmicro b/app/boards/joric/nrfmicro/Kconfig.nrfmicro new file mode 100644 index 00000000..68d724c4 --- /dev/null +++ b/app/boards/joric/nrfmicro/Kconfig.nrfmicro @@ -0,0 +1,13 @@ +# nrfmicro board configuration + +# Copyright (c) 2020 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config BOARD_NRFMICRO + select SOC_NRF52840_QIAA if BOARD_NRFMICRO_NRF52840_ZMK + select SOC_NRF52840_QIAA if BOARD_NRFMICRO_NRF52840_FLIPPED_ZMK + select SOC_NRF52833_QIAA if BOARD_NRFMICRO_NRF52833_ZMK + select ZMK_BOARD_COMPAT if BOARD_NRFMICRO_NRF52840_ZMK || BOARD_NRFMICRO_NRF52840_FLIPPED_ZMK || BOARD_NRFMICRO_NRF52833_ZMK + imply RETAINED_MEM if BOARD_NRFMICRO_NRF52840_ZMK || BOARD_NRFMICRO_NRF52840_FLIPPED_ZMK || BOARD_NRFMICRO_NRF52833_ZMK + imply RETENTION if BOARD_NRFMICRO_NRF52840_ZMK || BOARD_NRFMICRO_NRF52840_FLIPPED_ZMK || BOARD_NRFMICRO_NRF52833_ZMK + imply RETENTION_BOOT_MODE if BOARD_NRFMICRO_NRF52840_ZMK || BOARD_NRFMICRO_NRF52840_FLIPPED_ZMK || BOARD_NRFMICRO_NRF52833_ZMK diff --git a/app/boards/joric/nrfmicro/board.yml b/app/boards/joric/nrfmicro/board.yml new file mode 100644 index 00000000..391cee63 --- /dev/null +++ b/app/boards/joric/nrfmicro/board.yml @@ -0,0 +1,9 @@ +board: + extend: nrfmicro + variants: + - name: zmk + qualifier: nrf52840 + - name: flipped_zmk + qualifier: nrf52840 + - name: zmk + qualifier: nrf52833 diff --git a/app/boards/arm/nrfmicro/nrfmicro_11.zmk.yml b/app/boards/joric/nrfmicro/nrfmicro_nrf52833.zmk.yml similarity index 55% rename from app/boards/arm/nrfmicro/nrfmicro_11.zmk.yml rename to app/boards/joric/nrfmicro/nrfmicro_nrf52833.zmk.yml index 4160ec6a..632d283e 100644 --- a/app/boards/arm/nrfmicro/nrfmicro_11.zmk.yml +++ b/app/boards/joric/nrfmicro/nrfmicro_nrf52833.zmk.yml @@ -1,6 +1,6 @@ file_format: "1" -id: nrfmicro_11 -name: nRFMicro 1.1/1.2 +id: nrfmicro/nrf52833/zmk +name: nRFMicro (nRF52833) type: board arch: arm outputs: @@ -8,3 +8,6 @@ outputs: - ble url: https://github.com/joric/nrfmicro/ exposes: [pro_micro] +revisions: + - "1.3.0" +default_revision: "1.3.0" diff --git a/app/boards/joric/nrfmicro/nrfmicro_nrf52833_zmk.dts b/app/boards/joric/nrfmicro/nrfmicro_nrf52833_zmk.dts new file mode 100644 index 00000000..7f597f58 --- /dev/null +++ b/app/boards/joric/nrfmicro/nrfmicro_nrf52833_zmk.dts @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2026 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include <../boards/joric/nrfmicro/nrfmicro_nrf52833.dts> +#include + +/ { + chosen { + zmk,battery = &vbatt; + }; + + // Node name must match original "EXT_POWER" label to preserve user settings. + EXT_POWER { + compatible = "zmk,ext-power-generic"; + control-gpios = <&gpio1 9 GPIO_ACTIVE_LOW>; + init-delay-ms = <50>; + }; + + vbatt: vbatt { + compatible = "zmk,battery-voltage-divider"; + io-channels = <&adc 2>; + output-ohms = <2000000>; + full-ohms = <(2000000 + 820000)>; + }; +}; + diff --git a/app/boards/arm/nrfmicro/nrfmicro_11_defconfig b/app/boards/joric/nrfmicro/nrfmicro_nrf52833_zmk_1_3_0_defconfig similarity index 79% rename from app/boards/arm/nrfmicro/nrfmicro_11_defconfig rename to app/boards/joric/nrfmicro/nrfmicro_nrf52833_zmk_1_3_0_defconfig index 5ba4d6e1..709f33d8 100644 --- a/app/boards/arm/nrfmicro/nrfmicro_11_defconfig +++ b/app/boards/joric/nrfmicro/nrfmicro_nrf52833_zmk_1_3_0_defconfig @@ -1,9 +1,5 @@ # SPDX-License-Identifier: MIT -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_NRFMICRO_11=y - # Enable MPU CONFIG_ARM_MPU=y @@ -25,4 +21,4 @@ CONFIG_CLOCK_CONTROL_NRF=y CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y CONFIG_ZMK_USB=y -CONFIG_ZMK_BLE=y \ No newline at end of file +CONFIG_ZMK_BLE=y diff --git a/app/boards/arm/nrfmicro/nrfmicro_13.zmk.yml b/app/boards/joric/nrfmicro/nrfmicro_nrf52840.zmk.yml similarity index 50% rename from app/boards/arm/nrfmicro/nrfmicro_13.zmk.yml rename to app/boards/joric/nrfmicro/nrfmicro_nrf52840.zmk.yml index 8fd28d37..403fdda3 100644 --- a/app/boards/arm/nrfmicro/nrfmicro_13.zmk.yml +++ b/app/boards/joric/nrfmicro/nrfmicro_nrf52840.zmk.yml @@ -1,6 +1,6 @@ file_format: "1" -id: nrfmicro_13 -name: nRFMicro 1.3/1.4 +id: nrfmicro/nrf52840/zmk +name: nRFMicro (nRF52840) 1.1/1.2/1.3 type: board arch: arm outputs: @@ -8,3 +8,7 @@ outputs: - ble url: https://github.com/joric/nrfmicro/ exposes: [pro_micro] +revisions: + - "1.1.0" + - "1.3.0" +default_revision: "1.3.0" diff --git a/app/boards/arm/nrfmicro/nrfmicro_11_flipped.zmk.yml b/app/boards/joric/nrfmicro/nrfmicro_nrf52840_flipped.zmk.yml similarity index 51% rename from app/boards/arm/nrfmicro/nrfmicro_11_flipped.zmk.yml rename to app/boards/joric/nrfmicro/nrfmicro_nrf52840_flipped.zmk.yml index b63ace2d..d3b66619 100644 --- a/app/boards/arm/nrfmicro/nrfmicro_11_flipped.zmk.yml +++ b/app/boards/joric/nrfmicro/nrfmicro_nrf52840_flipped.zmk.yml @@ -1,6 +1,6 @@ file_format: "1" -id: nrfmicro_11_flipped -name: nRFMicro 1.1 (flipped) +id: nrfmicro/nrf52840/flipped_zmk +name: nRFMicro nRF52840 (flipped) type: board arch: arm outputs: @@ -8,3 +8,6 @@ outputs: - ble url: https://github.com/joric/nrfmicro/ exposes: [pro_micro] +revisions: + - "1.1.0" +default_revision: "1.1.0" diff --git a/app/boards/joric/nrfmicro/nrfmicro_nrf52840_flipped_zmk.dts b/app/boards/joric/nrfmicro/nrfmicro_nrf52840_flipped_zmk.dts new file mode 100644 index 00000000..d1de13ce --- /dev/null +++ b/app/boards/joric/nrfmicro/nrfmicro_nrf52840_flipped_zmk.dts @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2026 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include <../boards/joric/nrfmicro/nrfmicro_nrf52840_flipped.dts> +#include + +/ { + // Node name must match original "EXT_POWER" label to preserve user settings. + EXT_POWER { + compatible = "zmk,ext-power-generic"; + control-gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>; + init-delay-ms = <50>; + }; +}; diff --git a/app/boards/arm/nrfmicro/nrfmicro_13_defconfig b/app/boards/joric/nrfmicro/nrfmicro_nrf52840_flipped_zmk_1_1_0_defconfig similarity index 79% rename from app/boards/arm/nrfmicro/nrfmicro_13_defconfig rename to app/boards/joric/nrfmicro/nrfmicro_nrf52840_flipped_zmk_1_1_0_defconfig index 9ffb2766..709f33d8 100644 --- a/app/boards/arm/nrfmicro/nrfmicro_13_defconfig +++ b/app/boards/joric/nrfmicro/nrfmicro_nrf52840_flipped_zmk_1_1_0_defconfig @@ -1,9 +1,5 @@ # SPDX-License-Identifier: MIT -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_NRFMICRO_13=y - # Enable MPU CONFIG_ARM_MPU=y @@ -25,4 +21,4 @@ CONFIG_CLOCK_CONTROL_NRF=y CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y CONFIG_ZMK_USB=y -CONFIG_ZMK_BLE=y \ No newline at end of file +CONFIG_ZMK_BLE=y diff --git a/app/boards/joric/nrfmicro/nrfmicro_nrf52840_zmk.dts b/app/boards/joric/nrfmicro/nrfmicro_nrf52840_zmk.dts new file mode 100644 index 00000000..a1995732 --- /dev/null +++ b/app/boards/joric/nrfmicro/nrfmicro_nrf52840_zmk.dts @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2026 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include <../boards/joric/nrfmicro/nrfmicro_nrf52840.dts> +#include + +/ { + + chosen { + zmk,battery = &vbatt; + }; + + // Node name must match original "EXT_POWER" label to preserve user settings. + EXT_POWER { + compatible = "zmk,ext-power-generic"; + control-gpios = <&gpio1 9 GPIO_ACTIVE_LOW>; + init-delay-ms = <50>; + }; + + vbatt: vbatt { + compatible = "zmk,battery-voltage-divider"; + io-channels = <&adc 2>; + output-ohms = <2000000>; + full-ohms = <(2000000 + 820000)>; + }; +}; diff --git a/app/boards/arm/bluemicro840/bluemicro840_v1_defconfig b/app/boards/joric/nrfmicro/nrfmicro_nrf52840_zmk_1_1_0_defconfig similarity index 79% rename from app/boards/arm/bluemicro840/bluemicro840_v1_defconfig rename to app/boards/joric/nrfmicro/nrfmicro_nrf52840_zmk_1_1_0_defconfig index 3e13e77d..709f33d8 100644 --- a/app/boards/arm/bluemicro840/bluemicro840_v1_defconfig +++ b/app/boards/joric/nrfmicro/nrfmicro_nrf52840_zmk_1_1_0_defconfig @@ -1,9 +1,5 @@ # SPDX-License-Identifier: MIT -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_BLUEMICRO840_V1=y - # Enable MPU CONFIG_ARM_MPU=y @@ -21,6 +17,8 @@ CONFIG_SETTINGS_NVS=y CONFIG_FLASH=y CONFIG_FLASH_PAGE_LAYOUT=y CONFIG_FLASH_MAP=y +CONFIG_CLOCK_CONTROL_NRF=y +CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y CONFIG_ZMK_USB=y CONFIG_ZMK_BLE=y diff --git a/app/boards/joric/nrfmicro/nrfmicro_nrf52840_zmk_1_3_0.overlay b/app/boards/joric/nrfmicro/nrfmicro_nrf52840_zmk_1_3_0.overlay new file mode 100644 index 00000000..3963dc43 --- /dev/null +++ b/app/boards/joric/nrfmicro/nrfmicro_nrf52840_zmk_1_3_0.overlay @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +/ { + chosen { + zmk,battery = &vbatt; + }; + + // Node name must match original "EXT_POWER" label to preserve user settings. + EXT_POWER { + compatible = "zmk,ext-power-generic"; + control-gpios = <&gpio1 9 GPIO_ACTIVE_LOW>; + init-delay-ms = <50>; + }; + + vbatt: vbatt { + compatible = "zmk,battery-voltage-divider"; + io-channels = <&adc 2>; + output-ohms = <2000000>; + full-ohms = <(2000000 + 820000)>; + }; +}; + +&adc { + status = "okay"; +}; + diff --git a/app/boards/arm/nrfmicro/nrfmicro_13_52833_defconfig b/app/boards/joric/nrfmicro/nrfmicro_nrf52840_zmk_1_3_0_defconfig similarity index 78% rename from app/boards/arm/nrfmicro/nrfmicro_13_52833_defconfig rename to app/boards/joric/nrfmicro/nrfmicro_nrf52840_zmk_1_3_0_defconfig index f459f356..709f33d8 100644 --- a/app/boards/arm/nrfmicro/nrfmicro_13_52833_defconfig +++ b/app/boards/joric/nrfmicro/nrfmicro_nrf52840_zmk_1_3_0_defconfig @@ -1,9 +1,5 @@ # SPDX-License-Identifier: MIT -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52833_QIAA=y -CONFIG_BOARD_NRFMICRO_13_52833=y - # Enable MPU CONFIG_ARM_MPU=y @@ -25,4 +21,4 @@ CONFIG_CLOCK_CONTROL_NRF=y CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y CONFIG_ZMK_USB=y -CONFIG_ZMK_BLE=y \ No newline at end of file +CONFIG_ZMK_BLE=y diff --git a/app/boards/jpconstantineau/bluemicro840/Kconfig.bluemicro840 b/app/boards/jpconstantineau/bluemicro840/Kconfig.bluemicro840 new file mode 100644 index 00000000..8a9b31d7 --- /dev/null +++ b/app/boards/jpconstantineau/bluemicro840/Kconfig.bluemicro840 @@ -0,0 +1,9 @@ +# Copyright (c) 2026 Pete Johanson, Derek Schmell +# SPDX-License-Identifier: Apache-2.0 + +config BOARD_BLUEMICRO840 + select SOC_NRF52840_QIAA + select ZMK_BOARD_COMPAT if BOARD_BLUEMICRO840_NRF52840_ZMK + imply RETAINED_MEM if BOARD_BLUEMICRO840_NRF52840_ZMK + imply RETENTION if BOARD_BLUEMICRO840_NRF52840_ZMK + imply RETENTION_BOOT_MODE if BOARD_BLUEMICRO840_NRF52840_ZMK diff --git a/app/boards/arm/bluemicro840/bluemicro840_v1.yaml b/app/boards/jpconstantineau/bluemicro840/bluemicro840.yaml similarity index 85% rename from app/boards/arm/bluemicro840/bluemicro840_v1.yaml rename to app/boards/jpconstantineau/bluemicro840/bluemicro840.yaml index 9e1dd54c..c36eee0c 100644 --- a/app/boards/arm/bluemicro840/bluemicro840_v1.yaml +++ b/app/boards/jpconstantineau/bluemicro840/bluemicro840.yaml @@ -1,4 +1,4 @@ -identifier: bluemicro840_v1 +identifier: bluemicro840 name: BlueMicro840_V1 type: mcu arch: arm diff --git a/app/boards/arm/bluemicro840/bluemicro840_v1.zmk.yml b/app/boards/jpconstantineau/bluemicro840/bluemicro840.zmk.yml similarity index 88% rename from app/boards/arm/bluemicro840/bluemicro840_v1.zmk.yml rename to app/boards/jpconstantineau/bluemicro840/bluemicro840.zmk.yml index c1d3c6b9..7b1d8452 100644 --- a/app/boards/arm/bluemicro840/bluemicro840_v1.zmk.yml +++ b/app/boards/jpconstantineau/bluemicro840/bluemicro840.zmk.yml @@ -1,5 +1,5 @@ file_format: "1" -id: bluemicro840_v1 +id: bluemicro840//zmk name: BlueMicro840 v1 type: board arch: arm diff --git a/app/boards/jpconstantineau/bluemicro840/bluemicro840_nrf52840_zmk.dts b/app/boards/jpconstantineau/bluemicro840/bluemicro840_nrf52840_zmk.dts new file mode 100644 index 00000000..e36be912 --- /dev/null +++ b/app/boards/jpconstantineau/bluemicro840/bluemicro840_nrf52840_zmk.dts @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2026 Pete Johanson, Derek Schmell + * + * SPDX-License-Identifier: MIT + */ + +#include <../boards/jpconstantineau/bluemicro840/bluemicro840.dts> +#include + +/ { + chosen { + zmk,battery = &vbatt; + }; + + // Node name must match original "EXT_POWER" label to preserve user settings. + EXT_POWER { + compatible = "zmk,ext-power-generic"; + init-delay-ms = <20>; + control-gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>; + }; + + vbatt: vbatt { + compatible = "zmk,battery-voltage-divider"; + io-channels = <&adc 7>; + output-ohms = <2000000>; + full-ohms = <(2000000 + 806000)>; + }; + +}; diff --git a/app/boards/jpconstantineau/bluemicro840/bluemicro840_nrf52840_zmk_defconfig b/app/boards/jpconstantineau/bluemicro840/bluemicro840_nrf52840_zmk_defconfig new file mode 100644 index 00000000..b41fbe47 --- /dev/null +++ b/app/boards/jpconstantineau/bluemicro840/bluemicro840_nrf52840_zmk_defconfig @@ -0,0 +1,22 @@ +# SPDX-License-Identifier: MIT + +# Enable MPU +CONFIG_ARM_MPU=y + +CONFIG_PINCTRL=y + +# enable GPIO +CONFIG_GPIO=y + +CONFIG_USE_DT_CODE_PARTITION=y +CONFIG_BUILD_OUTPUT_UF2=y + +CONFIG_MPU_ALLOW_FLASH_WRITE=y +CONFIG_NVS=y +CONFIG_SETTINGS_NVS=y +CONFIG_FLASH=y +CONFIG_FLASH_PAGE_LAYOUT=y +CONFIG_FLASH_MAP=y + +CONFIG_ZMK_USB=y +CONFIG_ZMK_BLE=y diff --git a/app/boards/arm/bluemicro840/board.cmake b/app/boards/jpconstantineau/bluemicro840/board.cmake similarity index 100% rename from app/boards/arm/bluemicro840/board.cmake rename to app/boards/jpconstantineau/bluemicro840/board.cmake diff --git a/app/boards/jpconstantineau/bluemicro840/board.yml b/app/boards/jpconstantineau/bluemicro840/board.yml new file mode 100644 index 00000000..4341c04f --- /dev/null +++ b/app/boards/jpconstantineau/bluemicro840/board.yml @@ -0,0 +1,5 @@ +board: + extend: bluemicro840 + variants: + - name: zmk + qualifier: nrf52840 diff --git a/app/boards/arm/adv360pro/pre_dt_board.cmake b/app/boards/jpconstantineau/bluemicro840/pre_dt_board.cmake similarity index 100% rename from app/boards/arm/adv360pro/pre_dt_board.cmake rename to app/boards/jpconstantineau/bluemicro840/pre_dt_board.cmake diff --git a/app/boards/arm/kbdfans_tofu65/Kconfig.defconfig b/app/boards/kbdfans/tofu65/Kconfig.defconfig similarity index 74% rename from app/boards/arm/kbdfans_tofu65/Kconfig.defconfig rename to app/boards/kbdfans/tofu65/Kconfig.defconfig index 0444f510..0a524c4e 100644 --- a/app/boards/arm/kbdfans_tofu65/Kconfig.defconfig +++ b/app/boards/kbdfans/tofu65/Kconfig.defconfig @@ -1,7 +1,7 @@ # Copyright (c) 2023 The ZMK Contributors # SPDX-License-Identifier: MIT -if BOARD_KBDFANS_TOFU65_V2 +if BOARD_TOFU65 config ZMK_KEYBOARD_NAME default "kbdfans tofu65" @@ -9,4 +9,4 @@ config ZMK_KEYBOARD_NAME config RP2_FLASH_W25Q080 default y -endif # BOARD_KBDFANS_TOFU65_V2 +endif # BOARD_TOFU65 diff --git a/app/boards/kbdfans/tofu65/Kconfig.tofu65 b/app/boards/kbdfans/tofu65/Kconfig.tofu65 new file mode 100644 index 00000000..6844d439 --- /dev/null +++ b/app/boards/kbdfans/tofu65/Kconfig.tofu65 @@ -0,0 +1,9 @@ +# Copyright (c) 2023 The ZMK Contributors +# SPDX-License-Identifier: Apache-2.0 + +config BOARD_TOFU65 + select SOC_RP2040 + select ZMK_BOARD_COMPAT + imply RETAINED_MEM + imply RETENTION + imply RETENTION_BOOT_MODE diff --git a/app/boards/kbdfans/tofu65/board.yml b/app/boards/kbdfans/tofu65/board.yml new file mode 100644 index 00000000..9441c642 --- /dev/null +++ b/app/boards/kbdfans/tofu65/board.yml @@ -0,0 +1,7 @@ +board: + name: tofu65 + vendor: kbdfans + socs: + - name: rp2040 + variants: + - name: zmk diff --git a/app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2.keymap b/app/boards/kbdfans/tofu65/tofu65.keymap similarity index 100% rename from app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2.keymap rename to app/boards/kbdfans/tofu65/tofu65.keymap diff --git a/app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2.yaml b/app/boards/kbdfans/tofu65/tofu65.yaml similarity index 84% rename from app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2.yaml rename to app/boards/kbdfans/tofu65/tofu65.yaml index e1089766..458b157f 100644 --- a/app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2.yaml +++ b/app/boards/kbdfans/tofu65/tofu65.yaml @@ -1,4 +1,4 @@ -identifier: kbdfans_tofu65_v2 +identifier: tofu65 name: KBDfans Tofu65 2.0 type: mcu arch: arm diff --git a/app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2.zmk.yml b/app/boards/kbdfans/tofu65/tofu65.zmk.yml similarity index 88% rename from app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2.zmk.yml rename to app/boards/kbdfans/tofu65/tofu65.zmk.yml index 382e7dd3..fd24d183 100644 --- a/app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2.zmk.yml +++ b/app/boards/kbdfans/tofu65/tofu65.zmk.yml @@ -1,5 +1,5 @@ file_format: "1" -id: kbdfans_tofu65_v2 +id: tofu65//zmk name: KBDfans Tofu65 2.0 type: board arch: arm diff --git a/app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2.dts b/app/boards/kbdfans/tofu65/tofu65_rp2040_zmk.dts similarity index 88% rename from app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2.dts rename to app/boards/kbdfans/tofu65/tofu65_rp2040_zmk.dts index 60ba1da0..d1249c83 100644 --- a/app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2.dts +++ b/app/boards/kbdfans/tofu65/tofu65_rp2040_zmk.dts @@ -5,23 +5,22 @@ /dts-v1/; -#include +#include +#include + #include +#include + / { chosen { zephyr,sram = &sram0; zephyr,flash = &flash0; + zephyr,flash-controller = &ssi; zephyr,code-partition = &code_partition; zmk,kscan = &kscan0; - zmk,matrix-transform = &default_transform; - }; - - xtal_clk: xtal-clk { - compatible = "fixed-clock"; - clock-frequency = <12000000>; - #clock-cells = <0>; + zmk,physical-layout = &layout_65_ansi; }; default_transform: keymap_transform_0 { @@ -105,13 +104,28 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,6) RC(4,8) RC(4,9) }; }; +&timer { + status = "okay"; +}; + +&rtc { + clocks = <&clocks RPI_PICO_CLKID_CLK_RTC>; + status = "okay"; +}; zephyr_udc0: &usbd { status = "okay"; }; +&vreg { + regulator-always-on; + regulator-allowed-modes = ; +}; &gpio0 { status = "okay"; }; +&layout_65_ansi { + transform = <&default_transform>; +}; diff --git a/app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2_defconfig b/app/boards/kbdfans/tofu65/tofu65_rp2040_zmk_defconfig similarity index 83% rename from app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2_defconfig rename to app/boards/kbdfans/tofu65/tofu65_rp2040_zmk_defconfig index 57014acf..a0ac1c3b 100644 --- a/app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2_defconfig +++ b/app/boards/kbdfans/tofu65/tofu65_rp2040_zmk_defconfig @@ -1,10 +1,6 @@ # Copyright (c) 2023 The ZMK Contributors # SPDX-License-Identifier: MIT -CONFIG_SOC_SERIES_RP2XXX=y -CONFIG_SOC_RP2040=y -CONFIG_BOARD_KBDFANS_TOFU65_V2=y - CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=125000000 # Enable USB CDC ACM logging for debugging @@ -12,6 +8,7 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=125000000 # Enable reset by default CONFIG_RESET=y +CONFIG_CLOCK_CONTROL=y # Code partition needed to target the correct flash range CONFIG_USE_DT_CODE_PARTITION=y diff --git a/app/boards/keebio/bdn9/Kconfig.bdn9 b/app/boards/keebio/bdn9/Kconfig.bdn9 new file mode 100644 index 00000000..98a73619 --- /dev/null +++ b/app/boards/keebio/bdn9/Kconfig.bdn9 @@ -0,0 +1,6 @@ +# Copyright (c) 2020 Pete Johanson +# SPDX-License-Identifier: Apache-2.0 + +config BOARD_BDN9 + select SOC_STM32F072XB + select ZMK_BOARD_COMPAT diff --git a/app/boards/arm/bdn9/Kconfig.defconfig b/app/boards/keebio/bdn9/Kconfig.defconfig similarity index 78% rename from app/boards/arm/bdn9/Kconfig.defconfig rename to app/boards/keebio/bdn9/Kconfig.defconfig index 96b7fe55..3b6c0652 100644 --- a/app/boards/arm/bdn9/Kconfig.defconfig +++ b/app/boards/keebio/bdn9/Kconfig.defconfig @@ -11,8 +11,4 @@ config BOARD config ZMK_KEYBOARD_NAME default "BDN9 Rev2" -config ZMK_RGB_UNDERGLOW - select SPI - select WS2812_STRIP - endif # BOARD_BDN9 diff --git a/app/boards/arm/bdn9/README.md b/app/boards/keebio/bdn9/README.md similarity index 100% rename from app/boards/arm/bdn9/README.md rename to app/boards/keebio/bdn9/README.md diff --git a/app/boards/keebio/bdn9/bdn9-layouts.dtsi b/app/boards/keebio/bdn9/bdn9-layouts.dtsi new file mode 100644 index 00000000..bc0f5527 --- /dev/null +++ b/app/boards/keebio/bdn9/bdn9-layouts.dtsi @@ -0,0 +1,20 @@ +#include + +/ { + physical_layout0: physical_layout_0 { + compatible = "zmk,physical-layout"; + display-name = "BDN9"; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 0 0 0 0> + , <&key_physical_attrs 100 100 100 0 0 0 0> + , <&key_physical_attrs 100 100 200 0 0 0 0> + , <&key_physical_attrs 100 100 0 100 0 0 0> + , <&key_physical_attrs 100 100 100 100 0 0 0> + , <&key_physical_attrs 100 100 200 100 0 0 0> + , <&key_physical_attrs 100 100 0 200 0 0 0> + , <&key_physical_attrs 100 100 100 200 0 0 0> + , <&key_physical_attrs 100 100 200 200 0 0 0> + ; + }; +}; \ No newline at end of file diff --git a/app/boards/arm/bdn9/bdn9_rev2.conf b/app/boards/keebio/bdn9/bdn9.conf similarity index 100% rename from app/boards/arm/bdn9/bdn9_rev2.conf rename to app/boards/keebio/bdn9/bdn9.conf diff --git a/app/boards/arm/bdn9/bdn9_rev2.keymap b/app/boards/keebio/bdn9/bdn9.keymap similarity index 100% rename from app/boards/arm/bdn9/bdn9_rev2.keymap rename to app/boards/keebio/bdn9/bdn9.keymap diff --git a/app/boards/arm/bdn9/bdn9_rev2.yaml b/app/boards/keebio/bdn9/bdn9.yaml similarity index 100% rename from app/boards/arm/bdn9/bdn9_rev2.yaml rename to app/boards/keebio/bdn9/bdn9.yaml diff --git a/app/boards/arm/bdn9/bdn9_rev2.zmk.yml b/app/boards/keebio/bdn9/bdn9.zmk.yml similarity index 70% rename from app/boards/arm/bdn9/bdn9_rev2.zmk.yml rename to app/boards/keebio/bdn9/bdn9.zmk.yml index 4680746f..a6c764ad 100644 --- a/app/boards/arm/bdn9/bdn9_rev2.zmk.yml +++ b/app/boards/keebio/bdn9/bdn9.zmk.yml @@ -1,6 +1,6 @@ file_format: "1" -id: bdn9_rev2 -name: BDN9 Rev2 +id: bdn9//zmk +name: BDN9 (Rev2) type: board arch: arm outputs: @@ -9,3 +9,6 @@ features: - keys - encoder url: https://keeb.io/collections/bdn9-collection/products/bdn9-rev-2-3x3-9-key-macropad-rotary-encoder-and-rgb +revisions: + - "2.0.0" +default_revision: "2.0.0" diff --git a/app/boards/arm/bdn9/bdn9_rev2.dts b/app/boards/keebio/bdn9/bdn9_stm32f072xb_zmk.dts similarity index 86% rename from app/boards/arm/bdn9/bdn9_rev2.dts rename to app/boards/keebio/bdn9/bdn9_stm32f072xb_zmk.dts index 12059c41..542c5341 100644 --- a/app/boards/arm/bdn9/bdn9_rev2.dts +++ b/app/boards/keebio/bdn9/bdn9_stm32f072xb_zmk.dts @@ -9,6 +9,14 @@ #include #include +#include + +#include "bdn9-layouts.dtsi" + +&physical_layout0 { + transform = <&matrix_transform0>; +}; + / { model = "Keeb.io BDN9 rev2"; compatible = "keebio,bdn9", "st,stm32f072"; @@ -16,11 +24,23 @@ chosen { zephyr,sram = &sram0; zephyr,flash = &flash0; - zmk,kscan = &kscan; zmk,underglow = &led_strip; + zmk,physical-layout = &physical_layout0; + zmk,kscan = &kscan0; }; - kscan: kscan { + matrix_transform0: matrix_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <3>; + rows = <3>; + map = < + RC(0,0) RC(0,1) RC(0,2) + RC(0,3) RC(0,4) RC(0,5) + RC(0,6) RC(0,7) RC(0,8) + >; + }; + + kscan0: kscan_0 { compatible = "zmk,kscan-gpio-direct"; input-gpios diff --git a/app/boards/arm/bdn9/bdn9_rev2_defconfig b/app/boards/keebio/bdn9/bdn9_stm32f072xb_zmk_defconfig similarity index 85% rename from app/boards/arm/bdn9/bdn9_rev2_defconfig rename to app/boards/keebio/bdn9/bdn9_stm32f072xb_zmk_defconfig index a59fa522..ce598bd2 100644 --- a/app/boards/arm/bdn9/bdn9_rev2_defconfig +++ b/app/boards/keebio/bdn9/bdn9_stm32f072xb_zmk_defconfig @@ -1,7 +1,5 @@ # SPDX-License-Identifier: MIT -CONFIG_SOC_SERIES_STM32F0X=y -CONFIG_SOC_STM32F072XB=y # 72MHz system clock CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=72000000 @@ -14,6 +12,7 @@ CONFIG_PINCTRL=y # Poll to avoid interrupt overlap issues CONFIG_ZMK_KSCAN_DIRECT_POLLING=y +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=1536 CONFIG_ISR_STACK_SIZE=1024 # clock configuration diff --git a/app/boards/arm/bdn9/board.cmake b/app/boards/keebio/bdn9/board.cmake similarity index 100% rename from app/boards/arm/bdn9/board.cmake rename to app/boards/keebio/bdn9/board.cmake diff --git a/app/boards/keebio/bdn9/board.yml b/app/boards/keebio/bdn9/board.yml new file mode 100644 index 00000000..a2c5917d --- /dev/null +++ b/app/boards/keebio/bdn9/board.yml @@ -0,0 +1,12 @@ +board: + name: bdn9 + vendor: keebio + socs: + - name: stm32f072xb + variants: + - name: zmk + revision: + format: major.minor.patch + default: 2.0.0 + revisions: + - name: 2.0.0 diff --git a/app/boards/arm/puchi_ble/Kconfig.defconfig b/app/boards/keycapsss/puchi_ble/Kconfig.defconfig similarity index 56% rename from app/boards/arm/puchi_ble/Kconfig.defconfig rename to app/boards/keycapsss/puchi_ble/Kconfig.defconfig index 0ba7eefd..696e60f0 100644 --- a/app/boards/arm/puchi_ble/Kconfig.defconfig +++ b/app/boards/keycapsss/puchi_ble/Kconfig.defconfig @@ -1,10 +1,7 @@ # Copyright (c) 2022 The ZMK Contributors # SPDX-License-Identifier: MIT -if BOARD_PUCHI_BLE_v1 - -config BOARD - default "puchi_ble" +if BOARD_PUCHI_BLE if USB_DEVICE_STACK @@ -13,7 +10,4 @@ config USB_NRFX endif # USB_DEVICE_STACK -config BT_CTLR - default BT - -endif # BOARD_PUCHI_BLE_v1 +endif # BOARD_PUCHI_BLE diff --git a/app/boards/keycapsss/puchi_ble/Kconfig.puchi_ble b/app/boards/keycapsss/puchi_ble/Kconfig.puchi_ble new file mode 100644 index 00000000..67f52a99 --- /dev/null +++ b/app/boards/keycapsss/puchi_ble/Kconfig.puchi_ble @@ -0,0 +1,11 @@ +# Puchi-BLE board configuration + +# Copyright (c) 2022 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config BOARD_PUCHI_BLE + select SOC_NRF52840_QIAA + select ZMK_BOARD_COMPAT if BOARD_PUCHI_BLE_NRF52840_ZMK + imply RETAINED_MEM if BOARD_PUCHI_BLE_NRF52840_ZMK + imply RETENTION if BOARD_PUCHI_BLE_NRF52840_ZMK + imply RETENTION_BOOT_MODE if BOARD_PUCHI_BLE_NRF52840_ZMK diff --git a/app/boards/keycapsss/puchi_ble/board.yml b/app/boards/keycapsss/puchi_ble/board.yml new file mode 100644 index 00000000..ba5a6b11 --- /dev/null +++ b/app/boards/keycapsss/puchi_ble/board.yml @@ -0,0 +1,5 @@ +board: + extend: puchi_ble + variants: + - name: zmk + qualifier: nrf52840 diff --git a/app/boards/arm/bluemicro840/pre_dt_board.cmake b/app/boards/keycapsss/puchi_ble/pre_dt_board.cmake similarity index 100% rename from app/boards/arm/bluemicro840/pre_dt_board.cmake rename to app/boards/keycapsss/puchi_ble/pre_dt_board.cmake diff --git a/app/boards/keycapsss/puchi_ble/puchi_ble.zmk.yml b/app/boards/keycapsss/puchi_ble/puchi_ble.zmk.yml new file mode 100644 index 00000000..c641fe7d --- /dev/null +++ b/app/boards/keycapsss/puchi_ble/puchi_ble.zmk.yml @@ -0,0 +1,10 @@ +file_format: "1" +id: puchi_ble//zmk +name: Puchi-BLE V1 +type: board +arch: arm +outputs: + - usb + - ble +url: https://keycapsss.com/keyboard-parts/mcu-controller/202/puchi-ble-wireless-microcontroller +exposes: [pro_micro] diff --git a/app/boards/keycapsss/puchi_ble/puchi_ble_nrf52840_zmk.dts b/app/boards/keycapsss/puchi_ble/puchi_ble_nrf52840_zmk.dts new file mode 100644 index 00000000..4ba21200 --- /dev/null +++ b/app/boards/keycapsss/puchi_ble/puchi_ble_nrf52840_zmk.dts @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2026 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include <../boards/keycapsss/puchi_ble/puchi_ble.dts> +#include + + +/ { + chosen { + zmk,battery = &vbatt; + }; + + // Node name must match original "EXT_POWER" label to preserve user settings. + EXT_POWER { + compatible = "zmk,ext-power-generic"; + control-gpios = <&gpio1 9 GPIO_ACTIVE_LOW>; + }; + + vbatt: vbatt { + compatible = "zmk,battery-voltage-divider"; + io-channels = <&adc 2>; + output-ohms = <2000000>; + full-ohms = <(2000000 + 820000)>; + }; +}; + diff --git a/app/boards/arm/puchi_ble/puchi_ble_v1_defconfig b/app/boards/keycapsss/puchi_ble/puchi_ble_nrf52840_zmk_defconfig similarity index 81% rename from app/boards/arm/puchi_ble/puchi_ble_v1_defconfig rename to app/boards/keycapsss/puchi_ble/puchi_ble_nrf52840_zmk_defconfig index ab197df0..f6aaf5fd 100644 --- a/app/boards/arm/puchi_ble/puchi_ble_v1_defconfig +++ b/app/boards/keycapsss/puchi_ble/puchi_ble_nrf52840_zmk_defconfig @@ -1,10 +1,6 @@ # Copyright (c) 2022 The ZMK Contributors # SPDX-License-Identifier: MIT -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_PUCHI_BLE_v1=y - # Enable MPU CONFIG_ARM_MPU=y @@ -27,4 +23,4 @@ CONFIG_CLOCK_CONTROL_NRF=y CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y CONFIG_ZMK_USB=y -CONFIG_ZMK_BLE=y \ No newline at end of file +CONFIG_ZMK_BLE=y diff --git a/app/boards/kinesis/adv360pro/Kconfig.adv360pro_left b/app/boards/kinesis/adv360pro/Kconfig.adv360pro_left new file mode 100644 index 00000000..a0bf978a --- /dev/null +++ b/app/boards/kinesis/adv360pro/Kconfig.adv360pro_left @@ -0,0 +1,11 @@ +# +# Copyright (c) 2023 The ZMK Contributors +# SPDX-License-Identifier: MIT +# + +config BOARD_ADV360PRO_LEFT + select SOC_NRF52840_QIAA + select ZMK_BOARD_COMPAT + imply RETAINED_MEM + imply RETENTION + imply RETENTION_BOOT_MODE diff --git a/app/boards/kinesis/adv360pro/Kconfig.adv360pro_right b/app/boards/kinesis/adv360pro/Kconfig.adv360pro_right new file mode 100644 index 00000000..823f262c --- /dev/null +++ b/app/boards/kinesis/adv360pro/Kconfig.adv360pro_right @@ -0,0 +1,11 @@ +# +# Copyright (c) 2023 The ZMK Contributors +# SPDX-License-Identifier: MIT +# + +config BOARD_ADV360PRO_RIGHT + select SOC_NRF52840_QIAA + select ZMK_BOARD_COMPAT + imply RETAINED_MEM + imply RETENTION + imply RETENTION_BOOT_MODE diff --git a/app/boards/arm/adv360pro/Kconfig.defconfig b/app/boards/kinesis/adv360pro/Kconfig.defconfig similarity index 100% rename from app/boards/arm/adv360pro/Kconfig.defconfig rename to app/boards/kinesis/adv360pro/Kconfig.defconfig diff --git a/app/boards/arm/adv360pro/README.md b/app/boards/kinesis/adv360pro/README.md similarity index 100% rename from app/boards/arm/adv360pro/README.md rename to app/boards/kinesis/adv360pro/README.md diff --git a/app/boards/kinesis/adv360pro/adv360pro-layouts.dtsi b/app/boards/kinesis/adv360pro/adv360pro-layouts.dtsi new file mode 100644 index 00000000..7970e1be --- /dev/null +++ b/app/boards/kinesis/adv360pro/adv360pro-layouts.dtsi @@ -0,0 +1,87 @@ +#include + +/ { + physical_layout0: physical_layout_0 { + compatible = "zmk,physical-layout"; + display-name = "Default"; + + keys // w h x y rot rx ry + = <&key_physical_attrs 125 100 0 25 0 0 0> + , <&key_physical_attrs 100 100 125 25 0 0 0> + , <&key_physical_attrs 100 100 225 0 0 0 0> + , <&key_physical_attrs 100 100 325 0 0 0 0> + , <&key_physical_attrs 100 100 425 0 0 0 0> + , <&key_physical_attrs 100 100 525 0 0 0 0> + , <&key_physical_attrs 100 100 625 0 0 0 0> + , <&key_physical_attrs 100 100 1075 0 0 0 0> + , <&key_physical_attrs 100 100 1175 0 0 0 0> + , <&key_physical_attrs 100 100 1275 0 0 0 0> + , <&key_physical_attrs 100 100 1375 0 0 0 0> + , <&key_physical_attrs 100 100 1475 0 0 0 0> + , <&key_physical_attrs 100 100 1575 25 0 0 0> + , <&key_physical_attrs 125 100 1675 25 0 0 0> + , <&key_physical_attrs 125 100 0 125 0 0 0> + , <&key_physical_attrs 100 100 125 125 0 0 0> + , <&key_physical_attrs 100 100 225 100 0 0 0> + , <&key_physical_attrs 100 100 325 100 0 0 0> + , <&key_physical_attrs 100 100 425 100 0 0 0> + , <&key_physical_attrs 100 100 525 100 0 0 0> + , <&key_physical_attrs 100 100 625 100 0 0 0> + , <&key_physical_attrs 100 100 1075 100 0 0 0> + , <&key_physical_attrs 100 100 1175 100 0 0 0> + , <&key_physical_attrs 100 100 1275 100 0 0 0> + , <&key_physical_attrs 100 100 1375 100 0 0 0> + , <&key_physical_attrs 100 100 1475 100 0 0 0> + , <&key_physical_attrs 100 100 1575 125 0 0 0> + , <&key_physical_attrs 125 100 1675 125 0 0 0> + , <&key_physical_attrs 125 100 0 225 0 0 0> + , <&key_physical_attrs 100 100 125 225 0 0 0> + , <&key_physical_attrs 100 100 225 200 0 0 0> + , <&key_physical_attrs 100 100 325 200 0 0 0> + , <&key_physical_attrs 100 100 425 200 0 0 0> + , <&key_physical_attrs 100 100 525 200 0 0 0> + , <&key_physical_attrs 100 100 625 200 0 0 0> + , <&key_physical_attrs 100 100 675 400 1500 525 400> + , <&key_physical_attrs 100 100 775 400 1500 525 400> + , <&key_physical_attrs 100 100 925 400 (-1500) 1275 400> + , <&key_physical_attrs 100 100 1025 400 (-1500) 1275 400> + , <&key_physical_attrs 100 100 1075 200 0 0 0> + , <&key_physical_attrs 100 100 1175 200 0 0 0> + , <&key_physical_attrs 100 100 1275 200 0 0 0> + , <&key_physical_attrs 100 100 1375 200 0 0 0> + , <&key_physical_attrs 100 100 1475 200 0 0 0> + , <&key_physical_attrs 100 100 1575 225 0 0 0> + , <&key_physical_attrs 125 100 1675 225 0 0 0> + , <&key_physical_attrs 125 100 0 325 0 0 0> + , <&key_physical_attrs 100 100 125 325 0 0 0> + , <&key_physical_attrs 100 100 225 300 0 0 0> + , <&key_physical_attrs 100 100 325 300 0 0 0> + , <&key_physical_attrs 100 100 425 300 0 0 0> + , <&key_physical_attrs 100 100 525 300 0 0 0> + , <&key_physical_attrs 100 100 775 500 1500 525 400> + , <&key_physical_attrs 100 100 925 500 (-1500) 1275 400> + , <&key_physical_attrs 100 100 1175 300 0 0 0> + , <&key_physical_attrs 100 100 1275 300 0 0 0> + , <&key_physical_attrs 100 100 1375 300 0 0 0> + , <&key_physical_attrs 100 100 1475 300 0 0 0> + , <&key_physical_attrs 100 100 1575 325 0 0 0> + , <&key_physical_attrs 125 100 1675 325 0 0 0> + , <&key_physical_attrs 125 100 0 425 0 0 0> + , <&key_physical_attrs 100 100 125 425 0 0 0> + , <&key_physical_attrs 100 100 225 400 0 0 0> + , <&key_physical_attrs 100 100 325 400 0 0 0> + , <&key_physical_attrs 100 100 425 400 0 0 0> + , <&key_physical_attrs 100 200 575 500 1500 525 400> + , <&key_physical_attrs 100 200 675 500 1500 525 400> + , <&key_physical_attrs 100 100 775 600 1500 525 400> + , <&key_physical_attrs 100 100 925 600 (-1500) 1275 400> + , <&key_physical_attrs 100 200 1025 500 (-1500) 1275 400> + , <&key_physical_attrs 100 200 1125 500 (-1500) 1275 400> + , <&key_physical_attrs 100 100 1275 400 0 0 0> + , <&key_physical_attrs 100 100 1375 400 0 0 0> + , <&key_physical_attrs 100 100 1475 400 0 0 0> + , <&key_physical_attrs 100 100 1575 425 0 0 0> + , <&key_physical_attrs 125 100 1675 425 0 0 0> + ; + }; +}; \ No newline at end of file diff --git a/app/boards/arm/adv360pro/adv360pro-pinctrl.dtsi b/app/boards/kinesis/adv360pro/adv360pro-pinctrl.dtsi similarity index 100% rename from app/boards/arm/adv360pro/adv360pro-pinctrl.dtsi rename to app/boards/kinesis/adv360pro/adv360pro-pinctrl.dtsi diff --git a/app/boards/arm/adv360pro/adv360pro.dtsi b/app/boards/kinesis/adv360pro/adv360pro.dtsi similarity index 93% rename from app/boards/arm/adv360pro/adv360pro.dtsi rename to app/boards/kinesis/adv360pro/adv360pro.dtsi index ea68624b..d9a00b01 100644 --- a/app/boards/arm/adv360pro/adv360pro.dtsi +++ b/app/boards/kinesis/adv360pro/adv360pro.dtsi @@ -7,12 +7,18 @@ /dts-v1/; #include +#include #include #include +#include "adv360pro-layouts.dtsi" #include "adv360pro-pinctrl.dtsi" +&physical_layout0 { + transform = <&matrix_transform0>; +}; + / { model = "Adv360 Pro"; compatible = "kinesis,adv360pro"; @@ -21,14 +27,14 @@ zephyr,code-partition = &code_partition; zephyr,sram = &sram0; zephyr,flash = &flash0; - zmk,kscan = &kscan0; zmk,backlight = &backlight; zmk,battery = &vbatt; - zmk,matrix-transform = &default_transform; + zmk,physical-layout = &physical_layout0; + zmk,kscan = &kscan0; zmk,underglow = &led_strip; }; - default_transform: keymap_transform_0 { + matrix_transform0: keymap_transform_0 { compatible = "zmk,matrix-transform"; columns = <20>; rows = <5>; @@ -66,6 +72,10 @@ }; +®1 { + regulator-initial-mode = ; +}; + &pwm0 { status = "okay"; pinctrl-0 = <&pwm0_default>; diff --git a/app/boards/arm/adv360pro/adv360pro.keymap b/app/boards/kinesis/adv360pro/adv360pro.keymap similarity index 100% rename from app/boards/arm/adv360pro/adv360pro.keymap rename to app/boards/kinesis/adv360pro/adv360pro.keymap diff --git a/app/boards/arm/adv360pro/adv360pro.yaml b/app/boards/kinesis/adv360pro/adv360pro.yaml similarity index 100% rename from app/boards/arm/adv360pro/adv360pro.yaml rename to app/boards/kinesis/adv360pro/adv360pro.yaml diff --git a/app/boards/arm/adv360pro/adv360pro.zmk.yml b/app/boards/kinesis/adv360pro/adv360pro.zmk.yml similarity index 77% rename from app/boards/arm/adv360pro/adv360pro.zmk.yml rename to app/boards/kinesis/adv360pro/adv360pro.zmk.yml index 7d4a4b44..2d1e3496 100644 --- a/app/boards/arm/adv360pro/adv360pro.zmk.yml +++ b/app/boards/kinesis/adv360pro/adv360pro.zmk.yml @@ -8,9 +8,10 @@ features: - keys - underglow - backlight + - studio outputs: - usb - ble siblings: - - adv360pro_left - - adv360pro_right + - adv360pro_left//zmk + - adv360pro_right//zmk diff --git a/app/boards/arm/adv360pro/adv360pro_left.dts b/app/boards/kinesis/adv360pro/adv360pro_left_nrf52840_zmk.dts similarity index 100% rename from app/boards/arm/adv360pro/adv360pro_left.dts rename to app/boards/kinesis/adv360pro/adv360pro_left_nrf52840_zmk.dts diff --git a/app/boards/arm/adv360pro/adv360pro_left_defconfig b/app/boards/kinesis/adv360pro/adv360pro_left_nrf52840_zmk_defconfig similarity index 90% rename from app/boards/arm/adv360pro/adv360pro_left_defconfig rename to app/boards/kinesis/adv360pro/adv360pro_left_nrf52840_zmk_defconfig index 6eb5a8d0..7a8db4dc 100644 --- a/app/boards/arm/adv360pro/adv360pro_left_defconfig +++ b/app/boards/kinesis/adv360pro/adv360pro_left_nrf52840_zmk_defconfig @@ -3,10 +3,6 @@ # SPDX-License-Identifier: MIT # -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_ADV360PRO_LEFT=y - # Enable MPU CONFIG_ARM_MPU=y @@ -32,7 +28,6 @@ CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y CONFIG_CLOCK_CONTROL_NRF_K32SRC_150PPM=y #RGB leds config -CONFIG_WS2812_STRIP=y CONFIG_ZMK_RGB_UNDERGLOW=y CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=y CONFIG_ZMK_RGB_UNDERGLOW_ON_START=n diff --git a/app/boards/arm/adv360pro/adv360pro_right.dts b/app/boards/kinesis/adv360pro/adv360pro_right_nrf52840_zmk.dts similarity index 98% rename from app/boards/arm/adv360pro/adv360pro_right.dts rename to app/boards/kinesis/adv360pro/adv360pro_right_nrf52840_zmk.dts index 748cc42a..3c96f3a1 100644 --- a/app/boards/arm/adv360pro/adv360pro_right.dts +++ b/app/boards/kinesis/adv360pro/adv360pro_right_nrf52840_zmk.dts @@ -36,6 +36,6 @@ }; }; -&default_transform { +&matrix_transform0 { col-offset = <10>; }; diff --git a/app/boards/arm/adv360pro/adv360pro_right_defconfig b/app/boards/kinesis/adv360pro/adv360pro_right_nrf52840_zmk_defconfig similarity index 90% rename from app/boards/arm/adv360pro/adv360pro_right_defconfig rename to app/boards/kinesis/adv360pro/adv360pro_right_nrf52840_zmk_defconfig index b5174549..1cda90c0 100644 --- a/app/boards/arm/adv360pro/adv360pro_right_defconfig +++ b/app/boards/kinesis/adv360pro/adv360pro_right_nrf52840_zmk_defconfig @@ -3,10 +3,6 @@ # SPDX-License-Identifier: MIT # -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_ADV360PRO_RIGHT=y - # Enable MPU CONFIG_ARM_MPU=y @@ -32,7 +28,6 @@ CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y CONFIG_CLOCK_CONTROL_NRF_K32SRC_150PPM=y #RGB leds config -CONFIG_WS2812_STRIP=y CONFIG_ZMK_RGB_UNDERGLOW=y CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=y CONFIG_ZMK_RGB_UNDERGLOW_ON_START=n diff --git a/app/boards/arm/adv360pro/board.cmake b/app/boards/kinesis/adv360pro/board.cmake similarity index 100% rename from app/boards/arm/adv360pro/board.cmake rename to app/boards/kinesis/adv360pro/board.cmake diff --git a/app/boards/kinesis/adv360pro/board.yml b/app/boards/kinesis/adv360pro/board.yml new file mode 100644 index 00000000..8ec7f8f8 --- /dev/null +++ b/app/boards/kinesis/adv360pro/board.yml @@ -0,0 +1,13 @@ +boards: + - name: adv360pro_left + vendor: kinesis + socs: + - name: nrf52840 + variants: + - name: zmk + - name: adv360pro_right + vendor: kinesis + socs: + - name: nrf52840 + variants: + - name: zmk diff --git a/app/boards/arm/bt60/pre_dt_board.cmake b/app/boards/kinesis/adv360pro/pre_dt_board.cmake similarity index 100% rename from app/boards/arm/bt60/pre_dt_board.cmake rename to app/boards/kinesis/adv360pro/pre_dt_board.cmake diff --git a/app/boards/arm/corneish_zen/CMakeLists.txt b/app/boards/lowprokb/corneish_zen/CMakeLists.txt similarity index 100% rename from app/boards/arm/corneish_zen/CMakeLists.txt rename to app/boards/lowprokb/corneish_zen/CMakeLists.txt diff --git a/app/boards/lowprokb/corneish_zen/Kconfig.corneish_zen_left b/app/boards/lowprokb/corneish_zen/Kconfig.corneish_zen_left new file mode 100644 index 00000000..fb1e7027 --- /dev/null +++ b/app/boards/lowprokb/corneish_zen/Kconfig.corneish_zen_left @@ -0,0 +1,11 @@ +# +# Copyright (c) 2022 Darryl deHaan +# SPDX-License-Identifier: MIT +# + +config BOARD_CORNEISH_ZEN_LEFT + select SOC_NRF52840_QIAA + select ZMK_BOARD_COMPAT + imply RETAINED_MEM + imply RETENTION + imply RETENTION_BOOT_MODE diff --git a/app/boards/lowprokb/corneish_zen/Kconfig.corneish_zen_right b/app/boards/lowprokb/corneish_zen/Kconfig.corneish_zen_right new file mode 100644 index 00000000..4009ebf1 --- /dev/null +++ b/app/boards/lowprokb/corneish_zen/Kconfig.corneish_zen_right @@ -0,0 +1,11 @@ +# +# Copyright (c) 2022 Darryl deHaan +# SPDX-License-Identifier: MIT +# + +config BOARD_CORNEISH_ZEN_RIGHT + select SOC_NRF52840_QIAA + select ZMK_BOARD_COMPAT + imply RETAINED_MEM + imply RETENTION + imply RETENTION_BOOT_MODE diff --git a/app/boards/arm/corneish_zen/Kconfig.defconfig b/app/boards/lowprokb/corneish_zen/Kconfig.defconfig similarity index 88% rename from app/boards/arm/corneish_zen/Kconfig.defconfig rename to app/boards/lowprokb/corneish_zen/Kconfig.defconfig index 11f932b5..e4ff579a 100644 --- a/app/boards/arm/corneish_zen/Kconfig.defconfig +++ b/app/boards/lowprokb/corneish_zen/Kconfig.defconfig @@ -40,7 +40,7 @@ config ZMK_DISPLAY select LV_FONT_MONTSERRAT_26 select LV_FONT_MONTSERRAT_16 select LV_USE_LABEL - select LV_USE_IMG + select LV_USE_IMAGE choice ZMK_DISPLAY_STATUS_SCREEN default ZMK_DISPLAY_STATUS_SCREEN_CUSTOM @@ -79,10 +79,3 @@ menuconfig CUSTOM_WIDGET_PERIPHERAL_STATUS bool "custom peripheral status widget" endif # BOARD_CORNEISH_ZEN_LEFT || BOARD_CORNEISH_ZEN_RIGHT - -if BOARD_CORNEISH_ZEN_V1_LEFT || BOARD_CORNEISH_ZEN_V1_RIGHT - -config BQ274XX - default y - -endif # BOARD_CORNEISH_ZEN_V1_LEFT || BOARD_CORNEISH_ZEN_V1_RIGHT diff --git a/app/boards/arm/bt60/board.cmake b/app/boards/lowprokb/corneish_zen/board.cmake similarity index 100% rename from app/boards/arm/bt60/board.cmake rename to app/boards/lowprokb/corneish_zen/board.cmake diff --git a/app/boards/lowprokb/corneish_zen/board.yml b/app/boards/lowprokb/corneish_zen/board.yml new file mode 100644 index 00000000..aafdcbd6 --- /dev/null +++ b/app/boards/lowprokb/corneish_zen/board.yml @@ -0,0 +1,27 @@ +boards: + - name: corneish_zen_left + vendor: lowprokb + socs: + - name: nrf52840 + variants: + - name: zmk + revision: + format: major.minor.patch + default: 2.0.0 + exact: false + revisions: + - name: 2.0.0 + - name: 1.0.0 + - name: corneish_zen_right + vendor: lowprokb + socs: + - name: nrf52840 + variants: + - name: zmk + revision: + format: major.minor.patch + default: 2.0.0 + exact: false + revisions: + - name: 2.0.0 + - name: 1.0.0 diff --git a/app/boards/arm/corneish_zen/corneish_zen.conf b/app/boards/lowprokb/corneish_zen/corneish_zen.conf similarity index 100% rename from app/boards/arm/corneish_zen/corneish_zen.conf rename to app/boards/lowprokb/corneish_zen/corneish_zen.conf diff --git a/app/boards/arm/corneish_zen/corneish_zen.dtsi b/app/boards/lowprokb/corneish_zen/corneish_zen.dtsi similarity index 90% rename from app/boards/arm/corneish_zen/corneish_zen.dtsi rename to app/boards/lowprokb/corneish_zen/corneish_zen.dtsi index dbd6f93e..583f7ed3 100644 --- a/app/boards/arm/corneish_zen/corneish_zen.dtsi +++ b/app/boards/lowprokb/corneish_zen/corneish_zen.dtsi @@ -7,9 +7,21 @@ /dts-v1/; #include +#include #include +#include +#include + +&foostan_corne_6col_layout { + transform = <&default_transform>; +}; + +&foostan_corne_5col_layout { + transform = <&five_column_transform>; +}; + / { model = "Corne-ish Zen"; compatible = "corneish_zen"; @@ -20,7 +32,7 @@ zephyr,flash = &flash0; zmk,kscan = &kscan0; zmk,display = &epd; - zmk,matrix-transform = &default_transform; + zmk,physical-layout = &foostan_corne_6col_layout; }; default_transform: keymap_transform_0 { diff --git a/app/boards/arm/corneish_zen/corneish_zen.keymap b/app/boards/lowprokb/corneish_zen/corneish_zen.keymap similarity index 96% rename from app/boards/arm/corneish_zen/corneish_zen.keymap rename to app/boards/lowprokb/corneish_zen/corneish_zen.keymap index 8dbb7d3b..d53045eb 100644 --- a/app/boards/arm/corneish_zen/corneish_zen.keymap +++ b/app/boards/lowprokb/corneish_zen/corneish_zen.keymap @@ -11,8 +11,8 @@ / { chosen { - zmk,matrix-transform = &default_transform; - // zmk,matrix-transform = &five_column_transform; + zmk,physical-layout = &foostan_corne_6col_layout; + // zmk,physical-layout = &foostan_corne_5col_layout; }; }; diff --git a/app/boards/arm/corneish_zen/corneish_zen.yaml b/app/boards/lowprokb/corneish_zen/corneish_zen.yaml similarity index 90% rename from app/boards/arm/corneish_zen/corneish_zen.yaml rename to app/boards/lowprokb/corneish_zen/corneish_zen.yaml index 7975b262..f4092f4f 100644 --- a/app/boards/arm/corneish_zen/corneish_zen.yaml +++ b/app/boards/lowprokb/corneish_zen/corneish_zen.yaml @@ -1,4 +1,4 @@ -identifier: corne-ish_zen_v2 +identifier: corne-ish_zen name: Corne-ish Zen v2 url: https://lowprokb.ca/collections/keyboards/products/corne-ish-zen type: mcu diff --git a/app/boards/arm/corneish_zen/corneish_zen_v1.zmk.yml b/app/boards/lowprokb/corneish_zen/corneish_zen.zmk.yml similarity index 56% rename from app/boards/arm/corneish_zen/corneish_zen_v1.zmk.yml rename to app/boards/lowprokb/corneish_zen/corneish_zen.zmk.yml index 1f6be20d..574664a2 100644 --- a/app/boards/arm/corneish_zen/corneish_zen_v1.zmk.yml +++ b/app/boards/lowprokb/corneish_zen/corneish_zen.zmk.yml @@ -1,15 +1,19 @@ file_format: "1" -id: corneish_zen_v1 -name: Corneish Zen v1 +id: corneish_zen +name: Corneish Zen url: https://lowprokb.ca/collections/keyboards/products/corne-ish-zen type: board arch: arm features: - keys - display + - studio outputs: - usb - ble +revisions: + - 2.0.0 + - 1.0.0 siblings: - - corneish_zen_v1_left - - corneish_zen_v1_right + - corneish_zen_left//zmk + - corneish_zen_right//zmk diff --git a/app/boards/lowprokb/corneish_zen/corneish_zen_left_nrf52840_zmk.dts b/app/boards/lowprokb/corneish_zen/corneish_zen_left_nrf52840_zmk.dts new file mode 100644 index 00000000..6849efa3 --- /dev/null +++ b/app/boards/lowprokb/corneish_zen/corneish_zen_left_nrf52840_zmk.dts @@ -0,0 +1,8 @@ +/* +* +* Copyright (c) 2025 The ZMK Contributors +* SPDX-License-Identifier: MIT +* +*/ + +#include "corneish_zen.dtsi" \ No newline at end of file diff --git a/app/boards/arm/corneish_zen/corneish_zen_v1_left.dts b/app/boards/lowprokb/corneish_zen/corneish_zen_left_nrf52840_zmk_1_0_0.overlay similarity index 99% rename from app/boards/arm/corneish_zen/corneish_zen_v1_left.dts rename to app/boards/lowprokb/corneish_zen/corneish_zen_left_nrf52840_zmk_1_0_0.overlay index 4230147e..9b6617b1 100644 --- a/app/boards/arm/corneish_zen/corneish_zen_v1_left.dts +++ b/app/boards/lowprokb/corneish_zen/corneish_zen_left_nrf52840_zmk_1_0_0.overlay @@ -5,7 +5,6 @@ * */ -#include "corneish_zen.dtsi" /{ chosen { diff --git a/app/boards/arm/corneish_zen/corneish_zen_v1_left_defconfig b/app/boards/lowprokb/corneish_zen/corneish_zen_left_nrf52840_zmk_1_0_0_defconfig similarity index 92% rename from app/boards/arm/corneish_zen/corneish_zen_v1_left_defconfig rename to app/boards/lowprokb/corneish_zen/corneish_zen_left_nrf52840_zmk_1_0_0_defconfig index d4de8ed3..cba717e3 100644 --- a/app/boards/arm/corneish_zen/corneish_zen_v1_left_defconfig +++ b/app/boards/lowprokb/corneish_zen/corneish_zen_left_nrf52840_zmk_1_0_0_defconfig @@ -3,9 +3,6 @@ # SPDX-License-Identifier: MIT # -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_CORNEISH_ZEN_V1_LEFT=y CONFIG_ZMK_SLEEP=y CONFIG_ZMK_DISPLAY=y @@ -50,7 +47,7 @@ CONFIG_LV_COLOR_DEPTH_1=y CONFIG_LV_DPI_DEF=145 CONFIG_LV_Z_VDB_SIZE=100 CONFIG_LV_USE_THEME_MONO=y -CONFIG_LV_COLOR_CHROMA_KEY_HEX=0x00FF00 +# CONFIG_LV_COLOR_CHROMA_KEY_HEX=0x00FF00 CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_16=y CONFIG_LV_FONT_MONTSERRAT_26=y CONFIG_LV_FONT_DEFAULT_MONTSERRAT_26=y diff --git a/app/boards/arm/corneish_zen/corneish_zen_v2_left.dts b/app/boards/lowprokb/corneish_zen/corneish_zen_left_nrf52840_zmk_2_0_0.overlay similarity index 98% rename from app/boards/arm/corneish_zen/corneish_zen_v2_left.dts rename to app/boards/lowprokb/corneish_zen/corneish_zen_left_nrf52840_zmk_2_0_0.overlay index 42839b61..a72c9be2 100644 --- a/app/boards/arm/corneish_zen/corneish_zen_v2_left.dts +++ b/app/boards/lowprokb/corneish_zen/corneish_zen_left_nrf52840_zmk_2_0_0.overlay @@ -5,8 +5,6 @@ * */ -#include "corneish_zen.dtsi" - /{ chosen { zephyr,display = &epd; diff --git a/app/boards/arm/corneish_zen/corneish_zen_v2_left_defconfig b/app/boards/lowprokb/corneish_zen/corneish_zen_left_nrf52840_zmk_2_0_0_defconfig similarity index 92% rename from app/boards/arm/corneish_zen/corneish_zen_v2_left_defconfig rename to app/boards/lowprokb/corneish_zen/corneish_zen_left_nrf52840_zmk_2_0_0_defconfig index b6670fd8..a549c29c 100644 --- a/app/boards/arm/corneish_zen/corneish_zen_v2_left_defconfig +++ b/app/boards/lowprokb/corneish_zen/corneish_zen_left_nrf52840_zmk_2_0_0_defconfig @@ -3,9 +3,6 @@ # SPDX-License-Identifier: MIT # -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_CORNEISH_ZEN_V2_LEFT=y CONFIG_ZMK_SLEEP=y CONFIG_ZMK_DISPLAY=y @@ -46,7 +43,7 @@ CONFIG_LV_COLOR_DEPTH_1=y CONFIG_LV_DPI_DEF=145 CONFIG_LV_Z_VDB_SIZE=100 CONFIG_LV_USE_THEME_MONO=y -CONFIG_LV_COLOR_CHROMA_KEY_HEX=0x00FF00 +# CONFIG_LV_COLOR_CHROMA_KEY_HEX=0x00FF00 CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_16=y CONFIG_LV_FONT_MONTSERRAT_26=y CONFIG_LV_FONT_DEFAULT_MONTSERRAT_26=y diff --git a/app/boards/lowprokb/corneish_zen/corneish_zen_right_nrf52840_zmk.dts b/app/boards/lowprokb/corneish_zen/corneish_zen_right_nrf52840_zmk.dts new file mode 100644 index 00000000..6849efa3 --- /dev/null +++ b/app/boards/lowprokb/corneish_zen/corneish_zen_right_nrf52840_zmk.dts @@ -0,0 +1,8 @@ +/* +* +* Copyright (c) 2025 The ZMK Contributors +* SPDX-License-Identifier: MIT +* +*/ + +#include "corneish_zen.dtsi" \ No newline at end of file diff --git a/app/boards/arm/corneish_zen/corneish_zen_v1_right.dts b/app/boards/lowprokb/corneish_zen/corneish_zen_right_nrf52840_zmk_1_0_0.overlay similarity index 99% rename from app/boards/arm/corneish_zen/corneish_zen_v1_right.dts rename to app/boards/lowprokb/corneish_zen/corneish_zen_right_nrf52840_zmk_1_0_0.overlay index 820d3163..20594856 100644 --- a/app/boards/arm/corneish_zen/corneish_zen_v1_right.dts +++ b/app/boards/lowprokb/corneish_zen/corneish_zen_right_nrf52840_zmk_1_0_0.overlay @@ -5,8 +5,6 @@ * */ -#include "corneish_zen.dtsi" - /{ chosen { zephyr,display = &epd; diff --git a/app/boards/arm/corneish_zen/corneish_zen_v1_right_defconfig b/app/boards/lowprokb/corneish_zen/corneish_zen_right_nrf52840_zmk_1_0_0_defconfig similarity index 92% rename from app/boards/arm/corneish_zen/corneish_zen_v1_right_defconfig rename to app/boards/lowprokb/corneish_zen/corneish_zen_right_nrf52840_zmk_1_0_0_defconfig index ad78217f..e44e010a 100644 --- a/app/boards/arm/corneish_zen/corneish_zen_v1_right_defconfig +++ b/app/boards/lowprokb/corneish_zen/corneish_zen_right_nrf52840_zmk_1_0_0_defconfig @@ -3,9 +3,6 @@ # SPDX-License-Identifier: MIT # -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_CORNEISH_ZEN_V1_RIGHT=y CONFIG_ZMK_SLEEP=y CONFIG_ZMK_DISPLAY=y @@ -50,7 +47,7 @@ CONFIG_LV_COLOR_DEPTH_1=y CONFIG_LV_DPI_DEF=145 CONFIG_LV_Z_VDB_SIZE=100 CONFIG_LV_USE_THEME_MONO=y -CONFIG_LV_COLOR_CHROMA_KEY_HEX=0x00FF00 +# CONFIG_LV_COLOR_CHROMA_KEY_HEX=0x00FF00 CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_16=y CONFIG_LV_FONT_MONTSERRAT_26=y CONFIG_LV_FONT_DEFAULT_MONTSERRAT_26=y diff --git a/app/boards/arm/corneish_zen/corneish_zen_v2_right.dts b/app/boards/lowprokb/corneish_zen/corneish_zen_right_nrf52840_zmk_2_0_0.overlay similarity index 98% rename from app/boards/arm/corneish_zen/corneish_zen_v2_right.dts rename to app/boards/lowprokb/corneish_zen/corneish_zen_right_nrf52840_zmk_2_0_0.overlay index b47d122f..dc8ef626 100644 --- a/app/boards/arm/corneish_zen/corneish_zen_v2_right.dts +++ b/app/boards/lowprokb/corneish_zen/corneish_zen_right_nrf52840_zmk_2_0_0.overlay @@ -5,8 +5,6 @@ * */ -#include "corneish_zen.dtsi" - /{ chosen { zephyr,display = &epd; diff --git a/app/boards/arm/corneish_zen/corneish_zen_v2_right_defconfig b/app/boards/lowprokb/corneish_zen/corneish_zen_right_nrf52840_zmk_2_0_0_defconfig similarity index 92% rename from app/boards/arm/corneish_zen/corneish_zen_v2_right_defconfig rename to app/boards/lowprokb/corneish_zen/corneish_zen_right_nrf52840_zmk_2_0_0_defconfig index 90cfe769..63b098e1 100644 --- a/app/boards/arm/corneish_zen/corneish_zen_v2_right_defconfig +++ b/app/boards/lowprokb/corneish_zen/corneish_zen_right_nrf52840_zmk_2_0_0_defconfig @@ -3,9 +3,6 @@ # SPDX-License-Identifier: MIT # -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_CORNEISH_ZEN_V2_RIGHT=y CONFIG_ZMK_SLEEP=y CONFIG_ZMK_DISPLAY=y @@ -46,7 +43,7 @@ CONFIG_LV_COLOR_DEPTH_1=y CONFIG_LV_DPI_DEF=145 CONFIG_LV_Z_VDB_SIZE=100 CONFIG_LV_USE_THEME_MONO=y -CONFIG_LV_COLOR_CHROMA_KEY_HEX=0x00FF00 +# CONFIG_LV_COLOR_CHROMA_KEY_HEX=0x00FF00 CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_16=y CONFIG_LV_FONT_MONTSERRAT_26=y CONFIG_LV_FONT_DEFAULT_MONTSERRAT_26=y diff --git a/app/boards/arm/corneish_zen/custom_status_screen.c b/app/boards/lowprokb/corneish_zen/custom_status_screen.c similarity index 92% rename from app/boards/arm/corneish_zen/custom_status_screen.c rename to app/boards/lowprokb/corneish_zen/custom_status_screen.c index 492239c8..86c1a226 100644 --- a/app/boards/arm/corneish_zen/custom_status_screen.c +++ b/app/boards/lowprokb/corneish_zen/custom_status_screen.c @@ -56,9 +56,9 @@ lv_obj_t *zmk_display_status_screen() { #if IS_ENABLED(CONFIG_CUSTOM_WIDGET_LAYER_STATUS) lv_obj_t *LayersHeading; - LayersHeading = lv_img_create(screen); + LayersHeading = lv_image_create(screen); lv_obj_align(LayersHeading, LV_ALIGN_BOTTOM_MID, 0, -30); - lv_img_set_src(LayersHeading, &layers2); + lv_image_set_src(LayersHeading, &layers2); zmk_widget_layer_status_init(&layer_status_widget, screen); lv_obj_set_style_text_font(zmk_widget_layer_status_obj(&layer_status_widget), @@ -68,8 +68,8 @@ lv_obj_t *zmk_display_status_screen() { #if !IS_ENABLED(CONFIG_ZMK_SPLIT_ROLE_CENTRAL) lv_obj_t *zenlogo_icon; - zenlogo_icon = lv_img_create(screen); - lv_img_set_src(zenlogo_icon, &zenlogo); + zenlogo_icon = lv_image_create(screen); + lv_image_set_src(zenlogo_icon, &zenlogo); lv_obj_align(zenlogo_icon, LV_ALIGN_BOTTOM_MID, 0, -5); #endif diff --git a/app/boards/arm/corneish_zen/custom_status_screen.h b/app/boards/lowprokb/corneish_zen/custom_status_screen.h similarity index 100% rename from app/boards/arm/corneish_zen/custom_status_screen.h rename to app/boards/lowprokb/corneish_zen/custom_status_screen.h diff --git a/app/boards/arm/ckp/pre_dt_board.cmake b/app/boards/lowprokb/corneish_zen/pre_dt_board.cmake similarity index 100% rename from app/boards/arm/ckp/pre_dt_board.cmake rename to app/boards/lowprokb/corneish_zen/pre_dt_board.cmake diff --git a/app/boards/arm/corneish_zen/widgets/battery_status.c b/app/boards/lowprokb/corneish_zen/widgets/battery_status.c similarity index 82% rename from app/boards/arm/corneish_zen/widgets/battery_status.c rename to app/boards/lowprokb/corneish_zen/widgets/battery_status.c index 39b811b5..044d3cee 100644 --- a/app/boards/arm/corneish_zen/widgets/battery_status.c +++ b/app/boards/lowprokb/corneish_zen/widgets/battery_status.c @@ -45,17 +45,17 @@ static void set_battery_symbol(lv_obj_t *icon, struct battery_status_state state #if IS_ENABLED(CONFIG_USB_DEVICE_STACK) if (level > 95) { - lv_img_set_src(icon, state.usb_present ? &batt_100_chg : &batt_100); + lv_image_set_src(icon, state.usb_present ? &batt_100_chg : &batt_100); } else if (level > 74) { - lv_img_set_src(icon, state.usb_present ? &batt_75_chg : &batt_75); + lv_image_set_src(icon, state.usb_present ? &batt_75_chg : &batt_75); } else if (level > 49) { - lv_img_set_src(icon, state.usb_present ? &batt_50_chg : &batt_50); + lv_image_set_src(icon, state.usb_present ? &batt_50_chg : &batt_50); } else if (level > 24) { - lv_img_set_src(icon, state.usb_present ? &batt_25_chg : &batt_25); + lv_image_set_src(icon, state.usb_present ? &batt_25_chg : &batt_25); } else if (level > 5) { - lv_img_set_src(icon, state.usb_present ? &batt_5_chg : &batt_5); + lv_image_set_src(icon, state.usb_present ? &batt_5_chg : &batt_5); } else { - lv_img_set_src(icon, state.usb_present ? &batt_0_chg : &batt_0); + lv_image_set_src(icon, state.usb_present ? &batt_0_chg : &batt_0); } #endif /* IS_ENABLED(CONFIG_USB_DEVICE_STACK) */ } @@ -68,7 +68,7 @@ void battery_status_update_cb(struct battery_status_state state) { static struct battery_status_state battery_status_get_state(const zmk_event_t *eh) { const struct zmk_battery_state_changed *ev = as_zmk_battery_state_changed(eh); - return (struct battery_status_state) { + return (struct battery_status_state){ .level = (ev != NULL) ? ev->state_of_charge : zmk_battery_state_of_charge(), #if IS_ENABLED(CONFIG_USB_DEVICE_STACK) .usb_present = zmk_usb_is_powered(), @@ -85,7 +85,7 @@ ZMK_SUBSCRIPTION(widget_battery_status, zmk_usb_conn_state_changed); #endif /* IS_ENABLED(CONFIG_USB_DEVICE_STACK) */ int zmk_widget_battery_status_init(struct zmk_widget_battery_status *widget, lv_obj_t *parent) { - widget->obj = lv_img_create(parent); + widget->obj = lv_image_create(parent); sys_slist_append(&widgets, &widget->node); widget_battery_status_init(); diff --git a/app/boards/arm/corneish_zen/widgets/battery_status.h b/app/boards/lowprokb/corneish_zen/widgets/battery_status.h similarity index 100% rename from app/boards/arm/corneish_zen/widgets/battery_status.h rename to app/boards/lowprokb/corneish_zen/widgets/battery_status.h diff --git a/app/boards/arm/corneish_zen/widgets/icons/CMakeLists.txt b/app/boards/lowprokb/corneish_zen/widgets/icons/CMakeLists.txt similarity index 100% rename from app/boards/arm/corneish_zen/widgets/icons/CMakeLists.txt rename to app/boards/lowprokb/corneish_zen/widgets/icons/CMakeLists.txt diff --git a/app/boards/arm/corneish_zen/widgets/icons/USB_connected.c b/app/boards/lowprokb/corneish_zen/widgets/icons/USB_connected.c similarity index 84% rename from app/boards/arm/corneish_zen/widgets/icons/USB_connected.c rename to app/boards/lowprokb/corneish_zen/widgets/icons/USB_connected.c index b3b60422..266eaead 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/USB_connected.c +++ b/app/boards/lowprokb/corneish_zen/widgets/icons/USB_connected.c @@ -31,11 +31,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_USB_CONNECTED uint8_t USB_connecte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t USB_connected = { - .header.always_zero = 0, - .header.w = 40, - .header.h = 31, - .data_size = 164, - .header.cf = LV_IMG_CF_INDEXED_1BIT, +const lv_image_dsc_t USB_connected = { + .header = + { + .magic = LV_IMAGE_HEADER_MAGIC, + .cf = LV_COLOR_FORMAT_I1, + .w = 40, + .h = 31, + .stride = 5, + }, + .data_size = sizeof(USB_connected_map), .data = USB_connected_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/icons/batt_0.c b/app/boards/lowprokb/corneish_zen/widgets/icons/batt_0.c similarity index 85% rename from app/boards/arm/corneish_zen/widgets/icons/batt_0.c rename to app/boards/lowprokb/corneish_zen/widgets/icons/batt_0.c index a6066b95..4df34e65 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/batt_0.c +++ b/app/boards/lowprokb/corneish_zen/widgets/icons/batt_0.c @@ -33,11 +33,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BATT_0 ui 0x00, 0x00, 0x7c, 0x00, 0x00, }; -const lv_img_dsc_t batt_0 = { - .header.always_zero = 0, - .header.w = 40, - .header.h = 31, - .data_size = 163, - .header.cf = LV_IMG_CF_INDEXED_1BIT, +const lv_image_dsc_t batt_0 = { + .header = + { + .magic = LV_IMAGE_HEADER_MAGIC, + .cf = LV_COLOR_FORMAT_I1, + .w = 40, + .h = 31, + .stride = 5, + }, + .data_size = sizeof(batt_0_map), .data = batt_0_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/icons/batt_0_chg.c b/app/boards/lowprokb/corneish_zen/widgets/icons/batt_0_chg.c similarity index 85% rename from app/boards/arm/corneish_zen/widgets/icons/batt_0_chg.c rename to app/boards/lowprokb/corneish_zen/widgets/icons/batt_0_chg.c index 368ba288..95fd4eae 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/batt_0_chg.c +++ b/app/boards/lowprokb/corneish_zen/widgets/icons/batt_0_chg.c @@ -33,11 +33,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BATT_0_CH 0x00, 0x10, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t batt_0_chg = { - .header.always_zero = 0, - .header.w = 40, - .header.h = 31, - .data_size = 163, - .header.cf = LV_IMG_CF_INDEXED_1BIT, +const lv_image_dsc_t batt_0_chg = { + .header = + { + .magic = LV_IMAGE_HEADER_MAGIC, + .cf = LV_COLOR_FORMAT_I1, + .w = 40, + .h = 31, + .stride = 5, + }, + .data_size = sizeof(batt_0_chg_map), .data = batt_0_chg_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/icons/batt_100.c b/app/boards/lowprokb/corneish_zen/widgets/icons/batt_100.c similarity index 85% rename from app/boards/arm/corneish_zen/widgets/icons/batt_100.c rename to app/boards/lowprokb/corneish_zen/widgets/icons/batt_100.c index e6aa27ba..975508c2 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/batt_100.c +++ b/app/boards/lowprokb/corneish_zen/widgets/icons/batt_100.c @@ -33,11 +33,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BATT_100 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t batt_100 = { - .header.always_zero = 0, - .header.w = 40, - .header.h = 31, - .data_size = 163, - .header.cf = LV_IMG_CF_INDEXED_1BIT, +const lv_image_dsc_t batt_100 = { + .header = + { + .magic = LV_IMAGE_HEADER_MAGIC, + .cf = LV_COLOR_FORMAT_I1, + .w = 40, + .h = 31, + .stride = 5, + }, + .data_size = sizeof(batt_100_map), .data = batt_100_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/icons/batt_100_chg.c b/app/boards/lowprokb/corneish_zen/widgets/icons/batt_100_chg.c similarity index 85% rename from app/boards/arm/corneish_zen/widgets/icons/batt_100_chg.c rename to app/boards/lowprokb/corneish_zen/widgets/icons/batt_100_chg.c index 9b2c18d4..7c8b739a 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/batt_100_chg.c +++ b/app/boards/lowprokb/corneish_zen/widgets/icons/batt_100_chg.c @@ -33,11 +33,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BATT_100_ 0x00, 0x10, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t batt_100_chg = { - .header.always_zero = 0, - .header.w = 40, - .header.h = 31, - .data_size = 163, - .header.cf = LV_IMG_CF_INDEXED_1BIT, +const lv_image_dsc_t batt_100_chg = { + .header = + { + .magic = LV_IMAGE_HEADER_MAGIC, + .cf = LV_COLOR_FORMAT_I1, + .w = 40, + .h = 31, + .stride = 5, + }, + .data_size = sizeof(batt_100_chg_map), .data = batt_100_chg_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/icons/batt_25.c b/app/boards/lowprokb/corneish_zen/widgets/icons/batt_25.c similarity index 85% rename from app/boards/arm/corneish_zen/widgets/icons/batt_25.c rename to app/boards/lowprokb/corneish_zen/widgets/icons/batt_25.c index 2445ef39..aae7338f 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/batt_25.c +++ b/app/boards/lowprokb/corneish_zen/widgets/icons/batt_25.c @@ -33,11 +33,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BATT_25 u 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t batt_25 = { - .header.always_zero = 0, - .header.w = 40, - .header.h = 31, - .data_size = 163, - .header.cf = LV_IMG_CF_INDEXED_1BIT, +const lv_image_dsc_t batt_25 = { + .header = + { + .magic = LV_IMAGE_HEADER_MAGIC, + .cf = LV_COLOR_FORMAT_I1, + .w = 40, + .h = 31, + .stride = 5, + }, + .data_size = sizeof(batt_25_map), .data = batt_25_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/icons/batt_25_chg.c b/app/boards/lowprokb/corneish_zen/widgets/icons/batt_25_chg.c similarity index 85% rename from app/boards/arm/corneish_zen/widgets/icons/batt_25_chg.c rename to app/boards/lowprokb/corneish_zen/widgets/icons/batt_25_chg.c index 37c30812..0e1852ee 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/batt_25_chg.c +++ b/app/boards/lowprokb/corneish_zen/widgets/icons/batt_25_chg.c @@ -33,11 +33,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BATT_25_C 0x00, 0x10, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t batt_25_chg = { - .header.always_zero = 0, - .header.w = 40, - .header.h = 31, - .data_size = 163, - .header.cf = LV_IMG_CF_INDEXED_1BIT, +const lv_image_dsc_t batt_25_chg = { + .header = + { + .magic = LV_IMAGE_HEADER_MAGIC, + .cf = LV_COLOR_FORMAT_I1, + .w = 40, + .h = 31, + .stride = 5, + }, + .data_size = sizeof(batt_25_chg_map), .data = batt_25_chg_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/icons/batt_5.c b/app/boards/lowprokb/corneish_zen/widgets/icons/batt_5.c similarity index 85% rename from app/boards/arm/corneish_zen/widgets/icons/batt_5.c rename to app/boards/lowprokb/corneish_zen/widgets/icons/batt_5.c index e9824572..e9427a8e 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/batt_5.c +++ b/app/boards/lowprokb/corneish_zen/widgets/icons/batt_5.c @@ -33,11 +33,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BATT_5 ui 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t batt_5 = { - .header.always_zero = 0, - .header.w = 40, - .header.h = 31, - .data_size = 163, - .header.cf = LV_IMG_CF_INDEXED_1BIT, +const lv_image_dsc_t batt_5 = { + .header = + { + .magic = LV_IMAGE_HEADER_MAGIC, + .cf = LV_COLOR_FORMAT_I1, + .w = 40, + .h = 31, + .stride = 5, + }, + .data_size = sizeof(batt_5_map), .data = batt_5_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/icons/batt_50.c b/app/boards/lowprokb/corneish_zen/widgets/icons/batt_50.c similarity index 85% rename from app/boards/arm/corneish_zen/widgets/icons/batt_50.c rename to app/boards/lowprokb/corneish_zen/widgets/icons/batt_50.c index bbb0af48..1e606bfc 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/batt_50.c +++ b/app/boards/lowprokb/corneish_zen/widgets/icons/batt_50.c @@ -33,11 +33,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BATT_50 u 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t batt_50 = { - .header.always_zero = 0, - .header.w = 40, - .header.h = 31, - .data_size = 163, - .header.cf = LV_IMG_CF_INDEXED_1BIT, +const lv_image_dsc_t batt_50 = { + .header = + { + .magic = LV_IMAGE_HEADER_MAGIC, + .cf = LV_COLOR_FORMAT_I1, + .w = 40, + .h = 31, + .stride = 5, + }, + .data_size = sizeof(batt_50_map), .data = batt_50_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/icons/batt_50_chg.c b/app/boards/lowprokb/corneish_zen/widgets/icons/batt_50_chg.c similarity index 85% rename from app/boards/arm/corneish_zen/widgets/icons/batt_50_chg.c rename to app/boards/lowprokb/corneish_zen/widgets/icons/batt_50_chg.c index c2ced92e..9e31d934 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/batt_50_chg.c +++ b/app/boards/lowprokb/corneish_zen/widgets/icons/batt_50_chg.c @@ -33,11 +33,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BATT_50_C 0x00, 0x10, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t batt_50_chg = { - .header.always_zero = 0, - .header.w = 40, - .header.h = 31, - .data_size = 163, - .header.cf = LV_IMG_CF_INDEXED_1BIT, +const lv_image_dsc_t batt_50_chg = { + .header = + { + .magic = LV_IMAGE_HEADER_MAGIC, + .cf = LV_COLOR_FORMAT_I1, + .w = 40, + .h = 31, + .stride = 5, + }, + .data_size = sizeof(batt_50_chg_map), .data = batt_50_chg_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/icons/batt_5_chg.c b/app/boards/lowprokb/corneish_zen/widgets/icons/batt_5_chg.c similarity index 85% rename from app/boards/arm/corneish_zen/widgets/icons/batt_5_chg.c rename to app/boards/lowprokb/corneish_zen/widgets/icons/batt_5_chg.c index 6a6d9d44..5ed20b10 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/batt_5_chg.c +++ b/app/boards/lowprokb/corneish_zen/widgets/icons/batt_5_chg.c @@ -33,11 +33,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BATT_5_CH 0x00, 0x10, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t batt_5_chg = { - .header.always_zero = 0, - .header.w = 40, - .header.h = 31, - .data_size = 163, - .header.cf = LV_IMG_CF_INDEXED_1BIT, +const lv_image_dsc_t batt_5_chg = { + .header = + { + .magic = LV_IMAGE_HEADER_MAGIC, + .cf = LV_COLOR_FORMAT_I1, + .w = 40, + .h = 31, + .stride = 5, + }, + .data_size = sizeof(batt_5_chg_map), .data = batt_5_chg_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/icons/batt_75.c b/app/boards/lowprokb/corneish_zen/widgets/icons/batt_75.c similarity index 85% rename from app/boards/arm/corneish_zen/widgets/icons/batt_75.c rename to app/boards/lowprokb/corneish_zen/widgets/icons/batt_75.c index 9918386d..eaa78c75 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/batt_75.c +++ b/app/boards/lowprokb/corneish_zen/widgets/icons/batt_75.c @@ -33,11 +33,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BATT_75 u 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t batt_75 = { - .header.always_zero = 0, - .header.w = 40, - .header.h = 31, - .data_size = 163, - .header.cf = LV_IMG_CF_INDEXED_1BIT, +const lv_image_dsc_t batt_75 = { + .header = + { + .magic = LV_IMAGE_HEADER_MAGIC, + .cf = LV_COLOR_FORMAT_I1, + .w = 40, + .h = 31, + .stride = 5, + }, + .data_size = sizeof(batt_75_map), .data = batt_75_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/icons/batt_75_chg.c b/app/boards/lowprokb/corneish_zen/widgets/icons/batt_75_chg.c similarity index 85% rename from app/boards/arm/corneish_zen/widgets/icons/batt_75_chg.c rename to app/boards/lowprokb/corneish_zen/widgets/icons/batt_75_chg.c index 422aaabc..5b2d796d 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/batt_75_chg.c +++ b/app/boards/lowprokb/corneish_zen/widgets/icons/batt_75_chg.c @@ -33,11 +33,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BATT_75_C 0x00, 0x10, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t batt_75_chg = { - .header.always_zero = 0, - .header.w = 40, - .header.h = 31, - .data_size = 163, - .header.cf = LV_IMG_CF_INDEXED_1BIT, +const lv_image_dsc_t batt_75_chg = { + .header = + { + .magic = LV_IMAGE_HEADER_MAGIC, + .cf = LV_COLOR_FORMAT_I1, + .w = 40, + .h = 31, + .stride = 5, + }, + .data_size = sizeof(batt_75_chg_map), .data = batt_75_chg_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/icons/bluetooth_advertising.c b/app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_advertising.c similarity index 83% rename from app/boards/arm/corneish_zen/widgets/icons/bluetooth_advertising.c rename to app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_advertising.c index daeee223..b57b59c8 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/bluetooth_advertising.c +++ b/app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_advertising.c @@ -32,11 +32,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BLUETOOTH 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t bluetooth_advertising = { - .header.always_zero = 0, - .header.w = 29, - .header.h = 35, - .data_size = 148, - .header.cf = LV_IMG_CF_INDEXED_1BIT, +const lv_image_dsc_t bluetooth_advertising = { + .header = + { + .magic = LV_IMAGE_HEADER_MAGIC, + .cf = LV_COLOR_FORMAT_I1, + .w = 29, + .h = 35, + .stride = 4, + }, + .data_size = sizeof(bluetooth_advertising_map), .data = bluetooth_advertising_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/icons/bluetooth_advertising_1.c b/app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_advertising_1.c similarity index 88% rename from app/boards/arm/corneish_zen/widgets/icons/bluetooth_advertising_1.c rename to app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_advertising_1.c index cf5b8197..28a65ac2 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/bluetooth_advertising_1.c +++ b/app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_advertising_1.c @@ -37,11 +37,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_BLUETOOTH_ADVERTISING_1 uint8_t 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t bluetooth_advertising_1 = { - .header.always_zero = 0, - .header.w = 54, - .header.h = 35, - .data_size = 254, - .header.cf = LV_IMG_CF_INDEXED_1BIT, +const lv_image_dsc_t bluetooth_advertising_1 = { + .header = + { + .magic = LV_IMAGE_HEADER_MAGIC, + .cf = LV_COLOR_FORMAT_I1, + .w = 54, + .h = 35, + .stride = 7, + }, + .data_size = sizeof(bluetooth_advertising_1_map), .data = bluetooth_advertising_1_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/icons/bluetooth_advertising_2.c b/app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_advertising_2.c similarity index 88% rename from app/boards/arm/corneish_zen/widgets/icons/bluetooth_advertising_2.c rename to app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_advertising_2.c index 184a5ce8..4c7447cc 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/bluetooth_advertising_2.c +++ b/app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_advertising_2.c @@ -37,11 +37,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_BLUETOOTH_ADVERTISING_2 uint8_t 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t bluetooth_advertising_2 = { - .header.always_zero = 0, - .header.w = 54, - .header.h = 35, - .data_size = 254, - .header.cf = LV_IMG_CF_INDEXED_1BIT, +const lv_image_dsc_t bluetooth_advertising_2 = { + .header = + { + .magic = LV_IMAGE_HEADER_MAGIC, + .cf = LV_COLOR_FORMAT_I1, + .w = 54, + .h = 35, + .stride = 7, + }, + .data_size = sizeof(bluetooth_advertising_2_map), .data = bluetooth_advertising_2_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/icons/bluetooth_advertising_3.c b/app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_advertising_3.c similarity index 88% rename from app/boards/arm/corneish_zen/widgets/icons/bluetooth_advertising_3.c rename to app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_advertising_3.c index e9665ff9..e2072eec 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/bluetooth_advertising_3.c +++ b/app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_advertising_3.c @@ -37,11 +37,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_BLUETOOTH_ADVERTISING_3 uint8_t 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t bluetooth_advertising_3 = { - .header.always_zero = 0, - .header.w = 54, - .header.h = 35, - .data_size = 254, - .header.cf = LV_IMG_CF_INDEXED_1BIT, +const lv_image_dsc_t bluetooth_advertising_3 = { + .header = + { + .magic = LV_IMAGE_HEADER_MAGIC, + .cf = LV_COLOR_FORMAT_I1, + .w = 54, + .h = 35, + .stride = 7, + }, + .data_size = sizeof(bluetooth_advertising_3_map), .data = bluetooth_advertising_3_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/icons/bluetooth_advertising_4.c b/app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_advertising_4.c similarity index 88% rename from app/boards/arm/corneish_zen/widgets/icons/bluetooth_advertising_4.c rename to app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_advertising_4.c index d591f17f..a9231077 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/bluetooth_advertising_4.c +++ b/app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_advertising_4.c @@ -37,11 +37,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_BLUETOOTH_ADVERTISING_4 uint8_t 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t bluetooth_advertising_4 = { - .header.always_zero = 0, - .header.w = 54, - .header.h = 35, - .data_size = 254, - .header.cf = LV_IMG_CF_INDEXED_1BIT, +const lv_image_dsc_t bluetooth_advertising_4 = { + .header = + { + .magic = LV_IMAGE_HEADER_MAGIC, + .cf = LV_COLOR_FORMAT_I1, + .w = 54, + .h = 35, + .stride = 7, + }, + .data_size = sizeof(bluetooth_advertising_4_map), .data = bluetooth_advertising_4_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/icons/bluetooth_advertising_5.c b/app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_advertising_5.c similarity index 88% rename from app/boards/arm/corneish_zen/widgets/icons/bluetooth_advertising_5.c rename to app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_advertising_5.c index 88213158..53cb3789 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/bluetooth_advertising_5.c +++ b/app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_advertising_5.c @@ -37,11 +37,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_BLUETOOTH_ADVERTISING_5 uint8_t 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t bluetooth_advertising_5 = { - .header.always_zero = 0, - .header.w = 54, - .header.h = 35, - .data_size = 254, - .header.cf = LV_IMG_CF_INDEXED_1BIT, +const lv_image_dsc_t bluetooth_advertising_5 = { + .header = + { + .magic = LV_IMAGE_HEADER_MAGIC, + .cf = LV_COLOR_FORMAT_I1, + .w = 54, + .h = 35, + .stride = 7, + }, + .data_size = sizeof(bluetooth_advertising_5_map), .data = bluetooth_advertising_5_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/icons/bluetooth_connected_1.c b/app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_connected_1.c similarity index 88% rename from app/boards/arm/corneish_zen/widgets/icons/bluetooth_connected_1.c rename to app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_connected_1.c index a3cb5a2c..179b7f6f 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/bluetooth_connected_1.c +++ b/app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_connected_1.c @@ -37,11 +37,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_BLUETOOTH_CONNECTED_1 uint8_t 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t bluetooth_connected_1 = { - .header.always_zero = 0, - .header.w = 54, - .header.h = 35, - .data_size = 254, - .header.cf = LV_IMG_CF_INDEXED_1BIT, +const lv_image_dsc_t bluetooth_connected_1 = { + .header = + { + .magic = LV_IMAGE_HEADER_MAGIC, + .cf = LV_COLOR_FORMAT_I1, + .w = 54, + .h = 35, + .stride = 7, + }, + .data_size = sizeof(bluetooth_connected_1_map), .data = bluetooth_connected_1_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/icons/bluetooth_connected_2.c b/app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_connected_2.c similarity index 88% rename from app/boards/arm/corneish_zen/widgets/icons/bluetooth_connected_2.c rename to app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_connected_2.c index 2ce5b939..29122930 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/bluetooth_connected_2.c +++ b/app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_connected_2.c @@ -37,11 +37,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_BLUETOOTH_CONNECTED_2 uint8_t 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t bluetooth_connected_2 = { - .header.always_zero = 0, - .header.w = 54, - .header.h = 35, - .data_size = 254, - .header.cf = LV_IMG_CF_INDEXED_1BIT, +const lv_image_dsc_t bluetooth_connected_2 = { + .header = + { + .magic = LV_IMAGE_HEADER_MAGIC, + .cf = LV_COLOR_FORMAT_I1, + .w = 54, + .h = 35, + .stride = 7, + }, + .data_size = sizeof(bluetooth_connected_2_map), .data = bluetooth_connected_2_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/icons/bluetooth_connected_3.c b/app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_connected_3.c similarity index 88% rename from app/boards/arm/corneish_zen/widgets/icons/bluetooth_connected_3.c rename to app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_connected_3.c index edac091f..c25c163b 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/bluetooth_connected_3.c +++ b/app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_connected_3.c @@ -37,11 +37,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_BLUETOOTH_CONNECTED_3 uint8_t 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t bluetooth_connected_3 = { - .header.always_zero = 0, - .header.w = 54, - .header.h = 35, - .data_size = 254, - .header.cf = LV_IMG_CF_INDEXED_1BIT, +const lv_image_dsc_t bluetooth_connected_3 = { + .header = + { + .magic = LV_IMAGE_HEADER_MAGIC, + .cf = LV_COLOR_FORMAT_I1, + .w = 54, + .h = 35, + .stride = 7, + }, + .data_size = sizeof(bluetooth_connected_3_map), .data = bluetooth_connected_3_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/icons/bluetooth_connected_4.c b/app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_connected_4.c similarity index 88% rename from app/boards/arm/corneish_zen/widgets/icons/bluetooth_connected_4.c rename to app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_connected_4.c index e79d6cb6..83ae53c2 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/bluetooth_connected_4.c +++ b/app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_connected_4.c @@ -37,11 +37,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_BLUETOOTH_CONNECTED_4 uint8_t 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t bluetooth_connected_4 = { - .header.always_zero = 0, - .header.w = 54, - .header.h = 35, - .data_size = 254, - .header.cf = LV_IMG_CF_INDEXED_1BIT, +const lv_image_dsc_t bluetooth_connected_4 = { + .header = + { + .magic = LV_IMAGE_HEADER_MAGIC, + .cf = LV_COLOR_FORMAT_I1, + .w = 54, + .h = 35, + .stride = 7, + }, + .data_size = sizeof(bluetooth_connected_4_map), .data = bluetooth_connected_4_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/icons/bluetooth_connected_5.c b/app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_connected_5.c similarity index 88% rename from app/boards/arm/corneish_zen/widgets/icons/bluetooth_connected_5.c rename to app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_connected_5.c index b567aa2d..9dbbcea9 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/bluetooth_connected_5.c +++ b/app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_connected_5.c @@ -37,11 +37,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_BLUETOOTH_CONNECTED_5 uint8_t 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t bluetooth_connected_5 = { - .header.always_zero = 0, - .header.w = 54, - .header.h = 35, - .data_size = 254, - .header.cf = LV_IMG_CF_INDEXED_1BIT, +const lv_image_dsc_t bluetooth_connected_5 = { + .header = + { + .magic = LV_IMAGE_HEADER_MAGIC, + .cf = LV_COLOR_FORMAT_I1, + .w = 54, + .h = 35, + .stride = 7, + }, + .data_size = sizeof(bluetooth_connected_5_map), .data = bluetooth_connected_5_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/icons/bluetooth_connected_right.c b/app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_connected_right.c similarity index 88% rename from app/boards/arm/corneish_zen/widgets/icons/bluetooth_connected_right.c rename to app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_connected_right.c index 2a28a903..6e14c17b 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/bluetooth_connected_right.c +++ b/app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_connected_right.c @@ -39,11 +39,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BLUETOOTH 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t bluetooth_connected_right = { - .header.always_zero = 0, - .header.w = 54, - .header.h = 35, - .data_size = 253, - .header.cf = LV_IMG_CF_INDEXED_1BIT, +const lv_image_dsc_t bluetooth_connected_right = { + .header = + { + .magic = LV_IMAGE_HEADER_MAGIC, + .cf = LV_COLOR_FORMAT_I1, + .w = 54, + .h = 35, + .stride = 7, + }, + .data_size = sizeof(bluetooth_connected_right_map), .data = bluetooth_connected_right_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/icons/bluetooth_disconnected_right.c b/app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_disconnected_right.c similarity index 88% rename from app/boards/arm/corneish_zen/widgets/icons/bluetooth_disconnected_right.c rename to app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_disconnected_right.c index 37974d69..71c67957 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/bluetooth_disconnected_right.c +++ b/app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_disconnected_right.c @@ -39,11 +39,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BLUETOOTH 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t bluetooth_disconnected_right = { - .header.always_zero = 0, - .header.w = 54, - .header.h = 35, - .data_size = 253, - .header.cf = LV_IMG_CF_INDEXED_1BIT, +const lv_image_dsc_t bluetooth_disconnected_right = { + .header = + { + .magic = LV_IMAGE_HEADER_MAGIC, + .cf = LV_COLOR_FORMAT_I1, + .w = 54, + .h = 35, + .stride = 7, + }, + .data_size = sizeof(bluetooth_disconnected_right_map), .data = bluetooth_disconnected_right_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/icons/layers.c b/app/boards/lowprokb/corneish_zen/widgets/icons/layers.c similarity index 86% rename from app/boards/arm/corneish_zen/widgets/icons/layers.c rename to app/boards/lowprokb/corneish_zen/widgets/icons/layers.c index 86bc8dfc..d6f4baab 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/layers.c +++ b/app/boards/lowprokb/corneish_zen/widgets/icons/layers.c @@ -34,11 +34,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_LAYERS ui 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t layers = { - .header.always_zero = 0, - .header.w = 35, - .header.h = 35, - .data_size = 183, - .header.cf = LV_IMG_CF_INDEXED_1BIT, +const lv_image_dsc_t layers = { + .header = + { + .magic = LV_IMAGE_HEADER_MAGIC, + .cf = LV_COLOR_FORMAT_I1, + .w = 35, + .h = 35, + .stride = 5, + }, + .data_size = sizeof(layers_map), .data = layers_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/icons/layers2.c b/app/boards/lowprokb/corneish_zen/widgets/icons/layers2.c similarity index 83% rename from app/boards/arm/corneish_zen/widgets/icons/layers2.c rename to app/boards/lowprokb/corneish_zen/widgets/icons/layers2.c index 068b0757..53f6a445 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/layers2.c +++ b/app/boards/lowprokb/corneish_zen/widgets/icons/layers2.c @@ -30,11 +30,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_LAYERS2 u 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t layers2 = { - .header.always_zero = 0, - .header.w = 78, - .header.h = 12, - .data_size = 128, - .header.cf = LV_IMG_CF_INDEXED_1BIT, +const lv_image_dsc_t layers2 = { + .header = + { + .magic = LV_IMAGE_HEADER_MAGIC, + .cf = LV_COLOR_FORMAT_I1, + .w = 78, + .h = 12, + .stride = 10, + }, + .data_size = sizeof(layers2_map), .data = layers2_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/icons/zenlogo.c b/app/boards/lowprokb/corneish_zen/widgets/icons/zenlogo.c similarity index 92% rename from app/boards/arm/corneish_zen/widgets/icons/zenlogo.c rename to app/boards/lowprokb/corneish_zen/widgets/icons/zenlogo.c index cc424041..677df489 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/zenlogo.c +++ b/app/boards/lowprokb/corneish_zen/widgets/icons/zenlogo.c @@ -48,11 +48,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_ZENLOGO u 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t zenlogo = { - .header.always_zero = 0, - .header.w = 80, - .header.h = 38, - .data_size = 388, - .header.cf = LV_IMG_CF_INDEXED_1BIT, +const lv_image_dsc_t zenlogo = { + .header = + { + .magic = LV_IMAGE_HEADER_MAGIC, + .cf = LV_COLOR_FORMAT_I1, + .w = 80, + .h = 38, + .stride = 10, + }, + .data_size = sizeof(zenlogo_map), .data = zenlogo_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/layer_status.c b/app/boards/lowprokb/corneish_zen/widgets/layer_status.c similarity index 81% rename from app/boards/arm/corneish_zen/widgets/layer_status.c rename to app/boards/lowprokb/corneish_zen/widgets/layer_status.c index 86418318..002ce46b 100644 --- a/app/boards/arm/corneish_zen/widgets/layer_status.c +++ b/app/boards/lowprokb/corneish_zen/widgets/layer_status.c @@ -19,15 +19,15 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); static sys_slist_t widgets = SYS_SLIST_STATIC_INIT(&widgets); struct layer_status_state { - uint8_t index; + zmk_keymap_layer_index_t index; const char *label; }; static void set_layer_symbol(lv_obj_t *label, struct layer_status_state state) { const char *layer_label = state.label; - uint8_t active_layer_index = state.index; + zmk_keymap_layer_index_t active_layer_index = state.index; - if (layer_label == NULL) { + if (layer_label == NULL || strlen(layer_label) == 0) { char text[6] = {}; sprintf(text, " %i", active_layer_index); @@ -44,8 +44,9 @@ static void layer_status_update_cb(struct layer_status_state state) { } static struct layer_status_state layer_status_get_state(const zmk_event_t *eh) { - uint8_t index = zmk_keymap_highest_layer_active(); - return (struct layer_status_state){.index = index, .label = zmk_keymap_layer_name(index)}; + zmk_keymap_layer_index_t index = zmk_keymap_highest_layer_active(); + return (struct layer_status_state){ + .index = index, .label = zmk_keymap_layer_name(zmk_keymap_layer_index_to_id(index))}; } ZMK_DISPLAY_WIDGET_LISTENER(widget_layer_status, struct layer_status_state, layer_status_update_cb, diff --git a/app/boards/arm/corneish_zen/widgets/layer_status.h b/app/boards/lowprokb/corneish_zen/widgets/layer_status.h similarity index 100% rename from app/boards/arm/corneish_zen/widgets/layer_status.h rename to app/boards/lowprokb/corneish_zen/widgets/layer_status.h diff --git a/app/boards/arm/corneish_zen/widgets/output_status.c b/app/boards/lowprokb/corneish_zen/widgets/output_status.c similarity index 80% rename from app/boards/arm/corneish_zen/widgets/output_status.c rename to app/boards/lowprokb/corneish_zen/widgets/output_status.c index 8e9457eb..50bd4fad 100644 --- a/app/boards/arm/corneish_zen/widgets/output_status.c +++ b/app/boards/lowprokb/corneish_zen/widgets/output_status.c @@ -45,7 +45,7 @@ struct output_status_state { static struct output_status_state get_state(const zmk_event_t *_eh) { return (struct output_status_state){ - .selected_endpoint = zmk_endpoints_selected(), + .selected_endpoint = zmk_endpoint_get_selected(), .active_profile_connected = zmk_ble_active_profile_is_connected(), .active_profile_bonded = !zmk_ble_active_profile_is_open(), }; @@ -54,7 +54,7 @@ static struct output_status_state get_state(const zmk_event_t *_eh) { static void set_status_symbol(lv_obj_t *icon, struct output_status_state state) { switch (state.selected_endpoint.transport) { case ZMK_TRANSPORT_USB: - lv_img_set_src(icon, &USB_connected); + lv_image_set_src(icon, &USB_connected); break; case ZMK_TRANSPORT_BLE: if (state.active_profile_bonded) { @@ -62,40 +62,40 @@ static void set_status_symbol(lv_obj_t *icon, struct output_status_state state) // sprintf(text, LV_SYMBOL_BLUETOOTH "%i " LV_SYMBOL_OK, active_profile_index); switch (state.selected_endpoint.ble.profile_index) { case 0: - lv_img_set_src(icon, &bluetooth_connected_1); + lv_image_set_src(icon, &bluetooth_connected_1); break; case 1: - lv_img_set_src(icon, &bluetooth_connected_2); + lv_image_set_src(icon, &bluetooth_connected_2); break; case 2: - lv_img_set_src(icon, &bluetooth_connected_3); + lv_image_set_src(icon, &bluetooth_connected_3); break; case 3: - lv_img_set_src(icon, &bluetooth_connected_4); + lv_image_set_src(icon, &bluetooth_connected_4); break; case 4: - lv_img_set_src(icon, &bluetooth_connected_5); + lv_image_set_src(icon, &bluetooth_connected_5); break; } } else { - lv_img_set_src(icon, &bluetooth_disconnected_right); + lv_image_set_src(icon, &bluetooth_disconnected_right); } } else { switch (state.selected_endpoint.ble.profile_index) { case 0: - lv_img_set_src(icon, &bluetooth_advertising_1); + lv_image_set_src(icon, &bluetooth_advertising_1); break; case 1: - lv_img_set_src(icon, &bluetooth_advertising_2); + lv_image_set_src(icon, &bluetooth_advertising_2); break; case 2: - lv_img_set_src(icon, &bluetooth_advertising_3); + lv_image_set_src(icon, &bluetooth_advertising_3); break; case 3: - lv_img_set_src(icon, &bluetooth_advertising_4); + lv_image_set_src(icon, &bluetooth_advertising_4); break; case 4: - lv_img_set_src(icon, &bluetooth_advertising_5); + lv_image_set_src(icon, &bluetooth_advertising_5); break; } } @@ -118,7 +118,7 @@ ZMK_SUBSCRIPTION(widget_output_status, zmk_ble_active_profile_changed); #endif int zmk_widget_output_status_init(struct zmk_widget_output_status *widget, lv_obj_t *parent) { - widget->obj = lv_img_create(parent); + widget->obj = lv_image_create(parent); sys_slist_append(&widgets, &widget->node); diff --git a/app/boards/arm/corneish_zen/widgets/output_status.h b/app/boards/lowprokb/corneish_zen/widgets/output_status.h similarity index 100% rename from app/boards/arm/corneish_zen/widgets/output_status.h rename to app/boards/lowprokb/corneish_zen/widgets/output_status.h diff --git a/app/boards/arm/corneish_zen/widgets/peripheral_status.c b/app/boards/lowprokb/corneish_zen/widgets/peripheral_status.c similarity index 91% rename from app/boards/arm/corneish_zen/widgets/peripheral_status.c rename to app/boards/lowprokb/corneish_zen/widgets/peripheral_status.c index b94d45f6..0f7c7c6d 100644 --- a/app/boards/arm/corneish_zen/widgets/peripheral_status.c +++ b/app/boards/lowprokb/corneish_zen/widgets/peripheral_status.c @@ -32,8 +32,8 @@ static struct peripheral_status_state get_state(const zmk_event_t *_eh) { static void set_status_symbol(lv_obj_t *icon, struct peripheral_status_state state) { LOG_DBG("halves connected? %s", state.connected ? "true" : "false"); - lv_img_set_src(icon, - state.connected ? &bluetooth_connected_right : &bluetooth_disconnected_right); + lv_image_set_src(icon, + state.connected ? &bluetooth_connected_right : &bluetooth_disconnected_right); } static void output_status_update_cb(struct peripheral_status_state state) { @@ -47,7 +47,7 @@ ZMK_SUBSCRIPTION(widget_peripheral_status, zmk_split_peripheral_status_changed); int zmk_widget_peripheral_status_init(struct zmk_widget_peripheral_status *widget, lv_obj_t *parent) { - widget->obj = lv_img_create(parent); + widget->obj = lv_image_create(parent); sys_slist_append(&widgets, &widget->node); diff --git a/app/boards/arm/corneish_zen/widgets/peripheral_status.h b/app/boards/lowprokb/corneish_zen/widgets/peripheral_status.h similarity index 100% rename from app/boards/arm/corneish_zen/widgets/peripheral_status.h rename to app/boards/lowprokb/corneish_zen/widgets/peripheral_status.h diff --git a/app/boards/makerdiary/nrf52840_m2/Kconfig.nrf52840_m2 b/app/boards/makerdiary/nrf52840_m2/Kconfig.nrf52840_m2 new file mode 100644 index 00000000..9225eb86 --- /dev/null +++ b/app/boards/makerdiary/nrf52840_m2/Kconfig.nrf52840_m2 @@ -0,0 +1,9 @@ +# Copyright (c) 2020 The ZMK Contributors +# SPDX-License-Identifier: Apache-2.0 + +config BOARD_NRF52840_M2 + select SOC_NRF52840_QIAA + select ZMK_BOARD_COMPAT if BOARD_NRF52840_M2_NRF52840_ZMK + imply RETAINED_MEM if BOARD_NRF52840_M2_NRF52840_ZMK + imply RETENTION if BOARD_NRF52840_M2_NRF52840_ZMK + imply RETENTION_BOOT_MODE if BOARD_NRF52840_M2_NRF52840_ZMK diff --git a/app/boards/arm/nrf52840_m2/board.cmake b/app/boards/makerdiary/nrf52840_m2/board.cmake similarity index 100% rename from app/boards/arm/nrf52840_m2/board.cmake rename to app/boards/makerdiary/nrf52840_m2/board.cmake diff --git a/app/boards/makerdiary/nrf52840_m2/board.yml b/app/boards/makerdiary/nrf52840_m2/board.yml new file mode 100644 index 00000000..16079c2c --- /dev/null +++ b/app/boards/makerdiary/nrf52840_m2/board.yml @@ -0,0 +1,5 @@ +board: + extend: nrf52840_m2 + variants: + - name: zmk + qualifier: nrf52840 diff --git a/app/boards/arm/nrf52840_m2/nrf52840_m2.yaml b/app/boards/makerdiary/nrf52840_m2/nrf52840_m2.yaml similarity index 100% rename from app/boards/arm/nrf52840_m2/nrf52840_m2.yaml rename to app/boards/makerdiary/nrf52840_m2/nrf52840_m2.yaml diff --git a/app/boards/arm/nrf52840_m2/nrf52840_m2.zmk.yml b/app/boards/makerdiary/nrf52840_m2/nrf52840_m2.zmk.yml similarity index 89% rename from app/boards/arm/nrf52840_m2/nrf52840_m2.zmk.yml rename to app/boards/makerdiary/nrf52840_m2/nrf52840_m2.zmk.yml index 2a4ccb0c..227c4500 100644 --- a/app/boards/arm/nrf52840_m2/nrf52840_m2.zmk.yml +++ b/app/boards/makerdiary/nrf52840_m2/nrf52840_m2.zmk.yml @@ -1,5 +1,5 @@ file_format: "1" -id: nrf52840_m2 +id: nrf52840_m2//zmk name: nRF52840 M.2 Module type: board arch: arm diff --git a/app/boards/makerdiary/nrf52840_m2/nrf52840_m2_nrf52840_zmk.dts b/app/boards/makerdiary/nrf52840_m2/nrf52840_m2_nrf52840_zmk.dts new file mode 100644 index 00000000..cdca8a68 --- /dev/null +++ b/app/boards/makerdiary/nrf52840_m2/nrf52840_m2_nrf52840_zmk.dts @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2026 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +/dts-v1/; +#include <../boards/makerdiary/nrf52840_m2/nrf52840_m2.dts> +#include + +/ { + model = "Makerdiary nRF52840 M.2 module"; + compatible = "makerdiary,nrf52840_m2"; + + chosen { + zmk,battery = &vbatt; + }; + + vbatt: vbatt { + compatible = "zmk,battery-voltage-divider"; + io-channels = <&adc 0>; + output-ohms = <1000000>; + full-ohms = <(1000000 + 1000000)>; + }; +}; diff --git a/app/boards/arm/nrf52840_m2/nrf52840_m2_defconfig b/app/boards/makerdiary/nrf52840_m2/nrf52840_m2_nrf52840_zmk_defconfig similarity index 81% rename from app/boards/arm/nrf52840_m2/nrf52840_m2_defconfig rename to app/boards/makerdiary/nrf52840_m2/nrf52840_m2_nrf52840_zmk_defconfig index 93eef9e6..d0b01539 100644 --- a/app/boards/arm/nrf52840_m2/nrf52840_m2_defconfig +++ b/app/boards/makerdiary/nrf52840_m2/nrf52840_m2_nrf52840_zmk_defconfig @@ -1,10 +1,6 @@ # Copyright (c) 2020 The ZMK Contributors # SPDX-License-Identifier: MIT -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_NRF52840_M2=y - # Enable MPU CONFIG_ARM_MPU=y diff --git a/app/boards/arm/corneish_zen/pre_dt_board.cmake b/app/boards/makerdiary/nrf52840_m2/pre_dt_board.cmake similarity index 100% rename from app/boards/arm/corneish_zen/pre_dt_board.cmake rename to app/boards/makerdiary/nrf52840_m2/pre_dt_board.cmake diff --git a/app/boards/mechwild/pillbug/Kconfig.pillbug b/app/boards/mechwild/pillbug/Kconfig.pillbug new file mode 100644 index 00000000..548a7e64 --- /dev/null +++ b/app/boards/mechwild/pillbug/Kconfig.pillbug @@ -0,0 +1,9 @@ +# Copyright (c) 2022 The ZMK Contributors +# SPDX-License-Identifier: Apache-2.0 + +config BOARD_PILLBUG + select SOC_NRF52840_QIAA + select ZMK_BOARD_COMPAT if BOARD_PILLBUG_NRF52840_ZMK + imply RETAINED_MEM if BOARD_PILLBUG_NRF52840_ZMK + imply RETENTION if BOARD_PILLBUG_NRF52840_ZMK + imply RETENTION_BOOT_MODE if BOARD_PILLBUG_NRF52840_ZMK diff --git a/app/boards/arm/pillbug/board.cmake b/app/boards/mechwild/pillbug/board.cmake similarity index 100% rename from app/boards/arm/pillbug/board.cmake rename to app/boards/mechwild/pillbug/board.cmake diff --git a/app/boards/mechwild/pillbug/board.yml b/app/boards/mechwild/pillbug/board.yml new file mode 100644 index 00000000..eb3d5172 --- /dev/null +++ b/app/boards/mechwild/pillbug/board.yml @@ -0,0 +1,5 @@ +board: + extend: pillbug + variants: + - name: zmk + qualifier: nrf52840 diff --git a/app/boards/arm/pillbug/pillbug-pinctrl.dtsi b/app/boards/mechwild/pillbug/pillbug-pinctrl.dtsi similarity index 100% rename from app/boards/arm/pillbug/pillbug-pinctrl.dtsi rename to app/boards/mechwild/pillbug/pillbug-pinctrl.dtsi diff --git a/app/boards/arm/pillbug/pillbug.zmk.yml b/app/boards/mechwild/pillbug/pillbug.zmk.yml similarity index 89% rename from app/boards/arm/pillbug/pillbug.zmk.yml rename to app/boards/mechwild/pillbug/pillbug.zmk.yml index 5df11b9e..397ce653 100644 --- a/app/boards/arm/pillbug/pillbug.zmk.yml +++ b/app/boards/mechwild/pillbug/pillbug.zmk.yml @@ -1,5 +1,5 @@ file_format: "1" -id: pillbug +id: pillbug//zmk name: PillBug type: board arch: arm diff --git a/app/boards/mechwild/pillbug/pillbug_nrf52840_zmk.dts b/app/boards/mechwild/pillbug/pillbug_nrf52840_zmk.dts new file mode 100644 index 00000000..ff977338 --- /dev/null +++ b/app/boards/mechwild/pillbug/pillbug_nrf52840_zmk.dts @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2026 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +/dts-v1/; + +#include <../boards/mechwild/pillbug/pillbug.dts> +#include + + +/ { + chosen { + zmk,battery = &vbatt; + }; + + + // Node name must match original "EXT_POWER" label to preserve user settings. + EXT_POWER { + compatible = "zmk,ext-power-generic"; + control-gpios = <&gpio1 7 GPIO_ACTIVE_LOW>; + init-delay-ms = <50>; + }; + + vbatt: vbatt { + compatible = "zmk,battery-voltage-divider"; + io-channels = <&adc 2>; + output-ohms = <2000000>; + full-ohms = <(2000000 + 820000)>; + }; +}; diff --git a/app/boards/arm/pillbug/pillbug_defconfig b/app/boards/mechwild/pillbug/pillbug_nrf52840_zmk_defconfig similarity index 83% rename from app/boards/arm/pillbug/pillbug_defconfig rename to app/boards/mechwild/pillbug/pillbug_nrf52840_zmk_defconfig index 9ec72c41..f325d358 100644 --- a/app/boards/arm/pillbug/pillbug_defconfig +++ b/app/boards/mechwild/pillbug/pillbug_nrf52840_zmk_defconfig @@ -1,10 +1,6 @@ # Copyright (c) 2022 The ZMK Contributors # SPDX-License-Identifier: MIT -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_PILLBUG=y - # Enable MPU CONFIG_ARM_MPU=y diff --git a/app/boards/arm/s40nc/Kconfig.defconfig b/app/boards/mechwild/s40nc/Kconfig.defconfig similarity index 100% rename from app/boards/arm/s40nc/Kconfig.defconfig rename to app/boards/mechwild/s40nc/Kconfig.defconfig diff --git a/app/boards/mechwild/s40nc/Kconfig.s40nc b/app/boards/mechwild/s40nc/Kconfig.s40nc new file mode 100644 index 00000000..749f8f11 --- /dev/null +++ b/app/boards/mechwild/s40nc/Kconfig.s40nc @@ -0,0 +1,8 @@ +# Copyright (c) 2021 The ZMK Contributors +# SPDX-License-Identifier: Apache-2.0 + +config BOARD_S40NC + select SOC_NRF52840_QIAA + imply RETAINED_MEM + imply RETENTION + imply RETENTION_BOOT_MODE diff --git a/app/boards/arm/s40nc/README.md b/app/boards/mechwild/s40nc/README.md similarity index 100% rename from app/boards/arm/s40nc/README.md rename to app/boards/mechwild/s40nc/README.md diff --git a/app/boards/arm/s40nc/board.cmake b/app/boards/mechwild/s40nc/board.cmake similarity index 100% rename from app/boards/arm/s40nc/board.cmake rename to app/boards/mechwild/s40nc/board.cmake diff --git a/app/boards/mechwild/s40nc/board.yml b/app/boards/mechwild/s40nc/board.yml new file mode 100644 index 00000000..61700618 --- /dev/null +++ b/app/boards/mechwild/s40nc/board.yml @@ -0,0 +1,7 @@ +board: + name: s40nc + vendor: mechwild + socs: + - name: nrf52840 + variants: + - name: zmk diff --git a/app/boards/arm/glove80/pre_dt_board.cmake b/app/boards/mechwild/s40nc/pre_dt_board.cmake similarity index 100% rename from app/boards/arm/glove80/pre_dt_board.cmake rename to app/boards/mechwild/s40nc/pre_dt_board.cmake diff --git a/app/boards/arm/s40nc/s40nc.keymap b/app/boards/mechwild/s40nc/s40nc.keymap similarity index 100% rename from app/boards/arm/s40nc/s40nc.keymap rename to app/boards/mechwild/s40nc/s40nc.keymap diff --git a/app/boards/arm/s40nc/s40nc.yaml b/app/boards/mechwild/s40nc/s40nc.yaml similarity index 100% rename from app/boards/arm/s40nc/s40nc.yaml rename to app/boards/mechwild/s40nc/s40nc.yaml diff --git a/app/boards/arm/s40nc/s40nc.zmk.yml b/app/boards/mechwild/s40nc/s40nc.zmk.yml similarity index 88% rename from app/boards/arm/s40nc/s40nc.zmk.yml rename to app/boards/mechwild/s40nc/s40nc.zmk.yml index 57b30eca..e64fc007 100644 --- a/app/boards/arm/s40nc/s40nc.zmk.yml +++ b/app/boards/mechwild/s40nc/s40nc.zmk.yml @@ -1,5 +1,5 @@ file_format: "1" -id: s40nc +id: s40nc//zmk name: S40NC type: board arch: arm diff --git a/app/boards/arm/s40nc/s40nc.dts b/app/boards/mechwild/s40nc/s40nc_nrf52840_zmk.dts similarity index 98% rename from app/boards/arm/s40nc/s40nc.dts rename to app/boards/mechwild/s40nc/s40nc_nrf52840_zmk.dts index 4c37030d..814a0801 100644 --- a/app/boards/arm/s40nc/s40nc.dts +++ b/app/boards/mechwild/s40nc/s40nc_nrf52840_zmk.dts @@ -6,6 +6,8 @@ /dts-v1/; #include +#include + #include / { diff --git a/app/boards/arm/s40nc/s40nc_defconfig b/app/boards/mechwild/s40nc/s40nc_nrf52840_zmk_defconfig similarity index 82% rename from app/boards/arm/s40nc/s40nc_defconfig rename to app/boards/mechwild/s40nc/s40nc_nrf52840_zmk_defconfig index b523ceb8..79d4175f 100644 --- a/app/boards/arm/s40nc/s40nc_defconfig +++ b/app/boards/mechwild/s40nc/s40nc_nrf52840_zmk_defconfig @@ -1,10 +1,6 @@ # Copyright (c) 2021 The ZMK Contributors # SPDX-License-Identifier: MIT -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_S40NC=y - # Enable MPU CONFIG_ARM_MPU=y diff --git a/app/boards/arm/glove80/CMakeLists.txt b/app/boards/moergo/glove80/CMakeLists.txt similarity index 100% rename from app/boards/arm/glove80/CMakeLists.txt rename to app/boards/moergo/glove80/CMakeLists.txt diff --git a/app/boards/arm/glove80/Kconfig.defconfig b/app/boards/moergo/glove80/Kconfig.defconfig similarity index 82% rename from app/boards/arm/glove80/Kconfig.defconfig rename to app/boards/moergo/glove80/Kconfig.defconfig index e1c452a5..6280a151 100644 --- a/app/boards/arm/glove80/Kconfig.defconfig +++ b/app/boards/moergo/glove80/Kconfig.defconfig @@ -6,7 +6,7 @@ if BOARD_GLOVE80_LH config BOARD default "glove80 lh" -config ZMK_SPLIT_BLE_ROLE_CENTRAL +config ZMK_SPLIT_ROLE_CENTRAL default y endif # BOARD_GLOVE80_LH @@ -52,14 +52,4 @@ config LED_PWM endif # ZMK_BACKLIGHT -if ZMK_RGB_UNDERGLOW - -config SPI - default y - -config WS2812_STRIP - default y - -endif # ZMK_RGB_UNDERGLOW - endif # BOARD_GLOVE80_LH || BOARD_GLOVE80_RH diff --git a/app/boards/moergo/glove80/Kconfig.glove80_lh b/app/boards/moergo/glove80/Kconfig.glove80_lh new file mode 100644 index 00000000..33046e7d --- /dev/null +++ b/app/boards/moergo/glove80/Kconfig.glove80_lh @@ -0,0 +1,9 @@ +# Copyright (c) 2021 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config BOARD_GLOVE80_LH + select SOC_NRF52840_QIAA + select ZMK_BOARD_COMPAT + imply RETAINED_MEM + imply RETENTION + imply RETENTION_BOOT_MODE diff --git a/app/boards/moergo/glove80/Kconfig.glove80_rh b/app/boards/moergo/glove80/Kconfig.glove80_rh new file mode 100644 index 00000000..68590e4b --- /dev/null +++ b/app/boards/moergo/glove80/Kconfig.glove80_rh @@ -0,0 +1,9 @@ +# Copyright (c) 2021 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config BOARD_GLOVE80_RH + select SOC_NRF52840_QIAA + select ZMK_BOARD_COMPAT + imply RETAINED_MEM + imply RETENTION + imply RETENTION_BOOT_MODE diff --git a/app/boards/arm/glove80/board.cmake b/app/boards/moergo/glove80/board.cmake similarity index 100% rename from app/boards/arm/glove80/board.cmake rename to app/boards/moergo/glove80/board.cmake diff --git a/app/boards/moergo/glove80/board.yml b/app/boards/moergo/glove80/board.yml new file mode 100644 index 00000000..fcbd7cf5 --- /dev/null +++ b/app/boards/moergo/glove80/board.yml @@ -0,0 +1,9 @@ +boards: + - name: glove80_rh + vendor: moergo + socs: + - name: nrf52840 + - name: glove80_lh + vendor: moergo + socs: + - name: nrf52840 diff --git a/app/boards/moergo/glove80/glove80-layouts.dtsi b/app/boards/moergo/glove80/glove80-layouts.dtsi new file mode 100644 index 00000000..0c4f2d4e --- /dev/null +++ b/app/boards/moergo/glove80/glove80-layouts.dtsi @@ -0,0 +1,91 @@ +#include + +/ { + physical_layout0: physical_layout_0 { + compatible = "zmk,physical-layout"; + display-name = "Default"; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 50 0 0 0> + , <&key_physical_attrs 100 100 100 50 0 0 0> + , <&key_physical_attrs 100 100 200 0 0 0 0> + , <&key_physical_attrs 100 100 300 0 0 0 0> + , <&key_physical_attrs 100 100 400 0 0 0 0> + , <&key_physical_attrs 100 100 1300 0 0 0 0> + , <&key_physical_attrs 100 100 1400 0 0 0 0> + , <&key_physical_attrs 100 100 1500 0 0 0 0> + , <&key_physical_attrs 100 100 1600 50 0 0 0> + , <&key_physical_attrs 100 100 1700 50 0 0 0> + , <&key_physical_attrs 100 100 0 150 0 0 0> + , <&key_physical_attrs 100 100 100 150 0 0 0> + , <&key_physical_attrs 100 100 200 100 0 0 0> + , <&key_physical_attrs 100 100 300 100 0 0 0> + , <&key_physical_attrs 100 100 400 100 0 0 0> + , <&key_physical_attrs 100 100 500 100 0 0 0> + , <&key_physical_attrs 100 100 1200 100 0 0 0> + , <&key_physical_attrs 100 100 1300 100 0 0 0> + , <&key_physical_attrs 100 100 1400 100 0 0 0> + , <&key_physical_attrs 100 100 1500 100 0 0 0> + , <&key_physical_attrs 100 100 1600 150 0 0 0> + , <&key_physical_attrs 100 100 1700 150 0 0 0> + , <&key_physical_attrs 100 100 0 250 0 0 0> + , <&key_physical_attrs 100 100 100 250 0 0 0> + , <&key_physical_attrs 100 100 200 200 0 0 0> + , <&key_physical_attrs 100 100 300 200 0 0 0> + , <&key_physical_attrs 100 100 400 200 0 0 0> + , <&key_physical_attrs 100 100 500 200 0 0 0> + , <&key_physical_attrs 100 100 1200 200 0 0 0> + , <&key_physical_attrs 100 100 1300 200 0 0 0> + , <&key_physical_attrs 100 100 1400 200 0 0 0> + , <&key_physical_attrs 100 100 1500 200 0 0 0> + , <&key_physical_attrs 100 100 1600 250 0 0 0> + , <&key_physical_attrs 100 100 1700 250 0 0 0> + , <&key_physical_attrs 100 100 0 350 0 0 0> + , <&key_physical_attrs 100 100 100 350 0 0 0> + , <&key_physical_attrs 100 100 200 300 0 0 0> + , <&key_physical_attrs 100 100 300 300 0 0 0> + , <&key_physical_attrs 100 100 400 300 0 0 0> + , <&key_physical_attrs 100 100 500 300 0 0 0> + , <&key_physical_attrs 100 100 1200 300 0 0 0> + , <&key_physical_attrs 100 100 1300 300 0 0 0> + , <&key_physical_attrs 100 100 1400 300 0 0 0> + , <&key_physical_attrs 100 100 1500 300 0 0 0> + , <&key_physical_attrs 100 100 1600 350 0 0 0> + , <&key_physical_attrs 100 100 1700 350 0 0 0> + , <&key_physical_attrs 100 100 0 450 0 0 0> + , <&key_physical_attrs 100 100 100 450 0 0 0> + , <&key_physical_attrs 100 100 200 400 0 0 0> + , <&key_physical_attrs 100 100 300 400 0 0 0> + , <&key_physical_attrs 100 100 400 400 0 0 0> + , <&key_physical_attrs 100 100 500 400 0 0 0> + , <&key_physical_attrs 100 100 400 450 3000 450 925> + , <&key_physical_attrs 100 100 400 450 4500 450 925> + , <&key_physical_attrs 100 100 400 450 6000 450 925> + , <&key_physical_attrs 100 100 1300 450 (-6000) 1350 925> + , <&key_physical_attrs 100 100 1300 450 (-4500) 1350 925> + , <&key_physical_attrs 100 100 1300 450 (-3000) 1350 925> + , <&key_physical_attrs 100 100 1200 400 0 0 0> + , <&key_physical_attrs 100 100 1300 400 0 0 0> + , <&key_physical_attrs 100 100 1400 400 0 0 0> + , <&key_physical_attrs 100 100 1500 400 0 0 0> + , <&key_physical_attrs 100 100 1600 450 0 0 0> + , <&key_physical_attrs 100 100 1700 450 0 0 0> + , <&key_physical_attrs 100 100 0 550 0 0 0> + , <&key_physical_attrs 100 100 100 550 0 0 0> + , <&key_physical_attrs 100 100 200 500 0 0 0> + , <&key_physical_attrs 100 100 300 500 0 0 0> + , <&key_physical_attrs 100 100 400 500 0 0 0> + , <&key_physical_attrs 100 100 400 550 2000 450 925> + , <&key_physical_attrs 100 100 400 550 4000 450 925> + , <&key_physical_attrs 100 100 400 550 6000 450 925> + , <&key_physical_attrs 100 100 1300 550 (-6000) 1350 925> + , <&key_physical_attrs 100 100 1300 550 (-4000) 1350 925> + , <&key_physical_attrs 100 100 1300 550 (-2000) 1350 925> + , <&key_physical_attrs 100 100 1300 500 0 0 0> + , <&key_physical_attrs 100 100 1400 500 0 0 0> + , <&key_physical_attrs 100 100 1500 500 0 0 0> + , <&key_physical_attrs 100 100 1600 550 0 0 0> + , <&key_physical_attrs 100 100 1700 550 0 0 0> + ; + }; +}; \ No newline at end of file diff --git a/app/boards/arm/glove80/glove80.dtsi b/app/boards/moergo/glove80/glove80.dtsi similarity index 89% rename from app/boards/arm/glove80/glove80.dtsi rename to app/boards/moergo/glove80/glove80.dtsi index d51a73ac..cf3ce7cc 100644 --- a/app/boards/arm/glove80/glove80.dtsi +++ b/app/boards/moergo/glove80/glove80.dtsi @@ -5,19 +5,26 @@ /dts-v1/; #include +#include #include +#include "glove80-layouts.dtsi" + +&physical_layout0 { + transform = <&matrix_transform0>; +}; + / { chosen { zmk,kscan = &kscan0; - zmk,matrix-transform = &default_transform; + zmk,physical-layout = &physical_layout0; zephyr,code-partition = &code_partition; zephyr,sram = &sram0; zephyr,flash = &flash0; }; - default_transform: keymap_transform_0 { + matrix_transform0: keymap_transform_0 { compatible = "zmk,matrix-transform"; columns = <14>; rows = <6>; @@ -39,7 +46,10 @@ debounce-press-ms = <4>; debounce-release-ms = <20>; }; +}; +®1 { + regulator-initial-mode = ; }; &adc { diff --git a/app/boards/arm/glove80/glove80.keymap b/app/boards/moergo/glove80/glove80.keymap similarity index 100% rename from app/boards/arm/glove80/glove80.keymap rename to app/boards/moergo/glove80/glove80.keymap diff --git a/app/boards/arm/glove80/glove80.yaml b/app/boards/moergo/glove80/glove80.yaml similarity index 100% rename from app/boards/arm/glove80/glove80.yaml rename to app/boards/moergo/glove80/glove80.yaml diff --git a/app/boards/arm/glove80/glove80.zmk.yml b/app/boards/moergo/glove80/glove80.zmk.yml similarity index 94% rename from app/boards/arm/glove80/glove80.zmk.yml rename to app/boards/moergo/glove80/glove80.zmk.yml index ca70b7d6..708fa4f2 100644 --- a/app/boards/arm/glove80/glove80.zmk.yml +++ b/app/boards/moergo/glove80/glove80.zmk.yml @@ -8,6 +8,7 @@ features: - keys - underglow - backlight + - studio outputs: - usb - ble diff --git a/app/boards/arm/glove80/glove80_lh-pinctrl.dtsi b/app/boards/moergo/glove80/glove80_lh-pinctrl.dtsi similarity index 100% rename from app/boards/arm/glove80/glove80_lh-pinctrl.dtsi rename to app/boards/moergo/glove80/glove80_lh-pinctrl.dtsi diff --git a/app/boards/arm/glove80/glove80_lh.dts b/app/boards/moergo/glove80/glove80_lh.dts similarity index 83% rename from app/boards/arm/glove80/glove80_lh.dts rename to app/boards/moergo/glove80/glove80_lh.dts index 5ef54207..2ed56688 100644 --- a/app/boards/arm/glove80/glove80_lh.dts +++ b/app/boards/moergo/glove80/glove80_lh.dts @@ -36,6 +36,21 @@ vbatt: vbatt { compatible = "zmk,battery-nrf-vddh"; }; + + glove80_ext: connector { + compatible = "moergo,glove80-ext"; + #gpio-cells = <2>; + gpio-map-mask = <0xffffffff 0xffffffc0>; + gpio-map-pass-thru = <0 0x3f>; + gpio-map + = <1 0 &gpio0 22 0> /* EXT1 */ + , <2 0 &gpio0 21 0> /* EXT2 */ + , <3 0 &gpio0 24 0> /* EXT3 */ + , <4 0 &gpio0 20 0> /* EXT4 */ + , <5 0 &gpio0 25 0> /* EXT5 */ + , <6 0 &gpio1 00 0> /* EXT6 */ + ; + }; }; &spi3 { diff --git a/app/boards/arm/glove80/glove80_lh.keymap b/app/boards/moergo/glove80/glove80_lh.keymap similarity index 100% rename from app/boards/arm/glove80/glove80_lh.keymap rename to app/boards/moergo/glove80/glove80_lh.keymap diff --git a/app/boards/arm/glove80/glove80_lh_defconfig b/app/boards/moergo/glove80/glove80_lh_defconfig similarity index 96% rename from app/boards/arm/glove80/glove80_lh_defconfig rename to app/boards/moergo/glove80/glove80_lh_defconfig index a93f27cd..9973e953 100644 --- a/app/boards/arm/glove80/glove80_lh_defconfig +++ b/app/boards/moergo/glove80/glove80_lh_defconfig @@ -1,10 +1,6 @@ # Copyright (c) 2021 The ZMK Contributors # SPDX-License-Identifier: MIT -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_GLOVE80_LH=y - # Enable both USB and BLE CONFIG_ZMK_USB=y CONFIG_ZMK_BLE=y diff --git a/app/boards/arm/glove80/glove80_rh-pinctrl.dtsi b/app/boards/moergo/glove80/glove80_rh-pinctrl.dtsi similarity index 100% rename from app/boards/arm/glove80/glove80_rh-pinctrl.dtsi rename to app/boards/moergo/glove80/glove80_rh-pinctrl.dtsi diff --git a/app/boards/arm/glove80/glove80_rh.dts b/app/boards/moergo/glove80/glove80_rh.dts similarity index 83% rename from app/boards/arm/glove80/glove80_rh.dts rename to app/boards/moergo/glove80/glove80_rh.dts index 6f108d74..7b54f62c 100644 --- a/app/boards/arm/glove80/glove80_rh.dts +++ b/app/boards/moergo/glove80/glove80_rh.dts @@ -37,6 +37,21 @@ vbatt: vbatt { compatible = "zmk,battery-nrf-vddh"; }; + + glove80_ext: connector { + compatible = "moergo,glove80-ext"; + #gpio-cells = <2>; + gpio-map-mask = <0xffffffff 0xffffffc0>; + gpio-map-pass-thru = <0 0x3f>; + gpio-map + = <1 0 &gpio0 21 0> /* EXT1 */ + , <2 0 &gpio0 24 0> /* EXT2 */ + , <3 0 &gpio0 20 0> /* EXT3 */ + , <4 0 &gpio0 25 0> /* EXT4 */ + , <5 0 &gpio0 22 0> /* EXT5 */ + , <6 0 &gpio1 00 0> /* EXT6 */ + ; + }; }; &spi3 { @@ -79,7 +94,7 @@ }; /* For right hand, the columns are offset by 7 */ -&default_transform { +&matrix_transform0 { col-offset = <7>; }; diff --git a/app/boards/arm/glove80/glove80_rh.keymap b/app/boards/moergo/glove80/glove80_rh.keymap similarity index 100% rename from app/boards/arm/glove80/glove80_rh.keymap rename to app/boards/moergo/glove80/glove80_rh.keymap diff --git a/app/boards/arm/glove80/glove80_rh_defconfig b/app/boards/moergo/glove80/glove80_rh_defconfig similarity index 96% rename from app/boards/arm/glove80/glove80_rh_defconfig rename to app/boards/moergo/glove80/glove80_rh_defconfig index ef29d682..d45e0ded 100644 --- a/app/boards/arm/glove80/glove80_rh_defconfig +++ b/app/boards/moergo/glove80/glove80_rh_defconfig @@ -1,10 +1,6 @@ # Copyright (c) 2021 The ZMK Contributors # SPDX-License-Identifier: MIT -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_GLOVE80_RH=y - # Enable both USB and BLE CONFIG_ZMK_USB=y CONFIG_ZMK_BLE=y diff --git a/app/boards/arm/mikoto/pre_dt_board.cmake b/app/boards/moergo/glove80/pre_dt_board.cmake similarity index 100% rename from app/boards/arm/mikoto/pre_dt_board.cmake rename to app/boards/moergo/glove80/pre_dt_board.cmake diff --git a/app/boards/arm/glove80/readme.md b/app/boards/moergo/glove80/readme.md similarity index 100% rename from app/boards/arm/glove80/readme.md rename to app/boards/moergo/glove80/readme.md diff --git a/app/boards/arm/glove80/usb_serial_number.c b/app/boards/moergo/glove80/usb_serial_number.c similarity index 100% rename from app/boards/arm/glove80/usb_serial_number.c rename to app/boards/moergo/glove80/usb_serial_number.c diff --git a/app/boards/native/native_sim/Kconfig b/app/boards/native/native_sim/Kconfig new file mode 100644 index 00000000..8d7f746f --- /dev/null +++ b/app/boards/native/native_sim/Kconfig @@ -0,0 +1,11 @@ + +config BOARD_NATIVE_SIM + bool + select POSIX_ARCH_CONSOLE + select NATIVE_LIBRARY + select NATIVE_POSIX_TIMER + select 64BIT if BOARD_NATIVE_SIM_NATIVE_ZMK_TEST_MOCK || BOARD_NATIVE_SIM_NATIVE_ZMK_DISPLAY_TESTING + imply BOARD_NATIVE_POSIX if NATIVE_SIM_NATIVE_POSIX_COMPAT + help + Native simulator (Single Core) + Will produce a console Linux process which can be executed natively. diff --git a/app/boards/native/native_sim/board.yml b/app/boards/native/native_sim/board.yml new file mode 100644 index 00000000..81f8d1b2 --- /dev/null +++ b/app/boards/native/native_sim/board.yml @@ -0,0 +1,7 @@ +board: + extend: native_sim + variants: + - name: zmk_display_testing + qualifier: native + - name: zmk_test_mock + qualifier: native diff --git a/app/boards/native/native_sim/native_sim_native_zmk_display_testing.keymap b/app/boards/native/native_sim/native_sim_native_zmk_display_testing.keymap new file mode 100644 index 00000000..d55614c3 --- /dev/null +++ b/app/boards/native/native_sim/native_sim_native_zmk_display_testing.keymap @@ -0,0 +1,20 @@ +#include +#include + +/ { + keymap { + compatible = "zmk,keymap"; + + default_layer { + bindings = < + &none &mo 1 + &kp A &none>; + }; + + lower_layer { + bindings = < + &none &trans + &none &kp A>; + }; + }; +}; diff --git a/app/boards/native/native_sim/native_sim_native_zmk_display_testing_defconfig b/app/boards/native/native_sim/native_sim_native_zmk_display_testing_defconfig new file mode 100644 index 00000000..26fcc6ad --- /dev/null +++ b/app/boards/native/native_sim/native_sim_native_zmk_display_testing_defconfig @@ -0,0 +1,12 @@ +# SPDX-License-Identifier: MIT + +CONFIG_ZMK_DISPLAY=y + +CONFIG_CONSOLE=y +CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=1000000 + +CONFIG_LOG=y +CONFIG_LOG_BACKEND_SHOW_COLOR=n +CONFIG_ZMK_LOG_LEVEL_DBG=y +CONFIG_DEBUG=y +CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000 diff --git a/app/boards/native_posix_64.conf b/app/boards/native/native_sim/native_sim_native_zmk_test_mock_defconfig similarity index 56% rename from app/boards/native_posix_64.conf rename to app/boards/native/native_sim/native_sim_native_zmk_test_mock_defconfig index 0d8e0d81..fc1b0407 100644 --- a/app/boards/native_posix_64.conf +++ b/app/boards/native/native_sim/native_sim_native_zmk_test_mock_defconfig @@ -1,6 +1,8 @@ -CONFIG_GPIO=n -# Enable to have the native posix build expose USBIP device(s) -# CONFIG_ZMK_USB=y +# SPDX-License-Identifier: MIT + +CONFIG_CONSOLE=y +CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=1000000 + CONFIG_LOG=y CONFIG_LOG_BACKEND_SHOW_COLOR=n CONFIG_ZMK_LOG_LEVEL_DBG=y diff --git a/app/boards/native/native_sim/native_sim_zmk_display_testing.dts b/app/boards/native/native_sim/native_sim_zmk_display_testing.dts new file mode 100644 index 00000000..f82371b4 --- /dev/null +++ b/app/boards/native/native_sim/native_sim_zmk_display_testing.dts @@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: MIT */ + +#include "native_sim_zmk_test_mock.dts" + +&kscan { + events = <>; + /delete-property/ exit-after; +}; + +&sdl_dc { + width = <128>; + height = <128>; +}; diff --git a/app/boards/native_posix.overlay b/app/boards/native/native_sim/native_sim_zmk_test_mock.dts similarity index 71% rename from app/boards/native_posix.overlay rename to app/boards/native/native_sim/native_sim_zmk_test_mock.dts index d5ebcf18..fa67bfc5 100644 --- a/app/boards/native_posix.overlay +++ b/app/boards/native/native_sim/native_sim_zmk_test_mock.dts @@ -1,4 +1,5 @@ -#include + +#include <../boards/native/native_sim/native_sim.dts> #include #include @@ -7,7 +8,7 @@ zmk,kscan = &kscan; }; - kscan: kscan { + kscan: native_posix_64_kscan_mock { compatible = "zmk,kscan-mock"; rows = <2>; @@ -15,3 +16,4 @@ exit-after; }; }; + diff --git a/app/boards/native/nrf_bsim/board.yml b/app/boards/native/nrf_bsim/board.yml new file mode 100644 index 00000000..89ccb73e --- /dev/null +++ b/app/boards/native/nrf_bsim/board.yml @@ -0,0 +1,5 @@ +board: + extend: nrf52_bsim + variants: + - name: zmk_test_mock + qualifier: native diff --git a/app/boards/native/nrf_bsim/nrf52_bsim_native_zmk_test_mock_defconfig b/app/boards/native/nrf_bsim/nrf52_bsim_native_zmk_test_mock_defconfig new file mode 100644 index 00000000..c24991bf --- /dev/null +++ b/app/boards/native/nrf_bsim/nrf52_bsim_native_zmk_test_mock_defconfig @@ -0,0 +1,10 @@ +# Copyright (c) 2026 The ZMK Contributors +# SPDX-License-Identifier: MIT + +CONFIG_CONSOLE=y +CONFIG_NO_OPTIMIZATIONS=y + +CONFIG_ZMK_BLE=y +CONFIG_LOG=y +CONFIG_LOG_BACKEND_SHOW_COLOR=n +CONFIG_ZMK_LOG_LEVEL_DBG=y diff --git a/app/boards/nrf52_bsim.overlay b/app/boards/native/nrf_bsim/nrf52_bsim_zmk_test_mock.dts similarity index 83% rename from app/boards/nrf52_bsim.overlay rename to app/boards/native/nrf_bsim/nrf52_bsim_zmk_test_mock.dts index ec7c49ae..835a49c1 100644 --- a/app/boards/nrf52_bsim.overlay +++ b/app/boards/native/nrf_bsim/nrf52_bsim_zmk_test_mock.dts @@ -1,3 +1,5 @@ +#include <../boards/native/nrf_bsim/nrf52_bsim.dts> + #include #include #include diff --git a/app/boards/native_posix_64.overlay b/app/boards/native_posix_64.overlay deleted file mode 100644 index 5b8e23d3..00000000 --- a/app/boards/native_posix_64.overlay +++ /dev/null @@ -1,27 +0,0 @@ - -#include -#include - -/ { - chosen { - zephyr,console = &uart0; - zmk,kscan = &kscan; - }; - - kscan: native_posix_64_kscan_mock { - compatible = "zmk,kscan-mock"; - - rows = <2>; - columns = <2>; - exit-after; - }; - - uart0: uart { - status = "okay"; - compatible = "zephyr,native-posix-uart"; - /* Dummy current-speed entry to comply with serial - * DTS binding - */ - current-speed = <0>; - }; -}; diff --git a/app/boards/arm/nice60/Kconfig b/app/boards/nicekeyboards/nice60/Kconfig similarity index 100% rename from app/boards/arm/nice60/Kconfig rename to app/boards/nicekeyboards/nice60/Kconfig diff --git a/app/boards/arm/nice60/Kconfig.defconfig b/app/boards/nicekeyboards/nice60/Kconfig.defconfig similarity index 100% rename from app/boards/arm/nice60/Kconfig.defconfig rename to app/boards/nicekeyboards/nice60/Kconfig.defconfig diff --git a/app/boards/nicekeyboards/nice60/Kconfig.nice60 b/app/boards/nicekeyboards/nice60/Kconfig.nice60 new file mode 100644 index 00000000..cf02e433 --- /dev/null +++ b/app/boards/nicekeyboards/nice60/Kconfig.nice60 @@ -0,0 +1,9 @@ +# Copyright (c) 2021 Nick Winans +# SPDX-License-Identifier: Apache-2.0 + +config BOARD_NICE60 + select SOC_NRF52840_QIAA + select ZMK_BOARD_COMPAT if BOARD_NICE60_NRF52840_ZMK + imply RETAINED_MEM if BOARD_NICE60_NRF52840_ZMK + imply RETENTION if BOARD_NICE60_NRF52840_ZMK + imply RETENTION_BOOT_MODE if BOARD_NICE60_NRF52840_ZMK diff --git a/app/boards/arm/nice60/README.md b/app/boards/nicekeyboards/nice60/README.md similarity index 86% rename from app/boards/arm/nice60/README.md rename to app/boards/nicekeyboards/nice60/README.md index dce230ae..4b3fa09a 100644 --- a/app/boards/arm/nice60/README.md +++ b/app/boards/nicekeyboards/nice60/README.md @@ -7,5 +7,5 @@ The nice!60 is a hotswap 60% made by Nice Keyboards. https://nicekeyboards.com/n ## Building nice!60 ZMK firmware ``` -west build -p -b nice60 +west build -p -b nice60//zmk ``` diff --git a/app/boards/arm/nice60/board.cmake b/app/boards/nicekeyboards/nice60/board.cmake similarity index 100% rename from app/boards/arm/nice60/board.cmake rename to app/boards/nicekeyboards/nice60/board.cmake diff --git a/app/boards/nicekeyboards/nice60/board.yml b/app/boards/nicekeyboards/nice60/board.yml new file mode 100644 index 00000000..e945cbf0 --- /dev/null +++ b/app/boards/nicekeyboards/nice60/board.yml @@ -0,0 +1,7 @@ +board: + name: nice60 + vendor: nicekeyboards + socs: + - name: nrf52840 + variants: + - name: zmk diff --git a/app/boards/arm/nice60/nice60-pinctrl.dtsi b/app/boards/nicekeyboards/nice60/nice60-pinctrl.dtsi similarity index 100% rename from app/boards/arm/nice60/nice60-pinctrl.dtsi rename to app/boards/nicekeyboards/nice60/nice60-pinctrl.dtsi diff --git a/app/boards/arm/nice60/nice60.keymap b/app/boards/nicekeyboards/nice60/nice60.keymap similarity index 100% rename from app/boards/arm/nice60/nice60.keymap rename to app/boards/nicekeyboards/nice60/nice60.keymap diff --git a/app/boards/arm/nice60/nice60.yaml b/app/boards/nicekeyboards/nice60/nice60.yaml similarity index 100% rename from app/boards/arm/nice60/nice60.yaml rename to app/boards/nicekeyboards/nice60/nice60.yaml diff --git a/app/boards/arm/nice60/nice60.zmk.yml b/app/boards/nicekeyboards/nice60/nice60.zmk.yml similarity index 84% rename from app/boards/arm/nice60/nice60.zmk.yml rename to app/boards/nicekeyboards/nice60/nice60.zmk.yml index cbcc8130..b6d2a2b1 100644 --- a/app/boards/arm/nice60/nice60.zmk.yml +++ b/app/boards/nicekeyboards/nice60/nice60.zmk.yml @@ -1,11 +1,12 @@ file_format: "1" -id: nice60 +id: nice60//zmk name: nice!60 type: board arch: arm features: - keys - underglow + - studio outputs: - usb - ble diff --git a/app/boards/arm/nice60/nice60.dts b/app/boards/nicekeyboards/nice60/nice60_nrf52840_zmk.dts similarity index 94% rename from app/boards/arm/nice60/nice60.dts rename to app/boards/nicekeyboards/nice60/nice60_nrf52840_zmk.dts index fec8a678..acecda4d 100644 --- a/app/boards/arm/nice60/nice60.dts +++ b/app/boards/nicekeyboards/nice60/nice60_nrf52840_zmk.dts @@ -6,10 +6,13 @@ /dts-v1/; #include +#include #include #include +#include + #include "nice60-pinctrl.dtsi" / { @@ -22,7 +25,7 @@ zephyr,flash = &flash0; zmk,battery = &vbatt; zmk,kscan = &kscan0; - zmk,matrix-transform = &default_transform; + zmk,physical-layout = &layout_60_ansi; zmk,underglow = &led_strip; }; @@ -90,6 +93,10 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,5) R }; }; +®1 { + regulator-initial-mode = ; +}; + &adc { status = "okay"; }; @@ -169,3 +176,7 @@ zephyr_udc0: &usbd { }; }; }; + +&layout_60_ansi { + transform = <&default_transform>; +}; diff --git a/app/boards/arm/nice60/nice60_defconfig b/app/boards/nicekeyboards/nice60/nice60_nrf52840_zmk_defconfig similarity index 79% rename from app/boards/arm/nice60/nice60_defconfig rename to app/boards/nicekeyboards/nice60/nice60_nrf52840_zmk_defconfig index fabcb7ed..9b3a9144 100644 --- a/app/boards/arm/nice60/nice60_defconfig +++ b/app/boards/nicekeyboards/nice60/nice60_nrf52840_zmk_defconfig @@ -1,10 +1,6 @@ # Copyright (c) 2021 Nick Winans # SPDX-License-Identifier: MIT -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_NICE60=y - # Enable MPU CONFIG_ARM_MPU=y @@ -24,11 +20,9 @@ CONFIG_FLASH_PAGE_LAYOUT=y CONFIG_FLASH_MAP=y CONFIG_ZMK_RGB_UNDERGLOW=y -CONFIG_WS2812_STRIP=y CONFIG_ZMK_RGB_UNDERGLOW_HUE_START=160 CONFIG_ZMK_RGB_UNDERGLOW_EFF_START=3 - CONFIG_ZMK_USB=y -CONFIG_ZMK_BLE=y \ No newline at end of file +CONFIG_ZMK_BLE=y diff --git a/app/boards/arm/nice60/pre_dt_board.cmake b/app/boards/nicekeyboards/nice60/pre_dt_board.cmake similarity index 100% rename from app/boards/arm/nice60/pre_dt_board.cmake rename to app/boards/nicekeyboards/nice60/pre_dt_board.cmake diff --git a/app/boards/nicekeyboards/nice_nano/Kconfig.nice_nano b/app/boards/nicekeyboards/nice_nano/Kconfig.nice_nano new file mode 100644 index 00000000..dd120dbc --- /dev/null +++ b/app/boards/nicekeyboards/nice_nano/Kconfig.nice_nano @@ -0,0 +1,9 @@ +# Copyright (c) 2020 Pete Johanson +# SPDX-License-Identifier: Apache-2.0 + +config BOARD_NICE_NANO + select SOC_NRF52840_QIAA + select ZMK_BOARD_COMPAT if BOARD_NICE_NANO_NRF52840_ZMK + imply RETAINED_MEM if BOARD_NICE_NANO_NRF52840_ZMK + imply RETENTION if BOARD_NICE_NANO_NRF52840_ZMK + imply RETENTION_BOOT_MODE if BOARD_NICE_NANO_NRF52840_ZMK diff --git a/app/boards/arm/ckp/board.cmake b/app/boards/nicekeyboards/nice_nano/board.cmake similarity index 100% rename from app/boards/arm/ckp/board.cmake rename to app/boards/nicekeyboards/nice_nano/board.cmake diff --git a/app/boards/nicekeyboards/nice_nano/board.yml b/app/boards/nicekeyboards/nice_nano/board.yml new file mode 100644 index 00000000..13cba4f6 --- /dev/null +++ b/app/boards/nicekeyboards/nice_nano/board.yml @@ -0,0 +1,5 @@ +board: + extend: nice_nano + variants: + - name: zmk + qualifier: nrf52840 diff --git a/app/boards/arm/nice_nano/nice_nano.zmk.yml b/app/boards/nicekeyboards/nice_nano/nice_nano.zmk.yml similarity index 56% rename from app/boards/arm/nice_nano/nice_nano.zmk.yml rename to app/boards/nicekeyboards/nice_nano/nice_nano.zmk.yml index 1799c0de..e9b69fff 100644 --- a/app/boards/arm/nice_nano/nice_nano.zmk.yml +++ b/app/boards/nicekeyboards/nice_nano/nice_nano.zmk.yml @@ -1,6 +1,6 @@ file_format: "1" -id: nice_nano -name: nice!nano v1 +id: nice_nano//zmk +name: nice!nano type: board arch: arm outputs: @@ -8,3 +8,7 @@ outputs: - ble url: https://nicekeyboards.com/nice-nano exposes: [pro_micro] +revisions: + - "1.0.0" + - "2.0.0" +default_revision: "2.0.0" diff --git a/app/boards/nicekeyboards/nice_nano/nice_nano_nrf52840_zmk.dts b/app/boards/nicekeyboards/nice_nano/nice_nano_nrf52840_zmk.dts new file mode 100644 index 00000000..ed5b9b7b --- /dev/null +++ b/app/boards/nicekeyboards/nice_nano/nice_nano_nrf52840_zmk.dts @@ -0,0 +1,11 @@ +/* + * Copyright (c) 2026 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +/dts-v1/; + +#include <../boards/nicekeyboards/nice_nano/nice_nano.dts> +#include + diff --git a/app/boards/arm/nice_nano/nice_nano.dts b/app/boards/nicekeyboards/nice_nano/nice_nano_nrf52840_zmk_1_0_0.overlay similarity index 85% rename from app/boards/arm/nice_nano/nice_nano.dts rename to app/boards/nicekeyboards/nice_nano/nice_nano_nrf52840_zmk_1_0_0.overlay index 06be88e1..6c1590bb 100644 --- a/app/boards/arm/nice_nano/nice_nano.dts +++ b/app/boards/nicekeyboards/nice_nano/nice_nano_nrf52840_zmk_1_0_0.overlay @@ -1,12 +1,9 @@ /* - * Copyright (c) 2021 The ZMK Contributors + * Copyright (c) 2025 The ZMK Contributors * * SPDX-License-Identifier: MIT */ -/dts-v1/; -#include "nice_nano.dtsi" - / { chosen { zmk,battery = &vbatt; diff --git a/app/boards/arm/nice_nano/nice_nano_defconfig b/app/boards/nicekeyboards/nice_nano/nice_nano_nrf52840_zmk_1_0_0_defconfig similarity index 81% rename from app/boards/arm/nice_nano/nice_nano_defconfig rename to app/boards/nicekeyboards/nice_nano/nice_nano_nrf52840_zmk_1_0_0_defconfig index 6b7fcab2..babddaac 100644 --- a/app/boards/arm/nice_nano/nice_nano_defconfig +++ b/app/boards/nicekeyboards/nice_nano/nice_nano_nrf52840_zmk_1_0_0_defconfig @@ -1,9 +1,5 @@ # SPDX-License-Identifier: MIT -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_NICE_NANO=y - # Enable MPU CONFIG_ARM_MPU=y diff --git a/app/boards/arm/nice_nano/nice_nano_v2.dts b/app/boards/nicekeyboards/nice_nano/nice_nano_nrf52840_zmk_2_0_0.overlay similarity index 92% rename from app/boards/arm/nice_nano/nice_nano_v2.dts rename to app/boards/nicekeyboards/nice_nano/nice_nano_nrf52840_zmk_2_0_0.overlay index c4f7a821..34c635ff 100644 --- a/app/boards/arm/nice_nano/nice_nano_v2.dts +++ b/app/boards/nicekeyboards/nice_nano/nice_nano_nrf52840_zmk_2_0_0.overlay @@ -4,9 +4,6 @@ * SPDX-License-Identifier: MIT */ -/dts-v1/; -#include "nice_nano.dtsi" - / { chosen { zmk,battery = &vbatt; @@ -23,3 +20,7 @@ compatible = "zmk,battery-nrf-vddh"; }; }; + +®0 { + status = "okay"; +}; diff --git a/app/boards/arm/nice_nano/nice_nano_v2_defconfig b/app/boards/nicekeyboards/nice_nano/nice_nano_nrf52840_zmk_2_0_0_defconfig similarity index 76% rename from app/boards/arm/nice_nano/nice_nano_v2_defconfig rename to app/boards/nicekeyboards/nice_nano/nice_nano_nrf52840_zmk_2_0_0_defconfig index 6b5044e5..03d08c91 100644 --- a/app/boards/arm/nice_nano/nice_nano_v2_defconfig +++ b/app/boards/nicekeyboards/nice_nano/nice_nano_nrf52840_zmk_2_0_0_defconfig @@ -1,9 +1,5 @@ # SPDX-License-Identifier: MIT -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_NICE_NANO_V2=y - # Enable MPU CONFIG_ARM_MPU=y @@ -24,4 +20,4 @@ CONFIG_FLASH_PAGE_LAYOUT=y CONFIG_FLASH_MAP=y CONFIG_ZMK_BLE=y -CONFIG_ZMK_USB=y \ No newline at end of file +CONFIG_ZMK_USB=y diff --git a/app/boards/arm/nice_nano/pre_dt_board.cmake b/app/boards/nicekeyboards/nice_nano/pre_dt_board.cmake similarity index 100% rename from app/boards/arm/nice_nano/pre_dt_board.cmake rename to app/boards/nicekeyboards/nice_nano/pre_dt_board.cmake diff --git a/app/boards/nordic/nrf52840dk/Kconfig.nrf52840dk b/app/boards/nordic/nrf52840dk/Kconfig.nrf52840dk new file mode 100644 index 00000000..8c213cce --- /dev/null +++ b/app/boards/nordic/nrf52840dk/Kconfig.nrf52840dk @@ -0,0 +1,4 @@ + +config BOARD_NRF52840DK + select SOC_NRF52840_QIAA if BOARD_NRF52840DK_NRF52840_ZMK + select ZMK_BOARD_COMPAT if BOARD_NRF52840DK_NRF52840_ZMK diff --git a/app/boards/nordic/nrf52840dk/board.yml b/app/boards/nordic/nrf52840dk/board.yml new file mode 100644 index 00000000..a8be86a3 --- /dev/null +++ b/app/boards/nordic/nrf52840dk/board.yml @@ -0,0 +1,5 @@ +board: + extend: nrf52840dk + variants: + - name: zmk + qualifier: nrf52840 diff --git a/app/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840.zmk.yml b/app/boards/nordic/nrf52840dk/nrf52840dk_nrf52840.zmk.yml similarity index 86% rename from app/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840.zmk.yml rename to app/boards/nordic/nrf52840dk/nrf52840dk_nrf52840.zmk.yml index 2a0d9946..738cf290 100644 --- a/app/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840.zmk.yml +++ b/app/boards/nordic/nrf52840dk/nrf52840dk_nrf52840.zmk.yml @@ -1,5 +1,5 @@ file_format: "1" -id: nrf52840dk_nrf52840 +id: nrf52840dk/nrf52840/zmk name: Nordic nRF52840 DK type: board arch: arm diff --git a/app/boards/nordic/nrf52840dk/nrf52840dk_nrf52840_zmk.dts b/app/boards/nordic/nrf52840dk/nrf52840dk_nrf52840_zmk.dts new file mode 100644 index 00000000..d2a0b855 --- /dev/null +++ b/app/boards/nordic/nrf52840dk/nrf52840dk_nrf52840_zmk.dts @@ -0,0 +1,8 @@ +/* + * Copyright (c) 2026 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include <../boards/nordic/nrf52840dk/nrf52840dk_nrf52840.dts> + diff --git a/app/boards/nrf52840dk_nrf52840.conf b/app/boards/nordic/nrf52840dk/nrf52840dk_nrf52840_zmk_defconfig similarity index 59% rename from app/boards/nrf52840dk_nrf52840.conf rename to app/boards/nordic/nrf52840dk/nrf52840dk_nrf52840_zmk_defconfig index 6c9bcdf1..087cfbd0 100644 --- a/app/boards/nrf52840dk_nrf52840.conf +++ b/app/boards/nordic/nrf52840dk/nrf52840dk_nrf52840_zmk_defconfig @@ -1,9 +1,20 @@ # Copyright (c) 2022 The ZMK Contributors # SPDX-License-Identifier: MIT +# Enable MPU +CONFIG_ARM_MPU=y + +# Enable hardware stack protection +CONFIG_HW_STACK_PROTECTION=y + +# enable GPIO +CONFIG_GPIO=y + +# USB and BLE HID CONFIG_ZMK_USB=y CONFIG_ZMK_BLE=y +# Settings Support CONFIG_MPU_ALLOW_FLASH_WRITE=y CONFIG_NVS=y CONFIG_SETTINGS_NVS=y diff --git a/app/boards/nordic/nrf52840dongle/Kconfig.nrf52840dongle b/app/boards/nordic/nrf52840dongle/Kconfig.nrf52840dongle new file mode 100644 index 00000000..3558e141 --- /dev/null +++ b/app/boards/nordic/nrf52840dongle/Kconfig.nrf52840dongle @@ -0,0 +1,5 @@ +# Copyright (c) 2026 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config BOARD_NRF52840DONGLE + select ZMK_BOARD_COMPAT if BOARD_NRF52840DONGLE_NRF52840_ZMK diff --git a/app/boards/nordic/nrf52840dongle/board.yml b/app/boards/nordic/nrf52840dongle/board.yml new file mode 100644 index 00000000..26104aa0 --- /dev/null +++ b/app/boards/nordic/nrf52840dongle/board.yml @@ -0,0 +1,5 @@ +board: + extend: nrf52840dongle + variants: + - name: zmk + qualifier: nrf52840 diff --git a/app/boards/nordic/nrf52840dongle/nrf52840dongle_nrf52840_zmk.dts b/app/boards/nordic/nrf52840dongle/nrf52840dongle_nrf52840_zmk.dts new file mode 100644 index 00000000..2b093635 --- /dev/null +++ b/app/boards/nordic/nrf52840dongle/nrf52840dongle_nrf52840_zmk.dts @@ -0,0 +1,8 @@ +/* + * Copyright (c) 2026 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include <../boards/nordic/nrf52840dongle/nrf52840dongle_nrf52840.dts> + diff --git a/app/boards/nordic/nrf52840dongle/nrf52840dongle_nrf52840_zmk_defconfig b/app/boards/nordic/nrf52840dongle/nrf52840dongle_nrf52840_zmk_defconfig new file mode 100644 index 00000000..2c19ebd8 --- /dev/null +++ b/app/boards/nordic/nrf52840dongle/nrf52840dongle_nrf52840_zmk_defconfig @@ -0,0 +1,29 @@ +# Copyright (c) 2026 The ZMK Contributors +# SPDX-License-Identifier: MIT + +# Enable MPU +CONFIG_ARM_MPU=y + +# Enable hardware stack protection +CONFIG_HW_STACK_PROTECTION=y + +# enable GPIO +CONFIG_GPIO=y + +# Board Kconfig.defconfig enables USB CDC ACM and should disable USB remote +# wakeup by default. It needs to be disabled here, because the USB nrfx +# driver always overwrites option from Kconfig mentioned above with the +# imply from CONFIG_USB_NRFX. +CONFIG_USB_DEVICE_REMOTE_WAKEUP=n + +# HID Transports +CONFIG_ZMK_BLE=y +CONFIG_ZMK_USB=y + +# Settings options +CONFIG_MPU_ALLOW_FLASH_WRITE=y +CONFIG_NVS=y +CONFIG_SETTINGS_NVS=y +CONFIG_FLASH=y +CONFIG_FLASH_PAGE_LAYOUT=y +CONFIG_FLASH_MAP=y diff --git a/app/boards/nrf5340dk_nrf5340_cpuapp.conf b/app/boards/nordic/nrf5340dk/nrf5340dk_nrf5340_cpuapp.conf similarity index 100% rename from app/boards/nrf5340dk_nrf5340_cpuapp.conf rename to app/boards/nordic/nrf5340dk/nrf5340dk_nrf5340_cpuapp.conf diff --git a/app/boards/nrf5340dk_nrf5340_cpuapp.overlay b/app/boards/nordic/nrf5340dk/nrf5340dk_nrf5340_cpuapp.overlay similarity index 100% rename from app/boards/nrf5340dk_nrf5340_cpuapp.overlay rename to app/boards/nordic/nrf5340dk/nrf5340dk_nrf5340_cpuapp.overlay diff --git a/app/boards/arm/nrf5340dk_nrf5340_cpuapp/nrf5340dk_nrf5340_cpuapp.zmk.yml b/app/boards/nordic/nrf5340dk/nrf5340dk_nrf5340_cpuapp.zmk.yml similarity index 86% rename from app/boards/arm/nrf5340dk_nrf5340_cpuapp/nrf5340dk_nrf5340_cpuapp.zmk.yml rename to app/boards/nordic/nrf5340dk/nrf5340dk_nrf5340_cpuapp.zmk.yml index 444de996..96a461fe 100644 --- a/app/boards/arm/nrf5340dk_nrf5340_cpuapp/nrf5340dk_nrf5340_cpuapp.zmk.yml +++ b/app/boards/nordic/nrf5340dk/nrf5340dk_nrf5340_cpuapp.zmk.yml @@ -1,5 +1,5 @@ file_format: "1" -id: nrf5340dk_nrf5340_cpuapp +id: nrf5340dk/nrf5340/cpuapp name: Nordic nRF5340 DK type: board arch: arm diff --git a/app/boards/arm/planck/CMakeLists.txt b/app/boards/olkb/planck/CMakeLists.txt similarity index 100% rename from app/boards/arm/planck/CMakeLists.txt rename to app/boards/olkb/planck/CMakeLists.txt diff --git a/app/boards/arm/planck/Kconfig.defconfig b/app/boards/olkb/planck/Kconfig.defconfig similarity index 81% rename from app/boards/arm/planck/Kconfig.defconfig rename to app/boards/olkb/planck/Kconfig.defconfig index 69dea84c..d588982e 100644 --- a/app/boards/arm/planck/Kconfig.defconfig +++ b/app/boards/olkb/planck/Kconfig.defconfig @@ -3,7 +3,7 @@ # Copyright (c) 2020 The ZMK Contributors # SPDX-License-Identifier: MIT -if BOARD_PLANCK_REV6 +if BOARD_PLANCK config ZMK_KEYBOARD_NAME default "Planck V6" @@ -11,4 +11,4 @@ config ZMK_KEYBOARD_NAME config ZMK_KSCAN_MATRIX_POLLING default y -endif # BOARD_PLANCK_REV6 +endif # BOARD_PLANCK diff --git a/app/boards/arm/planck/Kconfig.board b/app/boards/olkb/planck/Kconfig.planck similarity index 55% rename from app/boards/arm/planck/Kconfig.board rename to app/boards/olkb/planck/Kconfig.planck index 28b7381f..7acad14f 100644 --- a/app/boards/arm/planck/Kconfig.board +++ b/app/boards/olkb/planck/Kconfig.planck @@ -3,6 +3,6 @@ # Copyright (c) 2020 The ZMK Contributors # SPDX-License-Identifier: MIT -config BOARD_PLANCK_REV6 - bool "Planck V6 Keyboard" - depends on SOC_STM32F303XC +config BOARD_PLANCK + select SOC_STM32F303XC + select ZMK_BOARD_COMPAT diff --git a/app/boards/arm/planck/board.cmake b/app/boards/olkb/planck/board.cmake similarity index 100% rename from app/boards/arm/planck/board.cmake rename to app/boards/olkb/planck/board.cmake diff --git a/app/boards/olkb/planck/board.yml b/app/boards/olkb/planck/board.yml new file mode 100644 index 00000000..dd30d7cf --- /dev/null +++ b/app/boards/olkb/planck/board.yml @@ -0,0 +1,12 @@ +board: + name: planck + vendor: olkb + socs: + - name: stm32f303xc + variants: + - name: zmk + revision: + format: major.minor.patch + default: 6.0.0 + revisions: + - name: 6.0.0 diff --git a/app/boards/arm/planck/planck_rev6.keymap b/app/boards/olkb/planck/planck.keymap similarity index 100% rename from app/boards/arm/planck/planck_rev6.keymap rename to app/boards/olkb/planck/planck.keymap diff --git a/app/boards/arm/planck/planck_rev6.yaml b/app/boards/olkb/planck/planck.yaml similarity index 100% rename from app/boards/arm/planck/planck_rev6.yaml rename to app/boards/olkb/planck/planck.yaml diff --git a/app/boards/arm/planck/planck_rev6.zmk.yml b/app/boards/olkb/planck/planck.zmk.yml similarity index 60% rename from app/boards/arm/planck/planck_rev6.zmk.yml rename to app/boards/olkb/planck/planck.zmk.yml index f9d42424..54194542 100644 --- a/app/boards/arm/planck/planck_rev6.zmk.yml +++ b/app/boards/olkb/planck/planck.zmk.yml @@ -1,6 +1,6 @@ file_format: "1" -id: planck_rev6 -name: Planck Rev6 +id: planck//zmk +name: Planck (Rev6) type: board arch: arm features: @@ -9,3 +9,6 @@ features: outputs: - usb url: https://olkb.com/collections/planck +revisions: + - "6.0.0" +default_revision: "6.0.0" diff --git a/app/boards/arm/planck/planck_rev6.dts b/app/boards/olkb/planck/planck_stm32f303xc_zmk.dts similarity index 91% rename from app/boards/arm/planck/planck_rev6.dts rename to app/boards/olkb/planck/planck_stm32f303xc_zmk.dts index 85b75140..2f34571f 100644 --- a/app/boards/arm/planck/planck_rev6.dts +++ b/app/boards/olkb/planck/planck_stm32f303xc_zmk.dts @@ -9,6 +9,11 @@ #include #include +#include +#include +#include + + / { model = "Plack PCD, rev6"; compatible = "planck,rev6", "st,stm32f303"; @@ -17,7 +22,7 @@ zephyr,sram = &sram0; zephyr,flash = &flash0; zmk,kscan = &kscan0; - zmk,matrix-transform = &layout_grid_transform; + zmk,physical-layout = &layout_ortho_4x12_all1u; }; kscan0: kscan { @@ -137,3 +142,15 @@ zephyr_udc0: &usb { }; }; }; + +&layout_ortho_4x12_all1u { + transform = <&layout_grid_transform>; +}; + +&layout_ortho_4x12_1x2u { + transform = <&layout_mit_transform>; +}; + +&layout_ortho_4x12_2x2u { + transform = <&layout_2x2u_transform>; +}; diff --git a/app/boards/arm/planck/planck_rev6_defconfig b/app/boards/olkb/planck/planck_stm32f303xc_zmk_6_0_0_defconfig similarity index 85% rename from app/boards/arm/planck/planck_rev6_defconfig rename to app/boards/olkb/planck/planck_stm32f303xc_zmk_6_0_0_defconfig index f4530639..154e7687 100644 --- a/app/boards/arm/planck/planck_rev6_defconfig +++ b/app/boards/olkb/planck/planck_stm32f303xc_zmk_6_0_0_defconfig @@ -1,7 +1,5 @@ # SPDX-License-Identifier: MIT -CONFIG_SOC_SERIES_STM32F3X=y -CONFIG_SOC_STM32F303XC=y # 72MHz system clock CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=72000000 diff --git a/app/boards/arm/preonic/CMakeLists.txt b/app/boards/olkb/preonic/CMakeLists.txt similarity index 100% rename from app/boards/arm/preonic/CMakeLists.txt rename to app/boards/olkb/preonic/CMakeLists.txt diff --git a/app/boards/arm/preonic/Kconfig.defconfig b/app/boards/olkb/preonic/Kconfig.defconfig similarity index 80% rename from app/boards/arm/preonic/Kconfig.defconfig rename to app/boards/olkb/preonic/Kconfig.defconfig index 86b2e3d0..ab7b9b52 100644 --- a/app/boards/arm/preonic/Kconfig.defconfig +++ b/app/boards/olkb/preonic/Kconfig.defconfig @@ -3,7 +3,7 @@ # Copyright (c) 2022 The ZMK Contributors # SPDX-License-Identifier: MIT -if BOARD_PREONIC_REV3 +if BOARD_PREONIC config ZMK_KEYBOARD_NAME default "Preonic V3" @@ -11,4 +11,4 @@ config ZMK_KEYBOARD_NAME config ZMK_KSCAN_MATRIX_POLLING default y -endif # BOARD_PREONIC_REV3 +endif # BOARD_PREONIC diff --git a/app/boards/arm/preonic/Kconfig.board b/app/boards/olkb/preonic/Kconfig.preonic similarity index 55% rename from app/boards/arm/preonic/Kconfig.board rename to app/boards/olkb/preonic/Kconfig.preonic index 39f35db6..7bfd47e7 100644 --- a/app/boards/arm/preonic/Kconfig.board +++ b/app/boards/olkb/preonic/Kconfig.preonic @@ -3,6 +3,6 @@ # Copyright (c) 2022 The ZMK Contributors # SPDX-License-Identifier: MIT -config BOARD_PREONIC_REV3 - bool "Preonic V3 Keyboard" - depends on SOC_STM32F303XC +config BOARD_PREONIC + select SOC_STM32F303XC + select ZMK_BOARD_COMPAT diff --git a/app/boards/arm/preonic/board.cmake b/app/boards/olkb/preonic/board.cmake similarity index 100% rename from app/boards/arm/preonic/board.cmake rename to app/boards/olkb/preonic/board.cmake diff --git a/app/boards/olkb/preonic/board.yml b/app/boards/olkb/preonic/board.yml new file mode 100644 index 00000000..95992c3e --- /dev/null +++ b/app/boards/olkb/preonic/board.yml @@ -0,0 +1,12 @@ +board: + name: preonic + vendor: olkb + socs: + - name: stm32f303xc + variants: + - name: zmk + revision: + format: major.minor.patch + default: 3.0.0 + revisions: + - name: 3.0.0 diff --git a/app/boards/arm/preonic/preonic_rev3.keymap b/app/boards/olkb/preonic/preonic.keymap similarity index 98% rename from app/boards/arm/preonic/preonic_rev3.keymap rename to app/boards/olkb/preonic/preonic.keymap index d25c5ca8..a3d85a94 100644 --- a/app/boards/arm/preonic/preonic_rev3.keymap +++ b/app/boards/olkb/preonic/preonic.keymap @@ -13,7 +13,6 @@ #define RAISE 2 / { - chosen { zmk,matrix-transform = &layout_grid_transform; }; keymap { compatible = "zmk,keymap"; default_layer { diff --git a/app/boards/arm/preonic/preonic_rev3.yaml b/app/boards/olkb/preonic/preonic.yaml similarity index 100% rename from app/boards/arm/preonic/preonic_rev3.yaml rename to app/boards/olkb/preonic/preonic.yaml diff --git a/app/boards/arm/preonic/preonic_rev3.zmk.yml b/app/boards/olkb/preonic/preonic.zmk.yml similarity index 67% rename from app/boards/arm/preonic/preonic_rev3.zmk.yml rename to app/boards/olkb/preonic/preonic.zmk.yml index bd9d9579..88755083 100644 --- a/app/boards/arm/preonic/preonic_rev3.zmk.yml +++ b/app/boards/olkb/preonic/preonic.zmk.yml @@ -1,5 +1,5 @@ file_format: "1" -id: preonic_rev3 +id: preonic//zmk name: Preonic Rev3 type: board arch: arm @@ -8,3 +8,6 @@ features: outputs: - usb url: https://olkb.com/collections/preonic +revisions: + - "3.0.0" +default_revision: "3.0.0" diff --git a/app/boards/arm/preonic/preonic_rev3.dts b/app/boards/olkb/preonic/preonic_stm32f303xc_zmk.dts similarity index 91% rename from app/boards/arm/preonic/preonic_rev3.dts rename to app/boards/olkb/preonic/preonic_stm32f303xc_zmk.dts index 79f88c33..0bb0e2ce 100644 --- a/app/boards/arm/preonic/preonic_rev3.dts +++ b/app/boards/olkb/preonic/preonic_stm32f303xc_zmk.dts @@ -9,6 +9,9 @@ #include #include +#include +#include +#include / { model = "Preonic PCD, rev3"; @@ -18,7 +21,7 @@ zephyr,sram = &sram0; zephyr,flash = &flash0; zmk,kscan = &kscan0; - zmk,matrix-transform = &layout_grid_transform; + zmk,physical-layout = &layout_ortho_5x12_all1u; }; kscan0: kscan_0 { @@ -131,3 +134,15 @@ zephyr_udc0: &usb { }; }; }; + +&layout_ortho_5x12_all1u { + transform = <&layout_grid_transform>; +}; + +&layout_ortho_5x12_1x2u { + transform = <&layout_mit_transform>; +}; + +&layout_ortho_5x12_2x2u { + transform = <&layout_2x2u_transform>; +}; diff --git a/app/boards/olkb/preonic/preonic_stm32f303xc_zmk_defconfig b/app/boards/olkb/preonic/preonic_stm32f303xc_zmk_defconfig new file mode 100644 index 00000000..fbe05d58 --- /dev/null +++ b/app/boards/olkb/preonic/preonic_stm32f303xc_zmk_defconfig @@ -0,0 +1,15 @@ +# SPDX-License-Identifier: MIT + +# 72MHz system clock +CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=72000000 + +# enable pinctrl +CONFIG_PINCTRL=y + +# enable GPIO +CONFIG_GPIO=y + +# clock configuration +CONFIG_CLOCK_CONTROL=y + +CONFIG_ZMK_USB=y diff --git a/app/boards/arm/ferris/Kconfig.defconfig b/app/boards/pierrechevalier83/ferris/Kconfig.defconfig similarity index 85% rename from app/boards/arm/ferris/Kconfig.defconfig rename to app/boards/pierrechevalier83/ferris/Kconfig.defconfig index 420ea01f..1c8ed02c 100644 --- a/app/boards/arm/ferris/Kconfig.defconfig +++ b/app/boards/pierrechevalier83/ferris/Kconfig.defconfig @@ -5,9 +5,6 @@ if BOARD_FERRIS -config BOARD - default "ferris_rev02" - config ZMK_KEYBOARD_NAME default "Ferris rev 0.2" diff --git a/app/boards/pierrechevalier83/ferris/Kconfig.ferris b/app/boards/pierrechevalier83/ferris/Kconfig.ferris new file mode 100644 index 00000000..348ef27d --- /dev/null +++ b/app/boards/pierrechevalier83/ferris/Kconfig.ferris @@ -0,0 +1,14 @@ +# Ferris board configuration + +# Copyright (c) 2020 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config BOARD_FERRIS + select SOC_STM32F072XB + select ZMK_BOARD_COMPAT + imply RETAINED_MEM + imply RETENTION + imply RETENTION_BOOT_MODE + imply STM32_BOOTLOADER + imply RTC + imply BBRAM diff --git a/app/boards/arm/ferris/README.md b/app/boards/pierrechevalier83/ferris/README.md similarity index 79% rename from app/boards/arm/ferris/README.md rename to app/boards/pierrechevalier83/ferris/README.md index b6fdcdf2..3dbfb1ba 100644 --- a/app/boards/arm/ferris/README.md +++ b/app/boards/pierrechevalier83/ferris/README.md @@ -3,7 +3,7 @@ ## Standard Build ``` -west build -p -d build/ferris --board ferris_rev02 +west build -p -d build/ferris --board ferris ``` ## Flashing diff --git a/app/boards/arm/ferris/board.cmake b/app/boards/pierrechevalier83/ferris/board.cmake similarity index 100% rename from app/boards/arm/ferris/board.cmake rename to app/boards/pierrechevalier83/ferris/board.cmake diff --git a/app/boards/pierrechevalier83/ferris/board.yml b/app/boards/pierrechevalier83/ferris/board.yml new file mode 100644 index 00000000..6fb3af39 --- /dev/null +++ b/app/boards/pierrechevalier83/ferris/board.yml @@ -0,0 +1,7 @@ +board: + name: ferris + vendor: pierrechevalier83 + socs: + - name: stm32f072xb + variants: + - name: zmk diff --git a/app/boards/arm/ferris/ferris_rev02.keymap b/app/boards/pierrechevalier83/ferris/ferris.keymap similarity index 100% rename from app/boards/arm/ferris/ferris_rev02.keymap rename to app/boards/pierrechevalier83/ferris/ferris.keymap diff --git a/app/boards/arm/ferris/ferris_rev02.yaml b/app/boards/pierrechevalier83/ferris/ferris.yaml similarity index 83% rename from app/boards/arm/ferris/ferris_rev02.yaml rename to app/boards/pierrechevalier83/ferris/ferris.yaml index f4cbdcaf..d2dbfa0a 100644 --- a/app/boards/arm/ferris/ferris_rev02.yaml +++ b/app/boards/pierrechevalier83/ferris/ferris.yaml @@ -1,4 +1,4 @@ -identifier: ferris_rev02 +identifier: ferris name: Ferris 0.2 type: mcu arch: arm diff --git a/app/boards/arm/ferris/ferris_rev02.zmk.yml b/app/boards/pierrechevalier83/ferris/ferris.zmk.yml similarity index 90% rename from app/boards/arm/ferris/ferris_rev02.zmk.yml rename to app/boards/pierrechevalier83/ferris/ferris.zmk.yml index da3a7f53..68919fe5 100644 --- a/app/boards/arm/ferris/ferris_rev02.zmk.yml +++ b/app/boards/pierrechevalier83/ferris/ferris.zmk.yml @@ -1,5 +1,5 @@ file_format: "1" -id: ferris_rev02 +id: ferris//zmk name: Ferris 0.2 type: board arch: arm diff --git a/app/boards/arm/ferris/ferris_rev02.dts b/app/boards/pierrechevalier83/ferris/ferris_stm32f072xb_zmk.dts similarity index 80% rename from app/boards/arm/ferris/ferris_rev02.dts rename to app/boards/pierrechevalier83/ferris/ferris_stm32f072xb_zmk.dts index 235a92e4..c49ae602 100644 --- a/app/boards/arm/ferris/ferris_rev02.dts +++ b/app/boards/pierrechevalier83/ferris/ferris_stm32f072xb_zmk.dts @@ -13,7 +13,7 @@ #include &cuddlykeyboards_ferris_layout { - transform = <&transform>; + transform = <&matrix_transform0>; }; / { @@ -23,13 +23,14 @@ chosen { zephyr,sram = &sram0; zephyr,flash = &flash0; - zmk,kscan = &kscan; + zmk,kscan = &kscan0; + zmk,physical-layout = &cuddlykeyboards_ferris_layout; /* TODO: Enable once we support the IC for underglow zmk,underglow = &led_strip; */ }; - transform: transform { + matrix_transform0: matrix_transform0 { compatible = "zmk,matrix-transform"; rows = <4>; columns = <10>; @@ -42,7 +43,7 @@ >; }; - kscan: kscan { + kscan0: kscan0 { compatible = "zmk,kscan-composite"; rows = <4>; columns = <10>; @@ -53,7 +54,7 @@ right { kscan = <&kscan_right>; - column-offset = <5>; + col-offset = <5>; }; }; @@ -105,7 +106,7 @@ clock-frequency = ; right_io: mcp23017@20 { - compatible = "microchip,mcp230xx"; + compatible = "microchip,mcp23017"; status = "okay"; gpio-controller; reg = <0x20>; @@ -146,9 +147,37 @@ zephyr_udc0: &usb { apb1-prescaler = <1>; }; - &rtc { + clocks = <&rcc STM32_CLOCK_BUS_APB1 0x10000000>, + <&rcc STM32_SRC_LSI RTC_SEL(2)>; status = "okay"; + + backup_regs { + status = "okay"; + }; +}; + +&bbram { + status = "okay"; + + retainedmem0: retainedmem { + compatible = "zephyr,retained-bbram"; + status = "okay"; + #address-cells = <1>; + #size-cells = <1>; + + retention0: retention@0 { + compatible = "zephyr,retention"; + status = "okay"; + reg = <0x0 0x1>; + }; + }; +}; + +/ { + chosen { + zephyr,boot-mode = &retention0; + }; }; &flash0 { diff --git a/app/boards/arm/ferris/ferris_rev02_defconfig b/app/boards/pierrechevalier83/ferris/ferris_stm32f072xb_zmk_defconfig similarity index 84% rename from app/boards/arm/ferris/ferris_rev02_defconfig rename to app/boards/pierrechevalier83/ferris/ferris_stm32f072xb_zmk_defconfig index bd03c305..eb55b019 100644 --- a/app/boards/arm/ferris/ferris_rev02_defconfig +++ b/app/boards/pierrechevalier83/ferris/ferris_stm32f072xb_zmk_defconfig @@ -1,8 +1,5 @@ # SPDX-License-Identifier: MIT -CONFIG_BOARD_FERRIS=y -CONFIG_SOC_SERIES_STM32F0X=y -CONFIG_SOC_STM32F072XB=y # 48MHz system clock CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=48000000 diff --git a/app/boards/polarityworks/bt60/Kconfig.bt60 b/app/boards/polarityworks/bt60/Kconfig.bt60 new file mode 100644 index 00000000..f1e578c6 --- /dev/null +++ b/app/boards/polarityworks/bt60/Kconfig.bt60 @@ -0,0 +1,11 @@ +# CKP BT60 board configuration + +# Copyright (c) 2022 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config BOARD_BT60 + select SOC_NRF52840_QIAA + select ZMK_BOARD_COMPAT + imply RETAINED_MEM + imply RETENTION + imply RETENTION_BOOT_MODE diff --git a/app/boards/polarityworks/bt60/Kconfig.bt60_hs b/app/boards/polarityworks/bt60/Kconfig.bt60_hs new file mode 100644 index 00000000..cc30cc2c --- /dev/null +++ b/app/boards/polarityworks/bt60/Kconfig.bt60_hs @@ -0,0 +1,11 @@ +# BT60 HS board configuration + +# Copyright (c) 2022 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config BOARD_BT60_HS + select SOC_NRF52840_QIAA + select ZMK_BOARD_COMPAT + imply RETAINED_MEM + imply RETENTION + imply RETENTION_BOOT_MODE diff --git a/app/boards/polarityworks/bt60/Kconfig.defconfig b/app/boards/polarityworks/bt60/Kconfig.defconfig new file mode 100644 index 00000000..1b681d07 --- /dev/null +++ b/app/boards/polarityworks/bt60/Kconfig.defconfig @@ -0,0 +1,22 @@ +# Copyright (c) 2022 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config ZMK_KEYBOARD_NAME + default "BT60" if BOARD_BT60 || BOARD_BT60_HS + +if BOARD_BT60 || BOARD_BT60_HS + +if USB + +config USB_NRFX + default y + +config USB_DEVICE_STACK + default y + +endif # USB + +config BT_CTLR + default BT + +endif # BOARD_BT60 || BOARD_BT60_HS diff --git a/app/boards/arm/corneish_zen/board.cmake b/app/boards/polarityworks/bt60/board.cmake similarity index 100% rename from app/boards/arm/corneish_zen/board.cmake rename to app/boards/polarityworks/bt60/board.cmake diff --git a/app/boards/polarityworks/bt60/board.yml b/app/boards/polarityworks/bt60/board.yml new file mode 100644 index 00000000..2f9a8b80 --- /dev/null +++ b/app/boards/polarityworks/bt60/board.yml @@ -0,0 +1,19 @@ +boards: + - name: bt60_hs + vendor: polarityworks + socs: + - name: nrf52840 + variants: + - name: zmk + - name: bt60 + vendor: polarityworks + socs: + - name: nrf52840 + variants: + - name: zmk + revision: + format: major.minor.patch + default: 2.0.0 + revisions: + - name: 1.0.0 + - name: 2.0.0 diff --git a/app/boards/arm/ckp/bt60_v2.yaml b/app/boards/polarityworks/bt60/bt60.yaml similarity index 88% rename from app/boards/arm/ckp/bt60_v2.yaml rename to app/boards/polarityworks/bt60/bt60.yaml index 2a3f3b47..c2dc3736 100644 --- a/app/boards/arm/ckp/bt60_v2.yaml +++ b/app/boards/polarityworks/bt60/bt60.yaml @@ -1,4 +1,4 @@ -identifier: bt60_v2 +identifier: bt60 name: BT60 V2 type: mcu arch: arm diff --git a/app/boards/arm/ckp/bt75_v1.zmk.yml b/app/boards/polarityworks/bt60/bt60.zmk.yml similarity index 69% rename from app/boards/arm/ckp/bt75_v1.zmk.yml rename to app/boards/polarityworks/bt60/bt60.zmk.yml index 76e30047..98bb85fc 100644 --- a/app/boards/arm/ckp/bt75_v1.zmk.yml +++ b/app/boards/polarityworks/bt60/bt60.zmk.yml @@ -1,6 +1,6 @@ file_format: "1" -id: bt75_v1 -name: BT75_V1 +id: bt60//zmk +name: BT60 V2 type: board arch: arm features: @@ -8,7 +8,11 @@ features: - encoder - underglow - backlight + - studio outputs: - usb - ble +revisions: + - 2.0.0 + - 1.0.0 url: https://polarityworks.com/btckp diff --git a/app/boards/polarityworks/bt60/bt60_1_0_0.dtsi b/app/boards/polarityworks/bt60/bt60_1_0_0.dtsi new file mode 100644 index 00000000..d760b284 --- /dev/null +++ b/app/boards/polarityworks/bt60/bt60_1_0_0.dtsi @@ -0,0 +1,38 @@ +/* +* Copyright (c) 2021 Polarity Works +* +* SPDX-License-Identifier: MIT +*/ + +#include + +/ { + model = "BT60"; + compatible = "polarityworks,bt60"; + + sensors: sensors { + compatible = "zmk,keymap-sensors"; + sensors = <&left_encoder>; + triggers-per-rotation = <20>; + }; + + left_encoder: encoder_left { + compatible = "alps,ec11"; + a-gpios = <&gpio1 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + b-gpios = <&gpio1 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + steps = <80>; + status = "okay"; + }; + + leds { + compatible = "gpio-leds"; + blue_led: led_0 { + gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>; + }; + }; +}; + +&vbatt { + output-ohms = <2000000>; + full-ohms = <(2000000 + 806000)>; +}; diff --git a/app/boards/arm/bt60/bt60_v1.keymap b/app/boards/polarityworks/bt60/bt60_1_0_0.keymap similarity index 80% rename from app/boards/arm/bt60/bt60_v1.keymap rename to app/boards/polarityworks/bt60/bt60_1_0_0.keymap index be3b206a..93957695 100644 --- a/app/boards/arm/bt60/bt60_v1.keymap +++ b/app/boards/polarityworks/bt60/bt60_1_0_0.keymap @@ -2,26 +2,25 @@ #include #include -#define ANSI true -//#define HHKB true -//#define ISO true -//#define ALL_1U true -//#define SPLIT_BKSP_RSHFT true +#define ANSI +//#define HHKB +//#define ISO +//#define ALL_1U / { chosen { #ifdef ANSI - zmk,matrix-transform = &ansi_transform; - #elif defined(HHKB) - zmk,matrix-transform = &hhkb_transform; + zmk,physical-layout = &layout_60_ansi; #elif defined(ISO) - zmk,matrix-transform = &iso_transform; + zmk,physical-layout = &layout_60_iso; #elif defined(ALL_1U) - zmk,matrix-transform = &all_1u_transform; + zmk,physical-layout = &layout_60_all1u; + #elif defined(HHKB) + zmk,physical-layout = &layout_60_hhkb; #else - zmk,matrix-transform = &split_transform; + #error "Layout not defined, please define a layout by uncommenting the appropriate line in bt60.keymap" #endif }; @@ -148,33 +147,7 @@ sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; }; #else - default_layer { - // ------------------------------------------------------------------------------------------ - // | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |BSPC| DEL | - // | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | - // | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | - // | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT | 1 | - // | CTL | WIN | ALT | SPACE | ALT | 1 | CTRL | - // ------------------------------------------------------------------------------------------ - bindings = < - &kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC &kp DEL - &kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSLH - &kp CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET - &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT &mo 1 - &kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &kp RGUI &kp C_MENU &kp RCTRL - >; - sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; - }; - raise { - bindings = < - &kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp DEL &trans - &trans &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &sys_reset - &trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader - &kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &kp END &kp PG_DN &kp C_NEXT &trans - &bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &bt BT_CLR - >; - sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; - }; + #error "Layout not defined, please define a layout by uncommenting the appropriate line in bt60.keymap" #endif }; }; diff --git a/app/boards/arm/ckp/bt60_v2.keymap b/app/boards/polarityworks/bt60/bt60_2_0_0.keymap similarity index 97% rename from app/boards/arm/ckp/bt60_v2.keymap rename to app/boards/polarityworks/bt60/bt60_2_0_0.keymap index f72401f6..c9829589 100644 --- a/app/boards/arm/ckp/bt60_v2.keymap +++ b/app/boards/polarityworks/bt60/bt60_2_0_0.keymap @@ -12,15 +12,15 @@ / { chosen { #ifdef ANSI - zmk,matrix-transform = &ansi_transform; + zmk,physical-layout = &layout_60_ansi; #elif defined(ISO) - zmk,matrix-transform = &iso_transform; + zmk,physical-layout = &layout_60_iso; #elif defined(ALL_1U) - zmk,matrix-transform = &all_1u_transform; + zmk,physical-layout = &layout_60_all1u; #elif defined(HHKB) - zmk,matrix-transform = &hhkb_transform; + zmk,physical-layout = &layout_60_hhkb; #else - #error "Layout not defined, please define a layout by uncommenting the appropriate line in bt60_v2.keymap" + #error "Layout not defined, please define a layout by uncommenting the appropriate line in bt60.keymap" #endif }; @@ -170,7 +170,7 @@ sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; }; #else - #error "Layout not defined, please define a layout by uncommenting the appropriate line in bt60_v2.keymap" + #error "Layout not defined, please define a layout by uncommenting the appropriate line in bt60.keymap" #endif }; diff --git a/app/boards/arm/bt60/bt60_v1_hs.keymap b/app/boards/polarityworks/bt60/bt60_hs.keymap similarity index 93% rename from app/boards/arm/bt60/bt60_v1_hs.keymap rename to app/boards/polarityworks/bt60/bt60_hs.keymap index f1e483e3..a36246e5 100644 --- a/app/boards/arm/bt60/bt60_v1_hs.keymap +++ b/app/boards/polarityworks/bt60/bt60_hs.keymap @@ -8,14 +8,14 @@ default_layer { // ------------------------------------------------------------------------------------------ - // | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BSPC | DEL - // | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | | | + // | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BSPC | + // | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | | | // | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | // | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT | - // | CTL | WIN | ALT | SPACE | ALT | 1 | MENU | CTRL | + // | CTL | WIN | ALT | SPACE | ALT | 1 | MENU | CTRL | // ------------------------------------------------------------------------------------------ bindings = < - &kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC &bt BT_CLR + &kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC &kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSLH &kp CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT @@ -25,7 +25,7 @@ }; raise { bindings = < - &kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp DEL &trans + &kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp DEL &trans &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &sys_reset &trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader &kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &kp END &kp PG_DN &kp C_NEXT diff --git a/app/boards/arm/bt60/bt60_v1_hs.zmk.yml b/app/boards/polarityworks/bt60/bt60_hs.zmk.yml similarity index 84% rename from app/boards/arm/bt60/bt60_v1_hs.zmk.yml rename to app/boards/polarityworks/bt60/bt60_hs.zmk.yml index bc9acea4..cc9d8ed7 100644 --- a/app/boards/arm/bt60/bt60_v1_hs.zmk.yml +++ b/app/boards/polarityworks/bt60/bt60_hs.zmk.yml @@ -1,11 +1,12 @@ file_format: "1" -id: bt60_v1_hs +id: bt60_hs//zmk name: BT60 V1 Hotswap type: board arch: arm features: - keys - encoder + - studio outputs: - usb - ble diff --git a/app/boards/arm/bt60/bt60_v1_hs.dts b/app/boards/polarityworks/bt60/bt60_hs_nrf52840_zmk.dts similarity index 90% rename from app/boards/arm/bt60/bt60_v1_hs.dts rename to app/boards/polarityworks/bt60/bt60_hs_nrf52840_zmk.dts index 27e38286..55f90525 100644 --- a/app/boards/arm/bt60/bt60_v1_hs.dts +++ b/app/boards/polarityworks/bt60/bt60_hs_nrf52840_zmk.dts @@ -4,14 +4,14 @@ * SPDX-License-Identifier: MIT */ -/dts-v1/; -#include "bt60.dtsi" - +#include "bt60_nrf52840_zmk.dts" +#include "bt60_1_0_0.dtsi" +#include / { chosen { zmk,kscan = &kscan0; - zmk,matrix-transform = &default_transform; + zmk,physical-layout = &layout_60_ansi; }; default_transform: keymap_transform_0 { @@ -60,3 +60,7 @@ ; }; }; + +&layout_60_ansi { + transform = <&default_transform>; +}; diff --git a/app/boards/arm/bt60/bt60_v1_defconfig b/app/boards/polarityworks/bt60/bt60_hs_nrf52840_zmk_defconfig similarity index 79% rename from app/boards/arm/bt60/bt60_v1_defconfig rename to app/boards/polarityworks/bt60/bt60_hs_nrf52840_zmk_defconfig index 04adb8a3..6925f175 100644 --- a/app/boards/arm/bt60/bt60_v1_defconfig +++ b/app/boards/polarityworks/bt60/bt60_hs_nrf52840_zmk_defconfig @@ -1,9 +1,5 @@ # SPDX-License-Identifier: MIT -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_BT60_V1=y - # Enable MPU CONFIG_ARM_MPU=y @@ -25,4 +21,4 @@ CONFIG_FLASH_PAGE_LAYOUT=y CONFIG_FLASH_MAP=y CONFIG_ZMK_USB=y -CONFIG_ZMK_BLE=y \ No newline at end of file +CONFIG_ZMK_BLE=y diff --git a/app/boards/arm/bt60/bt60.dtsi b/app/boards/polarityworks/bt60/bt60_nrf52840_zmk.dts similarity index 63% rename from app/boards/arm/bt60/bt60.dtsi rename to app/boards/polarityworks/bt60/bt60_nrf52840_zmk.dts index 83ff3f04..d4c52c1c 100644 --- a/app/boards/arm/bt60/bt60.dtsi +++ b/app/boards/polarityworks/bt60/bt60_nrf52840_zmk.dts @@ -1,55 +1,24 @@ /* -* Copyright (c) 2021 Polarity Works +* Copyright (c) 2022 The ZMK Contributors * * SPDX-License-Identifier: MIT */ /dts-v1/; #include -#include +#include / { - model = "BT60"; - compatible = "polarityworks,bt60"; - chosen { zephyr,code-partition = &code_partition; zephyr,sram = &sram0; zephyr,flash = &flash0; zmk,battery = &vbatt; - zmk,kscan = &kscan0; - zmk,matrix-transform = &default_transform; - }; - - sensors: sensors { - compatible = "zmk,keymap-sensors"; - sensors = <&left_encoder>; - triggers-per-rotation = <20>; - }; - - - - left_encoder: encoder_left { - compatible = "alps,ec11"; - a-gpios = <&gpio1 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - b-gpios = <&gpio1 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - steps = <80>; - status = "okay"; - }; - - - leds { - compatible = "gpio-leds"; - blue_led: led_0 { - gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>; - }; }; vbatt: vbatt { compatible = "zmk,battery-voltage-divider"; io-channels = <&adc 2>; - output-ohms = <2000000>; - full-ohms = <(2000000 + 806000)>; }; }; @@ -73,7 +42,6 @@ zephyr_udc0: &usbd { status = "okay"; }; - &flash0 { /* * For more information, see: diff --git a/app/boards/arm/bt60/bt60_v1.dts b/app/boards/polarityworks/bt60/bt60_nrf52840_zmk_1_0_0.overlay similarity index 83% rename from app/boards/arm/bt60/bt60_v1.dts rename to app/boards/polarityworks/bt60/bt60_nrf52840_zmk_1_0_0.overlay index 315d8cce..c132266d 100644 --- a/app/boards/arm/bt60/bt60_v1.dts +++ b/app/boards/polarityworks/bt60/bt60_nrf52840_zmk_1_0_0.overlay @@ -4,14 +4,17 @@ * SPDX-License-Identifier: MIT */ -/dts-v1/; -#include "bt60.dtsi" +#include "bt60_1_0_0.dtsi" +#include +#include +#include +#include / { chosen { zmk,kscan = &kscan0; - zmk,matrix-transform = &ansi_transform; + zmk,physical-layout = &layout_60_ansi; }; ansi_transform: keymap_transform_0 { @@ -66,19 +69,6 @@ >; }; - split_transform: keymap_transform_4 { - compatible = "zmk,matrix-transform"; - columns = <15>; - rows = <5>; - map = < - RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,13) RC(0,14) - RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13) - RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,13) - RC(3,0) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,12) RC(3,14) - RC(4,0) RC(4,1) RC(4,2) RC(4,6) RC(4,10) RC(4,11) RC(4,12) RC(4,13) - >; - }; - kscan0: kscan_0 { compatible = "zmk,kscan-gpio-matrix"; wakeup-source; @@ -112,3 +102,19 @@ ; }; }; + +&layout_60_ansi { + transform = <&ansi_transform>; +}; + +&layout_60_iso { + transform = <&iso_transform>; +}; + +&layout_60_all1u { + transform = <&all_1u_transform>; +}; + +&layout_60_hhkb { + transform = <&hhkb_transform>; +}; diff --git a/app/boards/arm/bt60/bt60_v1_hs_defconfig b/app/boards/polarityworks/bt60/bt60_nrf52840_zmk_1_0_0_defconfig similarity index 78% rename from app/boards/arm/bt60/bt60_v1_hs_defconfig rename to app/boards/polarityworks/bt60/bt60_nrf52840_zmk_1_0_0_defconfig index f16d82ac..6925f175 100644 --- a/app/boards/arm/bt60/bt60_v1_hs_defconfig +++ b/app/boards/polarityworks/bt60/bt60_nrf52840_zmk_1_0_0_defconfig @@ -1,9 +1,5 @@ # SPDX-License-Identifier: MIT -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_BT60_V1_HS=y - # Enable MPU CONFIG_ARM_MPU=y @@ -25,4 +21,4 @@ CONFIG_FLASH_PAGE_LAYOUT=y CONFIG_FLASH_MAP=y CONFIG_ZMK_USB=y -CONFIG_ZMK_BLE=y \ No newline at end of file +CONFIG_ZMK_BLE=y diff --git a/app/boards/arm/ckp/bt60_v2.dts b/app/boards/polarityworks/bt60/bt60_nrf52840_zmk_2_0_0.overlay similarity index 86% rename from app/boards/arm/ckp/bt60_v2.dts rename to app/boards/polarityworks/bt60/bt60_nrf52840_zmk_2_0_0.overlay index a3ef75fb..c9aac427 100644 --- a/app/boards/arm/ckp/bt60_v2.dts +++ b/app/boards/polarityworks/bt60/bt60_nrf52840_zmk_2_0_0.overlay @@ -4,16 +4,19 @@ * SPDX-License-Identifier: MIT */ -/dts-v1/; -#include "ckp.dtsi" +#include "../common/ckp.dtsi" +#include +#include +#include +#include / { model = "BT60_V2"; - compatible = "polarityworks,bt60_v2"; + compatible = "polarityworks,bt60"; chosen { - zmk,matrix-transform = &ansi_transform; + zmk,physical-layout = &layout_60_ansi; }; @@ -69,3 +72,19 @@ >; }; }; + +&layout_60_ansi { + transform = <&ansi_transform>; +}; + +&layout_60_iso { + transform = <&iso_transform>; +}; + +&layout_60_all1u { + transform = <&all_1u_transform>; +}; + +&layout_60_hhkb { + transform = <&hhkb_transform>; +}; diff --git a/app/boards/arm/ckp/bt60_v2_defconfig b/app/boards/polarityworks/bt60/bt60_nrf52840_zmk_2_0_0_defconfig similarity index 84% rename from app/boards/arm/ckp/bt60_v2_defconfig rename to app/boards/polarityworks/bt60/bt60_nrf52840_zmk_2_0_0_defconfig index fd1ae985..27b0681e 100644 --- a/app/boards/arm/ckp/bt60_v2_defconfig +++ b/app/boards/polarityworks/bt60/bt60_nrf52840_zmk_2_0_0_defconfig @@ -1,9 +1,5 @@ # SPDX-License-Identifier: MIT -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_BT60_V2=y - # Enable MPU CONFIG_ARM_MPU=y @@ -32,8 +28,6 @@ CONFIG_ZMK_RGB_UNDERGLOW=y CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=y CONFIG_ZMK_RGB_UNDERGLOW_ON_START=y CONFIG_ZMK_RGB_UNDERGLOW_HUE_START=262 -CONFIG_WS2812_STRIP=y -CONFIG_SPI=y CONFIG_BT_CTLR_TX_PWR_PLUS_8=y diff --git a/app/boards/arm/nrf52840_m2/pre_dt_board.cmake b/app/boards/polarityworks/bt60/pre_dt_board.cmake similarity index 100% rename from app/boards/arm/nrf52840_m2/pre_dt_board.cmake rename to app/boards/polarityworks/bt60/pre_dt_board.cmake diff --git a/app/boards/polarityworks/bt65/Kconfig.bt65 b/app/boards/polarityworks/bt65/Kconfig.bt65 new file mode 100644 index 00000000..2aa7be69 --- /dev/null +++ b/app/boards/polarityworks/bt65/Kconfig.bt65 @@ -0,0 +1,11 @@ +# CKP BT65 board configuration + +# Copyright (c) 2022 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config BOARD_BT65 + select SOC_NRF52840_QIAA + select ZMK_BOARD_COMPAT + imply RETAINED_MEM + imply RETENTION + imply RETENTION_BOOT_MODE diff --git a/app/boards/arm/bt60/Kconfig.defconfig b/app/boards/polarityworks/bt65/Kconfig.defconfig similarity index 55% rename from app/boards/arm/bt60/Kconfig.defconfig rename to app/boards/polarityworks/bt65/Kconfig.defconfig index c44901bd..ac6b221e 100644 --- a/app/boards/arm/bt60/Kconfig.defconfig +++ b/app/boards/polarityworks/bt65/Kconfig.defconfig @@ -1,10 +1,10 @@ -# Copyright (c) 2021 Polarity Works +# Copyright (c) 2022 The ZMK Contributors # SPDX-License-Identifier: MIT -if BOARD_BT60_V1_HS || BOARD_BT60_V1 +config ZMK_KEYBOARD_NAME + default "BT65" if BOARD_BT65 -config BOARD - default "bt60" +if BOARD_BT65 if USB @@ -19,7 +19,4 @@ endif # USB config BT_CTLR default BT -config ZMK_KEYBOARD_NAME - default "BT60" - -endif # BOARD_BT60 +endif # BOARD_BT65 diff --git a/app/boards/arm/mikoto/board.cmake b/app/boards/polarityworks/bt65/board.cmake similarity index 100% rename from app/boards/arm/mikoto/board.cmake rename to app/boards/polarityworks/bt65/board.cmake diff --git a/app/boards/polarityworks/bt65/board.yml b/app/boards/polarityworks/bt65/board.yml new file mode 100644 index 00000000..7392a405 --- /dev/null +++ b/app/boards/polarityworks/bt65/board.yml @@ -0,0 +1,7 @@ +board: + name: bt65 + vendor: polarityworks + socs: + - name: nrf52840 + variants: + - name: zmk diff --git a/app/boards/arm/ckp/bt65_v1.keymap b/app/boards/polarityworks/bt65/bt65.keymap similarity index 97% rename from app/boards/arm/ckp/bt65_v1.keymap rename to app/boards/polarityworks/bt65/bt65.keymap index a4041084..b3b34b21 100644 --- a/app/boards/arm/ckp/bt65_v1.keymap +++ b/app/boards/polarityworks/bt65/bt65.keymap @@ -12,15 +12,15 @@ / { chosen { #ifdef ANSI - zmk,matrix-transform = &ansi_transform; + zmk,physical-layout = &layout_65_ansi; #elif defined(ISO) - zmk,matrix-transform = &iso_transform; + zmk,physical-layout = &layout_65_iso; #elif defined(ALL_1U) - zmk,matrix-transform = &all_1u_transform; + zmk,physical-layout = &layout_65_all1u; #elif defined(HHKB) - zmk,matrix-transform = &hhkb_transform; + zmk,physical-layout = &layout_65_hhkb; #else - #error "Layout not defined, please define a layout by uncommenting the appropriate line in bt65_v1.keymap" + #error "Layout not defined, please define a layout by uncommenting the appropriate line in bt65.keymap" #endif }; @@ -170,7 +170,7 @@ sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; }; #else - #error "Layout not defined, please define a layout by uncommenting the appropriate line in bt65_v1.keymap" + #error "Layout not defined, please define a layout by uncommenting the appropriate line in bt65.keymap" #endif }; diff --git a/app/boards/arm/ckp/bt65_v1.yaml b/app/boards/polarityworks/bt65/bt65.yaml similarity index 88% rename from app/boards/arm/ckp/bt65_v1.yaml rename to app/boards/polarityworks/bt65/bt65.yaml index 61edacce..52bc38ae 100644 --- a/app/boards/arm/ckp/bt65_v1.yaml +++ b/app/boards/polarityworks/bt65/bt65.yaml @@ -1,4 +1,4 @@ -identifier: bt65_v1 +identifier: bt65 name: BT65_V1 type: mcu arch: arm diff --git a/app/boards/arm/ckp/bt65_v1.zmk.yml b/app/boards/polarityworks/bt65/bt65.zmk.yml similarity index 87% rename from app/boards/arm/ckp/bt65_v1.zmk.yml rename to app/boards/polarityworks/bt65/bt65.zmk.yml index f82253b0..aaeb1835 100644 --- a/app/boards/arm/ckp/bt65_v1.zmk.yml +++ b/app/boards/polarityworks/bt65/bt65.zmk.yml @@ -1,5 +1,5 @@ file_format: "1" -id: bt65_v1 +id: bt65//zmk name: BT65 type: board arch: arm @@ -8,6 +8,7 @@ features: - encoder - underglow - backlight + - studio outputs: - usb - ble diff --git a/app/boards/arm/ckp/bt65_v1.dts b/app/boards/polarityworks/bt65/bt65_nrf52840_zmk.dts similarity index 84% rename from app/boards/arm/ckp/bt65_v1.dts rename to app/boards/polarityworks/bt65/bt65_nrf52840_zmk.dts index f79587ce..d7de5143 100644 --- a/app/boards/arm/ckp/bt65_v1.dts +++ b/app/boards/polarityworks/bt65/bt65_nrf52840_zmk.dts @@ -5,15 +5,23 @@ */ /dts-v1/; -#include "ckp.dtsi" +#include +#include + +#include "../common/ckp-base.dtsi" +#include "../common/ckp.dtsi" +#include +#include +#include +#include / { model = "BT65_V1"; - compatible = "polarityworks,bt65_v1"; + compatible = "polarityworks,bt65"; chosen { - zmk,matrix-transform = &ansi_transform; + zmk,physical-layout = &layout_65_ansi; }; @@ -69,3 +77,19 @@ >; }; }; + +&layout_65_ansi { + transform = <&ansi_transform>; +}; + +&layout_65_iso { + transform = <&iso_transform>; +}; + +&layout_65_all1u { + transform = <&all_1u_transform>; +}; + +&layout_65_hhkb { + transform = <&hhkb_transform>; +}; diff --git a/app/boards/arm/ckp/bt65_v1_defconfig b/app/boards/polarityworks/bt65/bt65_nrf52840_zmk_defconfig similarity index 82% rename from app/boards/arm/ckp/bt65_v1_defconfig rename to app/boards/polarityworks/bt65/bt65_nrf52840_zmk_defconfig index be5f17eb..27b0681e 100644 --- a/app/boards/arm/ckp/bt65_v1_defconfig +++ b/app/boards/polarityworks/bt65/bt65_nrf52840_zmk_defconfig @@ -1,9 +1,5 @@ # SPDX-License-Identifier: MIT -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_BT65_V1=y - # Enable MPU CONFIG_ARM_MPU=y @@ -32,10 +28,8 @@ CONFIG_ZMK_RGB_UNDERGLOW=y CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=y CONFIG_ZMK_RGB_UNDERGLOW_ON_START=y CONFIG_ZMK_RGB_UNDERGLOW_HUE_START=262 -CONFIG_WS2812_STRIP=y -CONFIG_SPI=y CONFIG_BT_CTLR_TX_PWR_PLUS_8=y CONFIG_ZMK_USB=y -CONFIG_ZMK_BLE=y \ No newline at end of file +CONFIG_ZMK_BLE=y diff --git a/app/boards/arm/nrfmicro/pre_dt_board.cmake b/app/boards/polarityworks/bt65/pre_dt_board.cmake similarity index 100% rename from app/boards/arm/nrfmicro/pre_dt_board.cmake rename to app/boards/polarityworks/bt65/pre_dt_board.cmake diff --git a/app/boards/polarityworks/bt75/Kconfig.bt75 b/app/boards/polarityworks/bt75/Kconfig.bt75 new file mode 100644 index 00000000..b2718fcd --- /dev/null +++ b/app/boards/polarityworks/bt75/Kconfig.bt75 @@ -0,0 +1,11 @@ +# CKP BT75 board configuration + +# Copyright (c) 2022 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config BOARD_BT75 + select SOC_NRF52840_QIAA + select ZMK_BOARD_COMPAT + imply RETAINED_MEM + imply RETENTION + imply RETENTION_BOOT_MODE diff --git a/app/boards/polarityworks/bt75/Kconfig.defconfig b/app/boards/polarityworks/bt75/Kconfig.defconfig new file mode 100644 index 00000000..ded51c24 --- /dev/null +++ b/app/boards/polarityworks/bt75/Kconfig.defconfig @@ -0,0 +1,22 @@ +# Copyright (c) 2022 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config ZMK_KEYBOARD_NAME + default "BT75" if BOARD_BT75 + +if BOARD_BT75 + +if USB + +config USB_NRFX + default y + +config USB_DEVICE_STACK + default y + +endif # USB + +config BT_CTLR + default BT + +endif # BOARD_BT75 diff --git a/app/boards/arm/nice_nano/board.cmake b/app/boards/polarityworks/bt75/board.cmake similarity index 100% rename from app/boards/arm/nice_nano/board.cmake rename to app/boards/polarityworks/bt75/board.cmake diff --git a/app/boards/polarityworks/bt75/board.yml b/app/boards/polarityworks/bt75/board.yml new file mode 100644 index 00000000..5a8057c8 --- /dev/null +++ b/app/boards/polarityworks/bt75/board.yml @@ -0,0 +1,7 @@ +board: + name: bt75 + vendor: polarityworks + socs: + - name: nrf52840 + variants: + - name: zmk diff --git a/app/boards/arm/ckp/bt75_v1.keymap b/app/boards/polarityworks/bt75/bt75.keymap similarity index 98% rename from app/boards/arm/ckp/bt75_v1.keymap rename to app/boards/polarityworks/bt75/bt75.keymap index 888dcb64..42833cb0 100644 --- a/app/boards/arm/ckp/bt75_v1.keymap +++ b/app/boards/polarityworks/bt75/bt75.keymap @@ -11,13 +11,13 @@ / { chosen { #ifdef ANSI - zmk,matrix-transform = &ansi_transform; + zmk,physical-layout = &layout_75_ansi; #elif defined(ISO) - zmk,matrix-transform = &iso_transform; + zmk,physical-layout = &layout_75_iso; #elif defined(ALL_1U) - zmk,matrix-transform = &all_1u_transform; + zmk,physical-layout = &layout_75_all1u; #else - #error "Layout not defined, please define a layout using by uncommenting the appropriate line in bt75_v1.keymap" + #error "Layout not defined, please define a layout using by uncommenting the appropriate line in bt75.keymap" #endif }; diff --git a/app/boards/arm/ckp/bt75_v1.yaml b/app/boards/polarityworks/bt75/bt75.yaml similarity index 88% rename from app/boards/arm/ckp/bt75_v1.yaml rename to app/boards/polarityworks/bt75/bt75.yaml index e4faa09f..b628d81c 100644 --- a/app/boards/arm/ckp/bt75_v1.yaml +++ b/app/boards/polarityworks/bt75/bt75.yaml @@ -1,4 +1,4 @@ -identifier: bt75_v1 +identifier: bt75 name: BT75_V1 type: mcu arch: arm diff --git a/app/boards/arm/ckp/bt60_v2.zmk.yml b/app/boards/polarityworks/bt75/bt75.zmk.yml similarity index 80% rename from app/boards/arm/ckp/bt60_v2.zmk.yml rename to app/boards/polarityworks/bt75/bt75.zmk.yml index faf64205..fb909c52 100644 --- a/app/boards/arm/ckp/bt60_v2.zmk.yml +++ b/app/boards/polarityworks/bt75/bt75.zmk.yml @@ -1,6 +1,6 @@ file_format: "1" -id: bt60_v2 -name: BT60 V2 +id: bt75//zmk +name: BT75 V1 type: board arch: arm features: @@ -8,6 +8,7 @@ features: - encoder - underglow - backlight + - studio outputs: - usb - ble diff --git a/app/boards/arm/ckp/bt75_v1.dts b/app/boards/polarityworks/bt75/bt75_nrf52840_zmk.dts similarity index 85% rename from app/boards/arm/ckp/bt75_v1.dts rename to app/boards/polarityworks/bt75/bt75_nrf52840_zmk.dts index 41281086..bfbef0a2 100644 --- a/app/boards/arm/ckp/bt75_v1.dts +++ b/app/boards/polarityworks/bt75/bt75_nrf52840_zmk.dts @@ -5,15 +5,22 @@ */ /dts-v1/; -#include "ckp.dtsi" +#include +#include + +#include "../common/ckp-base.dtsi" +#include "../common/ckp.dtsi" +#include +#include +#include / { model = "BT75_V1"; - compatible = "polarityworks,bt75_v1"; + compatible = "polarityworks,bt75"; chosen { - zmk,matrix-transform = &ansi_transform; + zmk,physical-layout = &layout_75_ansi; }; @@ -59,3 +66,15 @@ >; }; }; + +&layout_75_ansi { + transform = <&ansi_transform>; +}; + +&layout_75_iso { + transform = <&iso_transform>; +}; + +&layout_75_all1u { + transform = <&all_1u_transform>; +}; diff --git a/app/boards/arm/ckp/bt75_v1_defconfig b/app/boards/polarityworks/bt75/bt75_nrf52840_zmk_defconfig similarity index 82% rename from app/boards/arm/ckp/bt75_v1_defconfig rename to app/boards/polarityworks/bt75/bt75_nrf52840_zmk_defconfig index b4d85338..27b0681e 100644 --- a/app/boards/arm/ckp/bt75_v1_defconfig +++ b/app/boards/polarityworks/bt75/bt75_nrf52840_zmk_defconfig @@ -1,9 +1,5 @@ # SPDX-License-Identifier: MIT -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_BT75_V1=y - # Enable MPU CONFIG_ARM_MPU=y @@ -32,10 +28,8 @@ CONFIG_ZMK_RGB_UNDERGLOW=y CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=y CONFIG_ZMK_RGB_UNDERGLOW_ON_START=y CONFIG_ZMK_RGB_UNDERGLOW_HUE_START=262 -CONFIG_WS2812_STRIP=y -CONFIG_SPI=y CONFIG_BT_CTLR_TX_PWR_PLUS_8=y CONFIG_ZMK_USB=y -CONFIG_ZMK_BLE=y \ No newline at end of file +CONFIG_ZMK_BLE=y diff --git a/app/boards/arm/pillbug/pre_dt_board.cmake b/app/boards/polarityworks/bt75/pre_dt_board.cmake similarity index 100% rename from app/boards/arm/pillbug/pre_dt_board.cmake rename to app/boards/polarityworks/bt75/pre_dt_board.cmake diff --git a/app/boards/polarityworks/common/ckp-base.dtsi b/app/boards/polarityworks/common/ckp-base.dtsi new file mode 100644 index 00000000..0b1d9d13 --- /dev/null +++ b/app/boards/polarityworks/common/ckp-base.dtsi @@ -0,0 +1,61 @@ +&adc { + status = "okay"; +}; + +&gpiote { + status = "okay"; +}; + +&gpio0 { + status = "okay"; +}; + +&gpio1 { + status = "okay"; +}; + +zephyr_udc0: &usbd { + status = "okay"; +}; + +®1 { + regulator-initial-mode = ; +}; + + +&flash0 { + /* + * For more information, see: + * http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html + */ + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + sd_partition: partition@0 { + reg = <0x00000000 0x00026000>; + }; + code_partition: partition@26000 { + reg = <0x00026000 0x000c6000>; + }; + + /* + * The flash starting at 0x000ec000 and ending at + * 0x000f3fff is reserved for use by the application. + */ + + /* + * Storage partition will be used by FCB/LittleFS/NVS + * if enabled. + */ + storage_partition: partition@ec000 { + reg = <0x000ec000 0x00008000>; + }; + + boot_partition: partition@f4000 { + reg = <0x000f4000 0x0000c000>; + }; + }; +}; + diff --git a/app/boards/arm/ckp/ckp-pinctrl.dtsi b/app/boards/polarityworks/common/ckp-pinctrl.dtsi similarity index 100% rename from app/boards/arm/ckp/ckp-pinctrl.dtsi rename to app/boards/polarityworks/common/ckp-pinctrl.dtsi diff --git a/app/boards/arm/ckp/ckp.dtsi b/app/boards/polarityworks/common/ckp.dtsi similarity index 78% rename from app/boards/arm/ckp/ckp.dtsi rename to app/boards/polarityworks/common/ckp.dtsi index b127cabc..ba337468 100644 --- a/app/boards/arm/ckp/ckp.dtsi +++ b/app/boards/polarityworks/common/ckp.dtsi @@ -4,9 +4,6 @@ * SPDX-License-Identifier: MIT */ -/dts-v1/; -#include - #include #include @@ -119,8 +116,9 @@ }; }; -&adc { - status = "okay"; +&vbatt { + output-ohms = <100000>; + full-ohms = <(100000 + 100000)>; }; &pwm0 { @@ -130,59 +128,6 @@ pinctrl-names = "default", "sleep"; }; -&gpiote { - status = "okay"; -}; - -&gpio0 { - status = "okay"; -}; - -&gpio1 { - status = "okay"; -}; - -zephyr_udc0: &usbd { - status = "okay"; -}; - - -&flash0 { - /* - * For more information, see: - * http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html - */ - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - sd_partition: partition@0 { - reg = <0x00000000 0x00026000>; - }; - code_partition: partition@26000 { - reg = <0x00026000 0x000c6000>; - }; - - /* - * The flash starting at 0x000ec000 and ending at - * 0x000f3fff is reserved for use by the application. - */ - - /* - * Storage partition will be used by FCB/LittleFS/NVS - * if enabled. - */ - storage_partition: partition@ec000 { - reg = <0x000ec000 0x00008000>; - }; - - boot_partition: partition@f4000 { - reg = <0x000f4000 0x0000c000>; - }; - }; -}; - &spi3 { compatible = "nordic,nrf-spim"; status = "okay"; diff --git a/app/boards/post_boards_shields.cmake b/app/boards/post_boards_shields.cmake new file mode 100644 index 00000000..6c4dd0ad --- /dev/null +++ b/app/boards/post_boards_shields.cmake @@ -0,0 +1,100 @@ +# TODO: Check for env or command line "ZMK_CONFIG" setting. +# * That directory should load +# * defconfigs, +# * .conf file, +# * single overlay, +# * or per board/shield. + +list(APPEND KEYMAP_DIRS "${BOARD_DIRECTORIES}") +get_filename_component(BOARD_DIR_NAME ${BOARD_DIR} NAME) +# Give a shield like `kyria_rev2_left` we want to use `kyria_rev2` and `kyria` as candidate names for +# overlay/conf/keymap files. +if(DEFINED SHIELD) + list(APPEND KEYMAP_DIRS ${SHIELD_DIRS}) + foreach(s ${SHIELD_AS_LIST}) + if (DEFINED SHIELD_DIR_${s}) + get_filename_component(shield_dir_name ${SHIELD_DIR_${s}} NAME) + list(APPEND shield_candidate_names ${shield_dir_name}) + endif() + string(REPLACE "_" ";" S_PIECES ${s}) + list(LENGTH S_PIECES S_PIECES_LEN) + while(NOT S_PIECES STREQUAL "") + list(POP_BACK S_PIECES) + list(JOIN S_PIECES "_" s_substr) + if ("${s_substr}" STREQUAL "" OR "${s_substr}" STREQUAL "${shield_dir_name}") + break() + endif() + list(APPEND shield_candidate_names ${s_substr}) + endwhile() + endforeach() +endif() + +if (ZMK_CONFIG) + if (EXISTS ${ZMK_CONFIG}) + message(STATUS "ZMK Config directory: ${ZMK_CONFIG}") + list(PREPEND KEYMAP_DIRS "${ZMK_CONFIG}") + + if (DEFINED SHIELD) + foreach (s ${shield_candidate_names} ${SHIELD_AS_LIST}) + if (DEFINED ${SHIELD_DIR_${s}}) + get_filename_component(shield_dir_name ${SHIELD_DIR_${s}} NAME) + endif() + list(APPEND overlay_candidates "${ZMK_CONFIG}/${s}_${BOARD}.overlay") + list(APPEND overlay_candidates "${ZMK_CONFIG}/${s}.overlay") + if (NOT "${shield_dir_name}" STREQUAL "${s}") + list(APPEND config_candidates "${ZMK_CONFIG}/${shield_dir_name}_${BOARD}.conf") + list(APPEND config_candidates "${ZMK_CONFIG}/${shield_dir_name}.conf") + endif() + list(APPEND config_candidates "${ZMK_CONFIG}/${s}_${BOARD}.conf") + list(APPEND config_candidates "${ZMK_CONFIG}/${s}.conf") + endforeach() + endif() + + # TODO: Board revisions? + list(APPEND overlay_candidates "${ZMK_CONFIG}/${BOARD_DIR_NAME}.overlay") + list(APPEND overlay_candidates "${ZMK_CONFIG}/${BOARD}.overlay") + list(APPEND overlay_candidates "${ZMK_CONFIG}/default.overlay") + list(APPEND config_candidates "${ZMK_CONFIG}/${BOARD_DIR_NAME}.conf") + list(APPEND config_candidates "${ZMK_CONFIG}/${BOARD}.conf") + list(APPEND config_candidates "${ZMK_CONFIG}/default.conf") + + foreach(overlay ${overlay_candidates}) + if (EXISTS "${overlay}") + message(STATUS "ZMK Config devicetree overlay: ${overlay}") + list(APPEND shield_dts_files "${overlay}") + break() + endif() + endforeach() + + foreach(conf ${config_candidates}) + if (EXISTS "${conf}") + message(STATUS "ZMK Config Kconfig: ${conf}") + list(APPEND shield_conf_files "${conf}") + endif() + endforeach() + else() + message(WARNING "Unable to locate ZMK config at: ${ZMK_CONFIG}") + endif() +endif() + + +if(NOT KEYMAP_FILE) + message("${NORMALIZED_BOARD_TARGET} for ${NORMALIZED_BOARD_QUALIFIERS} for ${BOARD} with version ${BOARD_REVISION}") + foreach(keymap_dir ${KEYMAP_DIRS}) + foreach(keymap_prefix ${shield_candidate_names} ${SHIELD_AS_LIST} ${SHIELD_DIR} "${NORMALIZED_BOARD_TARGET}" "${BOARD}_${BOARD_REVISION_STRING}" ${BOARD} ${BOARD_DIR_NAME}) + if (EXISTS ${keymap_dir}/${keymap_prefix}.keymap) + set(KEYMAP_FILE "${keymap_dir}/${keymap_prefix}.keymap" CACHE STRING "Selected keymap file") + message(STATUS "Using keymap file: ${KEYMAP_FILE}") + set(EXTRA_DTC_OVERLAY_FILE ${KEYMAP_FILE}) + break() + endif() + endforeach() + endforeach() +else() + message(STATUS "Using keymap file: ${KEYMAP_FILE}") + set(EXTRA_DTC_OVERLAY_FILE ${KEYMAP_FILE}) +endif() + +if (NOT KEYMAP_FILE) + message(WARNING "Failed to locate keymap file!") +endif() diff --git a/app/boards/qmk/proton_c/Kconfig.proton_c b/app/boards/qmk/proton_c/Kconfig.proton_c new file mode 100644 index 00000000..c3eaaf68 --- /dev/null +++ b/app/boards/qmk/proton_c/Kconfig.proton_c @@ -0,0 +1,6 @@ +# Copyright (c) 2026 The ZMK Contributors +# SPDX-License-Identifier: Apache-2.0 + +config BOARD_PROTON_C + select ZMK_BOARD_COMPAT + diff --git a/app/boards/arm/dz60rgb/board.cmake b/app/boards/qmk/proton_c/board.cmake similarity index 100% rename from app/boards/arm/dz60rgb/board.cmake rename to app/boards/qmk/proton_c/board.cmake diff --git a/app/boards/qmk/proton_c/board.yml b/app/boards/qmk/proton_c/board.yml new file mode 100644 index 00000000..0b6a5d3e --- /dev/null +++ b/app/boards/qmk/proton_c/board.yml @@ -0,0 +1,5 @@ +board: + extend: proton_c + variants: + - name: zmk + qualifier: stm32f303xc diff --git a/app/boards/qmk/proton_c/proton_c.zmk.yml b/app/boards/qmk/proton_c/proton_c.zmk.yml new file mode 100644 index 00000000..e89acf24 --- /dev/null +++ b/app/boards/qmk/proton_c/proton_c.zmk.yml @@ -0,0 +1,9 @@ +file_format: "1" +id: proton_c//zmk +name: QMK Proton-C +type: board +arch: arm +outputs: + - usb +url: https://qmk.fm/proton-c/ +exposes: [pro_micro] diff --git a/app/boards/qmk/proton_c/proton_c_stm32f303xc_zmk.dts b/app/boards/qmk/proton_c/proton_c_stm32f303xc_zmk.dts new file mode 100644 index 00000000..dfee886e --- /dev/null +++ b/app/boards/qmk/proton_c/proton_c_stm32f303xc_zmk.dts @@ -0,0 +1,9 @@ +/* + * Copyright (c) 2026 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +/dts-v1/; +#include <../boards/qmk/proton_c/proton_c.dts> + diff --git a/app/boards/arm/preonic/preonic_rev3_defconfig b/app/boards/qmk/proton_c/proton_c_stm32f303xc_zmk_defconfig similarity index 80% rename from app/boards/arm/preonic/preonic_rev3_defconfig rename to app/boards/qmk/proton_c/proton_c_stm32f303xc_zmk_defconfig index e063827a..f7abf012 100644 --- a/app/boards/arm/preonic/preonic_rev3_defconfig +++ b/app/boards/qmk/proton_c/proton_c_stm32f303xc_zmk_defconfig @@ -1,10 +1,11 @@ # SPDX-License-Identifier: MIT -CONFIG_SOC_SERIES_STM32F3X=y -CONFIG_SOC_STM32F303XC=y # 72MHz system clock CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=72000000 +# Floating Point Options +CONFIG_FPU=y + # enable pinctrl CONFIG_PINCTRL=y diff --git a/app/boards/raspberrypi/rpi_pico/Kconfig.rpi_pico b/app/boards/raspberrypi/rpi_pico/Kconfig.rpi_pico new file mode 100644 index 00000000..5a9e8ef0 --- /dev/null +++ b/app/boards/raspberrypi/rpi_pico/Kconfig.rpi_pico @@ -0,0 +1,10 @@ +# Copyright (c) 2026 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config BOARD_RPI_PICO + select SOC_RP2040 + select ZMK_BOARD_COMPAT if BOARD_RPI_PICO_RP2040_ZMK + imply RETAINED_MEM if BOARD_RPI_PICO_RP2040_ZMK + imply RETENTION if BOARD_RPI_PICO_RP2040_ZMK + imply RETENTION_BOOT_MODE if BOARD_RPI_PICO_RP2040_ZMK + diff --git a/app/boards/raspberrypi/rpi_pico/board.yml b/app/boards/raspberrypi/rpi_pico/board.yml new file mode 100644 index 00000000..de179f80 --- /dev/null +++ b/app/boards/raspberrypi/rpi_pico/board.yml @@ -0,0 +1,5 @@ +board: + extend: rpi_pico + variants: + - name: zmk + qualifier: rp2040 diff --git a/app/boards/raspberrypi/rpi_pico/rpi_pico.zmk.yml b/app/boards/raspberrypi/rpi_pico/rpi_pico.zmk.yml new file mode 100644 index 00000000..7142cb56 --- /dev/null +++ b/app/boards/raspberrypi/rpi_pico/rpi_pico.zmk.yml @@ -0,0 +1,8 @@ +file_format: "1" +id: rpi_pico//zmk +name: Raspberry Pi Pico +type: board +arch: arm +outputs: + - usb +url: https://www.raspberrypi.com/documentation/microcontrollers/pico-series.html#pico-1-family diff --git a/app/boards/raspberrypi/rpi_pico/rpi_pico_rp2040_zmk.dts b/app/boards/raspberrypi/rpi_pico/rpi_pico_rp2040_zmk.dts new file mode 100644 index 00000000..3acf57ff --- /dev/null +++ b/app/boards/raspberrypi/rpi_pico/rpi_pico_rp2040_zmk.dts @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2026 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include <../boards/raspberrypi/rpi_pico/rpi_pico.dts> +#include + +&uart0 { status = "disabled"; }; + +&code_partition { + reg = <0x100 (DT_SIZE_M(2) - 0x100 - DT_SIZE_K(512))>; +}; + +&flash0 { + partitions { + storage_partition: partition@180000 { + reg = <0x180000 DT_SIZE_K(512)>; + read-only; + }; + }; +}; diff --git a/app/boards/raspberrypi/rpi_pico/rpi_pico_rp2040_zmk_defconfig b/app/boards/raspberrypi/rpi_pico/rpi_pico_rp2040_zmk_defconfig new file mode 100644 index 00000000..5ff98221 --- /dev/null +++ b/app/boards/raspberrypi/rpi_pico/rpi_pico_rp2040_zmk_defconfig @@ -0,0 +1,27 @@ +CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=125000000 + +# Core deps +CONFIG_RESET=y +CONFIG_CLOCK_CONTROL=y +CONFIG_GPIO=y + +# Build Output +CONFIG_USE_DT_CODE_PARTITION=y +CONFIG_BUILD_OUTPUT_UF2=y +CONFIG_BUILD_OUTPUT_HEX=y + +# USB HID +CONFIG_ZMK_USB=y + +# Settings Support +CONFIG_MPU_ALLOW_FLASH_WRITE=y +CONFIG_NVS=y +CONFIG_SETTINGS_NVS=y +CONFIG_FLASH=y +CONFIG_FLASH_PAGE_LAYOUT=y +CONFIG_FLASH_MAP=y + +# Bootloader Support +CONFIG_RETAINED_MEM=y +CONFIG_RETENTION=y +CONFIG_RETENTION_BOOT_MODE=y diff --git a/app/boards/rpi_pico.conf b/app/boards/rpi_pico.conf deleted file mode 100644 index f0db8ed1..00000000 --- a/app/boards/rpi_pico.conf +++ /dev/null @@ -1,5 +0,0 @@ -CONFIG_CONSOLE=n -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n -CONFIG_UART_INTERRUPT_DRIVEN=n -CONFIG_ZMK_USB=y diff --git a/app/boards/seeed/seeeduino_xiao/Kconfig.seeeduino_xiao b/app/boards/seeed/seeeduino_xiao/Kconfig.seeeduino_xiao new file mode 100644 index 00000000..0e1b9cc9 --- /dev/null +++ b/app/boards/seeed/seeeduino_xiao/Kconfig.seeeduino_xiao @@ -0,0 +1,9 @@ +# Copyright (c) 2026 Pete Johanson +# SPDX-License-Identifier: MIT + +config BOARD_SEEEDUINO_XIAO + select ZMK_BOARD_COMPAT if BOARD_SEEEDUINO_XIAO_SAMD21G18A_ZMK + imply RETAINED_MEM if BOARD_SEEEDUINO_XIAO_SAMD21G18A_ZMK + imply RETENTION if BOARD_SEEEDUINO_XIAO_SAMD21G18A_ZMK + imply RETENTION_BOOT_MODE if BOARD_SEEEDUINO_XIAO_SAMD21G18A_ZMK + diff --git a/app/boards/seeed/seeeduino_xiao/board.yml b/app/boards/seeed/seeeduino_xiao/board.yml new file mode 100644 index 00000000..c5d20792 --- /dev/null +++ b/app/boards/seeed/seeeduino_xiao/board.yml @@ -0,0 +1,5 @@ +board: + extend: seeeduino_xiao + variants: + - name: zmk + qualifier: samd21g18a diff --git a/app/boards/arm/seeeduino_xiao/seeeduino_xiao.zmk.yml b/app/boards/seeed/seeeduino_xiao/seeeduino_xiao.zmk.yml similarity index 69% rename from app/boards/arm/seeeduino_xiao/seeeduino_xiao.zmk.yml rename to app/boards/seeed/seeeduino_xiao/seeeduino_xiao.zmk.yml index 1225fb31..da65bb69 100644 --- a/app/boards/arm/seeeduino_xiao/seeeduino_xiao.zmk.yml +++ b/app/boards/seeed/seeeduino_xiao/seeeduino_xiao.zmk.yml @@ -1,6 +1,6 @@ file_format: "1" -id: seeeduino_xiao -name: Seeeduino XIAO +id: seeeduino_xiao//zmk +name: Seeed Studio XIAO SAMD21 type: board arch: arm outputs: diff --git a/app/boards/seeed/seeeduino_xiao/seeeduino_xiao_zmk.dts b/app/boards/seeed/seeeduino_xiao/seeeduino_xiao_zmk.dts new file mode 100644 index 00000000..66a500dd --- /dev/null +++ b/app/boards/seeed/seeeduino_xiao/seeeduino_xiao_zmk.dts @@ -0,0 +1,8 @@ +/* + * Copyright (c) 2026 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include <../boards/seeed/seeeduino_xiao/seeeduino_xiao.dts> + diff --git a/app/boards/seeed/seeeduino_xiao/seeeduino_xiao_zmk_defconfig b/app/boards/seeed/seeeduino_xiao/seeeduino_xiao_zmk_defconfig new file mode 100644 index 00000000..04da60c9 --- /dev/null +++ b/app/boards/seeed/seeeduino_xiao/seeeduino_xiao_zmk_defconfig @@ -0,0 +1,11 @@ +# XTAL setup +CONFIG_SOC_ATMEL_SAMD_XOSC32K=y +CONFIG_SOC_ATMEL_SAMD_XOSC32K_AS_MAIN=y + +# Bootloader Setup +CONFIG_BUILD_OUTPUT_UF2=y +CONFIG_BOOTLOADER_BOSSA=y +CONFIG_BOOTLOADER_BOSSA_ADAFRUIT_UF2=y + +# ZMK USB Transport +CONFIG_ZMK_USB=y diff --git a/app/boards/seeed/xiao_ble/Kconfig.xiao_ble b/app/boards/seeed/xiao_ble/Kconfig.xiao_ble new file mode 100644 index 00000000..475ba15b --- /dev/null +++ b/app/boards/seeed/xiao_ble/Kconfig.xiao_ble @@ -0,0 +1,10 @@ +# Copyright (c) 2026 Pete Johanson +# SPDX-License-Identifier: MIT + +config BOARD_XIAO_BLE + select SOC_NRF52840_QIAA + select ZMK_BOARD_COMPAT if BOARD_XIAO_BLE_NRF52840_ZMK + imply RETAINED_MEM if BOARD_XIAO_BLE_NRF52840_ZMK + imply RETENTION if BOARD_XIAO_BLE_NRF52840_ZMK + imply RETENTION_BOOT_MODE if BOARD_XIAO_BLE_NRF52840_ZMK + diff --git a/app/boards/seeed/xiao_ble/board.yml b/app/boards/seeed/xiao_ble/board.yml new file mode 100644 index 00000000..5643184c --- /dev/null +++ b/app/boards/seeed/xiao_ble/board.yml @@ -0,0 +1,5 @@ +board: + extend: xiao_ble + variants: + - name: zmk + qualifier: nrf52840 diff --git a/app/boards/arm/seeeduino_xiao_ble/seeeduino_xiao_ble.zmk.yml b/app/boards/seeed/xiao_ble/xiao_ble.zmk.yml similarity index 71% rename from app/boards/arm/seeeduino_xiao_ble/seeeduino_xiao_ble.zmk.yml rename to app/boards/seeed/xiao_ble/xiao_ble.zmk.yml index 360bd04b..d4159e36 100644 --- a/app/boards/arm/seeeduino_xiao_ble/seeeduino_xiao_ble.zmk.yml +++ b/app/boards/seeed/xiao_ble/xiao_ble.zmk.yml @@ -1,6 +1,6 @@ file_format: "1" -id: seeeduino_xiao_ble -name: Seeeduino XIAO BLE +id: xiao_ble//zmk +name: Seeed Studio XIAO nRF52840 type: board arch: arm outputs: diff --git a/app/boards/seeeduino_xiao_ble.overlay b/app/boards/seeed/xiao_ble/xiao_ble_zmk.dts similarity index 80% rename from app/boards/seeeduino_xiao_ble.overlay rename to app/boards/seeed/xiao_ble/xiao_ble_zmk.dts index f6a60858..b01c544e 100644 --- a/app/boards/seeeduino_xiao_ble.overlay +++ b/app/boards/seeed/xiao_ble/xiao_ble_zmk.dts @@ -4,6 +4,11 @@ * SPDX-License-Identifier: MIT */ +#include <../boards/seeed/xiao_ble/xiao_ble.dts> +#include + +/* Add an sd_partition label for compatibility with the nosd snippet */ +sd_partition: &reserved_partition_0 { }; / { chosen { @@ -19,6 +24,8 @@ }; }; +&xiao_serial { status = "disabled"; }; + &adc { status = "okay"; }; diff --git a/app/boards/seeed/xiao_ble/xiao_ble_zmk_defconfig b/app/boards/seeed/xiao_ble/xiao_ble_zmk_defconfig new file mode 100644 index 00000000..fd85e275 --- /dev/null +++ b/app/boards/seeed/xiao_ble/xiao_ble_zmk_defconfig @@ -0,0 +1,30 @@ + +# Enable MPU +CONFIG_ARM_MPU=y + +# Enable hardware stack protection +CONFIG_HW_STACK_PROTECTION=y + +# Enable GPIO +CONFIG_GPIO=y + +CONFIG_ZMK_USB=y +CONFIG_ZMK_BLE=y + +# Build UF2 by default, supported by the Adafruit nRF52 Bootloader +CONFIG_BUILD_OUTPUT_UF2=y +CONFIG_USE_DT_CODE_PARTITION=y + +# Settings Support +CONFIG_MPU_ALLOW_FLASH_WRITE=y +CONFIG_NVS=y +CONFIG_SETTINGS_NVS=y +CONFIG_FLASH=y +CONFIG_FLASH_PAGE_LAYOUT=y +CONFIG_FLASH_MAP=y + +# Bootloader Support +CONFIG_RETAINED_MEM=y +CONFIG_RETENTION=y +CONFIG_RETENTION_BOOT_MODE=y +CONFIG_ZMK_BOOTMODE_MAGIC_VALUE_BOOTLOADER_TYPE_ADAFRUIT_NRF52=y diff --git a/app/boards/seeed/xiao_rp2040/Kconfig.xiao_rp2040 b/app/boards/seeed/xiao_rp2040/Kconfig.xiao_rp2040 new file mode 100644 index 00000000..3bd098fe --- /dev/null +++ b/app/boards/seeed/xiao_rp2040/Kconfig.xiao_rp2040 @@ -0,0 +1,10 @@ +# Copyright (c) 2026 Pete Johanson +# SPDX-License-Identifier: MIT + +config BOARD_XIAO_RP2040 + select ZMK_BOARD_COMPAT if BOARD_XIAO_RP2040_RP2040_ZMK + imply RETAINED_MEM if BOARD_XIAO_RP2040_RP2040_ZMK + imply RETENTION if BOARD_XIAO_RP2040_RP2040_ZMK + imply RETENTION_BOOT_MODE if BOARD_XIAO_RP2040_RP2040_ZMK + + diff --git a/app/boards/seeed/xiao_rp2040/board.yml b/app/boards/seeed/xiao_rp2040/board.yml new file mode 100644 index 00000000..813e3346 --- /dev/null +++ b/app/boards/seeed/xiao_rp2040/board.yml @@ -0,0 +1,5 @@ +board: + extend: xiao_rp2040 + variants: + - name: zmk + qualifier: rp2040 diff --git a/app/boards/arm/seeeduino_xiao_rp2040/seeeduino_xiao_rp2040.zmk.yml b/app/boards/seeed/xiao_rp2040/xiao_rp2040.zmk.yml similarity index 69% rename from app/boards/arm/seeeduino_xiao_rp2040/seeeduino_xiao_rp2040.zmk.yml rename to app/boards/seeed/xiao_rp2040/xiao_rp2040.zmk.yml index 77d8d664..ab30d3f7 100644 --- a/app/boards/arm/seeeduino_xiao_rp2040/seeeduino_xiao_rp2040.zmk.yml +++ b/app/boards/seeed/xiao_rp2040/xiao_rp2040.zmk.yml @@ -1,6 +1,6 @@ file_format: "1" -id: seeeduino_xiao_rp2040 -name: Seeeduino XIAO RP2040 +id: xiao_rp2040//zmk +name: Seeed Studio XIAO RP2040 type: board arch: arm outputs: diff --git a/app/boards/seeeduino_xiao_rp2040.overlay b/app/boards/seeed/xiao_rp2040/xiao_rp2040_zmk.dts similarity index 77% rename from app/boards/seeeduino_xiao_rp2040.overlay rename to app/boards/seeed/xiao_rp2040/xiao_rp2040_zmk.dts index e6ba8136..b55ddc63 100644 --- a/app/boards/seeeduino_xiao_rp2040.overlay +++ b/app/boards/seeed/xiao_rp2040/xiao_rp2040_zmk.dts @@ -4,6 +4,9 @@ * SPDX-License-Identifier: MIT */ +#include <../boards/seeed/xiao_rp2040/xiao_rp2040.dts> +#include + &xiao_serial { status = "disabled"; }; &code_partition { diff --git a/app/boards/seeed/xiao_rp2040/xiao_rp2040_zmk_defconfig b/app/boards/seeed/xiao_rp2040/xiao_rp2040_zmk_defconfig new file mode 100644 index 00000000..d4a902e0 --- /dev/null +++ b/app/boards/seeed/xiao_rp2040/xiao_rp2040_zmk_defconfig @@ -0,0 +1,30 @@ +# SPDX-License-Identifier: MIT + +CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=125000000 +CONFIG_RESET=y + +# Enable clock control by default +CONFIG_CLOCK_CONTROL=y + +# Code partition needed to target the correct flash range +CONFIG_USE_DT_CODE_PARTITION=y + +# Output UF2 by default, native bootloader supports it. +CONFIG_BUILD_OUTPUT_UF2=y + +# Enable USB HID transport by default +CONFIG_ZMK_USB=y + +# Settings Enablement +CONFIG_MPU_ALLOW_FLASH_WRITE=y +CONFIG_NVS=y +CONFIG_SETTINGS_NVS=y +CONFIG_FLASH=y +CONFIG_FLASH_PAGE_LAYOUT=y +CONFIG_FLASH_MAP=y + + +# Bootloader support +CONFIG_RETAINED_MEM=y +CONFIG_RETENTION=y +CONFIG_RETENTION_BOOT_MODE=y diff --git a/app/boards/seeeduino_xiao.conf b/app/boards/seeeduino_xiao.conf deleted file mode 100644 index f0db8ed1..00000000 --- a/app/boards/seeeduino_xiao.conf +++ /dev/null @@ -1,5 +0,0 @@ -CONFIG_CONSOLE=n -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n -CONFIG_UART_INTERRUPT_DRIVEN=n -CONFIG_ZMK_USB=y diff --git a/app/boards/seeeduino_xiao_ble.conf b/app/boards/seeeduino_xiao_ble.conf deleted file mode 100644 index 205f67e9..00000000 --- a/app/boards/seeeduino_xiao_ble.conf +++ /dev/null @@ -1,15 +0,0 @@ - -CONFIG_CONSOLE=n -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n -CONFIG_UART_INTERRUPT_DRIVEN=n -CONFIG_ZMK_USB=y -CONFIG_ZMK_BLE=y - - -CONFIG_MPU_ALLOW_FLASH_WRITE=y -CONFIG_NVS=y -CONFIG_SETTINGS_NVS=y -CONFIG_FLASH=y -CONFIG_FLASH_PAGE_LAYOUT=y -CONFIG_FLASH_MAP=y \ No newline at end of file diff --git a/app/boards/shields/a_dux/a_dux-layouts.dtsi b/app/boards/shields/a_dux/a_dux-layouts.dtsi new file mode 100644 index 00000000..ea8e3509 --- /dev/null +++ b/app/boards/shields/a_dux/a_dux-layouts.dtsi @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2025 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ +#include + +/ { + physical_layout0: physical_layout_0 { + compatible = "zmk,physical-layout"; + display-name = "Default"; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 133 0 0 0> + , <&key_physical_attrs 100 100 100 31 0 0 0> + , <&key_physical_attrs 100 100 200 0 0 0 0> + , <&key_physical_attrs 100 100 300 28 0 0 0> + , <&key_physical_attrs 100 100 400 42 0 0 0> + , <&key_physical_attrs 100 100 800 42 0 0 0> + , <&key_physical_attrs 100 100 900 28 0 0 0> + , <&key_physical_attrs 100 100 1000 0 0 0 0> + , <&key_physical_attrs 100 100 1100 31 0 0 0> + , <&key_physical_attrs 100 100 1200 133 0 0 0> + , <&key_physical_attrs 100 100 0 233 0 0 0> + , <&key_physical_attrs 100 100 100 131 0 0 0> + , <&key_physical_attrs 100 100 200 100 0 0 0> + , <&key_physical_attrs 100 100 300 128 0 0 0> + , <&key_physical_attrs 100 100 400 142 0 0 0> + , <&key_physical_attrs 100 100 800 142 0 0 0> + , <&key_physical_attrs 100 100 900 128 0 0 0> + , <&key_physical_attrs 100 100 1000 100 0 0 0> + , <&key_physical_attrs 100 100 1100 131 0 0 0> + , <&key_physical_attrs 100 100 1200 233 0 0 0> + , <&key_physical_attrs 100 100 0 333 0 0 0> + , <&key_physical_attrs 100 100 100 231 0 0 0> + , <&key_physical_attrs 100 100 200 200 0 0 0> + , <&key_physical_attrs 100 100 300 228 0 0 0> + , <&key_physical_attrs 100 100 400 242 0 0 0> + , <&key_physical_attrs 100 100 800 242 0 0 0> + , <&key_physical_attrs 100 100 900 228 0 0 0> + , <&key_physical_attrs 100 100 1000 200 0 0 0> + , <&key_physical_attrs 100 100 1100 231 0 0 0> + , <&key_physical_attrs 100 100 1200 333 0 0 0> + , <&key_physical_attrs 100 100 400 375 0 0 0> + , <&key_physical_attrs 100 100 500 400 0 0 0> + , <&key_physical_attrs 100 100 700 400 0 0 0> + , <&key_physical_attrs 100 100 800 375 0 0 0> + ; + }; +}; diff --git a/app/boards/shields/a_dux/a_dux.dtsi b/app/boards/shields/a_dux/a_dux.dtsi index 46aa8fda..0e581a9d 100644 --- a/app/boards/shields/a_dux/a_dux.dtsi +++ b/app/boards/shields/a_dux/a_dux.dtsi @@ -5,12 +5,18 @@ */ #include +#include "a_dux-layouts.dtsi" + +&physical_layout0 { + transform = <&default_transform>; +}; + / { chosen { zmk,kscan = &kscan0; - zmk,matrix-transform = &default_transform; + zmk,physical-layout = &physical_layout0; }; default_transform: keymap_transform_0 { @@ -49,5 +55,4 @@ <&pro_micro 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> ; }; - }; diff --git a/app/boards/shields/a_dux/a_dux.keymap b/app/boards/shields/a_dux/a_dux.keymap index 0f162a33..37452d59 100644 --- a/app/boards/shields/a_dux/a_dux.keymap +++ b/app/boards/shields/a_dux/a_dux.keymap @@ -14,6 +14,7 @@ // This is a sample keymap intended to be replaced with your own base_layer { + display-name = "Base Layer"; bindings = < &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI diff --git a/app/boards/shields/bat43/bat43.keymap b/app/boards/shields/bat43/bat43.keymap index 0f7e2d55..a690ff38 100644 --- a/app/boards/shields/bat43/bat43.keymap +++ b/app/boards/shields/bat43/bat43.keymap @@ -20,6 +20,7 @@ compatible = "zmk,keymap"; default_layer { + display-name = "Default Layer"; bindings = < &kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp MINUS &kp TAB &kp A &kp S &kp D &kp F &kp G &kp BSPC &kp H &kp J &kp K &kp L &kp SEMI &kp RSHFT @@ -29,6 +30,7 @@ >; }; lower_layer { + display-name = "Lower Layer"; bindings = < &trans &none &none &none &none &none &none &kp EQUAL &kp PLUS &kp STAR &kp PRCNT &trans &trans &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &trans &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &trans @@ -38,6 +40,7 @@ >; }; raise_layer { + display-name = "Raise Layer"; bindings = < &trans &kp BSLH &kp EXCL &kp AMPS &kp PIPE &none &none &kp EQUAL &kp PLUS &kp STAR &kp PRCNT &trans &trans &kp HASH &kp GRAVE &kp DQT &kp SQT &kp TILDE &trans &kp LEFT &kp DOWN &kp UP &kp RIGHT &kp DLLR &trans diff --git a/app/boards/shields/bfo9000/bfo9000.keymap b/app/boards/shields/bfo9000/bfo9000.keymap index 18a2085c..412fcbed 100644 --- a/app/boards/shields/bfo9000/bfo9000.keymap +++ b/app/boards/shields/bfo9000/bfo9000.keymap @@ -19,6 +19,7 @@ compatible = "zmk,keymap"; default_layer { + display-name = "Default Layer"; // | Esc | Vol Up | Esc | F1 | F2 | F3 | F4 | F5 | F6 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Del | // | Home | Vol Dn | ` | 1 | 2 | 3 | 4 | 5 | 6 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bk Spc | // | End | Tab | Tab | Q | W | E | R | T | Y | T | Y | U | I | O | P | [ | ] | \ | @@ -36,6 +37,7 @@ }; lower_layer { + display-name = "Lower Layer"; // | | | | | | | | | | | | | | | | | | | // | | | | | | | | | | | | | | | | | | | // | | | | | | | | | | | | | | | | | | | diff --git a/app/boards/shields/boardsource3x4/boardsource3x4-layouts.dtsi b/app/boards/shields/boardsource3x4/boardsource3x4-layouts.dtsi new file mode 100644 index 00000000..0bbee3bd --- /dev/null +++ b/app/boards/shields/boardsource3x4/boardsource3x4-layouts.dtsi @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2025 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include + +/ { + horizontal_physical_layout: horizontal_physical_layout { + compatible = "zmk,physical-layout"; + display-name = "Horizontal Layout"; + + keys + = <&key_physical_attrs 100 100 0 0 0 0 0> + , <&key_physical_attrs 100 100 100 0 0 0 0> + , <&key_physical_attrs 100 100 200 0 0 0 0> + , <&key_physical_attrs 100 100 300 0 0 0 0> + , <&key_physical_attrs 100 100 0 100 0 0 0> + , <&key_physical_attrs 100 100 100 100 0 0 0> + , <&key_physical_attrs 100 100 200 100 0 0 0> + , <&key_physical_attrs 100 100 300 100 0 0 0> + , <&key_physical_attrs 100 100 0 200 0 0 0> + , <&key_physical_attrs 100 100 100 200 0 0 0> + , <&key_physical_attrs 100 100 200 200 0 0 0> + , <&key_physical_attrs 100 100 300 200 0 0 0> + ; + }; + + vertical_physical_layout: vertical_physical_layout { + compatible = "zmk,physical-layout"; + display-name = "Vertical Layout"; + + keys + = <&key_physical_attrs 100 100 0 0 0 0 0> + , <&key_physical_attrs 100 100 100 0 0 0 0> + , <&key_physical_attrs 100 100 200 0 0 0 0> + , <&key_physical_attrs 100 100 0 100 0 0 0> + , <&key_physical_attrs 100 100 100 100 0 0 0> + , <&key_physical_attrs 100 100 200 100 0 0 0> + , <&key_physical_attrs 100 100 0 200 0 0 0> + , <&key_physical_attrs 100 100 100 200 0 0 0> + , <&key_physical_attrs 100 100 200 200 0 0 0> + , <&key_physical_attrs 100 100 0 300 0 0 0> + , <&key_physical_attrs 100 100 100 300 0 0 0> + , <&key_physical_attrs 100 100 200 300 0 0 0> + ; + }; + + position_map { + compatible = "zmk,physical-layout-position-map"; + + horizontal_map: horizontal { + // A 7 8 9 + // B 4 5 6 + // C 1 2 3 + physical-layout = <&horizontal_physical_layout>; + positions = ; + }; + vertical_map: verctical { + // A B C + // 7 8 9 + // 4 5 6 + // 1 2 3 + physical-layout = <&vertical_physical_layout>; + positions = ; + }; + }; + +}; diff --git a/app/boards/shields/boardsource3x4/boardsource3x4.keymap b/app/boards/shields/boardsource3x4/boardsource3x4.keymap index c47126ab..5648d235 100644 --- a/app/boards/shields/boardsource3x4/boardsource3x4.keymap +++ b/app/boards/shields/boardsource3x4/boardsource3x4.keymap @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 The ZMK Contributors + * Copyright (c) 2025 The ZMK Contributors * * SPDX-License-Identifier: MIT */ @@ -13,6 +13,7 @@ compatible = "zmk,keymap"; default_layer { + display-name = "Default Layer"; bindings = < &tog 1 &kp C_PREV &kp C_PP &kp C_NEXT @@ -23,6 +24,7 @@ }; num_layer { + display-name = "Num Layer"; bindings = < &trans &kp N7 &kp N8 &kp N9 &trans &kp N4 &kp N5 &kp N6 @@ -31,14 +33,16 @@ }; lower_layer { + display-name = "Lower Layer"; bindings = < &bt BT_CLR &none &sys_reset &bootloader &trans &bt BT_SEL 3 &bt BT_SEL 4 &none - &none &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 + &studio_unlock &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 >; }; raise_layer { + display-name = "Raise Layer"; bindings = < &kp 0x68 &kp 0x69 &kp 0x6A &kp 0x6B &kp 0x6C &kp 0x6D &kp 0x6E &kp 0x6F @@ -46,4 +50,4 @@ >; }; }; -}; \ No newline at end of file +}; diff --git a/app/boards/shields/boardsource3x4/boardsource3x4.overlay b/app/boards/shields/boardsource3x4/boardsource3x4.overlay index 0d63214d..37d0c3fc 100644 --- a/app/boards/shields/boardsource3x4/boardsource3x4.overlay +++ b/app/boards/shields/boardsource3x4/boardsource3x4.overlay @@ -1,14 +1,47 @@ /* - * Copyright (c) 2020 The ZMK Contributors + * Copyright (c) 2025 The ZMK Contributors * * SPDX-License-Identifier: MIT */ #include +#include "boardsource3x4-layouts.dtsi" + + +&horizontal_physical_layout { + transform = <&horizontal_transform>; +}; +&vertical_physical_layout { + transform = <&vertical_transform>; +}; / { chosen { zmk,kscan = &kscan0; + zmk,physical-layout = &horizontal_physical_layout; + }; + + horizontal_transform: horizontal_transform { + compatible = "zmk,matrix-transform"; + columns = <4>; + rows = <3>; + map = < + RC(0,0) RC(0,1) RC(0,2) RC(0,3) + RC(1,0) RC(1,1) RC(1,2) RC(1,3) + RC(2,0) RC(2,1) RC(2,2) RC(2,3) + >; + }; + + vertical_transform: vertical_transform { + compatible = "zmk,matrix-transform"; + columns = <4>; + rows = <3>; + map = < + RC(0,3) RC(1,3) RC(2,3) + RC(0,2) RC(1,2) RC(2,2) + RC(0,1) RC(1,1) RC(2,1) + RC(0,0) RC(1,0) RC(2,0) + >; }; kscan0: kscan { diff --git a/app/boards/shields/boardsource3x4/boardsource3x4.zmk.yml b/app/boards/shields/boardsource3x4/boardsource3x4.zmk.yml index fee27965..eee7fa40 100644 --- a/app/boards/shields/boardsource3x4/boardsource3x4.zmk.yml +++ b/app/boards/shields/boardsource3x4/boardsource3x4.zmk.yml @@ -6,3 +6,4 @@ url: https://boardsource.xyz/store/5ecc2008eee64242946c98c1 requires: [pro_micro] features: - keys + - studio diff --git a/app/boards/shields/boardsource5x12/boardsource5x12.keymap b/app/boards/shields/boardsource5x12/boardsource5x12.keymap index 8ae99398..3be2ae97 100644 --- a/app/boards/shields/boardsource5x12/boardsource5x12.keymap +++ b/app/boards/shields/boardsource5x12/boardsource5x12.keymap @@ -15,6 +15,7 @@ compatible = "zmk,keymap"; default_layer { + display-name = "Default Layer"; // ------------------------------------------------------------------------------------------ // | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | BSPC | // | TAB | Q | W | E | R | T | Y | U | I | O | P | \ | @@ -33,6 +34,7 @@ }; lower_layer { + display-name = "Lower Layer"; // ------------------------------------------------------------------------------------------- // | ESC | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | // | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | DEL | @@ -49,6 +51,7 @@ }; raise_layer { + display-name = "Raise Layer"; // ------------------------------------------------------------------------------------------ // | ESC | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | // | ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | DEL | @@ -65,6 +68,7 @@ }; adjust_layer { + display-name = "Adjust Layer"; // ------------------------------------------------------------------------------------------ // |tog(4)| F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | // | | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA |LALT(PRTSN)| @@ -81,6 +85,7 @@ }; flock_layer { + display-name = "Flock Layer"; // ---------------------------------------------------------------------------------------------- // |tog(4) | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | | // |out tog|BT_SEL 0|BT_SEL 1|BT_SEL 2|BT_SEL 3|BT_SEL 4|BT_PRV|BT_NXT|BT_CLR| | | | @@ -96,4 +101,4 @@ >; }; }; -}; \ No newline at end of file +}; diff --git a/app/boards/shields/boardsource5x12/boardsource5x12.overlay b/app/boards/shields/boardsource5x12/boardsource5x12.overlay index 15ae7b68..2e2c22d8 100644 --- a/app/boards/shields/boardsource5x12/boardsource5x12.overlay +++ b/app/boards/shields/boardsource5x12/boardsource5x12.overlay @@ -6,9 +6,25 @@ #include +#include + / { chosen { zmk,kscan = &kscan0; + zmk,physical-layout = &layout_ortho_5x12_all1u; + }; + + matrix_transform_50_all1u: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <12>; + rows = <5>; + map = < + RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) + RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) + RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) + RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) + RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) + >; }; kscan0: kscan { @@ -40,4 +56,8 @@ , <&pro_micro 6 GPIO_ACTIVE_HIGH> ; }; -}; \ No newline at end of file +}; + +&layout_ortho_5x12_all1u { + transform = <&matrix_transform_50_all1u>; +}; diff --git a/app/boards/shields/boardsource5x12/boardsource5x12.zmk.yml b/app/boards/shields/boardsource5x12/boardsource5x12.zmk.yml index 6987e27a..83e6b4b1 100644 --- a/app/boards/shields/boardsource5x12/boardsource5x12.zmk.yml +++ b/app/boards/shields/boardsource5x12/boardsource5x12.zmk.yml @@ -6,3 +6,4 @@ url: https://boardsource.xyz/store/5ecb802c86879c9a0c22db61 requires: [pro_micro] features: - keys + - studio diff --git a/app/boards/shields/chalice/boards/nice_nano.overlay b/app/boards/shields/chalice/boards/nice_nano_nrf52840_zmk.overlay similarity index 100% rename from app/boards/shields/chalice/boards/nice_nano.overlay rename to app/boards/shields/chalice/boards/nice_nano_nrf52840_zmk.overlay diff --git a/app/boards/shields/chalice/chalice.conf b/app/boards/shields/chalice/chalice.conf index da642256..6ca70f41 100644 --- a/app/boards/shields/chalice/chalice.conf +++ b/app/boards/shields/chalice/chalice.conf @@ -1,3 +1,2 @@ # Uncomment the following lines to enable RGB underglow # CONFIG_ZMK_RGB_UNDERGLOW=y -# CONFIG_WS2812_STRIP=y \ No newline at end of file diff --git a/app/boards/shields/chalice/chalice.keymap b/app/boards/shields/chalice/chalice.keymap index c72e3ee1..92864046 100644 --- a/app/boards/shields/chalice/chalice.keymap +++ b/app/boards/shields/chalice/chalice.keymap @@ -15,6 +15,7 @@ compatible = "zmk,keymap"; default_layer { + display-name = "Default Layer"; bindings = < &kp ESC &kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC @@ -26,6 +27,7 @@ }; function_layer { + display-name = "Function Layer"; bindings = < &bootloader &out OUT_TOG &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &trans diff --git a/app/boards/shields/clog/clog.keymap b/app/boards/shields/clog/clog.keymap index d00b00c9..fb696d09 100644 --- a/app/boards/shields/clog/clog.keymap +++ b/app/boards/shields/clog/clog.keymap @@ -75,6 +75,7 @@ compatible = "zmk,keymap"; MAIN_layer { + display-name = "Main Layer"; bindings = < &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp Q &kp A &kp S &kp D < SYM F &kp G &kp H < SYM J &kp K &kp L &kp SQT &kp P @@ -84,6 +85,7 @@ }; SYM_layer { + display-name = "Sym Layer"; bindings = < &kp N7 &kp N8 &kp N9 &kp STAR &kp DLLR &kp LBRC &kp RBRC &kp HASH &kp AMPS &kp EXCL &kp N1 &kp N2 &kp N3 &kp EQUAL &kp LT &kp LPAR &kp RPAR &kp GT &kp PIPE &none @@ -93,6 +95,7 @@ }; NAV_layer { + display-name = "Nav Layer"; bindings = < &kp C_VOL_DN &kp C_VOL_UP &kp C_NEXT &kp C_PP &none &kp F7 &kp F8 &kp F9 &kp C_PREV &kp LEFT &kp DOWN &kp UP &kp RIGHT &kp LC(TAB) &kp PSCRN &kp F1 &kp F2 &kp F3 &kp F10 &kp F12 @@ -102,6 +105,7 @@ }; BT_layer { + display-name = "BT Layer"; bindings = < &none &none &none &none &none &none &none &none &none &none &none &none &none &none &none &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &none diff --git a/app/boards/shields/clueboard_california/clueboard_california.keymap b/app/boards/shields/clueboard_california/clueboard_california.keymap index 9af22fa1..0aec8c10 100644 --- a/app/boards/shields/clueboard_california/clueboard_california.keymap +++ b/app/boards/shields/clueboard_california/clueboard_california.keymap @@ -12,6 +12,7 @@ compatible = "zmk,keymap"; default_layer { + display-name = "Default Layer"; bindings = < &kp N9 &kp N8 &kp N7 &kp N6 @@ -22,4 +23,4 @@ >; }; }; -}; \ No newline at end of file +}; diff --git a/app/boards/shields/contra/contra.keymap b/app/boards/shields/contra/contra.keymap index 77b431b6..ccb18901 100644 --- a/app/boards/shields/contra/contra.keymap +++ b/app/boards/shields/contra/contra.keymap @@ -17,6 +17,7 @@ compatible = "zmk,keymap"; default_layer { + display-name = "Default Layer"; bindings = < &kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSPC &kp TAB &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT @@ -26,6 +27,7 @@ }; num_mods { + display-name = "Num Mods"; bindings = < &kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp DEL &kp TAB &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp MINUS &kp PG_UP &kp LBKT &kp RBKT &kp BSLH @@ -35,6 +37,7 @@ }; bt_control { + display-name = "Bt Control"; bindings = < &bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans @@ -43,4 +46,4 @@ >; }; }; -}; \ No newline at end of file +}; diff --git a/app/boards/shields/contra/contra.overlay b/app/boards/shields/contra/contra.overlay index 45cc3088..e304ea77 100644 --- a/app/boards/shields/contra/contra.overlay +++ b/app/boards/shields/contra/contra.overlay @@ -4,9 +4,26 @@ * SPDX-License-Identifier: MIT */ +#include + +#include + / { chosen { zmk,kscan = &kscan0; + zmk,physical-layout = &layout_ortho_4x12_all1u; + }; + + matrix_transform_40_all1u: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <12>; + rows = <4>; + map = < + RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) + RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) + RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) + RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) + >; }; kscan0: kscan_0 { @@ -37,4 +54,8 @@ , <&pro_micro 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> ; }; -}; \ No newline at end of file +}; + +&layout_ortho_4x12_all1u { + transform = <&matrix_transform_40_all1u>; +}; diff --git a/app/boards/shields/contra/contra.zmk.yml b/app/boards/shields/contra/contra.zmk.yml index da3a9447..db289833 100644 --- a/app/boards/shields/contra/contra.zmk.yml +++ b/app/boards/shields/contra/contra.zmk.yml @@ -6,3 +6,4 @@ url: https://github.com/ai03-2725/Contra requires: [pro_micro] features: - keys + - studio diff --git a/app/boards/shields/chalice/boards/nice_nano_v2.overlay b/app/boards/shields/corne/boards/nice_nano_nrf52840_zmk.overlay similarity index 100% rename from app/boards/shields/chalice/boards/nice_nano_v2.overlay rename to app/boards/shields/corne/boards/nice_nano_nrf52840_zmk.overlay diff --git a/app/boards/shields/corne/corne.conf b/app/boards/shields/corne/corne.conf index 974243c8..b10586cc 100644 --- a/app/boards/shields/corne/corne.conf +++ b/app/boards/shields/corne/corne.conf @@ -1,6 +1,5 @@ # Uncomment the following lines to enable the Corne RGB Underglow # CONFIG_ZMK_RGB_UNDERGLOW=y -# CONFIG_WS2812_STRIP=y # Uncomment the following line to enable the Corne OLED Display # CONFIG_ZMK_DISPLAY=y diff --git a/app/boards/shields/corne/corne.dtsi b/app/boards/shields/corne/corne.dtsi index e4339e61..e1dcc058 100644 --- a/app/boards/shields/corne/corne.dtsi +++ b/app/boards/shields/corne/corne.dtsi @@ -6,7 +6,8 @@ #include -#include +#include +#include &foostan_corne_6col_layout { transform = <&default_transform>; diff --git a/app/boards/shields/corne/corne.keymap b/app/boards/shields/corne/corne.keymap index ea4c2e89..fa6d4744 100644 --- a/app/boards/shields/corne/corne.keymap +++ b/app/boards/shields/corne/corne.keymap @@ -13,6 +13,7 @@ compatible = "zmk,keymap"; default_layer { + display-name = "Default Layer"; // ----------------------------------------------------------------------------------------- // | TAB | Q | W | E | R | T | | Y | U | I | O | P | BSPC | // | CTRL | A | S | D | F | G | | H | J | K | L | ; | ' | @@ -26,6 +27,7 @@ >; }; lower_layer { + display-name = "Lower Layer"; // ----------------------------------------------------------------------------------------- // | TAB | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BSPC | // | BTCLR| BT1 | BT2 | BT3 | BT4 | BT5 | | LFT | DWN | UP | RGT | | | @@ -40,6 +42,7 @@ }; raise_layer { + display-name = "Raise Layer"; // ----------------------------------------------------------------------------------------- // | TAB | ! | @ | # | $ | % | | ^ | & | * | ( | ) | BSPC | // | CTRL | | | | | | | - | = | [ | ] | \ | ` | diff --git a/app/boards/shields/corne/corne.zmk.yml b/app/boards/shields/corne/corne.zmk.yml index 1e8a5fbb..1afc0218 100644 --- a/app/boards/shields/corne/corne.zmk.yml +++ b/app/boards/shields/corne/corne.zmk.yml @@ -9,6 +9,7 @@ features: - keys - display - underglow + - studio siblings: - corne_left - corne_right diff --git a/app/boards/shields/cradio/cradio.keymap b/app/boards/shields/cradio/cradio.keymap index ab952fb8..6463cd6e 100644 --- a/app/boards/shields/cradio/cradio.keymap +++ b/app/boards/shields/cradio/cradio.keymap @@ -33,6 +33,7 @@ keymap { compatible = "zmk,keymap"; default_layer { + display-name = "Default Layer"; bindings = < //╭──────────┬──────────┬──────────┬──────────┬──────────╮ ╭──────────┬──────────┬──────────┬──────────┬──────────╮ //│ Q │ W │ E │ R │ T │ │ Y │ U │ I │ O │ P │ @@ -50,6 +51,7 @@ }; right_layer { + display-name = "Right Layer"; bindings = < //╭──────────┬──────────┬──────────┬──────────┬──────────╮ ╭──────────┬──────────┬──────────┬──────────┬──────────╮ //│ INSERT │ 1 │ 2 │ 3 │ │ │ HOME │ PAGE DN │ PAGE UP │ END │ : │ @@ -67,6 +69,7 @@ }; left_layer { + display-name = "Left Layer"; bindings = < //╭──────────┬──────────┬──────────┬──────────┬──────────╮ ╭──────────┬──────────┬──────────┬──────────┬──────────╮ //│ │ [ │ { │ } │ │ │ ^ │ ( │ ) │ ] │ ~ │ @@ -84,6 +87,7 @@ }; tri_layer { + display-name = "Tri Layer"; bindings = < //╭──────────┬──────────┬──────────┬──────────┬──────────╮ ╭──────────┬──────────┬──────────┬──────────┬──────────╮ //│ RESET │ │ │ │PROFILE 0 │ │ │ │ │ │ RESET │ diff --git a/app/boards/shields/cradio/cradio.zmk.yml b/app/boards/shields/cradio/cradio.zmk.yml index 76cf1ab2..5ccfef0a 100644 --- a/app/boards/shields/cradio/cradio.zmk.yml +++ b/app/boards/shields/cradio/cradio.zmk.yml @@ -7,6 +7,7 @@ requires: [pro_micro] exposes: [i2c_oled] features: - keys + - studio siblings: - cradio_left - cradio_right diff --git a/app/boards/shields/crbn/crbn.keymap b/app/boards/shields/crbn/crbn.keymap index 08eab59c..5316465b 100644 --- a/app/boards/shields/crbn/crbn.keymap +++ b/app/boards/shields/crbn/crbn.keymap @@ -13,6 +13,7 @@ compatible = "zmk,keymap"; default_layer { + display-name = "Default Layer"; // ----------------------------------------------------------------------------------------- // | TAB | Q | W | E | R | T | Y | U | I | O | P | BSPC | // | ESC | A | S | D | F | G | H | J | K | L | ; | ' | @@ -29,6 +30,7 @@ }; lower { + display-name = "Lower"; bindings = < &kp LS(GRAVE) &kp LS(N1) &kp LS(N2) &kp LS(N3) &kp LS(N4) &kp LS(N5) &kp LS(N6) &kp LS(N7) &kp LS(N8) &kp LS(N9) &kp LS(N0) &kp DEL &kp DEL &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp UNDER &kp PLUS &kp LBRC &kp RBRC &kp PIPE @@ -40,6 +42,7 @@ }; raise { + display-name = "Raise"; bindings = < &kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp BSPC &kp DEL &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp MINUS &kp EQUAL &kp LBKT &kp RBKT &kp BSLH @@ -51,6 +54,7 @@ }; control { + display-name = "Control"; bindings = < &sys_reset &bootloader &bt BT_CLR &bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &trans &trans &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &trans &trans &trans &trans &trans &trans &trans &trans &trans diff --git a/app/boards/shields/crbn/crbn.overlay b/app/boards/shields/crbn/crbn.overlay index c6a2b87c..977bfadc 100644 --- a/app/boards/shields/crbn/crbn.overlay +++ b/app/boards/shields/crbn/crbn.overlay @@ -6,9 +6,24 @@ #include +#include + / { chosen { zmk,kscan = &kscan0; + zmk,physical-layout = &layout_ortho_4x12_all1u; + }; + + matrix_transform_40_all1u: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <12>; + rows = <4>; + map = < + RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) + RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) + RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) + RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) + >; }; kscan0: kscan_0 { @@ -54,3 +69,7 @@ triggers-per-rotation = <20>; }; }; + +&layout_ortho_4x12_all1u { + transform = <&matrix_transform_40_all1u>; +}; diff --git a/app/boards/shields/crbn/crbn.zmk.yml b/app/boards/shields/crbn/crbn.zmk.yml index baa73ea0..47c328a3 100644 --- a/app/boards/shields/crbn/crbn.zmk.yml +++ b/app/boards/shields/crbn/crbn.zmk.yml @@ -7,3 +7,4 @@ requires: [pro_micro] features: - keys - encoder + - studio diff --git a/app/boards/shields/eek/eek.keymap b/app/boards/shields/eek/eek.keymap index 74ecc407..be2f108c 100644 --- a/app/boards/shields/eek/eek.keymap +++ b/app/boards/shields/eek/eek.keymap @@ -14,6 +14,7 @@ compatible = "zmk,keymap"; default { + display-name = "Default"; // -------------------------------------------------------------------------------------------------------------------------------------------------------------------- // Q | W | E | R | T | | Y | U | I | O | P | // A | S | D | F | G | | H | J | K | L | ; | @@ -27,6 +28,7 @@ >; }; numbers { + display-name = "Numbers"; // -------------------------------------------------------------------------------------------------------------------------------------------------------------------- // 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | // TAB | BT_PRV | BT_NXT | VOL-| VOL+| | < | v | ∧ | > | ' | @@ -40,6 +42,7 @@ >; }; symbols { + display-name = "Symbols"; // -------------------------------------------------------------------------------------------------------------------------------------------------------------------- // ESC | F1 | F2 | F3 | F4 | | OUT_USB | OUT_BLE | | = | - | // CAPS| F5 | F6 | F7 | F8 | | [ | ] | | ` | \ | diff --git a/app/boards/shields/corne/boards/nice_nano.overlay b/app/boards/shields/elephant42/boards/nice_nano_nrf52840_zmk.overlay similarity index 100% rename from app/boards/shields/corne/boards/nice_nano.overlay rename to app/boards/shields/elephant42/boards/nice_nano_nrf52840_zmk.overlay diff --git a/app/boards/shields/elephant42/elephant42.conf b/app/boards/shields/elephant42/elephant42.conf index 1b41763f..3a123f34 100644 --- a/app/boards/shields/elephant42/elephant42.conf +++ b/app/boards/shields/elephant42/elephant42.conf @@ -1,6 +1,5 @@ # Uncomment the following lines to enable the Elephant42 RGB Underglow # CONFIG_ZMK_RGB_UNDERGLOW=y -# CONFIG_WS2812_STRIP=y # Uncomment the following line to enable the Elephant42 OLED Display -# CONFIG_ZMK_DISPLAY=y \ No newline at end of file +# CONFIG_ZMK_DISPLAY=y diff --git a/app/boards/shields/elephant42/elephant42.keymap b/app/boards/shields/elephant42/elephant42.keymap index 62484728..db9a3bd6 100644 --- a/app/boards/shields/elephant42/elephant42.keymap +++ b/app/boards/shields/elephant42/elephant42.keymap @@ -18,6 +18,7 @@ compatible = "zmk,keymap"; default_layer { + display-name = "Default Layer"; bindings = < < ADJT ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp DEL &mt LCTRL TAB &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT @@ -27,6 +28,7 @@ }; lower { + display-name = "Lower"; bindings = < &kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp C_PLAY_PAUSE &trans &trans &trans &trans &trans &trans &kp LEFT &kp DOWN &kp UP &kp RIGHT &trans &trans @@ -35,6 +37,7 @@ >; }; raise { + display-name = "Raise"; bindings = < &kp TILDE &trans &trans &trans &trans &trans &trans &trans &trans &kp MINUS &kp EQUAL &kp C_PLAY_PAUSE &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp BSLH @@ -44,6 +47,7 @@ }; adjust { + display-name = "Adjust"; bindings = < &trans &bt BT_NXT &bt BT_PRV &trans &trans &bt BT_CLR &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans @@ -52,4 +56,4 @@ >; }; }; -}; \ No newline at end of file +}; diff --git a/app/boards/shields/ergodash/ergodash.keymap b/app/boards/shields/ergodash/ergodash.keymap index e384e504..45b71296 100644 --- a/app/boards/shields/ergodash/ergodash.keymap +++ b/app/boards/shields/ergodash/ergodash.keymap @@ -18,6 +18,7 @@ compatible = "zmk,keymap"; default_layer { + display-name = "Default Layer"; /* QWERTY * .----------------------------------------------------------------------------------------------------------------------. * | ` | 1 | 2 | 3 | 4 | 5 | [ | | ] | 6 | 7 | 8 | 9 | 0 | PScr | @@ -40,6 +41,7 @@ >; }; lower_layer { + display-name = "Lower Layer"; /* .----------------------------------------------------------------------------------------------------------------------. * | F11 | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F12 | * |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| @@ -61,6 +63,7 @@ >; }; raise_layer { + display-name = "Raise Layer"; /* .----------------------------------------------------------------------------------------------------------------------. * | | BT 0 | BT 1 | BT 2 | BT 3 | | BTCL | | | | | | | | | * |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| diff --git a/app/boards/shields/corne/boards/nice_nano_v2.overlay b/app/boards/shields/eternal_keypad/boards/nice_nano_nrf52840_zmk.overlay similarity index 100% rename from app/boards/shields/corne/boards/nice_nano_v2.overlay rename to app/boards/shields/eternal_keypad/boards/nice_nano_nrf52840_zmk.overlay diff --git a/app/boards/shields/eternal_keypad/eternal_keypad.conf b/app/boards/shields/eternal_keypad/eternal_keypad.conf index 65fa2955..5f7c33bc 100644 --- a/app/boards/shields/eternal_keypad/eternal_keypad.conf +++ b/app/boards/shields/eternal_keypad/eternal_keypad.conf @@ -6,4 +6,3 @@ # Uncomment the following lines to enable RGB underglow # CONFIG_ZMK_RGB_UNDERGLOW=y -# CONFIG_WS2812_STRIP=y diff --git a/app/boards/shields/eternal_keypad/eternal_keypad.keymap b/app/boards/shields/eternal_keypad/eternal_keypad.keymap index 40ac97df..51171228 100644 --- a/app/boards/shields/eternal_keypad/eternal_keypad.keymap +++ b/app/boards/shields/eternal_keypad/eternal_keypad.keymap @@ -24,6 +24,7 @@ compatible = "zmk,keymap"; default_layer { + display-name = "Default Layer"; bindings = < &kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp TAB &kp Q &kp W &kp E &kp R &kp T &kp N7 @@ -34,6 +35,7 @@ }; arrow_layer { + display-name = "Arrow Layer"; bindings = < &bt BT_SEL 0 &bt BT_SEL 1 &trans &trans &trans &out OUT_USB &out OUT_BLE &trans &trans &kp UP &trans &rgb_ug RGB_TOG &rgb_ug RGB_HUI &rgb_ug RGB_HUD @@ -44,6 +46,7 @@ }; function_layer { + display-name = "Function Layer"; bindings = < &trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &trans &kp P &kp O &kp I &kp U &kp Y &kp F7 diff --git a/app/boards/shields/eternal_keypad/eternal_keypad_lefty.keymap b/app/boards/shields/eternal_keypad/eternal_keypad_lefty.keymap index 4dec0bc8..80eb4af9 100644 --- a/app/boards/shields/eternal_keypad/eternal_keypad_lefty.keymap +++ b/app/boards/shields/eternal_keypad/eternal_keypad_lefty.keymap @@ -24,6 +24,7 @@ compatible = "zmk,keymap"; default_layer { + display-name = "Default Layer"; bindings = < &kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp TAB &kp Q &kp W &kp E &kp R &kp T &kp N7 @@ -34,6 +35,7 @@ }; arrow_layer { + display-name = "Arrow Layer"; bindings = < &bt BT_SEL 0 &bt BT_SEL 1 &trans &trans &trans &out OUT_USB &out OUT_BLE &trans &trans &kp UP &trans &rgb_ug RGB_TOG &rgb_ug RGB_HUI &rgb_ug RGB_HUD @@ -44,6 +46,7 @@ }; function_layer { + display-name = "Function Layer"; bindings = < &trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &trans &kp P &kp O &kp I &kp U &kp Y &kp F7 diff --git a/app/boards/shields/fourier/fourier.keymap b/app/boards/shields/fourier/fourier.keymap index 819ddf61..17b1f81e 100644 --- a/app/boards/shields/fourier/fourier.keymap +++ b/app/boards/shields/fourier/fourier.keymap @@ -21,6 +21,7 @@ // ------------------------------------------- ----------------------------------------------- default_layer { + display-name = "Default Layer"; bindings = < &kp ESC &kp Q &kp W &kp E &kp R &kp T /**/ &kp Y &kp U &kp I &kp O &kp P &none &kp BACKSPACE &kp TAB &kp A &kp S &kp D &kp F &kp G /**/ &kp H &kp J &kp K &kp L &kp SQT &kp ENTER @@ -37,6 +38,7 @@ // ------------------------------------------- ----------------------------------------------- symbols_layer { + display-name = "Symbols Layer"; bindings = < &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 /**/ &kp N7 &kp N8 &kp N9 &kp N0 &kp PSCRN &none &kp DEL &kp GRAVE &none &kp LEFT &kp UP &kp RIGHT &kp C_VOL_UP /**/ &kp LBKT &kp RBKT &kp MINUS &kp EQUAL &kp SEMI &kp BACKSLASH @@ -53,6 +55,7 @@ // ------------------------------------------- ----------------------------------------------- fn_layer { + display-name = "Fn Layer"; bindings = < &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 /**/ &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &none &kp F12 &kp CAPS &none &kp HOME &kp PG_UP &kp END &none /**/ &none &none &none &none &none &none diff --git a/app/boards/shields/elephant42/boards/nice_nano.overlay b/app/boards/shields/helix/boards/nice_nano_nrf52840_zmk.overlay similarity index 100% rename from app/boards/shields/elephant42/boards/nice_nano.overlay rename to app/boards/shields/helix/boards/nice_nano_nrf52840_zmk.overlay diff --git a/app/boards/shields/helix/helix.conf b/app/boards/shields/helix/helix.conf index a8e57338..d8cb2f2e 100644 --- a/app/boards/shields/helix/helix.conf +++ b/app/boards/shields/helix/helix.conf @@ -3,4 +3,3 @@ # Enables RGB functionality (Uncomment lines below to enable.) # CONFIG_ZMK_RGB_UNDERGLOW=y -# CONFIG_WS2812_STRIP=y \ No newline at end of file diff --git a/app/boards/shields/helix/helix.keymap b/app/boards/shields/helix/helix.keymap index 80678fe6..867ebc67 100644 --- a/app/boards/shields/helix/helix.keymap +++ b/app/boards/shields/helix/helix.keymap @@ -25,6 +25,7 @@ As such, those are in use within the default layer at this time.*/ compatible = "zmk,keymap"; default_layer { + display-name = "Default Layer"; // --------------------------------------------------------------------------------------------------------------------------------- // | GRAVE | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | DEL | // | TAB | Q | W | E | R | T | | Y | U | I | O | P | BSPC | @@ -40,6 +41,7 @@ As such, those are in use within the default layer at this time.*/ >; }; lower_layer { + display-name = "Lower Layer"; // --------------------------------------------------------------------------------------------------------------------------------- // | | | | | | | | | | | | | | // | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | @@ -55,6 +57,7 @@ As such, those are in use within the default layer at this time.*/ >; }; raise_layer { + display-name = "Raise Layer"; // --------------------------------------------------------------------------------------------------------------------------------- // | | | | | | | | | | | | | | // | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | DEL | @@ -70,6 +73,7 @@ As such, those are in use within the default layer at this time.*/ >; }; adjust_layer { + display-name = "Adjust Layer"; // --------------------------------------------------------------------------------------------------------------------------------- // | ` | ! | @ | # | $ | % | | ^ | & | * | ( | ) | EP TOG | // | BT CLR | BT SEL0 | BT SEL1 | BT SEL2 | BGT SEL3 | BT SEL4 | | RGB EFF+ | RGB HUE+ | RGB SAT+ | RGB SPD+ | RGB BRI+ | RGB TOG | @@ -85,4 +89,4 @@ As such, those are in use within the default layer at this time.*/ >; }; }; -}; \ No newline at end of file +}; diff --git a/app/boards/shields/hummingbird/hummingbird-layouts.dtsi b/app/boards/shields/hummingbird/hummingbird-layouts.dtsi new file mode 100644 index 00000000..bfae8224 --- /dev/null +++ b/app/boards/shields/hummingbird/hummingbird-layouts.dtsi @@ -0,0 +1,41 @@ +#include + +/ { + physical_layout0: physical_layout_0 { + compatible = "zmk,physical-layout"; + display-name = "Default"; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 75 0 0 0> + , <&key_physical_attrs 100 100 100 25 0 0 0> + , <&key_physical_attrs 100 100 200 0 0 0 0> + , <&key_physical_attrs 100 100 300 25 0 0 0> + , <&key_physical_attrs 100 100 400 75 0 0 0> + , <&key_physical_attrs 100 100 600 75 0 0 0> + , <&key_physical_attrs 100 100 700 25 0 0 0> + , <&key_physical_attrs 100 100 800 0 0 0 0> + , <&key_physical_attrs 100 100 900 25 0 0 0> + , <&key_physical_attrs 100 100 1000 75 0 0 0> + , <&key_physical_attrs 100 100 0 175 0 0 0> + , <&key_physical_attrs 100 100 100 125 0 0 0> + , <&key_physical_attrs 100 100 200 100 0 0 0> + , <&key_physical_attrs 100 100 300 125 0 0 0> + , <&key_physical_attrs 100 100 400 175 0 0 0> + , <&key_physical_attrs 100 100 600 175 0 0 0> + , <&key_physical_attrs 100 100 700 125 0 0 0> + , <&key_physical_attrs 100 100 800 100 0 0 0> + , <&key_physical_attrs 100 100 900 125 0 0 0> + , <&key_physical_attrs 100 100 1000 175 0 0 0> + , <&key_physical_attrs 100 100 100 225 0 0 0> + , <&key_physical_attrs 100 100 200 200 0 0 0> + , <&key_physical_attrs 100 100 300 225 0 0 0> + , <&key_physical_attrs 100 100 700 225 0 0 0> + , <&key_physical_attrs 100 100 800 200 0 0 0> + , <&key_physical_attrs 100 100 900 225 0 0 0> + , <&key_physical_attrs 100 100 325 350 0 0 0> + , <&key_physical_attrs 100 100 425 375 0 0 0> + , <&key_physical_attrs 100 100 575 375 0 0 0> + , <&key_physical_attrs 100 100 675 350 0 0 0> + ; + }; +}; \ No newline at end of file diff --git a/app/boards/shields/hummingbird/hummingbird.keymap b/app/boards/shields/hummingbird/hummingbird.keymap index 31e33254..a50e541a 100644 --- a/app/boards/shields/hummingbird/hummingbird.keymap +++ b/app/boards/shields/hummingbird/hummingbird.keymap @@ -56,6 +56,7 @@ compatible = "zmk,keymap"; default_layer { + display-name = "Default Layer"; bindings = < &kp Q &kp W &kp E &kp R &kp T &kp H &kp U &kp I &kp O &kp P &hm LGUI A &hm LALT S &hm LCTRL D &hm LSHFT F &kp G &kp N &hm RSHFT J &hm RCTRL K &hm LALT L &hm RGUI SQT diff --git a/app/boards/shields/hummingbird/hummingbird.overlay b/app/boards/shields/hummingbird/hummingbird.overlay index b077804e..2efc263b 100644 --- a/app/boards/shields/hummingbird/hummingbird.overlay +++ b/app/boards/shields/hummingbird/hummingbird.overlay @@ -5,15 +5,19 @@ */ #include +#include "hummingbird-layouts.dtsi" -#include +&physical_layout0 { + transform = <&matrix_transform0>; +}; / { chosen { zmk,kscan = &kscan0; + zmk,physical-layout = &physical_layout0; }; - default_transform: keymap_transform_0 { + matrix_transform0: keymap_transform_0 { compatible = "zmk,matrix-transform"; columns = <7>; rows = <6>; @@ -49,46 +53,4 @@ , <&xiao_d 5 GPIO_ACTIVE_HIGH> ; }; - - - layout_0: layout_0 { - compatible = "zmk,physical-layout"; - display-name = "Default"; - - transform = <&default_transform>; - - keys // w h x y rot rx ry - = <&key_physical_attrs 100 100 0 75 0 0 0> - , <&key_physical_attrs 100 100 100 25 0 0 0> - , <&key_physical_attrs 100 100 200 0 0 0 0> - , <&key_physical_attrs 100 100 300 25 0 0 0> - , <&key_physical_attrs 100 100 400 75 0 0 0> - , <&key_physical_attrs 100 100 600 75 0 0 0> - , <&key_physical_attrs 100 100 700 25 0 0 0> - , <&key_physical_attrs 100 100 800 0 0 0 0> - , <&key_physical_attrs 100 100 900 25 0 0 0> - , <&key_physical_attrs 100 100 1000 75 0 0 0> - , <&key_physical_attrs 100 100 0 175 0 0 0> - , <&key_physical_attrs 100 100 100 125 0 0 0> - , <&key_physical_attrs 100 100 200 100 0 0 0> - , <&key_physical_attrs 100 100 300 125 0 0 0> - , <&key_physical_attrs 100 100 400 175 0 0 0> - , <&key_physical_attrs 100 100 600 175 0 0 0> - , <&key_physical_attrs 100 100 700 125 0 0 0> - , <&key_physical_attrs 100 100 800 100 0 0 0> - , <&key_physical_attrs 100 100 900 125 0 0 0> - , <&key_physical_attrs 100 100 1000 175 0 0 0> - , <&key_physical_attrs 100 100 100 225 0 0 0> - , <&key_physical_attrs 100 100 200 200 0 0 0> - , <&key_physical_attrs 100 100 300 225 0 0 0> - , <&key_physical_attrs 100 100 700 225 0 0 0> - , <&key_physical_attrs 100 100 800 200 0 0 0> - , <&key_physical_attrs 100 100 900 225 0 0 0> - , <&key_physical_attrs 100 100 325 350 0 0 0> - , <&key_physical_attrs 100 100 425 375 0 0 0> - , <&key_physical_attrs 100 100 575 375 0 0 0> - , <&key_physical_attrs 100 100 675 350 0 0 0> - ; - }; - }; diff --git a/app/boards/shields/hummingbird/hummingbird.zmk.yml b/app/boards/shields/hummingbird/hummingbird.zmk.yml index ee3a8bc8..e9508a85 100644 --- a/app/boards/shields/hummingbird/hummingbird.zmk.yml +++ b/app/boards/shields/hummingbird/hummingbird.zmk.yml @@ -6,3 +6,4 @@ url: https://github.com/PJE66/hummingbird requires: [seeed_xiao] features: - keys + - studio diff --git a/app/boards/shields/iris/iris.keymap b/app/boards/shields/iris/iris.keymap index 1846509f..affe1cc6 100644 --- a/app/boards/shields/iris/iris.keymap +++ b/app/boards/shields/iris/iris.keymap @@ -13,6 +13,7 @@ compatible = "zmk,keymap"; default_layer { + display-name = "Default Layer"; // ------------------------------------------------------------------------------------------------------------ // | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ` | // | TAB | Q | W | E | R | T | | Y | U | I | O | P | - | @@ -29,6 +30,7 @@ }; lower_layer { + display-name = "Lower Layer"; // ------------------------------------------------------------------------------------------------------------ // | BTCLR | BT1 | BT2 | BT3 | BT4 | BT5 | | | | | | | | // | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | @@ -45,6 +47,7 @@ }; raise_layer { + display-name = "Raise Layer"; // ------------------------------------------------------------------------------------------------------------ // | | | | | | | | | | | | | | // | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | diff --git a/app/boards/shields/jian/jian.dtsi b/app/boards/shields/jian/jian.dtsi index 439bf93c..4045b6b3 100644 --- a/app/boards/shields/jian/jian.dtsi +++ b/app/boards/shields/jian/jian.dtsi @@ -6,10 +6,26 @@ #include +#include +#include +#include + +&kgoh_jian_full_layout { + transform = <&default_transform>; +}; + +&kgoh_jian_6col_layout { + transform = <&crkbd_transform>; +}; + +&kgoh_jian_5col_layout { + transform = <&five_column_transform>; +}; + / { chosen { zmk,kscan = &kscan0; - zmk,matrix-transform = &default_transform; + zmk,physical-layout = &kgoh_jian_full_layout; }; default_transform: keymap_transform_0 { @@ -56,7 +72,7 @@ RC(0,1) RC(1,2) RC(0,2) RC(0,3) RC(0,4) RC(0,7) RC(0,8) RC(0,9) RC(1,9) RC(0,10) RC(1,1) RC(2,2) RC(1,3) RC(1,4) RC(0,5) RC(0,6) RC(1,7) RC(1,8) RC(2,9) RC(1,10) RC(3,2) RC(3,3) RC(2,3) RC(2,4) RC(1,5) RC(1,6) RC(2,7) RC(2,8) RC(3,8) RC(3,9) - RC(3,4) RC(2,5) RC(3,5) RC(3,6) RC(2,6) RC(3,7) + RC(3,4) RC(2,5) RC(3,5) RC(3,6) RC(2,6) RC(3,7) >; }; diff --git a/app/boards/shields/jian/jian.keymap b/app/boards/shields/jian/jian.keymap index b0235bd7..72d4bde8 100644 --- a/app/boards/shields/jian/jian.keymap +++ b/app/boards/shields/jian/jian.keymap @@ -7,6 +7,7 @@ #include #include #include +#include #define DEF 0 #define LWR 1 @@ -17,60 +18,72 @@ &mt { quick-tap-ms = <200>; }; / { + conditional_layers { + compatible = "zmk,conditional-layers"; + tri_layer { + if-layers = ; + then-layer = ; + }; + }; + keymap { compatible = "zmk,keymap"; default_layer { + display-name = "MAIN"; // ----------------------------------------------------------------------------------------- // | GUI | ~ | Q | W | E | R | T | | Y | U | I | O | P | [ | GUI/] | // | CTRL | A | S | D | F | G | | H | J | K | L | ; |CTRL/'| -// | LALT | Z | X | C | V | B | | N | M | , | . | / | RALT | +// | LALT | Z | X | C | V | B | | N | M | , | . | / |RALT/\| // | RSE | SPC | LWR | | LWR | BSPC | RSE | bindings = < &kp LWIN &kp GRAVE &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &mt RWIN RBKT &kp LCTRL &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &mt RCTRL SQT &kp LALT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &mt RALT BSLH - < RSE TAB &mt LSHFT SPACE < LWR RET < LWR ESC &mt RSHFT BSPC < RSE DEL + < RSE TAB &mt LSHFT SPACE < LWR RET < LWR ESC &mt RSHFT BSPC < RSE DEL >; }; lower_layer { + display-name = "SYM"; // ----------------------------------------------------------------------------------------- // | | _ | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | F12 | // | + | ! | @ | # | $ | % | | ^ | & | * | ( | ) | - | // | = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | -// | GUI | | SPC | | ENT | | ALT | +// | ADJ | | | | | | ADJ | bindings = < &trans &kp UNDER &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &mt RGUI F12 &mt LCTRL PLUS &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp STAR &kp LPAR &kp RPAR &mt RCTRL MINUS &mt LALT EQUAL &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &trans - < ADJ TAB &trans &trans &trans &trans < ADJ DEL + &trans &trans &trans &trans &trans &trans >; }; raise_layer { + display-name = "NUM"; // ----------------------------------------------------------------------------------------- // | | NMLK | / | 7 | 8 | 9 | - | | VOLU| HOME| PRSC| PGUP| SCLK| CLCK| | -// | CTRL | * | 4 | 5 | 6 | + | | MUT | LEFT| UP | RGHT| INS | APP | +// |CTRL/=| * | 4 | 5 | 6 | + | | MUT | LEFT| UP | RGHT| INS | APP | // | | 0 | 1 | 2 | 3 | . | | VOLD| END | DOWN| PGDN| PAUS| | // | | | ADJ | | ADJ | | | bindings = < &trans &kp KP_NUM &kp KP_SLASH &kp KP_N7 &kp KP_N8 &kp KP_N9 &kp KP_MINUS &kp C_VOL_UP &kp HOME &kp PSCRN &kp PG_UP &kp SLCK &kp CAPS &trans &mt LCTRL EQUAL &kp KP_MULTIPLY &kp KP_N4 &kp KP_N5 &kp KP_N6 &kp KP_PLUS &kp C_MUTE &kp LEFT &kp UP &kp RIGHT &kp INS &mt RCTRL K_APP &trans &kp KP_N0 &kp KP_N1 &kp KP_N2 &kp KP_N3 &kp KP_DOT &kp C_VOL_DN &kp END &kp DOWN &kp PG_DN &kp PAUSE_BREAK &trans - &trans &trans < ADJ RET < ADJ ESC &trans &trans + &trans &trans &trans &trans &trans &trans >; }; adjust_layer { + display-name = "ADJ"; // ----------------------------------------------------------------------------------------- -// | RST | BLDR | | | | | | | | | | | | BLDR | RST | +// | RST | BLDR | STU | | | | | | | | | | STU | BLDR | RST | // | BTCLR| BT0 | BT1 | BT2 | BT3 | BT4 | | BT4 | BT3 | BT2 | BT1 | BT0 | BTCLR| -// | | | | | | | | | | | | | | +// | OUT | | | | | | | | | | | | OUT | // | | | | | | | | bindings = < - &sys_reset &bootloader &none &none &none &none &none &none &none &none &none &none &bootloader &sys_reset - &bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &bt BT_SEL 4 &bt BT_SEL 3 &bt BT_SEL 2 &bt BT_SEL 1 &bt BT_SEL 0 &bt BT_CLR - &none &none &none &none &none &none &none &none &none &none &none &none - &trans &none &trans &trans &none &trans + &sys_reset &bootloader &studio_unlock &none &none &none &none &none &none &none &none &studio_unlock &bootloader &sys_reset + &bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &bt BT_SEL 4 &bt BT_SEL 3 &bt BT_SEL 2 &bt BT_SEL 1 &bt BT_SEL 0 &bt BT_CLR + &out OUT_TOG &none &none &none &none &none &none &none &none &none &none &out OUT_TOG + &trans &none &trans &trans &none &trans >; }; }; diff --git a/app/boards/shields/jian/jian.zmk.yml b/app/boards/shields/jian/jian.zmk.yml index 84ed69d7..094f49d7 100644 --- a/app/boards/shields/jian/jian.zmk.yml +++ b/app/boards/shields/jian/jian.zmk.yml @@ -6,6 +6,7 @@ url: https://github.com/KGOH/Jian-Info requires: [pro_micro] features: - keys + - studio siblings: - jian_left - jian_right diff --git a/app/boards/shields/jiran/jiran-layouts.dtsi b/app/boards/shields/jiran/jiran-layouts.dtsi new file mode 100644 index 00000000..b56c7725 --- /dev/null +++ b/app/boards/shields/jiran/jiran-layouts.dtsi @@ -0,0 +1,103 @@ +#include +#include +#include + +&layouts_kgoh_jian_position_map { + ladniy_jiran_full_posmap: full_jiran { + physical-layout = <&ladniy_jiran_full_layout>; + positions + = < 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 >; + }; +}; + +&kgoh_jian_full_posmap { + positions + = < 44 45 46 47 48 49 50 51 52 53 54 55 > + , < 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 >; +}; + +&kgoh_jian_6col_posmap { + positions + = < 42 43 44 45 46 47 48 49 50 51 52 53 > + , <54 0 1 2 3 4 5 6 7 8 9 10 11 55> + , < 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 >; +}; + +&kgoh_jian_full_layout { + display-name = "Jian (with pinky)"; +}; + +/ { + ladniy_jiran_full_layout: ladniy_jiran_full_layout { + compatible = "zmk,physical-layout"; + display-name = "Full (with pinky/numbers)"; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 100 75 0 0 0> + , <&key_physical_attrs 100 100 200 62 0 0 0> + , <&key_physical_attrs 100 100 300 25 0 0 0> + , <&key_physical_attrs 100 100 400 0 0 0 0> + , <&key_physical_attrs 100 100 500 25 0 0 0> + , <&key_physical_attrs 100 100 600 37 0 0 0> + , <&key_physical_attrs 100 100 1000 37 0 0 0> + , <&key_physical_attrs 100 100 1100 25 0 0 0> + , <&key_physical_attrs 100 100 1200 0 0 0 0> + , <&key_physical_attrs 100 100 1300 25 0 0 0> + , <&key_physical_attrs 100 100 1400 62 0 0 0> + , <&key_physical_attrs 100 100 1500 75 0 0 0> + , <&key_physical_attrs 100 100 0 250 0 0 0> + , <&key_physical_attrs 100 100 100 175 0 0 0> + , <&key_physical_attrs 100 100 200 162 0 0 0> + , <&key_physical_attrs 100 100 300 125 0 0 0> + , <&key_physical_attrs 100 100 400 100 0 0 0> + , <&key_physical_attrs 100 100 500 125 0 0 0> + , <&key_physical_attrs 100 100 600 137 0 0 0> + , <&key_physical_attrs 100 100 1000 137 0 0 0> + , <&key_physical_attrs 100 100 1100 125 0 0 0> + , <&key_physical_attrs 100 100 1200 100 0 0 0> + , <&key_physical_attrs 100 100 1300 125 0 0 0> + , <&key_physical_attrs 100 100 1400 162 0 0 0> + , <&key_physical_attrs 100 100 1500 175 0 0 0> + , <&key_physical_attrs 100 100 1600 250 0 0 0> + , <&key_physical_attrs 100 100 100 275 0 0 0> + , <&key_physical_attrs 100 100 200 262 0 0 0> + , <&key_physical_attrs 100 100 300 225 0 0 0> + , <&key_physical_attrs 100 100 400 200 0 0 0> + , <&key_physical_attrs 100 100 500 225 0 0 0> + , <&key_physical_attrs 100 100 600 237 0 0 0> + , <&key_physical_attrs 100 100 1000 237 0 0 0> + , <&key_physical_attrs 100 100 1100 225 0 0 0> + , <&key_physical_attrs 100 100 1200 200 0 0 0> + , <&key_physical_attrs 100 100 1300 225 0 0 0> + , <&key_physical_attrs 100 100 1400 262 0 0 0> + , <&key_physical_attrs 100 100 1500 275 0 0 0> + , <&key_physical_attrs 100 100 100 375 0 0 0> + , <&key_physical_attrs 100 100 200 362 0 0 0> + , <&key_physical_attrs 100 100 300 325 0 0 0> + , <&key_physical_attrs 100 100 400 300 0 0 0> + , <&key_physical_attrs 100 100 500 325 0 0 0> + , <&key_physical_attrs 100 100 600 337 0 0 0> + , <&key_physical_attrs 100 100 1000 337 0 0 0> + , <&key_physical_attrs 100 100 1100 325 0 0 0> + , <&key_physical_attrs 100 100 1200 300 0 0 0> + , <&key_physical_attrs 100 100 1300 325 0 0 0> + , <&key_physical_attrs 100 100 1400 362 0 0 0> + , <&key_physical_attrs 100 100 1500 375 0 0 0> + , <&key_physical_attrs 100 100 500 425 0 0 0> + , <&key_physical_attrs 100 100 600 437 0 0 0> + , <&key_physical_attrs 100 100 700 450 0 0 0> + , <&key_physical_attrs 100 100 900 450 0 0 0> + , <&key_physical_attrs 100 100 1000 437 0 0 0> + , <&key_physical_attrs 100 100 1100 425 0 0 0> + ; + }; +}; diff --git a/app/boards/shields/jiran/jiran.dtsi b/app/boards/shields/jiran/jiran.dtsi index 517cbe5f..0e0bd0a4 100644 --- a/app/boards/shields/jiran/jiran.dtsi +++ b/app/boards/shields/jiran/jiran.dtsi @@ -6,13 +6,27 @@ #include +#include "jiran-layouts.dtsi" + +&ladniy_jiran_full_layout { + transform = <&jiran_transform>; +}; + +&kgoh_jian_full_layout { + transform = <&jian_transform>; +}; + +&kgoh_jian_6col_layout { + transform = <&crkbd_transform>; +}; + / { chosen { zmk,kscan = &kscan0; - zmk,matrix-transform = &default_transform; + zmk,physical-layout = &ladniy_jiran_full_layout; }; - default_transform: keymap_transform_0 { + jiran_transform: keymap_transform_0 { compatible = "zmk,matrix-transform"; columns = <12>; rows = <5>; diff --git a/app/boards/shields/jiran/jiran.keymap b/app/boards/shields/jiran/jiran.keymap index 6dcd733c..55494d36 100644 --- a/app/boards/shields/jiran/jiran.keymap +++ b/app/boards/shields/jiran/jiran.keymap @@ -13,6 +13,7 @@ compatible = "zmk,keymap"; default_layer { + display-name = "Default Layer"; bindings = < &kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp LGUI &kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &mt RGUI RBKT @@ -23,13 +24,14 @@ }; lower_layer { + display-name = "Lower Layer"; bindings = < &kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp EQUAL - &kp F11 &kp TAB &bt BT_CLR &kp HOME &sys_reset &kp PG_UP &kp C_VOL_UP &kp C_VOL_UP &kp PG_UP &sys_reset &kp HOME &kp INS &kp DEL &kp F12 + &kp F11 &kp TAB &bt BT_CLR &kp HOME &sys_reset &kp PG_UP &kp C_VOL_UP &kp C_VOL_UP &kp PG_UP &studio_unlock &kp HOME &kp INS &kp DEL &kp F12 &kp LSHIFT &bt BT_NXT &kp LEFT &kp UP &kp RIGHT &kp C_MUTE &kp C_MUTE &kp LEFT &kp UP &kp RIGHT &kp PSCRN &mt RSHIFT SLCK &kp LCTRL &bt BT_PRV &kp END &kp DOWN &kp PG_DN &kp C_VOL_DN &kp C_VOL_DN &kp PG_DN &kp DOWN &kp END &kp PAUSE_BREAK &mt RCTRL KP_NUM &trans &kp SPACE &kp LALT &mt RALT RET &kp BSPC &trans >; }; }; -}; \ No newline at end of file +}; diff --git a/app/boards/shields/jiran/jiran.zmk.yml b/app/boards/shields/jiran/jiran.zmk.yml index 1e21df7c..928042dd 100644 --- a/app/boards/shields/jiran/jiran.zmk.yml +++ b/app/boards/shields/jiran/jiran.zmk.yml @@ -6,6 +6,7 @@ url: https://github.com/Ladniy/jiran requires: [pro_micro] features: - keys + - studio siblings: - jiran_left - jiran_right diff --git a/app/boards/shields/jiran/jiran_right.overlay b/app/boards/shields/jiran/jiran_right.overlay index 668c5513..d2c06723 100644 --- a/app/boards/shields/jiran/jiran_right.overlay +++ b/app/boards/shields/jiran/jiran_right.overlay @@ -6,7 +6,7 @@ #include "jiran.dtsi" -&default_transform { +&jiran_transform { col-offset = <6>; }; diff --git a/app/boards/shields/elephant42/boards/nice_nano_v2.overlay b/app/boards/shields/jorne/boards/nice_nano_nrf52840_zmk.overlay similarity index 100% rename from app/boards/shields/elephant42/boards/nice_nano_v2.overlay rename to app/boards/shields/jorne/boards/nice_nano_nrf52840_zmk.overlay diff --git a/app/boards/shields/jorne/jorne-layouts.dtsi b/app/boards/shields/jorne/jorne-layouts.dtsi new file mode 100644 index 00000000..0a525897 --- /dev/null +++ b/app/boards/shields/jorne/jorne-layouts.dtsi @@ -0,0 +1,84 @@ +#include +#include +#include + +&layouts_foostan_corne_position_map { + joric_jorne_full_posmap: full { + physical-layout = <&joric_jorne_full_layout>; + positions + = < 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 >; + }; +}; + +&foostan_corne_6col_posmap { + positions + = <42 0 1 2 3 4 5 6 7 8 9 10 11 43> + , < 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 >; +}; + +&foostan_corne_5col_posmap { + positions + = <36 37 0 1 2 3 4 5 6 7 8 9 38 39> + , < 40 10 11 12 13 14 15 16 17 18 19 41 > + , < 42 20 21 22 23 24 25 26 27 28 29 43 > + , < 30 31 32 33 34 35 >; +}; + +/ { + joric_jorne_full_layout: joric_jorne_full_layout { + compatible = "zmk,physical-layout"; + display-name = "Full (with pinky)"; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 112 0 0 0> + , <&key_physical_attrs 100 100 100 37 0 0 0> + , <&key_physical_attrs 100 100 200 37 0 0 0> + , <&key_physical_attrs 100 100 300 12 0 0 0> + , <&key_physical_attrs 100 100 400 0 0 0 0> + , <&key_physical_attrs 100 100 500 12 0 0 0> + , <&key_physical_attrs 100 100 600 24 0 0 0> + , <&key_physical_attrs 100 100 900 24 0 0 0> + , <&key_physical_attrs 100 100 1000 12 0 0 0> + , <&key_physical_attrs 100 100 1100 0 0 0 0> + , <&key_physical_attrs 100 100 1200 12 0 0 0> + , <&key_physical_attrs 100 100 1300 37 0 0 0> + , <&key_physical_attrs 100 100 1400 37 0 0 0> + , <&key_physical_attrs 100 100 1500 112 0 0 0> + , <&key_physical_attrs 100 100 100 137 0 0 0> + , <&key_physical_attrs 100 100 200 137 0 0 0> + , <&key_physical_attrs 100 100 300 112 0 0 0> + , <&key_physical_attrs 100 100 400 100 0 0 0> + , <&key_physical_attrs 100 100 500 112 0 0 0> + , <&key_physical_attrs 100 100 600 124 0 0 0> + , <&key_physical_attrs 100 100 900 124 0 0 0> + , <&key_physical_attrs 100 100 1000 112 0 0 0> + , <&key_physical_attrs 100 100 1100 100 0 0 0> + , <&key_physical_attrs 100 100 1200 112 0 0 0> + , <&key_physical_attrs 100 100 1300 137 0 0 0> + , <&key_physical_attrs 100 100 1400 137 0 0 0> + , <&key_physical_attrs 100 100 100 237 0 0 0> + , <&key_physical_attrs 100 100 200 237 0 0 0> + , <&key_physical_attrs 100 100 300 212 0 0 0> + , <&key_physical_attrs 100 100 400 200 0 0 0> + , <&key_physical_attrs 100 100 500 212 0 0 0> + , <&key_physical_attrs 100 100 600 224 0 0 0> + , <&key_physical_attrs 100 100 900 224 0 0 0> + , <&key_physical_attrs 100 100 1000 212 0 0 0> + , <&key_physical_attrs 100 100 1100 200 0 0 0> + , <&key_physical_attrs 100 100 1200 212 0 0 0> + , <&key_physical_attrs 100 100 1300 237 0 0 0> + , <&key_physical_attrs 100 100 1400 237 0 0 0> + , <&key_physical_attrs 100 100 450 312 0 0 0> + , <&key_physical_attrs 100 100 550 312 1200 550 412> + , <&key_physical_attrs 100 150 648 283 2400 648 433> + , <&key_physical_attrs 100 150 852 283 (-2400) 952 433> + , <&key_physical_attrs 100 100 950 312 (-1200) 1050 412> + , <&key_physical_attrs 100 100 1050 312 0 0 0> + ; + }; +}; diff --git a/app/boards/shields/jorne/jorne.conf b/app/boards/shields/jorne/jorne.conf index c4e62fc0..c94389a2 100644 --- a/app/boards/shields/jorne/jorne.conf +++ b/app/boards/shields/jorne/jorne.conf @@ -1,6 +1,5 @@ # Uncomment the following lines to enable the Jorne RGB Underglow # CONFIG_ZMK_RGB_UNDERGLOW=y -# CONFIG_WS2812_STRIP=y # Uncomment the following line to enable the Jorne OLED Display # CONFIG_ZMK_DISPLAY=y diff --git a/app/boards/shields/jorne/jorne.dtsi b/app/boards/shields/jorne/jorne.dtsi index e7b81e5f..d76c87dc 100644 --- a/app/boards/shields/jorne/jorne.dtsi +++ b/app/boards/shields/jorne/jorne.dtsi @@ -6,14 +6,28 @@ #include +#include "jorne-layouts.dtsi" + +&joric_jorne_full_layout { + transform = <&jorne_transform>; +}; + +&foostan_corne_6col_layout { + transform = <&crkbd_transform>; +}; + +&foostan_corne_5col_layout { + transform = <&five_column_transform>; +}; + / { chosen { zephyr,display = &oled; zmk,kscan = &kscan0; - zmk,matrix-transform = &default_transform; + zmk,physical-layout = &joric_jorne_full_layout; }; - default_transform: keymap_transform_0 { + jorne_transform: keymap_transform_0 { compatible = "zmk,matrix-transform"; columns = <12>; rows = <4>; @@ -57,7 +71,7 @@ RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) - RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) + RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) >; }; diff --git a/app/boards/shields/jorne/jorne.keymap b/app/boards/shields/jorne/jorne.keymap index 56ffe617..72d4bde8 100644 --- a/app/boards/shields/jorne/jorne.keymap +++ b/app/boards/shields/jorne/jorne.keymap @@ -7,67 +7,83 @@ #include #include #include +#include #define DEF 0 #define LWR 1 #define RSE 2 #define ADJ 3 +< { quick-tap-ms = <200>; }; +&mt { quick-tap-ms = <200>; }; + / { + conditional_layers { + compatible = "zmk,conditional-layers"; + tri_layer { + if-layers = ; + then-layer = ; + }; + }; + keymap { compatible = "zmk,keymap"; default_layer { + display-name = "MAIN"; // ----------------------------------------------------------------------------------------- // | GUI | ~ | Q | W | E | R | T | | Y | U | I | O | P | [ | GUI/] | // | CTRL | A | S | D | F | G | | H | J | K | L | ; |CTRL/'| -// | LALT | Z | X | C | V | B | | N | M | , | . | / | RALT | +// | LALT | Z | X | C | V | B | | N | M | , | . | / |RALT/\| // | RSE | SPC | LWR | | LWR | BSPC | RSE | bindings = < &kp LWIN &kp GRAVE &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &mt RWIN RBKT &kp LCTRL &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &mt RCTRL SQT - &kp LALT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp BSLH - < RSE TAB &mt LSHFT SPACE < LWR RET < LWR ESC &mt RSHFT BSPC < RSE DEL + &kp LALT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &mt RALT BSLH + < RSE TAB &mt LSHFT SPACE < LWR RET < LWR ESC &mt RSHFT BSPC < RSE DEL >; }; lower_layer { + display-name = "SYM"; // ----------------------------------------------------------------------------------------- // | | _ | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | F12 | // | + | ! | @ | # | $ | % | | ^ | & | * | ( | ) | - | // | = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | -// | GUI | | SPC | | ENT | | ALT | +// | ADJ | | | | | | ADJ | bindings = < &trans &kp UNDER &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &mt RGUI F12 &mt LCTRL PLUS &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp STAR &kp LPAR &kp RPAR &mt RCTRL MINUS &mt LALT EQUAL &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &trans - < ADJ TAB &trans &trans &trans &trans < ADJ DEL + &trans &trans &trans &trans &trans &trans >; }; raise_layer { + display-name = "NUM"; // ----------------------------------------------------------------------------------------- // | | NMLK | / | 7 | 8 | 9 | - | | VOLU| HOME| PRSC| PGUP| SCLK| CLCK| | -// | CTRL | * | 4 | 5 | 6 | + | | MUT | LEFT| UP | RGHT| INS | APP | +// |CTRL/=| * | 4 | 5 | 6 | + | | MUT | LEFT| UP | RGHT| INS | APP | // | | 0 | 1 | 2 | 3 | . | | VOLD| END | DOWN| PGDN| PAUS| | // | | | ADJ | | ADJ | | | bindings = < &trans &kp KP_NUM &kp KP_SLASH &kp KP_N7 &kp KP_N8 &kp KP_N9 &kp KP_MINUS &kp C_VOL_UP &kp HOME &kp PSCRN &kp PG_UP &kp SLCK &kp CAPS &trans &mt LCTRL EQUAL &kp KP_MULTIPLY &kp KP_N4 &kp KP_N5 &kp KP_N6 &kp KP_PLUS &kp C_MUTE &kp LEFT &kp UP &kp RIGHT &kp INS &mt RCTRL K_APP &trans &kp KP_N0 &kp KP_N1 &kp KP_N2 &kp KP_N3 &kp KP_DOT &kp C_VOL_DN &kp END &kp DOWN &kp PG_DN &kp PAUSE_BREAK &trans - &trans &trans < ADJ RET < ADJ ESC &trans &trans + &trans &trans &trans &trans &trans &trans >; }; adjust_layer { + display-name = "ADJ"; // ----------------------------------------------------------------------------------------- -// | RST | BLDR | | | | | | | | | | | | BLDR | RST | +// | RST | BLDR | STU | | | | | | | | | | STU | BLDR | RST | // | BTCLR| BT0 | BT1 | BT2 | BT3 | BT4 | | BT4 | BT3 | BT2 | BT1 | BT0 | BTCLR| -// | | | | | | | | | | | | | | +// | OUT | | | | | | | | | | | | OUT | // | | | | | | | | bindings = < - &sys_reset &bootloader &none &none &none &none &none &none &none &none &none &none &bootloader &sys_reset - &bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &bt BT_SEL 4 &bt BT_SEL 3 &bt BT_SEL 2 &bt BT_SEL 1 &bt BT_SEL 0 &bt BT_CLR - &none &none &none &none &none &none &none &none &none &none &none &none - &trans &none &trans &trans &none &trans + &sys_reset &bootloader &studio_unlock &none &none &none &none &none &none &none &none &studio_unlock &bootloader &sys_reset + &bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &bt BT_SEL 4 &bt BT_SEL 3 &bt BT_SEL 2 &bt BT_SEL 1 &bt BT_SEL 0 &bt BT_CLR + &out OUT_TOG &none &none &none &none &none &none &none &none &none &none &out OUT_TOG + &trans &none &trans &trans &none &trans >; }; }; diff --git a/app/boards/shields/jorne/jorne.zmk.yml b/app/boards/shields/jorne/jorne.zmk.yml index 16efe2ae..c2c63057 100644 --- a/app/boards/shields/jorne/jorne.zmk.yml +++ b/app/boards/shields/jorne/jorne.zmk.yml @@ -9,6 +9,7 @@ features: - keys - display - underglow + - studio siblings: - jorne_left - jorne_right diff --git a/app/boards/shields/jorne/jorne_right.overlay b/app/boards/shields/jorne/jorne_right.overlay index 604f4816..6c4b3329 100644 --- a/app/boards/shields/jorne/jorne_right.overlay +++ b/app/boards/shields/jorne/jorne_right.overlay @@ -6,7 +6,7 @@ #include "jorne.dtsi" -&default_transform { +&jorne_transform { col-offset = <6>; }; diff --git a/app/boards/shields/knob_goblin/knob_goblin.conf b/app/boards/shields/knob_goblin/knob_goblin.conf index 2eefae4d..23673a47 100644 --- a/app/boards/shields/knob_goblin/knob_goblin.conf +++ b/app/boards/shields/knob_goblin/knob_goblin.conf @@ -6,4 +6,4 @@ CONFIG_EC11=y CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y # Uncomment the following line to enable the Knob Goblin OLED Display -CONFIG_ZMK_DISPLAY=y +# CONFIG_ZMK_DISPLAY=y diff --git a/app/boards/shields/knob_goblin/knob_goblin.keymap b/app/boards/shields/knob_goblin/knob_goblin.keymap index 8e4a7e66..1879c235 100644 --- a/app/boards/shields/knob_goblin/knob_goblin.keymap +++ b/app/boards/shields/knob_goblin/knob_goblin.keymap @@ -13,6 +13,7 @@ compatible = "zmk,keymap"; default_layer { + display-name = "Default Layer"; bindings = < &trans &kp EQUAL &kp KP_SLASH &kp KP_MULTIPLY &kp KP_MINUS @@ -26,6 +27,7 @@ }; num_layer { + display-name = "Num Layer"; bindings = < &trans &bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &trans &kp HOME &trans &kp PAGE_UP &trans diff --git a/app/boards/shields/eternal_keypad/boards/nice_nano.overlay b/app/boards/shields/kyria/boards/nice_nano_nrf52840_zmk.overlay similarity index 100% rename from app/boards/shields/eternal_keypad/boards/nice_nano.overlay rename to app/boards/shields/kyria/boards/nice_nano_nrf52840_zmk.overlay diff --git a/app/boards/shields/kyria/boards/nice_nano_v2.overlay b/app/boards/shields/kyria/boards/nice_nano_v2.overlay deleted file mode 100644 index 424a617b..00000000 --- a/app/boards/shields/kyria/boards/nice_nano_v2.overlay +++ /dev/null @@ -1,46 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; -}; - -&spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; - - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; - - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; - - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; - - color-mapping = ; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; diff --git a/app/boards/shields/kyria/boards/nrfmicro_11.overlay b/app/boards/shields/kyria/boards/nrfmicro_nrf52840_flipped_zmk_1_1_0.overlay similarity index 100% rename from app/boards/shields/kyria/boards/nrfmicro_11.overlay rename to app/boards/shields/kyria/boards/nrfmicro_nrf52840_flipped_zmk_1_1_0.overlay diff --git a/app/boards/shields/kyria/boards/nrfmicro_11_flipped.overlay b/app/boards/shields/kyria/boards/nrfmicro_nrf52840_zmk_1_1_0.overlay similarity index 100% rename from app/boards/shields/kyria/boards/nrfmicro_11_flipped.overlay rename to app/boards/shields/kyria/boards/nrfmicro_nrf52840_zmk_1_1_0.overlay diff --git a/app/boards/shields/kyria/boards/nrfmicro_13.overlay b/app/boards/shields/kyria/boards/nrfmicro_nrf52840_zmk_1_3_0.overlay similarity index 100% rename from app/boards/shields/kyria/boards/nrfmicro_13.overlay rename to app/boards/shields/kyria/boards/nrfmicro_nrf52840_zmk_1_3_0.overlay diff --git a/app/boards/shields/kyria/kyria-layouts.dtsi b/app/boards/shields/kyria/kyria-layouts.dtsi new file mode 100644 index 00000000..4c0c37e7 --- /dev/null +++ b/app/boards/shields/kyria/kyria-layouts.dtsi @@ -0,0 +1,137 @@ +#include + +/ { + splitkb_kyria_6col_layout: splitkb_kyria_6col_layout { + compatible = "zmk,physical-layout"; + display-name = "6 Column"; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 75 0 0 0> + , <&key_physical_attrs 100 100 100 75 0 0 0> + , <&key_physical_attrs 100 100 200 25 0 0 0> + , <&key_physical_attrs 100 100 300 0 0 0 0> + , <&key_physical_attrs 100 100 400 25 0 0 0> + , <&key_physical_attrs 100 100 500 37 0 0 0> + , <&key_physical_attrs 100 100 1100 37 0 0 0> + , <&key_physical_attrs 100 100 1200 25 0 0 0> + , <&key_physical_attrs 100 100 1300 0 0 0 0> + , <&key_physical_attrs 100 100 1400 25 0 0 0> + , <&key_physical_attrs 100 100 1500 75 0 0 0> + , <&key_physical_attrs 100 100 1600 75 0 0 0> + , <&key_physical_attrs 100 100 0 175 0 0 0> + , <&key_physical_attrs 100 100 100 175 0 0 0> + , <&key_physical_attrs 100 100 200 125 0 0 0> + , <&key_physical_attrs 100 100 300 100 0 0 0> + , <&key_physical_attrs 100 100 400 125 0 0 0> + , <&key_physical_attrs 100 100 500 137 0 0 0> + , <&key_physical_attrs 100 100 1100 137 0 0 0> + , <&key_physical_attrs 100 100 1200 125 0 0 0> + , <&key_physical_attrs 100 100 1300 100 0 0 0> + , <&key_physical_attrs 100 100 1400 125 0 0 0> + , <&key_physical_attrs 100 100 1500 175 0 0 0> + , <&key_physical_attrs 100 100 1600 175 0 0 0> + , <&key_physical_attrs 100 100 0 275 0 0 0> + , <&key_physical_attrs 100 100 100 275 0 0 0> + , <&key_physical_attrs 100 100 200 225 0 0 0> + , <&key_physical_attrs 100 100 300 200 0 0 0> + , <&key_physical_attrs 100 100 400 225 0 0 0> + , <&key_physical_attrs 100 100 500 237 0 0 0> + , <&key_physical_attrs 100 100 350 225 3000 400 792> + , <&key_physical_attrs 100 100 350 225 4500 400 792> + , <&key_physical_attrs 100 100 1250 225 (-4500) 1300 792> + , <&key_physical_attrs 100 100 1250 225 (-3000) 1300 792> + , <&key_physical_attrs 100 100 1100 237 0 0 0> + , <&key_physical_attrs 100 100 1200 225 0 0 0> + , <&key_physical_attrs 100 100 1300 200 0 0 0> + , <&key_physical_attrs 100 100 1400 225 0 0 0> + , <&key_physical_attrs 100 100 1500 275 0 0 0> + , <&key_physical_attrs 100 100 1600 275 0 0 0> + , <&key_physical_attrs 100 100 250 325 0 0 0> + , <&key_physical_attrs 100 100 350 325 0 0 0> + , <&key_physical_attrs 100 100 350 325 1500 400 792> + , <&key_physical_attrs 100 100 350 325 3000 400 792> + , <&key_physical_attrs 100 100 350 325 4500 400 792> + , <&key_physical_attrs 100 100 1250 325 (-4500) 1300 792> + , <&key_physical_attrs 100 100 1250 325 (-3000) 1300 792> + , <&key_physical_attrs 100 100 1250 325 (-1500) 1300 792> + , <&key_physical_attrs 100 100 1250 325 0 0 0> + , <&key_physical_attrs 100 100 1350 325 0 0 0> + ; + }; + + splitkb_kyria_5col_layout: splitkb_kyria_5col_layout { + compatible = "zmk,physical-layout"; + display-name = "5 Column"; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 75 0 0 0> + , <&key_physical_attrs 100 100 100 25 0 0 0> + , <&key_physical_attrs 100 100 200 0 0 0 0> + , <&key_physical_attrs 100 100 300 25 0 0 0> + , <&key_physical_attrs 100 100 400 37 0 0 0> + , <&key_physical_attrs 100 100 1000 37 0 0 0> + , <&key_physical_attrs 100 100 1100 25 0 0 0> + , <&key_physical_attrs 100 100 1200 0 0 0 0> + , <&key_physical_attrs 100 100 1300 25 0 0 0> + , <&key_physical_attrs 100 100 1400 75 0 0 0> + , <&key_physical_attrs 100 100 0 175 0 0 0> + , <&key_physical_attrs 100 100 100 125 0 0 0> + , <&key_physical_attrs 100 100 200 100 0 0 0> + , <&key_physical_attrs 100 100 300 125 0 0 0> + , <&key_physical_attrs 100 100 400 137 0 0 0> + , <&key_physical_attrs 100 100 1000 137 0 0 0> + , <&key_physical_attrs 100 100 1100 125 0 0 0> + , <&key_physical_attrs 100 100 1200 100 0 0 0> + , <&key_physical_attrs 100 100 1300 125 0 0 0> + , <&key_physical_attrs 100 100 1400 175 0 0 0> + , <&key_physical_attrs 100 100 0 275 0 0 0> + , <&key_physical_attrs 100 100 100 225 0 0 0> + , <&key_physical_attrs 100 100 200 200 0 0 0> + , <&key_physical_attrs 100 100 300 225 0 0 0> + , <&key_physical_attrs 100 100 400 237 0 0 0> + , <&key_physical_attrs 100 100 250 225 3000 300 792> + , <&key_physical_attrs 100 100 250 225 4500 300 792> + , <&key_physical_attrs 100 100 1150 225 (-4500) 1200 792> + , <&key_physical_attrs 100 100 1150 225 (-3000) 1200 792> + , <&key_physical_attrs 100 100 1000 237 0 0 0> + , <&key_physical_attrs 100 100 1100 225 0 0 0> + , <&key_physical_attrs 100 100 1200 200 0 0 0> + , <&key_physical_attrs 100 100 1300 225 0 0 0> + , <&key_physical_attrs 100 100 1400 275 0 0 0> + , <&key_physical_attrs 100 100 150 325 0 0 0> + , <&key_physical_attrs 100 100 250 325 0 0 0> + , <&key_physical_attrs 100 100 250 325 1500 300 792> + , <&key_physical_attrs 100 100 250 325 3000 300 792> + , <&key_physical_attrs 100 100 250 325 4500 300 792> + , <&key_physical_attrs 100 100 1150 325 (-4500) 1200 792> + , <&key_physical_attrs 100 100 1150 325 (-3000) 1200 792> + , <&key_physical_attrs 100 100 1150 325 (-1500) 1200 792> + , <&key_physical_attrs 100 100 1150 325 0 0 0> + , <&key_physical_attrs 100 100 1250 325 0 0 0> + ; + }; + + splitkb_kyria_position_map { + compatible = "zmk,physical-layout-position-map"; + + complete; + + twelve { + physical-layout = <&splitkb_kyria_6col_layout>; + positions + = < 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 >; + }; + + ten { + physical-layout = <&splitkb_kyria_5col_layout>; + positions + = <44 0 1 2 3 4 5 6 7 8 9 47> + , <45 10 11 12 13 14 15 16 17 18 19 48> + , <46 20 21 22 23 24 25 26 27 28 29 30 31 32 33 49> + , < 34 35 36 37 38 39 40 41 42 43 >; + }; + }; +}; diff --git a/app/boards/shields/kyria/kyria.conf b/app/boards/shields/kyria/kyria.conf index 7a0b5b6c..bb2b843d 100644 --- a/app/boards/shields/kyria/kyria.conf +++ b/app/boards/shields/kyria/kyria.conf @@ -7,4 +7,3 @@ # Uncomment the following lines to enable RGB underglow # CONFIG_ZMK_RGB_UNDERGLOW=y -# CONFIG_WS2812_STRIP=y diff --git a/app/boards/shields/kyria/kyria.dtsi b/app/boards/shields/kyria/kyria.dtsi index 8934776f..72814a9e 100644 --- a/app/boards/shields/kyria/kyria.dtsi +++ b/app/boards/shields/kyria/kyria.dtsi @@ -6,11 +6,15 @@ #include "kyria_common.dtsi" -/ { - chosen { - zmk,matrix-transform = &default_transform; - }; +&splitkb_kyria_6col_layout { + transform = <&default_transform>; +}; +&splitkb_kyria_5col_layout { + transform = <&five_column_transform>; +}; + +/ { default_transform: keymap_transform_0 { compatible = "zmk,matrix-transform"; columns = <16>; diff --git a/app/boards/shields/kyria/kyria.keymap b/app/boards/shields/kyria/kyria.keymap index a11c1325..fd601b89 100644 --- a/app/boards/shields/kyria/kyria.keymap +++ b/app/boards/shields/kyria/kyria.keymap @@ -13,6 +13,7 @@ compatible = "zmk,keymap"; default_layer { + display-name = "Default Layer"; // --------------------------------------------------------------------------------------------------------------------------------- // | ESC | Q | W | E | R | T | | Y | U | I | O | P | \ | // | TAB | A | S | D | F | G | | H | J | K | L | ; | ' | @@ -28,6 +29,7 @@ sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>; }; function_layer { + display-name = "Function Layer"; // --------------------------------------------------------------------------------------------------------------------------------- // | | |BT_CLR|BTSEL0|BTSEL1|BTSEL2| | | | | | | | // | | | |BTSEL3|BTSEL4| | | | | | | | | diff --git a/app/boards/shields/kyria/kyria.zmk.yml b/app/boards/shields/kyria/kyria.zmk.yml index 95e6c3b7..ae63f5e7 100644 --- a/app/boards/shields/kyria/kyria.zmk.yml +++ b/app/boards/shields/kyria/kyria.zmk.yml @@ -10,6 +10,7 @@ features: - display - encoder - underglow + - studio siblings: - kyria_left - kyria_right diff --git a/app/boards/shields/kyria/kyria_common.dtsi b/app/boards/shields/kyria/kyria_common.dtsi index f662fa1c..f2d7b9be 100644 --- a/app/boards/shields/kyria/kyria_common.dtsi +++ b/app/boards/shields/kyria/kyria_common.dtsi @@ -6,11 +6,13 @@ #include +#include "kyria-layouts.dtsi" + / { chosen { zephyr,display = &oled; zmk,kscan = &kscan0; - zmk,matrix-transform = &default_transform; + zmk,physical-layout = &splitkb_kyria_6col_layout; }; kscan0: kscan { diff --git a/app/boards/shields/kyria/kyria_rev2.conf b/app/boards/shields/kyria/kyria_rev2.conf index 7a0b5b6c..bb2b843d 100644 --- a/app/boards/shields/kyria/kyria_rev2.conf +++ b/app/boards/shields/kyria/kyria_rev2.conf @@ -7,4 +7,3 @@ # Uncomment the following lines to enable RGB underglow # CONFIG_ZMK_RGB_UNDERGLOW=y -# CONFIG_WS2812_STRIP=y diff --git a/app/boards/shields/kyria/kyria_rev2.dtsi b/app/boards/shields/kyria/kyria_rev2.dtsi index c2586faf..c1c46bd1 100644 --- a/app/boards/shields/kyria/kyria_rev2.dtsi +++ b/app/boards/shields/kyria/kyria_rev2.dtsi @@ -6,11 +6,15 @@ #include "kyria_common.dtsi" -/ { - chosen { - zmk,matrix-transform = &default_transform; - }; +&splitkb_kyria_6col_layout { + transform = <&default_transform>; +}; +&splitkb_kyria_5col_layout { + transform = <&five_column_transform>; +}; + +/ { default_transform: keymap_transform_0 { compatible = "zmk,matrix-transform"; columns = <16>; diff --git a/app/boards/shields/kyria/kyria_rev2.keymap b/app/boards/shields/kyria/kyria_rev2.keymap index a11c1325..fd601b89 100644 --- a/app/boards/shields/kyria/kyria_rev2.keymap +++ b/app/boards/shields/kyria/kyria_rev2.keymap @@ -13,6 +13,7 @@ compatible = "zmk,keymap"; default_layer { + display-name = "Default Layer"; // --------------------------------------------------------------------------------------------------------------------------------- // | ESC | Q | W | E | R | T | | Y | U | I | O | P | \ | // | TAB | A | S | D | F | G | | H | J | K | L | ; | ' | @@ -28,6 +29,7 @@ sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>; }; function_layer { + display-name = "Function Layer"; // --------------------------------------------------------------------------------------------------------------------------------- // | | |BT_CLR|BTSEL0|BTSEL1|BTSEL2| | | | | | | | // | | | |BTSEL3|BTSEL4| | | | | | | | | diff --git a/app/boards/shields/kyria/kyria_rev3.conf b/app/boards/shields/kyria/kyria_rev3.conf index 7a0b5b6c..bb2b843d 100644 --- a/app/boards/shields/kyria/kyria_rev3.conf +++ b/app/boards/shields/kyria/kyria_rev3.conf @@ -7,4 +7,3 @@ # Uncomment the following lines to enable RGB underglow # CONFIG_ZMK_RGB_UNDERGLOW=y -# CONFIG_WS2812_STRIP=y diff --git a/app/boards/shields/kyria/kyria_rev3.dtsi b/app/boards/shields/kyria/kyria_rev3.dtsi index c8cd8df9..33395871 100644 --- a/app/boards/shields/kyria/kyria_rev3.dtsi +++ b/app/boards/shields/kyria/kyria_rev3.dtsi @@ -6,11 +6,15 @@ #include "kyria_common.dtsi" -/ { - chosen { - zmk,matrix-transform = &default_transform; - }; +&splitkb_kyria_6col_layout { + transform = <&default_transform>; +}; +&splitkb_kyria_5col_layout { + status = "disabled"; +}; + +/ { default_transform: keymap_transform_0 { compatible = "zmk,matrix-transform"; columns = <14>; diff --git a/app/boards/shields/kyria/kyria_rev3.keymap b/app/boards/shields/kyria/kyria_rev3.keymap index ac2fc044..aea8baf6 100644 --- a/app/boards/shields/kyria/kyria_rev3.keymap +++ b/app/boards/shields/kyria/kyria_rev3.keymap @@ -21,6 +21,7 @@ compatible = "zmk,keymap"; default_layer { + display-name = "Default Layer"; // --------------------------------------------------------------------------------------------------------------------------------- // | ESC | Q | W | E | R | T | | Y | U | I | O | P | \ | // | TAB | A | S | D | F | G | | H | J | K | L | ; | ' | @@ -36,6 +37,7 @@ sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>; }; function_layer { + display-name = "Function Layer"; // --------------------------------------------------------------------------------------------------------------------------------- // | | |BT_CLR|BTSEL0|BTSEL1|BTSEL2| | | | | | | | // | | | |BTSEL3|BTSEL4| | | | | | | | | diff --git a/app/boards/shields/kyria/kyria_rev3.zmk.yml b/app/boards/shields/kyria/kyria_rev3.zmk.yml index bf84c82c..9bb66e09 100644 --- a/app/boards/shields/kyria/kyria_rev3.zmk.yml +++ b/app/boards/shields/kyria/kyria_rev3.zmk.yml @@ -10,6 +10,7 @@ features: - display - encoder - underglow + - studio siblings: - kyria_rev3_left - kyria_rev3_right diff --git a/app/boards/shields/leeloo/README.md b/app/boards/shields/leeloo/README.md index 27d5e872..c9c189b0 100644 --- a/app/boards/shields/leeloo/README.md +++ b/app/boards/shields/leeloo/README.md @@ -47,29 +47,29 @@ Development Environment: [Basic Setup](https://zmk.dev/docs/development/setup) Build commands for the default keymap of Leeloo v1: ``` -west build -d build/left -p -b nice_nano_v2 -- -DSHIELD=leeloo_left -west build -d build/right -p -b nice_nano_v2 -- -DSHIELD=leeloo_right +west build -d build/left -p -b nice_nano -- -DSHIELD=leeloo_left +west build -d build/right -p -b nice_nano -- -DSHIELD=leeloo_right ``` Build commands for the default keymap of Leeloo v2: ``` -west build -d build/left_v2 -p -b nice_nano_v2 -- -DSHIELD=leeloo_rev2_left -west build -d build/right_v2 -p -b nice_nano_v2 -- -DSHIELD=leeloo_rev2_right +west build -d build/left_v2 -p -b nice_nano -- -DSHIELD=leeloo_rev2_left +west build -d build/right_v2 -p -b nice_nano -- -DSHIELD=leeloo_rev2_right ``` Build commands for your custom keymap of Leeloo v1: ``` -west build -d build/right -p -b nice_nano_v2 -- -DSHIELD=leeloo_right -DZMK_CONFIG="C:/dev/zmk/[yourName]/leeloo/config" -west build -d build/left -p -b nice_nano_v2 -- -DSHIELD=leeloo_left -DZMK_CONFIG="C:/dev/zmk/[yourName]/leeloo/config" +west build -d build/right -p -b nice_nano -- -DSHIELD=leeloo_right -DZMK_CONFIG="C:/dev/zmk/[yourName]/leeloo/config" +west build -d build/left -p -b nice_nano -- -DSHIELD=leeloo_left -DZMK_CONFIG="C:/dev/zmk/[yourName]/leeloo/config" ``` Build commands for your custom keymap of Leeloo v2: ``` -west build -d build/right_v2 -p -b nice_nano_v2 -- -DSHIELD=leeloo_rev2_right -DZMK_CONFIG="C:/dev/zmk/[yourName]/leeloo_v2/config" -west build -d build/left_v2 -p -b nice_nano_v2 -- -DSHIELD=leeloo_rev2_left -DZMK_CONFIG="C:/dev/zmk/[yourName]/leeloo_v2/config" +west build -d build/right_v2 -p -b nice_nano -- -DSHIELD=leeloo_rev2_right -DZMK_CONFIG="C:/dev/zmk/[yourName]/leeloo_v2/config" +west build -d build/left_v2 -p -b nice_nano -- -DSHIELD=leeloo_rev2_left -DZMK_CONFIG="C:/dev/zmk/[yourName]/leeloo_v2/config" ``` ## Building Leeloo's ZMK Firmware with nice!view Displays @@ -101,22 +101,22 @@ Save your changes and close the file. Build commands for the default keymap of Leeloo v1: ``` -west build -d build/left -p -b nice_nano_v2 -- -DSHIELD="leeloo_left nice_view_adapter nice_view" -west build -d build/right -p -b nice_nano_v2 -- -DSHIELD="leeloo_right nice_view_adapter nice_view" +west build -d build/left -p -b nice_nano -- -DSHIELD="leeloo_left nice_view_adapter nice_view" +west build -d build/right -p -b nice_nano -- -DSHIELD="leeloo_right nice_view_adapter nice_view" ``` Build commands for the default keymap of Leeloo v2: ``` -west build -d build/left_v2 -p -b nice_nano_v2 -- -DSHIELD="leeloo_rev2_left nice_view_adapter nice_view" -west build -d build/right_v2 -p -b nice_nano_v2 -- -DSHIELD="leeloo_rev2_right nice_view_adapter nice_view" +west build -d build/left_v2 -p -b nice_nano -- -DSHIELD="leeloo_rev2_left nice_view_adapter nice_view" +west build -d build/right_v2 -p -b nice_nano -- -DSHIELD="leeloo_rev2_right nice_view_adapter nice_view" ``` Build commands for your custom keymap of Leeloo v2: ``` -west build -d build/left -p -b nice_nano_v2 -- -DSHIELD="leeloo_rev2_left nice_view_adapter nice_view" -DZMK_CONFIG="/workspaces/zmk-config/[yourName]/leeloo_v2/config" -west build -d build/right -p -b nice_nano_v2 -- -DSHIELD="leeloo_rev2_right nice_view_adapter nice_view" -DZMK_CONFIG="/workspaces/zmk-config/[yourName]/leeloo_v2/config" +west build -d build/left -p -b nice_nano -- -DSHIELD="leeloo_rev2_left nice_view_adapter nice_view" -DZMK_CONFIG="/workspaces/zmk-config/[yourName]/leeloo_v2/config" +west build -d build/right -p -b nice_nano -- -DSHIELD="leeloo_rev2_right nice_view_adapter nice_view" -DZMK_CONFIG="/workspaces/zmk-config/[yourName]/leeloo_v2/config" ``` # Support diff --git a/app/boards/shields/leeloo/boards/nice_nano_v2.overlay b/app/boards/shields/leeloo/boards/nice_nano_v2.overlay deleted file mode 100644 index e95fac9d..00000000 --- a/app/boards/shields/leeloo/boards/nice_nano_v2.overlay +++ /dev/null @@ -1,46 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; -}; - -&spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; - - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; - - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; - - /* WS2812 */ - chain-length = <37>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; - - color-mapping = ; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; \ No newline at end of file diff --git a/app/boards/shields/leeloo/leeloo_rev2.conf b/app/boards/shields/leeloo/leeloo_rev2.conf index 8c1cf3ee..35b12c2d 100644 --- a/app/boards/shields/leeloo/leeloo_rev2.conf +++ b/app/boards/shields/leeloo/leeloo_rev2.conf @@ -14,9 +14,6 @@ # Uncomment the following line to enable per-key lighting # CONFIG_ZMK_RGB_UNDERGLOW=y -# Use the STRIP config specific to the LEDs you're using -# CONFIG_WS2812_STRIP=y - # Keep OLED or nice!view Displays on even when toggling off LEDs # Change to y if you wish to toggle Displays on and off with LEDs # CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=n @@ -40,4 +37,4 @@ # Uncomment if you are experiencing connectivity issues; this # configuration item boosts the BLE transmit power. -# CONFIG_BT_CTLR_TX_PWR_PLUS_8=y \ No newline at end of file +# CONFIG_BT_CTLR_TX_PWR_PLUS_8=y diff --git a/app/boards/shields/leeloo_micro/README.md b/app/boards/shields/leeloo_micro/README.md index c1827f82..3471a35b 100644 --- a/app/boards/shields/leeloo_micro/README.md +++ b/app/boards/shields/leeloo_micro/README.md @@ -30,15 +30,15 @@ Development Environment: [Basic Setup](https://zmk.dev/docs/development/setup) Build commands for the default keymap of Leeloo-Micro: ``` -west build -d build/left -p -b nice_nano_v2 -- -DSHIELD=leeloo_micro_left -west build -d build/right -p -b nice_nano_v2 -- -DSHIELD=leeloo_micro_right +west build -d build/left -p -b nice_nano -- -DSHIELD=leeloo_micro_left +west build -d build/right -p -b nice_nano -- -DSHIELD=leeloo_micro_right ``` Build commands for your custom keymap of Leeloo-Micro: ``` -west build -d build/right -p -b nice_nano_v2 -- -DSHIELD=leeloo_micro_right -DZMK_CONFIG="C:/dev/zmk/[yourName]/leeloo_micro/config" -west build -d build/left -p -b nice_nano_v2 -- -DSHIELD=leeloo_micro_left -DZMK_CONFIG="C:/dev/zmk/[yourName]/leeloo_micro/config" +west build -d build/right -p -b nice_nano -- -DSHIELD=leeloo_micro_right -DZMK_CONFIG="C:/dev/zmk/[yourName]/leeloo_micro/config" +west build -d build/left -p -b nice_nano -- -DSHIELD=leeloo_micro_left -DZMK_CONFIG="C:/dev/zmk/[yourName]/leeloo_micro/config" ``` ## Building Leeloo-Micro's ZMK Firmware with nice!view Displays @@ -70,15 +70,15 @@ Save your changes and close the file. Build commands for the default keymap of Leeloo-Micro: ``` -west build -d build/left -p -b nice_nano_v2 -- -DSHIELD="leeloo_micro_left nice_view_adapter nice_view" -west build -d build/right -p -b nice_nano_v2 -- -DSHIELD="leeloo_micro_right nice_view_adapter nice_view" +west build -d build/left -p -b nice_nano -- -DSHIELD="leeloo_micro_left nice_view_adapter nice_view" +west build -d build/right -p -b nice_nano -- -DSHIELD="leeloo_micro_right nice_view_adapter nice_view" ``` Build commands for your custom keymap of Leeloo-Micro: ``` -west build -d build/left -p -b nice_nano_v2 -- -DSHIELD="leeloo_micro_left nice_view_adapter nice_view" -DZMK_CONFIG="/workspaces/zmk-config/[yourName]/leeloo_micro/config" -west build -d build/right -p -b nice_nano_v2 -- -DSHIELD="leeloo_micro_right nice_view_adapter nice_view" -DZMK_CONFIG="/workspaces/zmk-config/[yourName]/leeloo_micro/config" +west build -d build/left -p -b nice_nano -- -DSHIELD="leeloo_micro_left nice_view_adapter nice_view" -DZMK_CONFIG="/workspaces/zmk-config/[yourName]/leeloo_micro/config" +west build -d build/right -p -b nice_nano -- -DSHIELD="leeloo_micro_right nice_view_adapter nice_view" -DZMK_CONFIG="/workspaces/zmk-config/[yourName]/leeloo_micro/config" ``` # Support diff --git a/app/boards/shields/leeloo_micro/boards/nice_nano_v2.overlay b/app/boards/shields/leeloo_micro/boards/nice_nano_v2.overlay deleted file mode 100644 index ba29cb2c..00000000 --- a/app/boards/shields/leeloo_micro/boards/nice_nano_v2.overlay +++ /dev/null @@ -1,46 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; -}; - -&spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; - - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; - - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; - - /* WS2812 */ - chain-length = <20>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; - - color-mapping = ; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; \ No newline at end of file diff --git a/app/boards/shields/leeloo_micro/leeloo_micro.conf b/app/boards/shields/leeloo_micro/leeloo_micro.conf index 02c1d605..deba268a 100644 --- a/app/boards/shields/leeloo_micro/leeloo_micro.conf +++ b/app/boards/shields/leeloo_micro/leeloo_micro.conf @@ -14,9 +14,6 @@ # Uncomment the following line to enable per-key lighting # CONFIG_ZMK_RGB_UNDERGLOW=y -# Use the STRIP config specific to the LEDs you're using -# CONFIG_WS2812_STRIP=y - # Keep OLED or nice!view Displays on even when toggling off LEDs # Change to y if you wish to toggle Displays on and off with LEDs # CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=n @@ -35,4 +32,4 @@ # Uncomment these two lines to add support for encoders # CONFIG_EC11=y -# CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y \ No newline at end of file +# CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y diff --git a/app/boards/shields/lily58/boards/nice_nano.overlay b/app/boards/shields/lily58/boards/nice_nano.overlay deleted file mode 100644 index 424a617b..00000000 --- a/app/boards/shields/lily58/boards/nice_nano.overlay +++ /dev/null @@ -1,46 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; -}; - -&spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; - - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; - - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; - - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; - - color-mapping = ; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; diff --git a/app/boards/shields/eternal_keypad/boards/nice_nano_v2.overlay b/app/boards/shields/lily58/boards/nice_nano_nrf52840_zmk.overlay similarity index 100% rename from app/boards/shields/eternal_keypad/boards/nice_nano_v2.overlay rename to app/boards/shields/lily58/boards/nice_nano_nrf52840_zmk.overlay diff --git a/app/boards/shields/lily58/boards/nice_nano_v2.overlay b/app/boards/shields/lily58/boards/nice_nano_v2.overlay deleted file mode 100644 index 424a617b..00000000 --- a/app/boards/shields/lily58/boards/nice_nano_v2.overlay +++ /dev/null @@ -1,46 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; -}; - -&spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; - - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; - - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; - - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; - - color-mapping = ; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; diff --git a/app/boards/shields/lily58/lily58.dtsi b/app/boards/shields/lily58/lily58.dtsi index c82b197c..195ab2b7 100644 --- a/app/boards/shields/lily58/lily58.dtsi +++ b/app/boards/shields/lily58/lily58.dtsi @@ -6,11 +6,13 @@ #include +#include + / { chosen { zephyr,display = &oled; zmk,kscan = &kscan0; - zmk,matrix-transform = &default_transform; + zmk,physical-layout = &kata0510_lily58_layout; }; default_transform: keymap_transform_0 { @@ -60,6 +62,10 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,5) RC(4,6) RC(3,6) RC(3,7) }; }; +&kata0510_lily58_layout { + transform = <&default_transform>; +}; + &pro_micro_i2c { status = "okay"; diff --git a/app/boards/shields/lily58/lily58.keymap b/app/boards/shields/lily58/lily58.keymap index 75a2e8ae..502f7be3 100644 --- a/app/boards/shields/lily58/lily58.keymap +++ b/app/boards/shields/lily58/lily58.keymap @@ -14,6 +14,7 @@ compatible = "zmk,keymap"; default_layer { + display-name = "Default Layer"; // ------------------------------------------------------------------------------------------------------------ // | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ` | // | TAB | Q | W | E | R | T | | Y | U | I | O | P | - | @@ -32,6 +33,7 @@ }; lower_layer { + display-name = "Lower Layer"; // ------------------------------------------------------------------------------------------------------------ // | BTCLR | BT1 | BT2 | BT3 | BT4 | BT5 | | | | | | | | // | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | @@ -50,6 +52,7 @@ }; raise_layer { + display-name = "Raise Layer"; // ------------------------------------------------------------------------------------------------------------ // | | | | | | | | | | | | | | // | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | diff --git a/app/boards/shields/lily58/lily58.zmk.yml b/app/boards/shields/lily58/lily58.zmk.yml index 65069a13..b5be126a 100644 --- a/app/boards/shields/lily58/lily58.zmk.yml +++ b/app/boards/shields/lily58/lily58.zmk.yml @@ -8,6 +8,7 @@ exposes: [i2c_oled] features: - keys - display + - studio siblings: - lily58_left - lily58_right diff --git a/app/boards/shields/lotus58/lotus58-layouts.dtsi b/app/boards/shields/lotus58/lotus58-layouts.dtsi new file mode 100644 index 00000000..397cfc51 --- /dev/null +++ b/app/boards/shields/lotus58/lotus58-layouts.dtsi @@ -0,0 +1,71 @@ +#include + +/ { + physical_layout0: physical_layout_0 { + compatible = "zmk,physical-layout"; + display-name = "Default"; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 50 0 0 0> + , <&key_physical_attrs 100 100 100 37 0 0 0> + , <&key_physical_attrs 100 100 200 12 0 0 0> + , <&key_physical_attrs 100 100 300 0 0 0 0> + , <&key_physical_attrs 100 100 400 12 0 0 0> + , <&key_physical_attrs 100 100 500 25 0 0 0> + , <&key_physical_attrs 100 100 1050 25 0 0 0> + , <&key_physical_attrs 100 100 1150 12 0 0 0> + , <&key_physical_attrs 100 100 1250 0 0 0 0> + , <&key_physical_attrs 100 100 1350 12 0 0 0> + , <&key_physical_attrs 100 100 1450 37 0 0 0> + , <&key_physical_attrs 100 100 1550 50 0 0 0> + , <&key_physical_attrs 100 100 0 150 0 0 0> + , <&key_physical_attrs 100 100 100 137 0 0 0> + , <&key_physical_attrs 100 100 200 112 0 0 0> + , <&key_physical_attrs 100 100 300 100 0 0 0> + , <&key_physical_attrs 100 100 400 112 0 0 0> + , <&key_physical_attrs 100 100 500 125 0 0 0> + , <&key_physical_attrs 100 100 1050 125 0 0 0> + , <&key_physical_attrs 100 100 1150 112 0 0 0> + , <&key_physical_attrs 100 100 1250 100 0 0 0> + , <&key_physical_attrs 100 100 1350 112 0 0 0> + , <&key_physical_attrs 100 100 1450 137 0 0 0> + , <&key_physical_attrs 100 100 1550 150 0 0 0> + , <&key_physical_attrs 100 100 0 250 0 0 0> + , <&key_physical_attrs 100 100 100 237 0 0 0> + , <&key_physical_attrs 100 100 200 212 0 0 0> + , <&key_physical_attrs 100 100 300 200 0 0 0> + , <&key_physical_attrs 100 100 400 212 0 0 0> + , <&key_physical_attrs 100 100 500 225 0 0 0> + , <&key_physical_attrs 100 100 625 75 0 0 0> + , <&key_physical_attrs 100 100 925 75 0 0 0> + , <&key_physical_attrs 100 100 1050 225 0 0 0> + , <&key_physical_attrs 100 100 1150 212 0 0 0> + , <&key_physical_attrs 100 100 1250 200 0 0 0> + , <&key_physical_attrs 100 100 1350 212 0 0 0> + , <&key_physical_attrs 100 100 1450 237 0 0 0> + , <&key_physical_attrs 100 100 1550 250 0 0 0> + , <&key_physical_attrs 100 100 0 350 0 0 0> + , <&key_physical_attrs 100 100 100 337 0 0 0> + , <&key_physical_attrs 100 100 200 312 0 0 0> + , <&key_physical_attrs 100 100 300 300 0 0 0> + , <&key_physical_attrs 100 100 400 312 0 0 0> + , <&key_physical_attrs 100 100 500 325 0 0 0> + , <&key_physical_attrs 100 100 625 275 0 0 0> + , <&key_physical_attrs 100 100 925 275 0 0 0> + , <&key_physical_attrs 100 100 1050 325 0 0 0> + , <&key_physical_attrs 100 100 1150 312 0 0 0> + , <&key_physical_attrs 100 100 1250 300 0 0 0> + , <&key_physical_attrs 100 100 1350 312 0 0 0> + , <&key_physical_attrs 100 100 1450 337 0 0 0> + , <&key_physical_attrs 100 100 1550 350 0 0 0> + , <&key_physical_attrs 100 100 250 412 0 0 0> + , <&key_physical_attrs 100 100 350 415 0 0 0> + , <&key_physical_attrs 100 100 450 425 0 0 0> + , <&key_physical_attrs 100 150 575 400 3000 625 475> + , <&key_physical_attrs 100 150 975 400 (-3000) 1025 475> + , <&key_physical_attrs 100 100 1100 425 0 0 0> + , <&key_physical_attrs 100 100 1200 415 0 0 0> + , <&key_physical_attrs 100 100 1300 415 0 0 0> + ; + }; +}; diff --git a/app/boards/shields/lotus58/lotus58.dtsi b/app/boards/shields/lotus58/lotus58.dtsi index e4595930..87c2670f 100644 --- a/app/boards/shields/lotus58/lotus58.dtsi +++ b/app/boards/shields/lotus58/lotus58.dtsi @@ -6,17 +6,19 @@ #include +#include "lotus58-layouts.dtsi" + / { chosen { zephyr,display = &oled; zmk,kscan = &kscan0; - zmk,matrix-transform = &default_transform; + zmk,physical-layout = &physical_layout0; }; default_transform: keymap_transform_0 { compatible = "zmk,matrix-transform"; columns = <16>; - rows = <4>; + rows = <5>; // | SW6 | SW5 | SW4 | SW3 | SW2 | SW1 | | SW1 | SW2 | SW3 | SW4 | SW5 | SW6 | // | SW12 | SW11 | SW10 | SW9 | SW8 | SW7 | | SW7 | SW8 | SW9 | SW10 | SW11 | SW12 | // | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 | SW30 | | SW30 | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 | @@ -68,6 +70,10 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,5) RC(4,6) RC(3,6) RC(3,7 }; }; +&physical_layout0 { + transform = <&default_transform>; +}; + &pro_micro_i2c { status = "okay"; diff --git a/app/boards/shields/lotus58/lotus58.keymap b/app/boards/shields/lotus58/lotus58.keymap index e9846e81..21a76955 100644 --- a/app/boards/shields/lotus58/lotus58.keymap +++ b/app/boards/shields/lotus58/lotus58.keymap @@ -45,6 +45,7 @@ compatible = "zmk,keymap"; default_layer { + display-name = "Default Layer"; // ------------------------------------------------------------------------------------------------------------ // 0| ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | = | 11 // 12| TAB | Q | W | E | R | T | | Y | U | I | O | P | [ | 23 @@ -63,6 +64,7 @@ }; lower_layer { + display-name = "Lower Layer"; // ------------------------------------------------------------------------------------------------------------ // | ` | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | // | | ! | HOME| ^ | END | % | | VOL^ | PGUP | INS | ^ | PSCR | - | @@ -81,6 +83,7 @@ }; raise_layer { + display-name = "Raise Layer"; // ------------------------------------------------------------------------------------------------------------ // |BTCLR| BT1 | BT2 | BT3 | BT4 | BT5 | |OUTTOG|OUTUSB| OUTBT | | RESET | FLASH | // | | INS | PSCR | GUI | RESET | | | PGUP | | ^ | | | | diff --git a/app/boards/shields/lotus58/lotus58.zmk.yml b/app/boards/shields/lotus58/lotus58.zmk.yml index 5cabbd0e..65323c2f 100644 --- a/app/boards/shields/lotus58/lotus58.zmk.yml +++ b/app/boards/shields/lotus58/lotus58.zmk.yml @@ -9,6 +9,7 @@ features: - keys - display - encoder + - studio siblings: - lotus58_left - lotus58_right diff --git a/app/boards/shields/m60/m60.keymap b/app/boards/shields/m60/m60.keymap index fd187da5..7fa07bbb 100644 --- a/app/boards/shields/m60/m60.keymap +++ b/app/boards/shields/m60/m60.keymap @@ -13,6 +13,7 @@ compatible = "zmk,keymap"; default_layer { + display-name = "Default Layer"; // ------------------------------------------------------------------------------------------ // | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BSPC | // | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | @@ -30,6 +31,7 @@ }; fn_layer { + display-name = "Fn Layer"; bindings = < &kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &bootloader &trans &bt BT_CLR &none &none &none &none &none &none &none &none &none &none &none &sys_reset diff --git a/app/boards/shields/m60/m60.overlay b/app/boards/shields/m60/m60.overlay index c479233c..15690f52 100644 --- a/app/boards/shields/m60/m60.overlay +++ b/app/boards/shields/m60/m60.overlay @@ -6,10 +6,12 @@ #include +#include + / { chosen { zmk,kscan = &kscan0; - zmk,matrix-transform = &default_transform; + zmk,physical-layout = &layout_60_ansi; }; kscan0: kscan { @@ -58,3 +60,6 @@ RC(6,5) RC(6,6) RC(6,7) RC(7,0) RC(7 }; }; +&layout_60_ansi { + transform = <&default_transform>; +}; diff --git a/app/boards/shields/m60/m60.zmk.yml b/app/boards/shields/m60/m60.zmk.yml index 8050df45..294769df 100644 --- a/app/boards/shields/m60/m60.zmk.yml +++ b/app/boards/shields/m60/m60.zmk.yml @@ -6,3 +6,4 @@ url: https://makerdiary.com/pages/m60-mechanical-keyboard requires: [makerdiary_nrf52840_m2] features: - keys + - studio diff --git a/app/boards/shields/microdox/boards/nice_nano.overlay b/app/boards/shields/microdox/boards/nice_nano.overlay deleted file mode 100644 index 424a617b..00000000 --- a/app/boards/shields/microdox/boards/nice_nano.overlay +++ /dev/null @@ -1,46 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; -}; - -&spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; - - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; - - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; - - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; - - color-mapping = ; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; diff --git a/app/boards/shields/helix/boards/nice_nano.overlay b/app/boards/shields/microdox/boards/nice_nano_nrf52840_zmk.overlay similarity index 100% rename from app/boards/shields/helix/boards/nice_nano.overlay rename to app/boards/shields/microdox/boards/nice_nano_nrf52840_zmk.overlay diff --git a/app/boards/shields/microdox/boards/nice_nano_v2.overlay b/app/boards/shields/microdox/boards/nice_nano_v2.overlay deleted file mode 100644 index 424a617b..00000000 --- a/app/boards/shields/microdox/boards/nice_nano_v2.overlay +++ /dev/null @@ -1,46 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; -}; - -&spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; - - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; - - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; - - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; - - color-mapping = ; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; diff --git a/app/boards/shields/microdox/microdox.conf b/app/boards/shields/microdox/microdox.conf index 0d38398c..b5df29aa 100644 --- a/app/boards/shields/microdox/microdox.conf +++ b/app/boards/shields/microdox/microdox.conf @@ -1,6 +1,5 @@ # Uncomment the following lines to enable the Microdox RGB Underglow # CONFIG_ZMK_RGB_UNDERGLOW=y -# CONFIG_WS2812_STRIP=y # Uncomment the following line to enable the Microdox OLED Display # CONFIG_ZMK_DISPLAY=y diff --git a/app/boards/shields/microdox/microdox.keymap b/app/boards/shields/microdox/microdox.keymap index f13f58f4..2ebc7a48 100644 --- a/app/boards/shields/microdox/microdox.keymap +++ b/app/boards/shields/microdox/microdox.keymap @@ -13,6 +13,7 @@ compatible = "zmk,keymap"; default_layer { + display-name = "Default Layer"; // ----------------------------------------------------------------------------------------- // | Q | W | E | R | T | | Y | U | I | O | P | // | A | S | D | F | G | | H | J | K | L | ; | @@ -26,6 +27,7 @@ >; }; nav_layer { + display-name = "Nav Layer"; // ----------------------------------------------------------------------------------------- // |BTCLR| | ESC | ~ | | | TAB | HOME | UP | END | DEL | // | BT1 | GUI | ALT | CTRL | NUM | | / | LEFT | DOWN | RGT | BSPC | @@ -40,6 +42,7 @@ }; sym_layer { + display-name = "Sym Layer"; // ----------------------------------------------------------------------------------------- // | ! | @ | # | $ | % | | ^ | & | * | ( | ) | // | | | | | | | - | = | { | } | "|" | @@ -56,6 +59,7 @@ // This layer is unreachable until "tri layer state" is sorted out. // Leaving it here for completeness. num_layer { + display-name = "Num Layer"; // ----------------------------------------------------------------------------------------- // | | | | | | | A | 7 | 8 | 9 | D | // | | | | | | | B | 4 | 5 | 6 | E | diff --git a/app/boards/shields/microdox/microdox_v2.conf b/app/boards/shields/microdox/microdox_v2.conf index 0d38398c..b5df29aa 100644 --- a/app/boards/shields/microdox/microdox_v2.conf +++ b/app/boards/shields/microdox/microdox_v2.conf @@ -1,6 +1,5 @@ # Uncomment the following lines to enable the Microdox RGB Underglow # CONFIG_ZMK_RGB_UNDERGLOW=y -# CONFIG_WS2812_STRIP=y # Uncomment the following line to enable the Microdox OLED Display # CONFIG_ZMK_DISPLAY=y diff --git a/app/boards/shields/murphpad/boards/nice_nano.conf b/app/boards/shields/murphpad/boards/nice_nano.conf deleted file mode 100644 index dda71c13..00000000 --- a/app/boards/shields/murphpad/boards/nice_nano.conf +++ /dev/null @@ -1,3 +0,0 @@ -# Uncomment both to enable underglow -CONFIG_ZMK_RGB_UNDERGLOW=y -CONFIG_WS2812_STRIP=y diff --git a/app/boards/shields/murphpad/boards/nice_nano.overlay b/app/boards/shields/murphpad/boards/nice_nano_nrf52840_zmk.overlay similarity index 92% rename from app/boards/shields/murphpad/boards/nice_nano.overlay rename to app/boards/shields/murphpad/boards/nice_nano_nrf52840_zmk.overlay index be8ff529..21bb17b0 100644 --- a/app/boards/shields/murphpad/boards/nice_nano.overlay +++ b/app/boards/shields/murphpad/boards/nice_nano_nrf52840_zmk.overlay @@ -31,7 +31,7 @@ spi-max-frequency = <4000000>; /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ + chain-length = <8>; /* number of SMD LED footprints on PCB */ spi-one-frame = <0x70>; spi-zero-frame = <0x40>; diff --git a/app/boards/shields/murphpad/boards/nice_nano_v2.overlay b/app/boards/shields/murphpad/boards/nice_nano_v2.overlay deleted file mode 100644 index be8ff529..00000000 --- a/app/boards/shields/murphpad/boards/nice_nano_v2.overlay +++ /dev/null @@ -1,46 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; -}; - -&spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; - - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; - - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; - - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; - - color-mapping = ; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; diff --git a/app/boards/shields/murphpad/murphpad-layout.dtsi b/app/boards/shields/murphpad/murphpad-layout.dtsi new file mode 100644 index 00000000..0ea18d8a --- /dev/null +++ b/app/boards/shields/murphpad/murphpad-layout.dtsi @@ -0,0 +1,156 @@ +/* + * Copyright (c) 2024 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include + +/ { + chosen { + zmk,physical-layout = &all_1u_layout; + }; + + all_1u_layout: keymap_layout_0 { + compatible = "zmk,physical-layout"; + display-name = "Default"; + + transform = <&all_1u_transform>; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 100 0 0 0 0> + , <&key_physical_attrs 100 100 200 0 0 0 0> + , <&key_physical_attrs 100 100 300 0 0 0 0> + , <&key_physical_attrs 100 100 400 0 0 0 0> + , <&key_physical_attrs 100 100 100 100 0 0 0> + , <&key_physical_attrs 100 100 200 100 0 0 0> + , <&key_physical_attrs 100 100 300 100 0 0 0> + , <&key_physical_attrs 100 100 400 100 0 0 0> + , <&key_physical_attrs 100 100 100 200 0 0 0> + , <&key_physical_attrs 100 100 200 200 0 0 0> + , <&key_physical_attrs 100 100 300 200 0 0 0> + , <&key_physical_attrs 100 100 400 200 0 0 0> + , <&key_physical_attrs 100 100 0 275 0 0 0> + , <&key_physical_attrs 100 100 100 300 0 0 0> + , <&key_physical_attrs 100 100 200 300 0 0 0> + , <&key_physical_attrs 100 100 300 300 0 0 0> + , <&key_physical_attrs 100 100 400 300 0 0 0> + , <&key_physical_attrs 100 100 0 400 0 0 0> + , <&key_physical_attrs 100 100 100 400 0 0 0> + , <&key_physical_attrs 100 100 200 400 0 0 0> + , <&key_physical_attrs 100 100 300 400 0 0 0> + , <&key_physical_attrs 100 100 400 400 0 0 0> + , <&key_physical_attrs 100 100 0 500 0 0 0> + , <&key_physical_attrs 100 100 100 500 0 0 0> + , <&key_physical_attrs 100 100 200 500 0 0 0> + , <&key_physical_attrs 100 100 300 500 0 0 0> + , <&key_physical_attrs 100 100 400 500 0 0 0> + , <&key_physical_attrs 100 100 100 700 0 0 0> + , <&key_physical_attrs 100 100 200 700 0 0 0> + , <&key_physical_attrs 100 100 300 700 0 0 0> + ; + + }; + + right_numpad_layout: keymap_layout_1 { + compatible = "zmk,physical-layout"; + display-name = "Right Numpad"; + + transform = <&right_numpad_transform>; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 100 0 0 0 0> + , <&key_physical_attrs 100 100 200 0 0 0 0> + , <&key_physical_attrs 100 100 300 0 0 0 0> + , <&key_physical_attrs 100 100 400 0 0 0 0> + , <&key_physical_attrs 100 100 100 100 0 0 0> + , <&key_physical_attrs 100 100 200 100 0 0 0> + , <&key_physical_attrs 100 100 300 100 0 0 0> + , <&key_physical_attrs 100 100 400 100 0 0 0> + , <&key_physical_attrs 100 200 100 200 0 0 0> + , <&key_physical_attrs 100 100 200 200 0 0 0> + , <&key_physical_attrs 100 100 300 200 0 0 0> + , <&key_physical_attrs 100 100 400 200 0 0 0> + , <&key_physical_attrs 100 100 0 275 0 0 0> + , <&key_physical_attrs 100 100 200 300 0 0 0> + , <&key_physical_attrs 100 100 300 300 0 0 0> + , <&key_physical_attrs 100 100 400 300 0 0 0> + , <&key_physical_attrs 100 100 0 400 0 0 0> + , <&key_physical_attrs 100 200 100 400 0 0 0> + , <&key_physical_attrs 100 100 200 400 0 0 0> + , <&key_physical_attrs 100 100 300 400 0 0 0> + , <&key_physical_attrs 100 100 400 400 0 0 0> + , <&key_physical_attrs 100 100 0 500 0 0 0> + , <&key_physical_attrs 100 100 200 500 0 0 0> + , <&key_physical_attrs 200 100 300 500 0 0 0> + , <&key_physical_attrs 100 100 100 700 0 0 0> + , <&key_physical_attrs 100 100 200 700 0 0 0> + , <&key_physical_attrs 100 100 300 700 0 0 0> + ; + + }; + + left_numpad_layout: keymap_layout_2 { + compatible = "zmk,physical-layout"; + display-name = "Left Numpad"; + + transform = <&left_numpad_transform>; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 100 0 0 0 0> + , <&key_physical_attrs 100 100 200 0 0 0 0> + , <&key_physical_attrs 100 100 300 0 0 0 0> + , <&key_physical_attrs 100 100 400 0 0 0 0> + , <&key_physical_attrs 100 100 100 100 0 0 0> + , <&key_physical_attrs 100 100 200 100 0 0 0> + , <&key_physical_attrs 100 100 300 100 0 0 0> + , <&key_physical_attrs 100 100 400 100 0 0 0> + , <&key_physical_attrs 100 100 100 200 0 0 0> + , <&key_physical_attrs 100 100 200 200 0 0 0> + , <&key_physical_attrs 100 100 300 200 0 0 0> + , <&key_physical_attrs 100 200 400 200 0 0 0> + , <&key_physical_attrs 100 100 0 275 0 0 0> + , <&key_physical_attrs 100 100 100 300 0 0 0> + , <&key_physical_attrs 100 100 200 300 0 0 0> + , <&key_physical_attrs 100 100 300 300 0 0 0> + , <&key_physical_attrs 100 100 0 400 0 0 0> + , <&key_physical_attrs 100 100 100 400 0 0 0> + , <&key_physical_attrs 100 100 200 400 0 0 0> + , <&key_physical_attrs 100 100 300 400 0 0 0> + , <&key_physical_attrs 100 200 400 400 0 0 0> + , <&key_physical_attrs 100 100 0 500 0 0 0> + , <&key_physical_attrs 200 100 100 500 0 0 0> + , <&key_physical_attrs 100 100 300 500 0 0 0> + , <&key_physical_attrs 100 100 100 700 0 0 0> + , <&key_physical_attrs 100 100 200 700 0 0 0> + , <&key_physical_attrs 100 100 300 700 0 0 0> + ; + }; + + position_map { + compatible = "zmk,physical-layout-position-map"; + all_1u_map { + physical-layout = <&all_1u_layout>; + positions + = <11 21 23 25 22 17 18 19 20 13 14 15 8 9 10 27> + , <28 29 16 26 24> + ; + }; + + right_numpad_map { + physical-layout = <&right_numpad_layout>; + positions + = < 8 17 23 22 21 16 18 19 20 13 14 15 9 10 11 24> + , <25 26 27 28 29> + ; + }; + + left_numpad_map { + physical-layout = <&left_numpad_layout>; + positions + = <11 20 22 23 21 16 17 18 19 13 14 15 8 9 10 24> + , <25 26 27 28 29> + ; + }; + }; +}; diff --git a/app/boards/shields/murphpad/murphpad.conf b/app/boards/shields/murphpad/murphpad.conf index bdcd4255..c954a946 100644 --- a/app/boards/shields/murphpad/murphpad.conf +++ b/app/boards/shields/murphpad/murphpad.conf @@ -1,9 +1,14 @@ -# Uncomment to turn on logging, and set ZMK logging to debug output -# CONFIG_ZMK_USB_LOGGING=y +# To enable logging, use the snippet per the documentation. +# Delaying log output may help catch issues close to startup. Uncomment and adjust if necessary (default is 1000ms) +#CONFIG_LOG_PROCESS_THREAD_STARTUP_DELAY_MS=3000 -# Uncomment both to enable encoder +# Uncomment both to enable encoder(s) CONFIG_EC11=y CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y # Uncomment to enable OLED -CONFIG_ZMK_DISPLAY=y \ No newline at end of file +#CONFIG_ZMK_DISPLAY=y + +# Uncomment both to enable underglow +# Note that this will only work if an implementation exists for your board; check under the shield folder for board-specific overlays. +#CONFIG_ZMK_RGB_UNDERGLOW=y diff --git a/app/boards/shields/murphpad/murphpad.keymap b/app/boards/shields/murphpad/murphpad.keymap index fefafb00..d82670a8 100644 --- a/app/boards/shields/murphpad/murphpad.keymap +++ b/app/boards/shields/murphpad/murphpad.keymap @@ -7,16 +7,16 @@ #include #include #include +#include #include - #define TIMEOUT 300 -&encoder_1 { +&middle_left_encoder { status = "okay"; }; -&encoder_2 { +&top_right_encoder { status = "okay"; }; @@ -25,62 +25,59 @@ compatible = "zmk,combos"; combo_btclr { timeout-ms = ; - key-positions = <1 6>; + key-positions = <0 4>; bindings = <&bt BT_CLR>; }; combo_reset { timeout-ms = ; - key-positions = <1 3>; + key-positions = <0 2>; bindings = <&sys_reset>; }; combo_bootloader { timeout-ms = ; - key-positions = <1 2>; + key-positions = <0 1>; bindings = <&bootloader>; }; combo_bt_nxt { timeout-ms = ; - key-positions = <1 4>; + key-positions = <0 3>; bindings = <&bt BT_NXT>; }; }; - sensors: sensors { - compatible = "zmk,keymap-sensors"; - sensors = <&encoder_1 &encoder_2>; - triggers-per-rotation = <20>; - }; - - - keymap0: keymap { + keymap: keymap { compatible = "zmk,keymap"; default_layer { - display-name = "default layer"; + display-name = "default"; bindings = < - &bt BT_CLR &kp TAB &kp F5 &kp LC(LA(C)) &kp LG(D) - &rgb_ug RGB_TOG &kp ESC &kp KP_DIVIDE &kp KP_MULTIPLY &kp KP_MINUS - &rgb_ug RGB_EFF &kp KP_N7 &kp KP_N8 &kp KP_N9 &kp KP_PLUS - &kp C_MUTE &kp KP_N4 &kp KP_N5 &kp KP_N6 &trans - &mo 1 &kp KP_N1 &kp KP_N2 &kp KP_N3 &kp KP_ENTER - &kp BSPC &kp KP_N0 &trans &kp KP_DOT &trans + &kp F1 &kp F2 &kp F3 &kp F4 + &kp KP_NUM &kp KP_DIVIDE &kp KP_MULTIPLY &kp KP_MINUS + &kp KP_N7 &kp KP_N8 &kp KP_N9 &kp KP_PLUS + &kp C_MUTE &kp KP_N4 &kp KP_N5 &kp KP_N6 &trans + &mo 1 &kp KP_N1 &kp KP_N2 &kp KP_N3 &kp KP_ENTER + &kp BSPC &kp KP_N0 &trans &kp KP_DOT &trans + + &bt BT_CLR &rgb_ug RGB_TOG &rgb_ug RGB_EFF >; sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>; }; fn_layer { - display-name = "fn layer"; + display-name = "fn"; bindings = < - &trans &trans &trans &trans &trans - &trans &kp KP_NUM &trans &trans &trans - &trans &trans &trans &trans &trans - &bt BT_CLR &trans &trans &trans &trans - &trans &trans &trans &trans &trans - &kp DEL &trans &trans &trans &trans + &out OUT_TOG &bt BT_PRV &bt BT_NXT &trans + &trans &trans &trans &trans + &rgb_ug RGB_HUD &rgb_ug RGB_SPI &rgb_ug RGB_HUI &trans + &bt BT_CLR &rgb_ug RGB_EFR &rgb_ug RGB_TOG &rgb_ug RGB_EFF &trans + &trans &rgb_ug RGB_BRD &rgb_ug RGB_SPD &rgb_ug RGB_BRI &trans + &kp DEL &rgb_ug RGB_SAD &trans &rgb_ug RGB_SAI &trans + + &trans &trans &trans >; sensor-bindings = <&inc_dec_kp PG_UP PG_DN &inc_dec_kp C_VOL_UP C_VOL_DN>; }; }; -}; \ No newline at end of file +}; diff --git a/app/boards/shields/murphpad/murphpad.overlay b/app/boards/shields/murphpad/murphpad.overlay index e2c9117f..4a45c30c 100644 --- a/app/boards/shields/murphpad/murphpad.overlay +++ b/app/boards/shields/murphpad/murphpad.overlay @@ -6,35 +6,86 @@ #include +#include "murphpad-layout.dtsi" + / { chosen { zephyr,display = &oled; - zmk,kscan = &kscan0; + zmk,kscan = &kscan; + zmk,physical-layouts = &all_1u_layout; }; - kscan0: kscan { + kscan: kscan { compatible = "zmk,kscan-gpio-matrix"; wakeup-source; diode-direction = "col2row"; row-gpios - = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&pro_micro 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&pro_micro 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&pro_micro 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 18 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 18 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> ; col-gpios = <&pro_micro 9 GPIO_ACTIVE_HIGH> , <&pro_micro 6 GPIO_ACTIVE_HIGH> , <&pro_micro 5 GPIO_ACTIVE_HIGH> , <&pro_micro 4 GPIO_ACTIVE_HIGH> - , <&pro_micro 10 GPIO_ACTIVE_HIGH> + , <&pro_micro 10 GPIO_ACTIVE_HIGH> ; }; - encoder_1: encoder_1 { + all_1u_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <5>; + rows = <6>; + map = < + RC(0,1) RC(0,2) RC(0,3) RC(0,4) + RC(1,1) RC(1,2) RC(1,3) RC(1,4) + RC(2,1) RC(2,2) RC(2,3) RC(2,4) + RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) + RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) + RC(5,0) RC(5,1) RC(5,2) RC(5,3) RC(5,4) + + RC(0,0) RC(1,0) RC(2,0) + >; + }; + + right_numpad_transform: keymap_transform_1 { + compatible = "zmk,matrix-transform"; + columns = <5>; + rows = <6>; + map = < + RC(0,1) RC(0,2) RC(0,3) RC(0,4) + RC(1,1) RC(1,2) RC(1,3) RC(1,4) + RC(2,1) RC(2,2) RC(2,3) RC(2,4) + RC(3,0) RC(3,2) RC(3,3) RC(3,4) + RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) + RC(5,0) RC(5,2) RC(5,4) + + RC(0,0) RC(1,0) RC(2,0) + >; + }; + + left_numpad_transform: keymap_transform_2 { + compatible = "zmk,matrix-transform"; + columns = <5>; + rows = <6>; + map = < + RC(0,1) RC(0,2) RC(0,3) RC(0,4) + RC(1,1) RC(1,2) RC(1,3) RC(1,4) + RC(2,1) RC(2,2) RC(2,3) RC(2,4) + RC(3,0) RC(3,1) RC(3,2) RC(3,3) + RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) + RC(5,0) RC(5,1) RC(5,3) + + RC(0,0) RC(1,0) RC(2,0) + >; + }; + + middle_left_encoder: encoder_1: encoder_1 { compatible = "alps,ec11"; a-gpios = <&pro_micro 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; b-gpios = <&pro_micro 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; @@ -42,7 +93,7 @@ status = "disabled"; }; - encoder_2: encoder_2 { + top_right_encoder: encoder_2: encoder_2 { compatible = "alps,ec11"; a-gpios = <&pro_micro 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; b-gpios = <&pro_micro 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; @@ -50,6 +101,12 @@ status = "disabled"; }; + sensors: sensors { + compatible = "zmk,keymap-sensors"; + sensors = <&middle_left_encoder &top_right_encoder>; + triggers-per-rotation = <20>; + }; + }; &pro_micro_i2c { diff --git a/app/boards/shields/naked60/naked60.keymap b/app/boards/shields/naked60/naked60.keymap index 4f02d9a1..42494199 100644 --- a/app/boards/shields/naked60/naked60.keymap +++ b/app/boards/shields/naked60/naked60.keymap @@ -15,6 +15,7 @@ compatible = "zmk,keymap"; default_layer { + display-name = "Default Layer"; // ---------------------------------------------------------------------------------------------------------- // | ESC | 1 | 2 | 3 | 4 | 5 |-------|-------| 6 | 7 | 8 | 9 | 0 | BSPC | // | TAB | Q | W | E | R | T |-------|-------| Y | U | I | O | P | \ | @@ -33,6 +34,7 @@ }; lower { + display-name = "Lower"; // ---------------------------------------------------------------------------------------------------------- // | ESC | F2 | F3 | F4 | F5 | F6 |-------|-------| F7 | F8 | F9 | F10 | F11 | F12 | // | ~ | ! | @ | # | $ | % |-------|-------| ^ | & | * | ( | ) | DEL | @@ -49,6 +51,7 @@ }; raise { + display-name = "Raise"; // ---------------------------------------------------------------------------------------------------------- // | ESC | F2 | F3 | F4 | F5 | F6 |-------|-------| F7 | F8 | F9 | F10 | F11 | F12 | // | ~ | 1 | 2 | 3 | 4 | 5 |-------|-------| 6 | 7 | 8 | 9 | 0 | DEL | @@ -65,6 +68,7 @@ }; adjust { + display-name = "Adjust"; // ---------------------------------------------------------------------------------------------------------- // |tog(4)| F2 | F3 | F4 | F5 | F6 |------|------| F7 | F8 | F9 | F10 | F11 | F12 | // | | NA | NA | NA | NA | NA |------|------| NA | NA | NA | NA | NA |LALT(PRTSN)| @@ -81,6 +85,7 @@ }; flock { + display-name = "Flock"; // ---------------------------------------------------------------------------------------------------------- // |tog(4) | F2 | F3 | F4 | F5 | F6 |-------|-------| F7 | F8 | F9 | F10 | F11 | | // |out tog|BT_SEL 0|BT_SEL 1|BT_SEL 2|BT_SEL 3|BT_SEL 4|-------|-------|BT_PRV|BT_NXT|BT_CLR| | | | @@ -96,4 +101,4 @@ >; }; }; -}; \ No newline at end of file +}; diff --git a/app/boards/shields/nibble/README.md b/app/boards/shields/nibble/README.md index 42646f97..a6d2add5 100644 --- a/app/boards/shields/nibble/README.md +++ b/app/boards/shields/nibble/README.md @@ -8,7 +8,6 @@ If you built your nibble without the LEDs _and_ are using a nice!nano board, you ``` CONFIG_ZMK_RGB_UNDERGLOW=n -CONFIG_WS2812_STRIP=n ``` ## Encoder Notes diff --git a/app/boards/shields/nibble/boards/nice_nano.conf b/app/boards/shields/nibble/boards/nice_nano.conf index 14bed3d0..d1b76b84 100644 --- a/app/boards/shields/nibble/boards/nice_nano.conf +++ b/app/boards/shields/nibble/boards/nice_nano.conf @@ -1,4 +1,2 @@ # Enable underglow CONFIG_ZMK_RGB_UNDERGLOW=y -# Use the STRIP config specific to the LEDs you're using -CONFIG_WS2812_STRIP=y \ No newline at end of file diff --git a/app/boards/shields/nibble/boards/nice_nano.overlay b/app/boards/shields/nibble/boards/nice_nano_nrf52840_zmk.overlay similarity index 100% rename from app/boards/shields/nibble/boards/nice_nano.overlay rename to app/boards/shields/nibble/boards/nice_nano_nrf52840_zmk.overlay diff --git a/app/boards/shields/nibble/boards/nice_nano_v2.overlay b/app/boards/shields/nibble/boards/nice_nano_v2.overlay deleted file mode 100644 index 3849a8fb..00000000 --- a/app/boards/shields/nibble/boards/nice_nano_v2.overlay +++ /dev/null @@ -1,46 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; -}; - -&spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; - - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; - - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; - - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; - - color-mapping = ; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; diff --git a/app/boards/shields/nice_view/Kconfig.defconfig b/app/boards/shields/nice_view/Kconfig.defconfig index c31cec89..0b2b7be3 100644 --- a/app/boards/shields/nice_view/Kconfig.defconfig +++ b/app/boards/shields/nice_view/Kconfig.defconfig @@ -3,6 +3,9 @@ if SHIELD_NICE_VIEW +config LS0XX_VCOM_THREAD_PRIO + default 11 + config LV_Z_VDB_SIZE default 100 @@ -25,7 +28,8 @@ choice ZMK_DISPLAY_STATUS_SCREEN endchoice config LV_Z_MEM_POOL_SIZE - default 4096 if ZMK_DISPLAY_STATUS_SCREEN_CUSTOM + default 8192 if ZMK_DISPLAY_STATUS_SCREEN_CUSTOM + default 5120 if ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN config ZMK_DISPLAY_STATUS_SCREEN_CUSTOM imply NICE_VIEW_WIDGET_STATUS @@ -33,7 +37,7 @@ config ZMK_DISPLAY_STATUS_SCREEN_CUSTOM config NICE_VIEW_WIDGET_STATUS bool "Custom nice!view status widget" select LV_FONT_MONTSERRAT_16 - select LV_USE_IMG + select LV_USE_IMAGE select LV_USE_CANVAS config NICE_VIEW_WIDGET_INVERTED diff --git a/app/boards/shields/nice_view/README.md b/app/boards/shields/nice_view/README.md index 00abfbfa..0d0c04db 100644 --- a/app/boards/shields/nice_view/README.md +++ b/app/boards/shields/nice_view/README.md @@ -4,9 +4,21 @@ The nice!view is a low-power, high refresh rate display meant to replace I2C OLE This shield requires that an `&nice_view_spi` labeled SPI bus is provided with _at least_ MOSI, SCK, and CS pins defined. +## Custom widget + +The nice!view shield includes a custom vertical widget. + +Profile indicators show the status of the first five BLE profiles using numbers from 1 to 5. +The number corresponding to the currently selected profile is drawn in a filled disk +and the circle outline around each profile number correspond to the following states: + +- solid outline: connected +- dashed outline: not connected +- no outline: not bound + ## Disable custom widget -The nice!view shield includes a custom vertical widget. To use the built-in ZMK one, add the following item to your `.conf` file: +To use the built-in ZMK widget instead of the custom nice!view one, add the following item to your `.conf` file: ``` CONFIG_ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN=y diff --git a/app/boards/shields/nice_view/nice_view.conf b/app/boards/shields/nice_view/nice_view.conf index e6f9158f..51408bb3 100644 --- a/app/boards/shields/nice_view/nice_view.conf +++ b/app/boards/shields/nice_view/nice_view.conf @@ -2,3 +2,4 @@ CONFIG_ZMK_DISPLAY=y # Disable idle blanking CONFIG_ZMK_DISPLAY_BLANK_ON_IDLE=n +CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=4096 diff --git a/app/boards/shields/nice_view/nice_view.overlay b/app/boards/shields/nice_view/nice_view.overlay index e1965569..6eecf693 100644 --- a/app/boards/shields/nice_view/nice_view.overlay +++ b/app/boards/shields/nice_view/nice_view.overlay @@ -12,6 +12,8 @@ reg = <0>; width = <160>; height = <68>; + serial-vcom-inversion; + serial-vcom-interval = <33>; }; }; diff --git a/app/boards/shields/nice_view/widgets/art.c b/app/boards/shields/nice_view/widgets/art.c index 56c89146..c91af376 100644 --- a/app/boards/shields/nice_view/widgets/art.c +++ b/app/boards/shields/nice_view/widgets/art.c @@ -111,9 +111,8 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BALLOON u }; const lv_img_dsc_t balloon = { - .header.cf = LV_IMG_CF_INDEXED_1BIT, - .header.always_zero = 0, - .header.reserved = 0, + .header.cf = LV_COLOR_FORMAT_I1, + .header.w = 140, .header.h = 68, .data_size = 1232, @@ -219,9 +218,8 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_MOUNTAIN }; const lv_img_dsc_t mountain = { - .header.cf = LV_IMG_CF_INDEXED_1BIT, - .header.always_zero = 0, - .header.reserved = 0, + .header.cf = LV_COLOR_FORMAT_I1, + .header.w = 140, .header.h = 68, .data_size = 1232, diff --git a/app/boards/shields/nice_view/widgets/bolt.c b/app/boards/shields/nice_view/widgets/bolt.c index 74dcc2b0..bb5c5aa1 100644 --- a/app/boards/shields/nice_view/widgets/bolt.c +++ b/app/boards/shields/nice_view/widgets/bolt.c @@ -35,9 +35,7 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BOLT uint }; const lv_img_dsc_t bolt = { - .header.cf = LV_IMG_CF_INDEXED_2BIT, - .header.always_zero = 0, - .header.reserved = 0, + .header.cf = LV_COLOR_FORMAT_I2, .header.w = 11, .header.h = 18, .data_size = 70, diff --git a/app/boards/shields/nice_view/widgets/peripheral_status.c b/app/boards/shields/nice_view/widgets/peripheral_status.c index b9da1996..40c338d3 100644 --- a/app/boards/shields/nice_view/widgets/peripheral_status.c +++ b/app/boards/shields/nice_view/widgets/peripheral_status.c @@ -41,17 +41,17 @@ static void draw_top(lv_obj_t *widget, lv_color_t cbuf[], const struct status_st init_rect_dsc(&rect_black_dsc, LVGL_BACKGROUND); // Fill background - lv_canvas_draw_rect(canvas, 0, 0, CANVAS_SIZE, CANVAS_SIZE, &rect_black_dsc); + canvas_draw_rect(canvas, 0, 0, CANVAS_SIZE, CANVAS_SIZE, &rect_black_dsc); // Draw battery draw_battery(canvas, state); // Draw output status - lv_canvas_draw_text(canvas, 0, 0, CANVAS_SIZE, &label_dsc, - state->connected ? LV_SYMBOL_WIFI : LV_SYMBOL_CLOSE); + canvas_draw_text(canvas, 0, 0, CANVAS_SIZE, &label_dsc, + state->connected ? LV_SYMBOL_WIFI : LV_SYMBOL_CLOSE); // Rotate canvas - rotate_canvas(canvas, cbuf); + rotate_canvas(canvas); } static void set_battery_status(struct zmk_widget_status *widget, @@ -71,7 +71,7 @@ static void battery_status_update_cb(struct battery_status_state state) { } static struct battery_status_state battery_status_get_state(const zmk_event_t *eh) { - return (struct battery_status_state) { + return (struct battery_status_state){ .level = zmk_battery_state_of_charge(), #if IS_ENABLED(CONFIG_USB_DEVICE_STACK) .usb_present = zmk_usb_is_powered(), @@ -112,11 +112,11 @@ int zmk_widget_status_init(struct zmk_widget_status *widget, lv_obj_t *parent) { lv_obj_set_size(widget->obj, 160, 68); lv_obj_t *top = lv_canvas_create(widget->obj); lv_obj_align(top, LV_ALIGN_TOP_RIGHT, 0, 0); - lv_canvas_set_buffer(top, widget->cbuf, CANVAS_SIZE, CANVAS_SIZE, LV_IMG_CF_TRUE_COLOR); + lv_canvas_set_buffer(top, widget->cbuf, CANVAS_SIZE, CANVAS_SIZE, CANVAS_COLOR_FORMAT); lv_obj_t *art = lv_img_create(widget->obj); bool random = sys_rand32_get() & 1; - lv_img_set_src(art, random ? &balloon : &mountain); + lv_image_set_src(art, random ? &balloon : &mountain); lv_obj_align(art, LV_ALIGN_TOP_LEFT, 0, 0); sys_slist_append(&widgets, &widget->node); diff --git a/app/boards/shields/nice_view/widgets/status.c b/app/boards/shields/nice_view/widgets/status.c index 061b7127..179ecb0a 100644 --- a/app/boards/shields/nice_view/widgets/status.c +++ b/app/boards/shields/nice_view/widgets/status.c @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2023 The ZMK Contributors + * Copyright (c) 2025 The ZMK Contributors * SPDX-License-Identifier: MIT * */ @@ -33,10 +33,12 @@ struct output_status_state { int active_profile_index; bool active_profile_connected; bool active_profile_bonded; + bool profiles_connected[NICEVIEW_PROFILE_COUNT]; + bool profiles_bonded[NICEVIEW_PROFILE_COUNT]; }; struct layer_status_state { - uint8_t index; + zmk_keymap_layer_index_t index; const char *label; }; @@ -44,7 +46,7 @@ struct wpm_status_state { uint8_t wpm; }; -static void draw_top(lv_obj_t *widget, lv_color_t cbuf[], const struct status_state *state) { +static void draw_top(lv_obj_t *widget, const struct status_state *state) { lv_obj_t *canvas = lv_obj_get_child(widget, 0); lv_draw_label_dsc_t label_dsc; @@ -59,7 +61,7 @@ static void draw_top(lv_obj_t *widget, lv_color_t cbuf[], const struct status_st init_line_dsc(&line_dsc, LVGL_FOREGROUND, 1); // Fill background - lv_canvas_draw_rect(canvas, 0, 0, CANVAS_SIZE, CANVAS_SIZE, &rect_black_dsc); + lv_canvas_fill_bg(canvas, LVGL_BACKGROUND, LV_OPA_COVER); // Draw battery draw_battery(canvas, state); @@ -84,15 +86,15 @@ static void draw_top(lv_obj_t *widget, lv_color_t cbuf[], const struct status_st break; } - lv_canvas_draw_text(canvas, 0, 0, CANVAS_SIZE, &label_dsc, output_text); + canvas_draw_text(canvas, 0, 0, CANVAS_SIZE, &label_dsc, output_text); // Draw WPM - lv_canvas_draw_rect(canvas, 0, 21, 68, 42, &rect_white_dsc); - lv_canvas_draw_rect(canvas, 1, 22, 66, 40, &rect_black_dsc); + canvas_draw_rect(canvas, 0, 21, 68, 42, &rect_white_dsc); + canvas_draw_rect(canvas, 1, 22, 66, 40, &rect_black_dsc); char wpm_text[6] = {}; snprintf(wpm_text, sizeof(wpm_text), "%d", state->wpm[9]); - lv_canvas_draw_text(canvas, 42, 52, 24, &label_dsc_wpm, wpm_text); + canvas_draw_text(canvas, 42, 52, 24, &label_dsc_wpm, wpm_text); int max = 0; int min = 256; @@ -116,13 +118,13 @@ static void draw_top(lv_obj_t *widget, lv_color_t cbuf[], const struct status_st points[i].x = 2 + i * 7; points[i].y = 60 - (state->wpm[i] - min) * 36 / range; } - lv_canvas_draw_line(canvas, points, 10, &line_dsc); + canvas_draw_line(canvas, points, 10, &line_dsc); // Rotate canvas - rotate_canvas(canvas, cbuf); + rotate_canvas(canvas); } -static void draw_middle(lv_obj_t *widget, lv_color_t cbuf[], const struct status_state *state) { +static void draw_middle(lv_obj_t *widget, const struct status_state *state) { lv_obj_t *canvas = lv_obj_get_child(widget, 1); lv_draw_rect_dsc_t rect_black_dsc; @@ -139,35 +141,44 @@ static void draw_middle(lv_obj_t *widget, lv_color_t cbuf[], const struct status init_label_dsc(&label_dsc_black, LVGL_BACKGROUND, &lv_font_montserrat_18, LV_TEXT_ALIGN_CENTER); // Fill background - lv_canvas_draw_rect(canvas, 0, 0, CANVAS_SIZE, CANVAS_SIZE, &rect_black_dsc); + lv_canvas_fill_bg(canvas, LVGL_BACKGROUND, LV_OPA_COVER); // Draw circles - int circle_offsets[5][2] = { + int circle_offsets[NICEVIEW_PROFILE_COUNT][2] = { {13, 13}, {55, 13}, {34, 34}, {13, 55}, {55, 55}, }; - for (int i = 0; i < 5; i++) { + for (int i = 0; i < NICEVIEW_PROFILE_COUNT; i++) { bool selected = i == state->active_profile_index; - lv_canvas_draw_arc(canvas, circle_offsets[i][0], circle_offsets[i][1], 13, 0, 360, - &arc_dsc); + if (state->profiles_connected[i]) { + canvas_draw_arc(canvas, circle_offsets[i][0], circle_offsets[i][1], 13, 0, 360, + &arc_dsc); + } else if (state->profiles_bonded[i]) { + const int segments = 8; + const int gap = 20; + for (int j = 0; j < segments; ++j) + canvas_draw_arc(canvas, circle_offsets[i][0], circle_offsets[i][1], 13, + 360. / segments * j + gap / 2.0, + 360. / segments * (j + 1) - gap / 2.0, &arc_dsc); + } if (selected) { - lv_canvas_draw_arc(canvas, circle_offsets[i][0], circle_offsets[i][1], 9, 0, 359, - &arc_dsc_filled); + canvas_draw_arc(canvas, circle_offsets[i][0], circle_offsets[i][1], 9, 0, 359, + &arc_dsc_filled); } char label[2]; snprintf(label, sizeof(label), "%d", i + 1); - lv_canvas_draw_text(canvas, circle_offsets[i][0] - 8, circle_offsets[i][1] - 10, 16, - (selected ? &label_dsc_black : &label_dsc), label); + canvas_draw_text(canvas, circle_offsets[i][0] - 8, circle_offsets[i][1] - 10, 16, + (selected ? &label_dsc_black : &label_dsc), label); } // Rotate canvas - rotate_canvas(canvas, cbuf); + rotate_canvas(canvas); } -static void draw_bottom(lv_obj_t *widget, lv_color_t cbuf[], const struct status_state *state) { +static void draw_bottom(lv_obj_t *widget, const struct status_state *state) { lv_obj_t *canvas = lv_obj_get_child(widget, 2); lv_draw_rect_dsc_t rect_black_dsc; @@ -176,21 +187,21 @@ static void draw_bottom(lv_obj_t *widget, lv_color_t cbuf[], const struct status init_label_dsc(&label_dsc, LVGL_FOREGROUND, &lv_font_montserrat_14, LV_TEXT_ALIGN_CENTER); // Fill background - lv_canvas_draw_rect(canvas, 0, 0, CANVAS_SIZE, CANVAS_SIZE, &rect_black_dsc); + lv_canvas_fill_bg(canvas, LVGL_BACKGROUND, LV_OPA_COVER); // Draw layer - if (state->layer_label == NULL) { + if (state->layer_label == NULL || strlen(state->layer_label) == 0) { char text[10] = {}; sprintf(text, "LAYER %i", state->layer_index); - lv_canvas_draw_text(canvas, 0, 5, 68, &label_dsc, text); + canvas_draw_text(canvas, 0, 5, 68, &label_dsc, text); } else { - lv_canvas_draw_text(canvas, 0, 5, 68, &label_dsc, state->layer_label); + canvas_draw_text(canvas, 0, 5, 68, &label_dsc, state->layer_label); } // Rotate canvas - rotate_canvas(canvas, cbuf); + rotate_canvas(canvas); } static void set_battery_status(struct zmk_widget_status *widget, @@ -201,7 +212,7 @@ static void set_battery_status(struct zmk_widget_status *widget, widget->state.battery = state.level; - draw_top(widget->obj, widget->cbuf, &widget->state); + draw_top(widget->obj, &widget->state); } static void battery_status_update_cb(struct battery_status_state state) { @@ -212,7 +223,7 @@ static void battery_status_update_cb(struct battery_status_state state) { static struct battery_status_state battery_status_get_state(const zmk_event_t *eh) { const struct zmk_battery_state_changed *ev = as_zmk_battery_state_changed(eh); - return (struct battery_status_state) { + return (struct battery_status_state){ .level = (ev != NULL) ? ev->state_of_charge : zmk_battery_state_of_charge(), #if IS_ENABLED(CONFIG_USB_DEVICE_STACK) .usb_present = zmk_usb_is_powered(), @@ -234,9 +245,13 @@ static void set_output_status(struct zmk_widget_status *widget, widget->state.active_profile_index = state->active_profile_index; widget->state.active_profile_connected = state->active_profile_connected; widget->state.active_profile_bonded = state->active_profile_bonded; + for (int i = 0; i < NICEVIEW_PROFILE_COUNT; ++i) { + widget->state.profiles_connected[i] = state->profiles_connected[i]; + widget->state.profiles_bonded[i] = state->profiles_bonded[i]; + } - draw_top(widget->obj, widget->cbuf, &widget->state); - draw_middle(widget->obj, widget->cbuf2, &widget->state); + draw_top(widget->obj, &widget->state); + draw_middle(widget->obj, &widget->state); } static void output_status_update_cb(struct output_status_state state) { @@ -245,12 +260,17 @@ static void output_status_update_cb(struct output_status_state state) { } static struct output_status_state output_status_get_state(const zmk_event_t *_eh) { - return (struct output_status_state){ - .selected_endpoint = zmk_endpoints_selected(), + struct output_status_state state = { + .selected_endpoint = zmk_endpoint_get_selected(), .active_profile_index = zmk_ble_active_profile_index(), .active_profile_connected = zmk_ble_active_profile_is_connected(), .active_profile_bonded = !zmk_ble_active_profile_is_open(), }; + for (int i = 0; i < MIN(NICEVIEW_PROFILE_COUNT, ZMK_BLE_PROFILE_COUNT); ++i) { + state.profiles_connected[i] = zmk_ble_profile_is_connected(i); + state.profiles_bonded[i] = !zmk_ble_profile_is_open(i); + } + return state; } ZMK_DISPLAY_WIDGET_LISTENER(widget_output_status, struct output_status_state, @@ -268,7 +288,7 @@ static void set_layer_status(struct zmk_widget_status *widget, struct layer_stat widget->state.layer_index = state.index; widget->state.layer_label = state.label; - draw_bottom(widget->obj, widget->cbuf3, &widget->state); + draw_bottom(widget->obj, &widget->state); } static void layer_status_update_cb(struct layer_status_state state) { @@ -277,8 +297,9 @@ static void layer_status_update_cb(struct layer_status_state state) { } static struct layer_status_state layer_status_get_state(const zmk_event_t *eh) { - uint8_t index = zmk_keymap_highest_layer_active(); - return (struct layer_status_state){.index = index, .label = zmk_keymap_layer_name(index)}; + zmk_keymap_layer_index_t index = zmk_keymap_highest_layer_active(); + return (struct layer_status_state){ + .index = index, .label = zmk_keymap_layer_name(zmk_keymap_layer_index_to_id(index))}; } ZMK_DISPLAY_WIDGET_LISTENER(widget_layer_status, struct layer_status_state, layer_status_update_cb, @@ -292,7 +313,7 @@ static void set_wpm_status(struct zmk_widget_status *widget, struct wpm_status_s } widget->state.wpm[9] = state.wpm; - draw_top(widget->obj, widget->cbuf, &widget->state); + draw_top(widget->obj, &widget->state); } static void wpm_status_update_cb(struct wpm_status_state state) { @@ -313,13 +334,13 @@ int zmk_widget_status_init(struct zmk_widget_status *widget, lv_obj_t *parent) { lv_obj_set_size(widget->obj, 160, 68); lv_obj_t *top = lv_canvas_create(widget->obj); lv_obj_align(top, LV_ALIGN_TOP_RIGHT, 0, 0); - lv_canvas_set_buffer(top, widget->cbuf, CANVAS_SIZE, CANVAS_SIZE, LV_IMG_CF_TRUE_COLOR); + lv_canvas_set_buffer(top, widget->cbuf, CANVAS_SIZE, CANVAS_SIZE, CANVAS_COLOR_FORMAT); lv_obj_t *middle = lv_canvas_create(widget->obj); lv_obj_align(middle, LV_ALIGN_TOP_LEFT, 24, 0); - lv_canvas_set_buffer(middle, widget->cbuf2, CANVAS_SIZE, CANVAS_SIZE, LV_IMG_CF_TRUE_COLOR); + lv_canvas_set_buffer(middle, widget->cbuf2, CANVAS_SIZE, CANVAS_SIZE, CANVAS_COLOR_FORMAT); lv_obj_t *bottom = lv_canvas_create(widget->obj); lv_obj_align(bottom, LV_ALIGN_TOP_LEFT, -44, 0); - lv_canvas_set_buffer(bottom, widget->cbuf3, CANVAS_SIZE, CANVAS_SIZE, LV_IMG_CF_TRUE_COLOR); + lv_canvas_set_buffer(bottom, widget->cbuf3, CANVAS_SIZE, CANVAS_SIZE, CANVAS_COLOR_FORMAT); sys_slist_append(&widgets, &widget->node); widget_battery_status_init(); diff --git a/app/boards/shields/nice_view/widgets/status.h b/app/boards/shields/nice_view/widgets/status.h index 53a22518..66e41e5d 100644 --- a/app/boards/shields/nice_view/widgets/status.h +++ b/app/boards/shields/nice_view/widgets/status.h @@ -14,9 +14,9 @@ struct zmk_widget_status { sys_snode_t node; lv_obj_t *obj; - lv_color_t cbuf[CANVAS_SIZE * CANVAS_SIZE]; - lv_color_t cbuf2[CANVAS_SIZE * CANVAS_SIZE]; - lv_color_t cbuf3[CANVAS_SIZE * CANVAS_SIZE]; + uint8_t cbuf[CANVAS_BUF_SIZE]; + uint8_t cbuf2[CANVAS_BUF_SIZE]; + uint8_t cbuf3[CANVAS_BUF_SIZE]; struct status_state state; }; diff --git a/app/boards/shields/nice_view/widgets/util.c b/app/boards/shields/nice_view/widgets/util.c index b4915ab7..90333910 100644 --- a/app/boards/shields/nice_view/widgets/util.c +++ b/app/boards/shields/nice_view/widgets/util.c @@ -10,18 +10,14 @@ LV_IMG_DECLARE(bolt); -void rotate_canvas(lv_obj_t *canvas, lv_color_t cbuf[]) { - static lv_color_t cbuf_tmp[CANVAS_SIZE * CANVAS_SIZE]; - memcpy(cbuf_tmp, cbuf, sizeof(cbuf_tmp)); - lv_img_dsc_t img; - img.data = (void *)cbuf_tmp; - img.header.cf = LV_IMG_CF_TRUE_COLOR; - img.header.w = CANVAS_SIZE; - img.header.h = CANVAS_SIZE; +void rotate_canvas(lv_obj_t *canvas) { + uint8_t *buf = lv_canvas_get_draw_buf(canvas)->data; + static uint8_t buf_copy[CANVAS_BUF_SIZE]; + memcpy(buf_copy, buf, sizeof(buf_copy)); - lv_canvas_fill_bg(canvas, LVGL_BACKGROUND, LV_OPA_COVER); - lv_canvas_transform(canvas, &img, 900, LV_IMG_ZOOM_NONE, -1, 0, CANVAS_SIZE / 2, - CANVAS_SIZE / 2, true); + const uint32_t stride = lv_draw_buf_width_to_stride(CANVAS_SIZE, CANVAS_COLOR_FORMAT); + lv_draw_sw_rotate(buf_copy, buf, CANVAS_SIZE, CANVAS_SIZE, stride, stride, + LV_DISPLAY_ROTATION_270, CANVAS_COLOR_FORMAT); } void draw_battery(lv_obj_t *canvas, const struct status_state *state) { @@ -30,16 +26,16 @@ void draw_battery(lv_obj_t *canvas, const struct status_state *state) { lv_draw_rect_dsc_t rect_white_dsc; init_rect_dsc(&rect_white_dsc, LVGL_FOREGROUND); - lv_canvas_draw_rect(canvas, 0, 2, 29, 12, &rect_white_dsc); - lv_canvas_draw_rect(canvas, 1, 3, 27, 10, &rect_black_dsc); - lv_canvas_draw_rect(canvas, 2, 4, (state->battery + 2) / 4, 8, &rect_white_dsc); - lv_canvas_draw_rect(canvas, 30, 5, 3, 6, &rect_white_dsc); - lv_canvas_draw_rect(canvas, 31, 6, 1, 4, &rect_black_dsc); + canvas_draw_rect(canvas, 0, 2, 29, 12, &rect_white_dsc); + canvas_draw_rect(canvas, 1, 3, 27, 10, &rect_black_dsc); + canvas_draw_rect(canvas, 2, 4, (state->battery + 2) / 4, 8, &rect_white_dsc); + canvas_draw_rect(canvas, 30, 5, 3, 6, &rect_white_dsc); + canvas_draw_rect(canvas, 31, 6, 1, 4, &rect_black_dsc); if (state->charging) { - lv_draw_img_dsc_t img_dsc; - lv_draw_img_dsc_init(&img_dsc); - lv_canvas_draw_img(canvas, 9, -1, &bolt, &img_dsc); + lv_draw_image_dsc_t img_dsc; + lv_draw_image_dsc_init(&img_dsc); + canvas_draw_img(canvas, 9, -1, &bolt, &img_dsc); } } @@ -67,3 +63,68 @@ void init_arc_dsc(lv_draw_arc_dsc_t *arc_dsc, lv_color_t color, uint8_t width) { arc_dsc->color = color; arc_dsc->width = width; } + +void canvas_draw_line(lv_obj_t *canvas, const lv_point_t points[], uint32_t point_cnt, + lv_draw_line_dsc_t *draw_dsc) { + lv_layer_t layer; + lv_canvas_init_layer(canvas, &layer); + + for (uint32_t i = 1; i < point_cnt; ++i) { + draw_dsc->p1.x = points[i - 1].x; + draw_dsc->p1.y = points[i - 1].y; + draw_dsc->p2.x = points[i].x; + draw_dsc->p2.y = points[i].y; + lv_draw_line(&layer, draw_dsc); + } + + lv_canvas_finish_layer(canvas, &layer); +} +void canvas_draw_rect(lv_obj_t *canvas, lv_coord_t x, lv_coord_t y, lv_coord_t w, lv_coord_t h, + lv_draw_rect_dsc_t *draw_dsc) { + lv_layer_t layer; + lv_canvas_init_layer(canvas, &layer); + + lv_area_t coords = {x, y, x + w - 1, y + h - 1}; + lv_draw_rect(&layer, draw_dsc, &coords); + + lv_canvas_finish_layer(canvas, &layer); +} + +void canvas_draw_arc(lv_obj_t *canvas, lv_coord_t x, lv_coord_t y, lv_coord_t r, + int32_t start_angle, int32_t end_angle, lv_draw_arc_dsc_t *draw_dsc) { + lv_layer_t layer; + lv_canvas_init_layer(canvas, &layer); + + draw_dsc->center.x = x; + draw_dsc->center.y = y; + draw_dsc->radius = r; + draw_dsc->start_angle = start_angle; + draw_dsc->end_angle = end_angle; + lv_draw_arc(&layer, draw_dsc); + + lv_canvas_finish_layer(canvas, &layer); +} + +void canvas_draw_text(lv_obj_t *canvas, lv_coord_t x, lv_coord_t y, lv_coord_t max_w, + lv_draw_label_dsc_t *draw_dsc, const char *txt) { + lv_layer_t layer; + lv_canvas_init_layer(canvas, &layer); + + draw_dsc->text = txt; + lv_area_t coords = {x, y, x + max_w, y + CANVAS_SIZE}; + lv_draw_label(&layer, draw_dsc, &coords); + + lv_canvas_finish_layer(canvas, &layer); +} + +void canvas_draw_img(lv_obj_t *canvas, lv_coord_t x, lv_coord_t y, const lv_image_dsc_t *src, + lv_draw_image_dsc_t *draw_dsc) { + lv_layer_t layer; + lv_canvas_init_layer(canvas, &layer); + + draw_dsc->src = src; + lv_area_t coords = {x, y, x + src->header.w - 1, y + src->header.h - 1}; + lv_draw_image(&layer, draw_dsc, &coords); + + lv_canvas_finish_layer(canvas, &layer); +} \ No newline at end of file diff --git a/app/boards/shields/nice_view/widgets/util.h b/app/boards/shields/nice_view/widgets/util.h index fbcb616f..183d0ec3 100644 --- a/app/boards/shields/nice_view/widgets/util.h +++ b/app/boards/shields/nice_view/widgets/util.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2023 The ZMK Contributors + * Copyright (c) 2025 The ZMK Contributors * SPDX-License-Identifier: MIT * */ @@ -8,7 +8,13 @@ #include #include +#define NICEVIEW_PROFILE_COUNT 5 + #define CANVAS_SIZE 68 +#define CANVAS_COLOR_FORMAT LV_COLOR_FORMAT_L8 // smallest type supported by sw_rotate +#define CANVAS_BUF_SIZE \ + LV_CANVAS_BUF_SIZE(CANVAS_SIZE, CANVAS_SIZE, LV_COLOR_FORMAT_GET_BPP(CANVAS_COLOR_FORMAT), \ + LV_DRAW_BUF_STRIDE_ALIGN) #define LVGL_BACKGROUND \ IS_ENABLED(CONFIG_NICE_VIEW_WIDGET_INVERTED) ? lv_color_black() : lv_color_white() @@ -23,6 +29,8 @@ struct status_state { int active_profile_index; bool active_profile_connected; bool active_profile_bonded; + bool profiles_connected[NICEVIEW_PROFILE_COUNT]; + bool profiles_bonded[NICEVIEW_PROFILE_COUNT]; uint8_t layer_index; const char *layer_label; uint8_t wpm[10]; @@ -38,10 +46,21 @@ struct battery_status_state { #endif }; -void rotate_canvas(lv_obj_t *canvas, lv_color_t cbuf[]); +void rotate_canvas(lv_obj_t *canvas); void draw_battery(lv_obj_t *canvas, const struct status_state *state); void init_label_dsc(lv_draw_label_dsc_t *label_dsc, lv_color_t color, const lv_font_t *font, lv_text_align_t align); void init_rect_dsc(lv_draw_rect_dsc_t *rect_dsc, lv_color_t bg_color); void init_line_dsc(lv_draw_line_dsc_t *line_dsc, lv_color_t color, uint8_t width); void init_arc_dsc(lv_draw_arc_dsc_t *arc_dsc, lv_color_t color, uint8_t width); + +void canvas_draw_line(lv_obj_t *canvas, const lv_point_t points[], uint32_t point_cnt, + lv_draw_line_dsc_t *draw_dsc); +void canvas_draw_rect(lv_obj_t *canvas, lv_coord_t x, lv_coord_t y, lv_coord_t w, lv_coord_t h, + lv_draw_rect_dsc_t *draw_dsc); +void canvas_draw_arc(lv_obj_t *canvas, lv_coord_t x, lv_coord_t y, lv_coord_t r, + int32_t start_angle, int32_t end_angle, lv_draw_arc_dsc_t *draw_dsc); +void canvas_draw_text(lv_obj_t *canvas, lv_coord_t x, lv_coord_t y, lv_coord_t max_w, + lv_draw_label_dsc_t *draw_dsc, const char *txt); +void canvas_draw_img(lv_obj_t *canvas, lv_coord_t x, lv_coord_t y, const lv_image_dsc_t *src, + lv_draw_image_dsc_t *draw_dsc); diff --git a/app/boards/shields/nice_view_adapter/README.md b/app/boards/shields/nice_view_adapter/README.md index fe0a6f07..19812931 100644 --- a/app/boards/shields/nice_view_adapter/README.md +++ b/app/boards/shields/nice_view_adapter/README.md @@ -7,5 +7,5 @@ To use this shield, you should add this shield to your list of shields _before_ The nice!view will use the SDA/SCL pins of the OLED, and then the adapter expects a final pin to be "bodged" from your microcontroller to the nice!view CS pin. This adapter assumes that the CS pin bodged is the `&pro_micro 1` pin or "D1", which is the top left pin when looking at the front of the board. If you can't use this pin, you'll need to override the `cs-gpios` for the `&nice_view_spi` bus (in your `zmk-config` keymap for example) or you will want to define your own `&nice_view_spi` bus without using this adapter. ``` -west build -b nice_nano_v2 -- -DSHIELD="lily58_left nice_view_adapter nice_view" +west build -b nice_nano -- -DSHIELD="lily58_left nice_view_adapter nice_view" ``` diff --git a/app/boards/shields/nice_view_adapter/boards/bluemicro840_v1.overlay b/app/boards/shields/nice_view_adapter/boards/bluemicro840_nrf52840_zmk.overlay similarity index 100% rename from app/boards/shields/nice_view_adapter/boards/bluemicro840_v1.overlay rename to app/boards/shields/nice_view_adapter/boards/bluemicro840_nrf52840_zmk.overlay diff --git a/app/boards/shields/nice_view_adapter/boards/mikoto_520.overlay b/app/boards/shields/nice_view_adapter/boards/mikoto_nrf52840_zmk.overlay similarity index 100% rename from app/boards/shields/nice_view_adapter/boards/mikoto_520.overlay rename to app/boards/shields/nice_view_adapter/boards/mikoto_nrf52840_zmk.overlay diff --git a/app/boards/shields/nice_view_adapter/boards/nice_nano.overlay b/app/boards/shields/nice_view_adapter/boards/nice_nano_nrf52840_zmk.overlay similarity index 100% rename from app/boards/shields/nice_view_adapter/boards/nice_nano.overlay rename to app/boards/shields/nice_view_adapter/boards/nice_nano_nrf52840_zmk.overlay diff --git a/app/boards/shields/nice_view_adapter/boards/nice_nano_v2.overlay b/app/boards/shields/nice_view_adapter/boards/nice_nano_v2.overlay deleted file mode 100644 index 45ba34de..00000000 --- a/app/boards/shields/nice_view_adapter/boards/nice_nano_v2.overlay +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2022 The ZMK Contributors - * - * SPDX-License-Identifier: MIT - */ - -&pinctrl { - spi0_default: spi0_default { - group1 { - psels = , - , - ; - }; - }; - spi0_sleep: spi0_sleep { - group1 { - psels = , - , - ; - low-power-enable; - }; - }; -}; - -nice_view_spi: &spi0 { - compatible = "nordic,nrf-spim"; - pinctrl-0 = <&spi0_default>; - pinctrl-1 = <&spi0_sleep>; - pinctrl-names = "default", "sleep"; - cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>; -}; - -&pro_micro_i2c { - status = "disabled"; -}; diff --git a/app/boards/shields/nice_view_adapter/boards/nrfmicro_11_flipped.overlay b/app/boards/shields/nice_view_adapter/boards/nrfmicro_nrf52840_flipped_zmk_1_1_0.overlay similarity index 100% rename from app/boards/shields/nice_view_adapter/boards/nrfmicro_11_flipped.overlay rename to app/boards/shields/nice_view_adapter/boards/nrfmicro_nrf52840_flipped_zmk_1_1_0.overlay diff --git a/app/boards/shields/nice_view_adapter/boards/nrfmicro_11.overlay b/app/boards/shields/nice_view_adapter/boards/nrfmicro_nrf52840_zmk_1_1_0.overlay similarity index 100% rename from app/boards/shields/nice_view_adapter/boards/nrfmicro_11.overlay rename to app/boards/shields/nice_view_adapter/boards/nrfmicro_nrf52840_zmk_1_1_0.overlay diff --git a/app/boards/shields/nice_view_adapter/boards/nrfmicro_13.overlay b/app/boards/shields/nice_view_adapter/boards/nrfmicro_nrf52840_zmk_1_3_0.overlay similarity index 100% rename from app/boards/shields/nice_view_adapter/boards/nrfmicro_13.overlay rename to app/boards/shields/nice_view_adapter/boards/nrfmicro_nrf52840_zmk_1_3_0.overlay diff --git a/app/boards/shields/nice_view_adapter/boards/puchi_ble_v1.overlay b/app/boards/shields/nice_view_adapter/boards/puchi_ble_nrf52840_zmk.overlay similarity index 100% rename from app/boards/shields/nice_view_adapter/boards/puchi_ble_v1.overlay rename to app/boards/shields/nice_view_adapter/boards/puchi_ble_nrf52840_zmk.overlay diff --git a/app/boards/shields/osprette/osprette.keymap b/app/boards/shields/osprette/osprette.keymap index 77e62fa0..7afd7ae8 100644 --- a/app/boards/shields/osprette/osprette.keymap +++ b/app/boards/shields/osprette/osprette.keymap @@ -75,6 +75,7 @@ compatible = "zmk,keymap"; MAIN_layer { + display-name = "Main Layer"; bindings = < &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp Q &kp A &kp S &kp D < SYM F &kp G &kp H < SYM J &kp K &kp L &kp SQT &kp P @@ -84,6 +85,7 @@ }; SYM_layer { + display-name = "Sym Layer"; bindings = < &kp N7 &kp N8 &kp N9 &kp STAR &kp DLLR &kp LBRC &kp RBRC &kp HASH &kp AMPS &kp EXCL &kp N1 &kp N2 &kp N3 &kp EQUAL &kp LT &kp LPAR &kp RPAR &kp GT &kp PIPE &none @@ -93,6 +95,7 @@ }; NAV_layer { + display-name = "Nav Layer"; bindings = < &kp C_VOL_DN &kp C_VOL_UP &kp C_NEXT &kp C_PP &none &kp F7 &kp F8 &kp F9 &kp C_PREV &kp LEFT &kp DOWN &kp UP &kp RIGHT &kp LC(TAB) &kp PSCRN &kp F1 &kp F2 &kp F3 &kp F10 &kp F12 @@ -102,6 +105,7 @@ }; BT_layer { + display-name = "BT Layer"; bindings = < &none &none &none &none &none &none &none &none &none &none &none &none &none &none &none &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &none diff --git a/app/boards/shields/pancake/pancake.keymap b/app/boards/shields/pancake/pancake.keymap index e5ca4372..a6a4c1a4 100644 --- a/app/boards/shields/pancake/pancake.keymap +++ b/app/boards/shields/pancake/pancake.keymap @@ -19,6 +19,7 @@ compatible = "zmk,keymap"; default_layer { + display-name = "Default Layer"; bindings = < &kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSPC &kp TAB &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SQT &kp SEMI @@ -28,6 +29,7 @@ }; lower_layer { + display-name = "Lower Layer"; bindings = < &kp TILDE &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp STAR &kp LPAR &kp RPAR &kp BSPC &trans &trans &trans &trans &trans &trans &trans &trans &kp UNDER &kp PLUS &trans &trans @@ -37,6 +39,7 @@ }; raise_layer { + display-name = "Raise Layer"; bindings = < &kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp BSPC &trans &trans &trans &trans &trans &trans &trans &trans &kp MINUS &kp EQUAL &trans &kp BSLH @@ -46,6 +49,7 @@ }; function_layer { + display-name = "Function Layer"; bindings = < &bootloader &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp MINUS &kp F11 &kp F12 &trans diff --git a/app/boards/shields/qaz/qaz-layouts.dtsi b/app/boards/shields/qaz/qaz-layouts.dtsi new file mode 100644 index 00000000..4080d79e --- /dev/null +++ b/app/boards/shields/qaz/qaz-layouts.dtsi @@ -0,0 +1,186 @@ +/* + * Copyright (c) 2024 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include + +/ { + split_big_bar_layout: split_big_bar_layout { + compatible = "zmk,physical-layout"; + display-name = "Split Big Bar"; + transform = <&split_big_bar_transform>; + kscan = <&kscan0>; + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 0 0 0 0> + , <&key_physical_attrs 100 100 100 0 0 0 0> + , <&key_physical_attrs 100 100 200 0 0 0 0> + , <&key_physical_attrs 100 100 300 0 0 0 0> + , <&key_physical_attrs 100 100 400 0 0 0 0> + , <&key_physical_attrs 100 100 500 0 0 0 0> + , <&key_physical_attrs 100 100 600 0 0 0 0> + , <&key_physical_attrs 100 100 700 0 0 0 0> + , <&key_physical_attrs 100 100 800 0 0 0 0> + , <&key_physical_attrs 125 100 900 0 0 0 0> + + , <&key_physical_attrs 125 100 0 100 0 0 0> + , <&key_physical_attrs 100 100 125 100 0 0 0> + , <&key_physical_attrs 100 100 225 100 0 0 0> + , <&key_physical_attrs 100 100 325 100 0 0 0> + , <&key_physical_attrs 100 100 425 100 0 0 0> + , <&key_physical_attrs 100 100 525 100 0 0 0> + , <&key_physical_attrs 100 100 625 100 0 0 0> + , <&key_physical_attrs 100 100 725 100 0 0 0> + , <&key_physical_attrs 100 100 825 100 0 0 0> + , <&key_physical_attrs 100 100 925 100 0 0 0> + + , <&key_physical_attrs 175 100 0 200 0 0 0> + , <&key_physical_attrs 100 100 175 200 0 0 0> + , <&key_physical_attrs 100 100 275 200 0 0 0> + , <&key_physical_attrs 100 100 375 200 0 0 0> + , <&key_physical_attrs 100 100 475 200 0 0 0> + , <&key_physical_attrs 100 100 575 200 0 0 0> + , <&key_physical_attrs 100 100 675 200 0 0 0> + , <&key_physical_attrs 100 100 775 200 0 0 0> + , <&key_physical_attrs 150 100 875 200 0 0 0> + , <&key_physical_attrs 100 100 0 300 0 0 0> + , <&key_physical_attrs 100 100 100 300 0 0 0> + , <&key_physical_attrs 325 100 200 300 0 0 0> + , <&key_physical_attrs 300 100 525 300 0 0 0> + , <&key_physical_attrs 100 100 825 300 0 0 0> + , <&key_physical_attrs 100 100 925 300 0 0 0> + ; + }; + + split_bar_layout: split_bar_layout { + compatible = "zmk,physical-layout"; + display-name = "Split Bar"; + transform = <&split_bar_transform>; + kscan = <&kscan0>; + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 0 0 0 0> + , <&key_physical_attrs 100 100 100 0 0 0 0> + , <&key_physical_attrs 100 100 200 0 0 0 0> + , <&key_physical_attrs 100 100 300 0 0 0 0> + , <&key_physical_attrs 100 100 400 0 0 0 0> + , <&key_physical_attrs 100 100 500 0 0 0 0> + , <&key_physical_attrs 100 100 600 0 0 0 0> + , <&key_physical_attrs 100 100 700 0 0 0 0> + , <&key_physical_attrs 100 100 800 0 0 0 0> + , <&key_physical_attrs 125 100 900 0 0 0 0> + + , <&key_physical_attrs 125 100 0 100 0 0 0> + , <&key_physical_attrs 100 100 125 100 0 0 0> + , <&key_physical_attrs 100 100 225 100 0 0 0> + , <&key_physical_attrs 100 100 325 100 0 0 0> + , <&key_physical_attrs 100 100 425 100 0 0 0> + , <&key_physical_attrs 100 100 525 100 0 0 0> + , <&key_physical_attrs 100 100 625 100 0 0 0> + , <&key_physical_attrs 100 100 725 100 0 0 0> + , <&key_physical_attrs 100 100 825 100 0 0 0> + , <&key_physical_attrs 100 100 925 100 0 0 0> + + , <&key_physical_attrs 175 100 0 200 0 0 0> + , <&key_physical_attrs 100 100 175 200 0 0 0> + , <&key_physical_attrs 100 100 275 200 0 0 0> + , <&key_physical_attrs 100 100 375 200 0 0 0> + , <&key_physical_attrs 100 100 475 200 0 0 0> + , <&key_physical_attrs 100 100 575 200 0 0 0> + , <&key_physical_attrs 100 100 675 200 0 0 0> + , <&key_physical_attrs 100 100 775 200 0 0 0> + , <&key_physical_attrs 150 100 875 200 0 0 0> + + , <&key_physical_attrs 100 100 0 300 0 0 0> + , <&key_physical_attrs 100 100 100 300 0 0 0> + , <&key_physical_attrs 100 100 200 300 0 0 0> + , <&key_physical_attrs 225 100 300 300 0 0 0> + , <&key_physical_attrs 200 100 525 300 0 0 0> + , <&key_physical_attrs 100 100 725 300 0 0 0> + , <&key_physical_attrs 100 100 825 300 0 0 0> + , <&key_physical_attrs 100 100 925 300 0 0 0> + ; + }; + + big_bar_layout: big_bar_layout { + compatible = "zmk,physical-layout"; + display-name = "Big Bar"; + transform = <&big_bar_transform>; + kscan = <&kscan0>; + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 0 0 0 0> + , <&key_physical_attrs 100 100 100 0 0 0 0> + , <&key_physical_attrs 100 100 200 0 0 0 0> + , <&key_physical_attrs 100 100 300 0 0 0 0> + , <&key_physical_attrs 100 100 400 0 0 0 0> + , <&key_physical_attrs 100 100 500 0 0 0 0> + , <&key_physical_attrs 100 100 600 0 0 0 0> + , <&key_physical_attrs 100 100 700 0 0 0 0> + , <&key_physical_attrs 100 100 800 0 0 0 0> + , <&key_physical_attrs 125 100 900 0 0 0 0> + + , <&key_physical_attrs 125 100 0 100 0 0 0> + , <&key_physical_attrs 100 100 125 100 0 0 0> + , <&key_physical_attrs 100 100 225 100 0 0 0> + , <&key_physical_attrs 100 100 325 100 0 0 0> + , <&key_physical_attrs 100 100 425 100 0 0 0> + , <&key_physical_attrs 100 100 525 100 0 0 0> + , <&key_physical_attrs 100 100 625 100 0 0 0> + , <&key_physical_attrs 100 100 725 100 0 0 0> + , <&key_physical_attrs 100 100 825 100 0 0 0> + , <&key_physical_attrs 100 100 925 100 0 0 0> + + , <&key_physical_attrs 175 100 0 200 0 0 0> + , <&key_physical_attrs 100 100 175 200 0 0 0> + , <&key_physical_attrs 100 100 275 200 0 0 0> + , <&key_physical_attrs 100 100 375 200 0 0 0> + , <&key_physical_attrs 100 100 475 200 0 0 0> + , <&key_physical_attrs 100 100 575 200 0 0 0> + , <&key_physical_attrs 100 100 675 200 0 0 0> + , <&key_physical_attrs 100 100 775 200 0 0 0> + , <&key_physical_attrs 150 100 875 200 0 0 0> + + , <&key_physical_attrs 100 100 0 300 0 0 0> + , <&key_physical_attrs 100 100 100 300 0 0 0> + , <&key_physical_attrs 625 100 200 300 0 0 0> + , <&key_physical_attrs 100 100 825 300 0 0 0> + , <&key_physical_attrs 100 100 925 300 0 0 0> + ; + }; + + position_map { + compatible = "zmk,physical-layout-position-map"; + + complete; + + split_big_bar_posmap { + physical-layout = <&split_big_bar_layout>; + positions + = < 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 35 31 36 33 34 32> + ; + }; + + split_bar_posmap { + physical-layout = <&split_bar_layout>; + positions + = < 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 34 35 36 33> + ; + }; + + big_bar_posmap { + physical-layout = <&big_bar_layout>; + positions + = < 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 35 34 36 32 33 31> + ; + }; + }; +}; \ No newline at end of file diff --git a/app/boards/shields/qaz/qaz.keymap b/app/boards/shields/qaz/qaz.keymap index c887fb03..72b51100 100644 --- a/app/boards/shields/qaz/qaz.keymap +++ b/app/boards/shields/qaz/qaz.keymap @@ -29,6 +29,7 @@ compatible = "zmk,keymap"; default_layer { + display-name = "Default Layer"; bindings = < &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &hm LGUI A &hm LALT S &hm LCTRL D &hm LSHFT F &kp G &kp H &hm RSHFT J &hm RCTRL K &hm RALT L &hm RGUI RET @@ -37,6 +38,7 @@ >; }; num_sym { + display-name = "Num Sym"; bindings = < &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &trans &trans &trans &trans &trans &trans &trans &trans &kp EQUAL &kp MINUS @@ -46,6 +48,7 @@ }; nav { + display-name = "Nav"; bindings = < &bt BT_CLR &bt BT_NXT &bt BT_PRV &none &none &none &none &kp UP &none &kp BSPC &trans &trans &trans &trans &none &none &kp LEFT &kp DOWN &kp RIGHT &none @@ -54,4 +57,4 @@ >; }; }; -}; \ No newline at end of file +}; diff --git a/app/boards/shields/qaz/qaz.overlay b/app/boards/shields/qaz/qaz.overlay index 5c76b98f..ca4a0bc1 100644 --- a/app/boards/shields/qaz/qaz.overlay +++ b/app/boards/shields/qaz/qaz.overlay @@ -1,18 +1,19 @@ /* - * Copyright (c) 2020 The ZMK Contributors + * Copyright (c) 2024 The ZMK Contributors * * SPDX-License-Identifier: MIT */ #include +#include "qaz-layouts.dtsi" / { chosen { zmk,kscan = &kscan0; - zmk,matrix-transform = &default_transform; + zmk,physical-layout = &split_bar_layout; }; - default_transform: keymap_transform_0 { + split_bar_transform: split_bar_transform { compatible = "zmk,matrix-transform"; columns = <7>; rows = <6>; @@ -24,6 +25,30 @@ >; }; + split_big_bar_transform: split_big_bar_transform { + compatible = "zmk,matrix-transform"; + columns = <7>; + rows = <6>; + map = < + RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(4,0) RC(4,1) RC(4,2) + RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(5,0) RC(5,1) RC(5,2) + RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(4,3) RC(5,3) + RC(3,0) RC(3,1) RC(3,2) RC(3,5) RC(3,6) RC(4,4) + >; + }; + + big_bar_transform: big_bar_transform { + compatible = "zmk,matrix-transform"; + columns = <7>; + rows = <6>; + map = < + RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(4,0) RC(4,1) RC(4,2) + RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(5,0) RC(5,1) RC(5,2) + RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(4,3) RC(5,3) + RC(3,0) RC(3,1) RC(3,4) RC(3,6) RC(4,4) + >; + }; + kscan0: kscan_0 { compatible = "zmk,kscan-gpio-matrix"; @@ -49,5 +74,4 @@ , <&pro_micro 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> ; }; - }; \ No newline at end of file diff --git a/app/boards/shields/qaz/qaz.zmk.yml b/app/boards/shields/qaz/qaz.zmk.yml index 3305e3da..05b277db 100644 --- a/app/boards/shields/qaz/qaz.zmk.yml +++ b/app/boards/shields/qaz/qaz.zmk.yml @@ -6,3 +6,4 @@ url: https://www.cbkbd.com/product/qaz-keyboard-kit requires: [pro_micro] features: - keys + - studio diff --git a/app/boards/shields/quefrency/quefrency.keymap b/app/boards/shields/quefrency/quefrency.keymap index 7d519ad4..d22da69d 100644 --- a/app/boards/shields/quefrency/quefrency.keymap +++ b/app/boards/shields/quefrency/quefrency.keymap @@ -21,6 +21,7 @@ // ------------------------------------------- ------------------------------------------------------ default_layer { + display-name = "Default Layer"; bindings = < &kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 /**/ &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC &kp GRAVE &kp TAB &kp Q &kp W &kp E &kp R &kp T /**/ &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSLH &kp HOME @@ -39,6 +40,7 @@ // ------------------------------------------- ------------------------------------------------------ fn_layer { + display-name = "Fn Layer"; bindings = < &bt BT_CLR &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 /**/ &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &trans &bt BT_CLR &trans &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &trans &trans /**/ &trans &trans &trans &trans &trans &trans &trans &trans &trans diff --git a/app/boards/shields/redox/boards/nice_nano.overlay b/app/boards/shields/redox/boards/nice_nano.overlay deleted file mode 100644 index 424a617b..00000000 --- a/app/boards/shields/redox/boards/nice_nano.overlay +++ /dev/null @@ -1,46 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; -}; - -&spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; - - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; - - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; - - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; - - color-mapping = ; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; diff --git a/app/boards/shields/helix/boards/nice_nano_v2.overlay b/app/boards/shields/redox/boards/nice_nano_nrf52840_zmk.overlay similarity index 100% rename from app/boards/shields/helix/boards/nice_nano_v2.overlay rename to app/boards/shields/redox/boards/nice_nano_nrf52840_zmk.overlay diff --git a/app/boards/shields/redox/boards/nice_nano_v2.overlay b/app/boards/shields/redox/boards/nice_nano_v2.overlay deleted file mode 100644 index 424a617b..00000000 --- a/app/boards/shields/redox/boards/nice_nano_v2.overlay +++ /dev/null @@ -1,46 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; -}; - -&spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; - - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; - - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; - - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; - - color-mapping = ; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; diff --git a/app/boards/shields/redox/redox-layouts.dtsi b/app/boards/shields/redox/redox-layouts.dtsi new file mode 100644 index 00000000..c998887f --- /dev/null +++ b/app/boards/shields/redox/redox-layouts.dtsi @@ -0,0 +1,87 @@ +/* + * Copyright (c) 2025 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include + +/ { + redox_physical_layout: redox_physical_layout { + compatible = "zmk,physical-layout"; + display-name = "Default"; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 35 0 0 0> + , <&key_physical_attrs 100 100 100 35 0 0 0> + , <&key_physical_attrs 100 100 200 15 0 0 0> + , <&key_physical_attrs 100 100 300 0 0 0 0> + , <&key_physical_attrs 100 100 400 15 0 0 0> + , <&key_physical_attrs 100 100 500 35 0 0 0> + , <&key_physical_attrs 100 100 1100 35 0 0 0> + , <&key_physical_attrs 100 100 1200 15 0 0 0> + , <&key_physical_attrs 100 100 1300 0 0 0 0> + , <&key_physical_attrs 100 100 1400 15 0 0 0> + , <&key_physical_attrs 100 100 1500 35 0 0 0> + , <&key_physical_attrs 100 100 1600 35 0 0 0> + , <&key_physical_attrs 100 100 0 135 0 0 0> + , <&key_physical_attrs 100 100 100 135 0 0 0> + , <&key_physical_attrs 100 100 200 115 0 0 0> + , <&key_physical_attrs 100 100 300 100 0 0 0> + , <&key_physical_attrs 100 100 400 115 0 0 0> + , <&key_physical_attrs 100 100 500 135 0 0 0> + , <&key_physical_attrs 100 100 600 85 0 0 0> + , <&key_physical_attrs 100 100 1000 85 0 0 0> + , <&key_physical_attrs 100 100 1100 135 0 0 0> + , <&key_physical_attrs 100 100 1200 115 0 0 0> + , <&key_physical_attrs 100 100 1300 100 0 0 0> + , <&key_physical_attrs 100 100 1400 115 0 0 0> + , <&key_physical_attrs 100 100 1500 135 0 0 0> + , <&key_physical_attrs 100 100 1600 135 0 0 0> + , <&key_physical_attrs 100 100 0 235 0 0 0> + , <&key_physical_attrs 100 100 100 235 0 0 0> + , <&key_physical_attrs 100 100 200 215 0 0 0> + , <&key_physical_attrs 100 100 300 200 0 0 0> + , <&key_physical_attrs 100 100 400 215 0 0 0> + , <&key_physical_attrs 100 100 500 235 0 0 0> + , <&key_physical_attrs 100 100 600 205 0 0 0> + , <&key_physical_attrs 100 100 1000 205 0 0 0> + , <&key_physical_attrs 100 100 1100 235 0 0 0> + , <&key_physical_attrs 100 100 1200 215 0 0 0> + , <&key_physical_attrs 100 100 1300 200 0 0 0> + , <&key_physical_attrs 100 100 1400 215 0 0 0> + , <&key_physical_attrs 100 100 1500 235 0 0 0> + , <&key_physical_attrs 100 100 1600 235 0 0 0> + , <&key_physical_attrs 100 100 0 335 0 0 0> + , <&key_physical_attrs 100 100 100 335 0 0 0> + , <&key_physical_attrs 100 100 200 315 0 0 0> + , <&key_physical_attrs 100 100 300 300 0 0 0> + , <&key_physical_attrs 100 100 400 315 0 0 0> + , <&key_physical_attrs 100 100 500 335 0 0 0> + , <&key_physical_attrs 100 100 600 335 3000 550 435> + , <&key_physical_attrs 100 100 700 335 3000 550 435> + , <&key_physical_attrs 100 100 900 335 (-3000) 1150 435> + , <&key_physical_attrs 100 100 1000 335 (-3000) 1150 435> + , <&key_physical_attrs 100 100 1100 335 0 0 0> + , <&key_physical_attrs 100 100 1200 315 0 0 0> + , <&key_physical_attrs 100 100 1300 300 0 0 0> + , <&key_physical_attrs 100 100 1400 315 0 0 0> + , <&key_physical_attrs 100 100 1500 335 0 0 0> + , <&key_physical_attrs 100 100 1600 335 0 0 0> + , <&key_physical_attrs 100 100 0 435 0 0 0> + , <&key_physical_attrs 100 100 100 435 0 0 0> + , <&key_physical_attrs 100 100 200 415 0 0 0> + , <&key_physical_attrs 100 100 300 400 0 0 0> + , <&key_physical_attrs 100 100 450 435 1000 450 435> + , <&key_physical_attrs 100 100 600 435 3000 550 435> + , <&key_physical_attrs 100 100 700 435 3000 550 435> + , <&key_physical_attrs 100 100 900 435 (-3000) 1150 435> + , <&key_physical_attrs 100 100 1000 435 (-3000) 1150 435> + , <&key_physical_attrs 100 100 1150 435 (-1000) 1250 435> + , <&key_physical_attrs 100 100 1300 400 0 0 0> + , <&key_physical_attrs 100 100 1400 415 0 0 0> + , <&key_physical_attrs 100 100 1500 435 0 0 0> + , <&key_physical_attrs 100 100 1600 435 0 0 0> + ; + }; +}; diff --git a/app/boards/shields/redox/redox.conf b/app/boards/shields/redox/redox.conf index a1837ef9..25d3e6c4 100644 --- a/app/boards/shields/redox/redox.conf +++ b/app/boards/shields/redox/redox.conf @@ -1,3 +1,2 @@ # Uncomment the following lines to enable the Redox RGB Underglow # CONFIG_ZMK_RGB_UNDERGLOW=y -# CONFIG_WS2812_STRIP=y \ No newline at end of file diff --git a/app/boards/shields/redox/redox.dtsi b/app/boards/shields/redox/redox.dtsi index 098be434..5fb87773 100644 --- a/app/boards/shields/redox/redox.dtsi +++ b/app/boards/shields/redox/redox.dtsi @@ -5,11 +5,17 @@ */ #include +#include "redox-layouts.dtsi" + + +&redox_physical_layout { + transform = <&default_transform>; +}; / { chosen { zmk,kscan = &kscan0; - zmk,matrix-transform = &default_transform; + zmk,physical-layout = &redox_physical_layout; }; default_transform: keymap_transform_0 { diff --git a/app/boards/shields/redox/redox.keymap b/app/boards/shields/redox/redox.keymap index ea4c09f9..02db9175 100644 --- a/app/boards/shields/redox/redox.keymap +++ b/app/boards/shields/redox/redox.keymap @@ -15,6 +15,7 @@ compatible = "zmk,keymap" ; default_layer { + display-name = "Default Layer"; // -------------------------------------------------------------------------------------------------------------------------------- // | ESC | 1 | 2 | 3 | 4 | 5 | --- | 6 | 7 | 8 | 9 | 0 | BSPC | // | TAB | Q | W | E | R | T | ( | --- | ) | Y | U | I | O | P | - | @@ -32,6 +33,7 @@ }; lower_layer { + display-name = "Lower Layer"; // -------------------------------------------------------------------------------------------------------------------------- // | ESC | 1 | 2 | 3 | 4 | 5 | --- | 6 | 7 | 8 | 9 | 0 | DEL | // | ESC | 1 | 2 | 3 | 4 | 5 | ( | --- | ) | 6 | 7 | 8 | 9 | 0 | DEL | @@ -48,6 +50,7 @@ }; raise_layer { + display-name = "Raise Layer"; // ---------------------------------------------------------------------------------------------------------------------------- // | ESC | 1 | 2 | 3 | 4 | 5 | --- | 6 | 7 | 8 | 9 | 0 | DEL | // | ESC | ! | @ | # | $ | % | ( | --- | ) | ^ | & | * | ( | ) | DEL | @@ -64,6 +67,7 @@ }; adjust_layer { + display-name = "Adjust Layer"; // ----------------------------------------------------------------------------------------- // | F1 | F2 | F3 | F4 | F5 | F6 | --- | F7 | F8 | F9 | F10 | F11 | F12 | // | TAB | | | | | | BOOTL | --- | ) | BT1 | BT2 | BT3 | BT4 | BT5 | OUTPUT TGL | diff --git a/app/boards/shields/reviung34/boards/nice_nano_v2.overlay b/app/boards/shields/reviung34/boards/nice_nano_v2.overlay deleted file mode 100644 index d14b95db..00000000 --- a/app/boards/shields/reviung34/boards/nice_nano_v2.overlay +++ /dev/null @@ -1,47 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; -}; - -&spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; - - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; - - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; - - /* WS2812 */ - chain-length = <9>; /* number of LEDs */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; - color-mapping = ; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; diff --git a/app/boards/shields/reviung34/reviung34-layouts.dtsi b/app/boards/shields/reviung34/reviung34-layouts.dtsi new file mode 100644 index 00000000..cc331fee --- /dev/null +++ b/app/boards/shields/reviung34/reviung34-layouts.dtsi @@ -0,0 +1,114 @@ +/* + * Copyright (c) 2026 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include + +/ { + reviung34_dual_1u_layout: reviung34_dual_1u_layout { + compatible = "zmk,physical-layout"; + display-name = "Dual 1U (34 keys)"; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 35 2 1000 85 52> + , <&key_physical_attrs 100 100 136 1 1000 186 51> + , <&key_physical_attrs 100 100 238 0 1000 288 50> + , <&key_physical_attrs 100 100 333 35 1000 383 85> + , <&key_physical_attrs 100 100 429 71 1000 479 121> + , <&key_physical_attrs 100 100 555 71 (-1000) 605 121> + , <&key_physical_attrs 100 100 650 35 (-1000) 700 85> + , <&key_physical_attrs 100 100 746 0 (-1000) 796 50> + , <&key_physical_attrs 100 100 847 1 (-1000) 897 51> + , <&key_physical_attrs 100 100 949 1 (-1000) 999 51> + , <&key_physical_attrs 100 100 17 100 1000 67 150> + , <&key_physical_attrs 100 100 119 99 1000 169 149> + , <&key_physical_attrs 100 100 221 98 1000 271 148> + , <&key_physical_attrs 100 100 316 134 1000 366 184> + , <&key_physical_attrs 100 100 411 169 1000 461 219> + , <&key_physical_attrs 100 100 572 169 (-1000) 622 219> + , <&key_physical_attrs 100 100 668 134 (-1000) 718 184> + , <&key_physical_attrs 100 100 763 98 (-1000) 813 148> + , <&key_physical_attrs 100 100 865 99 (-1000) 915 149> + , <&key_physical_attrs 100 100 966 100 (-1000) 1016 150> + , <&key_physical_attrs 100 100 0 198 1000 50 248> + , <&key_physical_attrs 100 100 102 198 1000 152 248> + , <&key_physical_attrs 100 100 203 197 1000 253 247> + , <&key_physical_attrs 100 100 298 232 1000 348 282> + , <&key_physical_attrs 100 100 394 268 1000 444 318> + , <&key_physical_attrs 100 100 590 268 (-1000) 640 318> + , <&key_physical_attrs 100 100 685 232 (-1000) 735 282> + , <&key_physical_attrs 100 100 780 197 (-1000) 830 247> + , <&key_physical_attrs 100 100 882 198 (-1000) 932 248> + , <&key_physical_attrs 100 100 984 198 (-1000) 1034 248> + , <&key_physical_attrs 100 100 328 370 1500 378 420> + , <&key_physical_attrs 100 100 442 385 0 0 0> + , <&key_physical_attrs 100 100 542 385 0 0 0> + , <&key_physical_attrs 100 100 655 370 (-1500) 705 420> + ; + }; + + reviung34_single_2u_layout: reviung34_single_2u_layout { + compatible = "zmk,physical-layout"; + display-name = "Single 2U (33 keys)"; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 35 2 1000 85 52> + , <&key_physical_attrs 100 100 136 1 1000 186 51> + , <&key_physical_attrs 100 100 238 0 1000 288 50> + , <&key_physical_attrs 100 100 333 35 1000 383 85> + , <&key_physical_attrs 100 100 429 71 1000 479 121> + , <&key_physical_attrs 100 100 555 71 (-1000) 605 121> + , <&key_physical_attrs 100 100 650 35 (-1000) 700 85> + , <&key_physical_attrs 100 100 746 0 (-1000) 796 50> + , <&key_physical_attrs 100 100 847 1 (-1000) 897 51> + , <&key_physical_attrs 100 100 949 1 (-1000) 999 51> + , <&key_physical_attrs 100 100 17 100 1000 67 150> + , <&key_physical_attrs 100 100 119 99 1000 169 149> + , <&key_physical_attrs 100 100 221 98 1000 271 148> + , <&key_physical_attrs 100 100 316 134 1000 366 184> + , <&key_physical_attrs 100 100 411 169 1000 461 219> + , <&key_physical_attrs 100 100 572 169 (-1000) 622 219> + , <&key_physical_attrs 100 100 668 134 (-1000) 718 184> + , <&key_physical_attrs 100 100 763 98 (-1000) 813 148> + , <&key_physical_attrs 100 100 865 99 (-1000) 915 149> + , <&key_physical_attrs 100 100 966 100 (-1000) 1016 150> + , <&key_physical_attrs 100 100 0 198 1000 50 248> + , <&key_physical_attrs 100 100 102 198 1000 152 248> + , <&key_physical_attrs 100 100 203 197 1000 253 247> + , <&key_physical_attrs 100 100 298 232 1000 348 282> + , <&key_physical_attrs 100 100 394 268 1000 444 318> + , <&key_physical_attrs 100 100 590 268 (-1000) 640 318> + , <&key_physical_attrs 100 100 685 232 (-1000) 735 282> + , <&key_physical_attrs 100 100 780 197 (-1000) 830 247> + , <&key_physical_attrs 100 100 882 198 (-1000) 932 248> + , <&key_physical_attrs 100 100 984 198 (-1000) 1034 248> + , <&key_physical_attrs 100 100 328 370 1500 378 420> + , <&key_physical_attrs 200 100 442 385 0 0 0> + , <&key_physical_attrs 100 100 655 370 (-1500) 705 420> + ; + }; + + reviung34_position_map { + compatible = "zmk,physical-layout-position-map"; + + reviung34_dual_1u_posmap { + physical-layout = <&reviung34_dual_1u_layout>; + positions + = < 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 33 32>; + }; + + reviung34_single_2u_posmap { + physical-layout = <&reviung34_single_2u_layout>; + positions + = < 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>; + }; + }; +}; diff --git a/app/boards/shields/reviung34/reviung34.conf b/app/boards/shields/reviung34/reviung34.conf index 289f070b..6ca70f41 100644 --- a/app/boards/shields/reviung34/reviung34.conf +++ b/app/boards/shields/reviung34/reviung34.conf @@ -1,3 +1,2 @@ # Uncomment the following lines to enable RGB underglow # CONFIG_ZMK_RGB_UNDERGLOW=y -# CONFIG_WS2812_STRIP=y diff --git a/app/boards/shields/reviung34/reviung34.overlay b/app/boards/shields/reviung34/reviung34.overlay index 0f58b99d..0e800a7d 100644 --- a/app/boards/shields/reviung34/reviung34.overlay +++ b/app/boards/shields/reviung34/reviung34.overlay @@ -6,10 +6,20 @@ #include +#include "reviung34-layouts.dtsi" + +&reviung34_dual_1u_layout { + transform = <&dual_1u_transform>; +}; + +&reviung34_single_2u_layout { + transform = <&single_2u_transform>; +}; + / { chosen { zmk,kscan = &kscan0; - zmk,matrix-transform = &dual_1u_transform; + zmk,physical-layout = &reviung34_dual_1u_layout; }; dual_1u_transform: keymap_transform_0 { diff --git a/app/boards/shields/reviung41/boards/nice_nano.overlay b/app/boards/shields/reviung41/boards/nice_nano_nrf52840_zmk.overlay similarity index 100% rename from app/boards/shields/reviung41/boards/nice_nano.overlay rename to app/boards/shields/reviung41/boards/nice_nano_nrf52840_zmk.overlay diff --git a/app/boards/shields/reviung41/boards/nice_nano_v2.overlay b/app/boards/shields/reviung41/boards/nice_nano_v2.overlay deleted file mode 100644 index 59180064..00000000 --- a/app/boards/shields/reviung41/boards/nice_nano_v2.overlay +++ /dev/null @@ -1,46 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; -}; - -&spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; - - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; - - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; - - /* WS2812 */ - chain-length = <11>; - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; - - color-mapping = ; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; diff --git a/app/boards/shields/reviung41/reviung41.conf b/app/boards/shields/reviung41/reviung41.conf index 289f070b..6ca70f41 100644 --- a/app/boards/shields/reviung41/reviung41.conf +++ b/app/boards/shields/reviung41/reviung41.conf @@ -1,3 +1,2 @@ # Uncomment the following lines to enable RGB underglow # CONFIG_ZMK_RGB_UNDERGLOW=y -# CONFIG_WS2812_STRIP=y diff --git a/app/boards/shields/reviung41/reviung41.keymap b/app/boards/shields/reviung41/reviung41.keymap index 618052b2..673c76f4 100644 --- a/app/boards/shields/reviung41/reviung41.keymap +++ b/app/boards/shields/reviung41/reviung41.keymap @@ -14,6 +14,7 @@ compatible = "zmk,keymap"; default_layer { + display-name = "Default Layer"; // ------------------------------------------------------------------------------------- // | TAB | Q | W | E | R | T | | Y | U | I | O | P | BSPC | // | CTRL | A | S | D | F | G | | H | J | K | L | ; | ' | @@ -28,6 +29,7 @@ }; lower_layer { + display-name = "Lower Layer"; // ------------------------------------------------------------------------------------ // | | ! | @ | # | $ | % | | ^ | & | * | ( | ) | DEL | // | | _ | + | { | } | "|" | | LFT | DWN | UP | RGT | ` | ~ | @@ -42,6 +44,7 @@ }; raise_layer { + display-name = "Raise Layer"; // ---------------------------------------------------------------------------- // | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | DEL | // | | - | = | [ | ] | \ | | F1 | F2 | F3 | F4 | F5 | F6 | @@ -56,6 +59,7 @@ }; adjust_layer { + display-name = "Adjust Layer"; // ----------------------------------------------------------------------------------------- // | RGB BRI+ | RGB SAT+ | RGB HUE+ | RGB ANI+ | | RGB TOG | | BT1 | BT2 | BT3 | BT4 | BT5 | BT CLR | // | RGB BRI- | RGB SAT- | RGB HUE- | RGB ANI- | | | | | | | | | | diff --git a/app/boards/shields/reviung41/reviung41.overlay b/app/boards/shields/reviung41/reviung41.overlay index f8503fc3..b8a499e9 100644 --- a/app/boards/shields/reviung41/reviung41.overlay +++ b/app/boards/shields/reviung41/reviung41.overlay @@ -6,10 +6,16 @@ #include +#include + +>ips_reviung41_layout { + transform = <&default_transform>; +}; + / { chosen { zmk,kscan = &kscan0; - zmk,matrix-transform = &default_transform; + zmk,physical-layout = >ips_reviung41_layout; }; default_transform: keymap_transform_0 { diff --git a/app/boards/shields/reviung41/reviung41.zmk.yml b/app/boards/shields/reviung41/reviung41.zmk.yml index 9783b9d9..ccbc1f41 100644 --- a/app/boards/shields/reviung41/reviung41.zmk.yml +++ b/app/boards/shields/reviung41/reviung41.zmk.yml @@ -6,3 +6,4 @@ url: https://github.com/gtips/reviung/tree/master/reviung41 requires: [pro_micro] features: - keys + - studio diff --git a/app/boards/shields/reviung5/reviung5.conf b/app/boards/shields/reviung5/reviung5.conf index a8b4a868..78ebd1d1 100644 --- a/app/boards/shields/reviung5/reviung5.conf +++ b/app/boards/shields/reviung5/reviung5.conf @@ -1,3 +1,6 @@ -# Encoder support. Uncomment to enable. +# Uncomment the following two lines to add support for encoders # CONFIG_EC11=y # CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y + +# Uncomment the following two lines to enable RGB underglow +# CONFIG_ZMK_RGB_UNDERGLOW=y diff --git a/app/boards/shields/reviung5/reviung5.keymap b/app/boards/shields/reviung5/reviung5.keymap index 31c89cbc..33701677 100644 --- a/app/boards/shields/reviung5/reviung5.keymap +++ b/app/boards/shields/reviung5/reviung5.keymap @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 The ZMK Contributors + * Copyright (c) 2024 The ZMK Contributors * * SPDX-License-Identifier: MIT */ @@ -8,20 +8,31 @@ #include #include #include +#include #define BASE 0 #define BLE 1 +#define RGB 2 / { + + behaviors { + rgb_encoder: rgb_encoder { + compatible = "zmk,behavior-sensor-rotate"; + #sensor-binding-cells = <0>; + bindings = <&rgb_ug RGB_BRI>, <&rgb_ug RGB_BRD>; + }; + }; + keymap { compatible = "zmk,keymap"; base_layer { display-name = "BASE"; bindings = < - // ╭─────────────┬──────────────┬──────────────────┬─────────────┬─────────────╮ - &mo BLE &kp C_PREVIOUS &kp C_PLAY_PAUSE &kp C_NEXT &kp C_MUTE - // ╰─────────────┴──────────────┴──────────────────┴─────────────┴─────────────╯ + // ╭─────────┬────────────────┬──────────────────┬────────────┬────────────────╮ + &mo BLE &kp C_PREVIOUS &kp C_PLAY_PAUSE &kp C_NEXT < RGB C_MUTE + // ╰─────────┴────────────────┴──────────────────┴────────────┴────────────────╯ >; sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; }; @@ -29,10 +40,20 @@ ble_layer { display-name = "BLE"; bindings = < - // ╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮ - &trans &out OUT_TOG &bt BT_PRV &bt BT_NXT &bt BT_CLR - // ╰─────────────┴─────────────┴─────────────┴─────────────┴─────────────╯ + // ╭────────┬──────────────┬────────────┬────────────┬────────────╮ + &trans &out OUT_TOG &bt BT_PRV &bt BT_NXT &bt BT_CLR + // ╰────────┴──────────────┴────────────┴────────────┴────────────╯ >; }; + + rgb_layer { + display-name = "RGB"; + bindings = < + // ╭──────────────────┬─────────────────┬─────────────────┬──────────────────────────────────┬────────╮ + &rgb_ug RGB_TOG &rgb_ug RGB_EFR &rgb_ug RGB_EFF &rgb_ug RGB_COLOR_HSB(307,89,98) &trans + // ╰──────────────────┴─────────────────┴─────────────────┴──────────────────────────────────┴────────╯ + >; + sensor-bindings = <&rgb_encoder>; + }; }; -}; +}; \ No newline at end of file diff --git a/app/boards/shields/reviung5/reviung5.zmk.yml b/app/boards/shields/reviung5/reviung5.zmk.yml index 9be3811f..bf332f23 100644 --- a/app/boards/shields/reviung5/reviung5.zmk.yml +++ b/app/boards/shields/reviung5/reviung5.zmk.yml @@ -7,3 +7,4 @@ requires: [pro_micro] features: - keys - encoder + - underglow diff --git a/app/boards/shields/reviung53/boards/nice_nano.overlay b/app/boards/shields/reviung53/boards/nice_nano_nrf52840_zmk.overlay similarity index 100% rename from app/boards/shields/reviung53/boards/nice_nano.overlay rename to app/boards/shields/reviung53/boards/nice_nano_nrf52840_zmk.overlay diff --git a/app/boards/shields/reviung53/boards/nice_nano_v2.overlay b/app/boards/shields/reviung53/boards/nice_nano_v2.overlay deleted file mode 100644 index 24905ac2..00000000 --- a/app/boards/shields/reviung53/boards/nice_nano_v2.overlay +++ /dev/null @@ -1,46 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; -}; - -&spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; - - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; - - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; - - /* WS2812 */ - chain-length = <10>; - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; - - color-mapping = ; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; diff --git a/app/boards/shields/reviung53/reviung53.conf b/app/boards/shields/reviung53/reviung53.conf index 289f070b..6ca70f41 100644 --- a/app/boards/shields/reviung53/reviung53.conf +++ b/app/boards/shields/reviung53/reviung53.conf @@ -1,3 +1,2 @@ # Uncomment the following lines to enable RGB underglow # CONFIG_ZMK_RGB_UNDERGLOW=y -# CONFIG_WS2812_STRIP=y diff --git a/app/boards/shields/reviung53/reviung53.keymap b/app/boards/shields/reviung53/reviung53.keymap index c3b39994..001c531a 100644 --- a/app/boards/shields/reviung53/reviung53.keymap +++ b/app/boards/shields/reviung53/reviung53.keymap @@ -22,6 +22,7 @@ compatible = "zmk,keymap"; default_layer { + display-name = "Default Layer"; // ---------------------------------------------------------------------------------------- // | | | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | DEL | // | TAB | Q | W | E | R | T | Y | U | I | O | P | BSPC | @@ -39,6 +40,7 @@ }; lower_layer { + display-name = "Lower Layer"; // -------------------------------------------------------------------------------------------- // | | | | F9 | F10 | F11 | F12 | INS | PAU | SCR | PSCR | | // | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | @@ -56,6 +58,7 @@ }; raise_layer { + display-name = "Raise Layer"; // -------------------------------------------------------------------------------------- // | | | | F9 | F10 | F11 | F12 | MUTE | VOL+ | VOL- | PLAY | | // | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | @@ -73,6 +76,7 @@ }; adjust_layer { + display-name = "Adjust Layer"; // ------------------------------------------------------------------------------------------------------------------------ // | | | BT CLR | BT1 | BT2 | BT3 | BT4 | BT5 | | | | BT CLR | // | RGB BRI+ | RGB SAT+ | RGB HUE+ | RGB ANI+ | | RGB TOG | | | | | | | @@ -90,6 +94,7 @@ }; nav_layer { + display-name = "Nav Layer"; // ------------------------------------------------------------------------------------------------------------------------ // | | | ESC | | | | | | | | | DEL | // | TAB | | UP | | | | | | | | | BSPC | @@ -106,4 +111,4 @@ >; }; }; -}; \ No newline at end of file +}; diff --git a/app/boards/shields/romac/romac.keymap b/app/boards/shields/romac/romac.keymap index e48368a8..3f656752 100644 --- a/app/boards/shields/romac/romac.keymap +++ b/app/boards/shields/romac/romac.keymap @@ -13,6 +13,7 @@ compatible = "zmk,keymap"; default_layer { + display-name = "Default Layer"; // ------------------- // | 7 | 8 | 9 | // | 4 | 5 | 6 | @@ -28,6 +29,7 @@ }; nav_layer { + display-name = "Nav Layer"; // ----------------------- // | BTNXT | HOME | PGUP | // | BTPRV | END | PGDN | diff --git a/app/boards/shields/romac_plus/boards/nice_nano.overlay b/app/boards/shields/romac_plus/boards/nice_nano.overlay deleted file mode 100644 index 424a617b..00000000 --- a/app/boards/shields/romac_plus/boards/nice_nano.overlay +++ /dev/null @@ -1,46 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; -}; - -&spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; - - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; - - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; - - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; - - color-mapping = ; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; diff --git a/app/boards/shields/jorne/boards/nice_nano.overlay b/app/boards/shields/romac_plus/boards/nice_nano_nrf52840_zmk.overlay similarity index 100% rename from app/boards/shields/jorne/boards/nice_nano.overlay rename to app/boards/shields/romac_plus/boards/nice_nano_nrf52840_zmk.overlay diff --git a/app/boards/shields/romac_plus/boards/nice_nano_v2.overlay b/app/boards/shields/romac_plus/boards/nice_nano_v2.overlay deleted file mode 100644 index 424a617b..00000000 --- a/app/boards/shields/romac_plus/boards/nice_nano_v2.overlay +++ /dev/null @@ -1,46 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; -}; - -&spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; - - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; - - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; - - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; - - color-mapping = ; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; diff --git a/app/boards/shields/romac_plus/romac_plus.keymap b/app/boards/shields/romac_plus/romac_plus.keymap index 039f6eb6..fd63e78b 100644 --- a/app/boards/shields/romac_plus/romac_plus.keymap +++ b/app/boards/shields/romac_plus/romac_plus.keymap @@ -13,6 +13,7 @@ compatible = "zmk,keymap"; default_layer { + display-name = "Default Layer"; // -------------------------- // | 7 | 8 | 9 | // | 4 | 5 | 6 | @@ -30,6 +31,7 @@ }; nav_layer { + display-name = "Nav Layer"; // -------------------------- // | BT_CLR | HOME | PGUP | // | _ | END | PGDN | @@ -46,4 +48,4 @@ sensor-bindings = <&inc_dec_kp A B>; }; }; -}; \ No newline at end of file +}; diff --git a/app/boards/shields/settings_reset/settings_reset.conf b/app/boards/shields/settings_reset/settings_reset.conf index 4ed84df8..d4b2acd8 100644 --- a/app/boards/shields/settings_reset/settings_reset.conf +++ b/app/boards/shields/settings_reset/settings_reset.conf @@ -2,3 +2,5 @@ CONFIG_SETTINGS=y CONFIG_ZMK_SETTINGS_RESET_ON_START=y # Disable BLE so splits don't try to re-pair until normal firmware is flashed. CONFIG_ZMK_BLE=n +# Disable displays so status screens that rely on BLE do not fail the build. +CONFIG_ZMK_DISPLAY=n diff --git a/app/boards/shields/snap/boards/nice_nano.overlay b/app/boards/shields/snap/boards/nice_nano_nrf52840_zmk.overlay similarity index 100% rename from app/boards/shields/snap/boards/nice_nano.overlay rename to app/boards/shields/snap/boards/nice_nano_nrf52840_zmk.overlay diff --git a/app/boards/shields/snap/boards/nice_nano_v2.overlay b/app/boards/shields/snap/boards/nice_nano_v2.overlay deleted file mode 100644 index 924151c7..00000000 --- a/app/boards/shields/snap/boards/nice_nano_v2.overlay +++ /dev/null @@ -1,46 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; -}; - -&spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; - - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; - - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; - - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; - - color-mapping = ; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; diff --git a/app/boards/shields/snap/snap.conf b/app/boards/shields/snap/snap.conf index e76bccb4..64c7602b 100644 --- a/app/boards/shields/snap/snap.conf +++ b/app/boards/shields/snap/snap.conf @@ -12,6 +12,5 @@ # Uncomment the following lines to enable the RGB underglow # CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=n # CONFIG_ZMK_RGB_UNDERGLOW=y -# CONFIG_WS2812_STRIP=y # CONFIG_ZMK_RGB_UNDERGLOW_HUE_STEP=5 -# CONFIG_ZMK_RGB_UNDERGLOW_SPD_START=1 \ No newline at end of file +# CONFIG_ZMK_RGB_UNDERGLOW_SPD_START=1 diff --git a/app/boards/shields/snap/snap_right.overlay b/app/boards/shields/snap/snap_right.overlay index b303316a..27955de2 100644 --- a/app/boards/shields/snap/snap_right.overlay +++ b/app/boards/shields/snap/snap_right.overlay @@ -23,7 +23,7 @@ kscan_direct: kscan_direct { direct { kscan = <&kscan_direct>; row-offset = <1>; - column-offset = <8>; + col-offset = <8>; }; }; diff --git a/app/boards/shields/sofle/Kconfig.defconfig b/app/boards/shields/sofle/Kconfig.defconfig index 4eb3d743..767ea35a 100644 --- a/app/boards/shields/sofle/Kconfig.defconfig +++ b/app/boards/shields/sofle/Kconfig.defconfig @@ -43,10 +43,4 @@ endchoice endif # LVGL -if ZMK_RGB_UNDERGLOW - -config WS2812_STRIP - default y -endif - endif diff --git a/app/boards/shields/sofle/boards/nice_nano.overlay b/app/boards/shields/sofle/boards/nice_nano_nrf52840_zmk.overlay similarity index 100% rename from app/boards/shields/sofle/boards/nice_nano.overlay rename to app/boards/shields/sofle/boards/nice_nano_nrf52840_zmk.overlay diff --git a/app/boards/shields/sofle/boards/nrfmicro_13.overlay b/app/boards/shields/sofle/boards/nrfmicro_13.overlay deleted file mode 100644 index f00f59f4..00000000 --- a/app/boards/shields/sofle/boards/nrfmicro_13.overlay +++ /dev/null @@ -1,50 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; -}; - -&spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; - - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; - - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; - - /* WS2812 */ - chain-length = <36>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; - - color-mapping = < - LED_COLOR_ID_GREEN - LED_COLOR_ID_RED - LED_COLOR_ID_BLUE - >; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; diff --git a/app/boards/shields/sofle/boards/nice_nano_v2.overlay b/app/boards/shields/sofle/boards/nrfmicro_nrf52840_zmk_1_1_0.overlay similarity index 100% rename from app/boards/shields/sofle/boards/nice_nano_v2.overlay rename to app/boards/shields/sofle/boards/nrfmicro_nrf52840_zmk_1_1_0.overlay diff --git a/app/boards/shields/sofle/boards/nrfmicro_11.overlay b/app/boards/shields/sofle/boards/nrfmicro_nrf52840_zmk_1_3_0.overlay similarity index 100% rename from app/boards/shields/sofle/boards/nrfmicro_11.overlay rename to app/boards/shields/sofle/boards/nrfmicro_nrf52840_zmk_1_3_0.overlay diff --git a/app/boards/shields/sofle/sofle.keymap b/app/boards/shields/sofle/sofle.keymap index c9db56ce..8cc1c028 100644 --- a/app/boards/shields/sofle/sofle.keymap +++ b/app/boards/shields/sofle/sofle.keymap @@ -78,7 +78,7 @@ // | | | | | | | | | | | | bindings = < &bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &trans &trans &trans &trans &trans &trans -&trans &kp INS &kp PSCRN &kp K_CMENU &trans &trans &kp PG_UP &trans &kp UP &trans &kp N0 &trans +&trans &kp INS &kp PSCRN &kp K_CMENU &trans &trans &kp PG_UP &trans &kp UP &trans &trans &trans &trans &kp LALT &kp LCTRL &kp LSHFT &trans &kp CLCK &kp PG_DN &kp LEFT &kp DOWN &kp RIGHT &kp DEL &kp BSPC &trans &kp K_UNDO &kp K_CUT &kp K_COPY &kp K_PASTE &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans diff --git a/app/boards/shields/sofle/sofle.zmk.yml b/app/boards/shields/sofle/sofle.zmk.yml index 47b66d67..f08689cb 100644 --- a/app/boards/shields/sofle/sofle.zmk.yml +++ b/app/boards/shields/sofle/sofle.zmk.yml @@ -10,6 +10,7 @@ features: - display - encoder - underglow + - studio siblings: - sofle_left - sofle_right diff --git a/app/boards/shields/splitkb_aurora_corne/Kconfig.defconfig b/app/boards/shields/splitkb_aurora_corne/Kconfig.defconfig index d3ac6c77..addfb8d1 100644 --- a/app/boards/shields/splitkb_aurora_corne/Kconfig.defconfig +++ b/app/boards/shields/splitkb_aurora_corne/Kconfig.defconfig @@ -16,10 +16,6 @@ if SHIELD_SPLITKB_AURORA_CORNE_LEFT || SHIELD_SPLITKB_AURORA_CORNE_RIGHT config ZMK_SPLIT default y -config ZMK_RGB_UNDERGLOW - select WS2812_STRIP - select SPI - config ZMK_DISPLAY if ZMK_DISPLAY diff --git a/app/boards/shields/splitkb_aurora_corne/boards/nice_nano.overlay b/app/boards/shields/splitkb_aurora_corne/boards/nice_nano.overlay deleted file mode 100644 index 424a617b..00000000 --- a/app/boards/shields/splitkb_aurora_corne/boards/nice_nano.overlay +++ /dev/null @@ -1,46 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; -}; - -&spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; - - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; - - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; - - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; - - color-mapping = ; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; diff --git a/app/boards/shields/jorne/boards/nice_nano_v2.overlay b/app/boards/shields/splitkb_aurora_corne/boards/nice_nano_nrf52840_zmk.overlay similarity index 100% rename from app/boards/shields/jorne/boards/nice_nano_v2.overlay rename to app/boards/shields/splitkb_aurora_corne/boards/nice_nano_nrf52840_zmk.overlay diff --git a/app/boards/shields/splitkb_aurora_corne/boards/nice_nano_v2.overlay b/app/boards/shields/splitkb_aurora_corne/boards/nice_nano_v2.overlay deleted file mode 100644 index 424a617b..00000000 --- a/app/boards/shields/splitkb_aurora_corne/boards/nice_nano_v2.overlay +++ /dev/null @@ -1,46 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; -}; - -&spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; - - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; - - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; - - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; - - color-mapping = ; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; diff --git a/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne.dtsi b/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne.dtsi index d63cdf21..f57cd235 100644 --- a/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne.dtsi +++ b/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne.dtsi @@ -6,7 +6,8 @@ #include -#include +#include +#include &foostan_corne_6col_layout { transform = <&default_transform>; @@ -20,6 +21,7 @@ chosen { zephyr,display = &oled; + zmk,physical-layout = &foostan_corne_6col_layout; }; default_transform: keymap_transform_0 { diff --git a/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne.keymap b/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne.keymap index ea4c2e89..fa6d4744 100644 --- a/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne.keymap +++ b/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne.keymap @@ -13,6 +13,7 @@ compatible = "zmk,keymap"; default_layer { + display-name = "Default Layer"; // ----------------------------------------------------------------------------------------- // | TAB | Q | W | E | R | T | | Y | U | I | O | P | BSPC | // | CTRL | A | S | D | F | G | | H | J | K | L | ; | ' | @@ -26,6 +27,7 @@ >; }; lower_layer { + display-name = "Lower Layer"; // ----------------------------------------------------------------------------------------- // | TAB | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BSPC | // | BTCLR| BT1 | BT2 | BT3 | BT4 | BT5 | | LFT | DWN | UP | RGT | | | @@ -40,6 +42,7 @@ }; raise_layer { + display-name = "Raise Layer"; // ----------------------------------------------------------------------------------------- // | TAB | ! | @ | # | $ | % | | ^ | & | * | ( | ) | BSPC | // | CTRL | | | | | | | - | = | [ | ] | \ | ` | diff --git a/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne.zmk.yml b/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne.zmk.yml index cc141826..242837a4 100644 --- a/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne.zmk.yml +++ b/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne.zmk.yml @@ -7,6 +7,7 @@ requires: [pro_micro] exposes: [i2c_oled] features: - keys + - studio siblings: - splitkb_aurora_corne_left - splitkb_aurora_corne_right diff --git a/app/boards/shields/splitkb_aurora_helix/Kconfig.defconfig b/app/boards/shields/splitkb_aurora_helix/Kconfig.defconfig index df32b83b..d9bb0eac 100644 --- a/app/boards/shields/splitkb_aurora_helix/Kconfig.defconfig +++ b/app/boards/shields/splitkb_aurora_helix/Kconfig.defconfig @@ -16,10 +16,6 @@ if SHIELD_SPLITKB_AURORA_HELIX_LEFT || SHIELD_SPLITKB_AURORA_HELIX_RIGHT config ZMK_SPLIT default y -config ZMK_RGB_UNDERGLOW - select WS2812_STRIP - select SPI - if ZMK_DISPLAY config SSD1306 diff --git a/app/boards/shields/splitkb_aurora_helix/boards/nice_nano.overlay b/app/boards/shields/splitkb_aurora_helix/boards/nice_nano_nrf52840_zmk.overlay similarity index 100% rename from app/boards/shields/splitkb_aurora_helix/boards/nice_nano.overlay rename to app/boards/shields/splitkb_aurora_helix/boards/nice_nano_nrf52840_zmk.overlay diff --git a/app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix.keymap b/app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix.keymap index edec8fec..cbbb8d81 100644 --- a/app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix.keymap +++ b/app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix.keymap @@ -33,6 +33,7 @@ As such, those are in use within the default layer at this time.*/ compatible = "zmk,keymap"; default_layer { + display-name = "Default Layer"; // --------------------------------------------------------------------------------------------------------------------------------- // | GRAVE | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | DEL | // | TAB | Q | W | E | R | T | | Y | U | I | O | P | BSPC | @@ -48,6 +49,7 @@ As such, those are in use within the default layer at this time.*/ >; }; lower_layer { + display-name = "Lower Layer"; // --------------------------------------------------------------------------------------------------------------------------------- // | | | | | | | | | | | | | | // | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | @@ -63,6 +65,7 @@ As such, those are in use within the default layer at this time.*/ >; }; raise_layer { + display-name = "Raise Layer"; // --------------------------------------------------------------------------------------------------------------------------------- // | | | | | | | | | | | | | | // | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | DEL | @@ -78,6 +81,7 @@ As such, those are in use within the default layer at this time.*/ >; }; adjust_layer { + display-name = "Adjust Layer"; // --------------------------------------------------------------------------------------------------------------------------------- // | ` | ! | @ | # | $ | % | | ^ | & | * | ( | ) | EP TOG | // | BT CLR | BT SEL0 | BT SEL1 | BT SEL2 | BGT SEL3 | BT SEL4 | | RGB EFF+ | RGB HUE+ | RGB SAT+ | RGB SPD+ | RGB BRI+ | RGB TOG | diff --git a/app/boards/shields/splitkb_aurora_lily58/Kconfig.defconfig b/app/boards/shields/splitkb_aurora_lily58/Kconfig.defconfig index 861db44f..9edcf346 100644 --- a/app/boards/shields/splitkb_aurora_lily58/Kconfig.defconfig +++ b/app/boards/shields/splitkb_aurora_lily58/Kconfig.defconfig @@ -16,10 +16,6 @@ if SHIELD_SPLITKB_AURORA_LILY58_LEFT || SHIELD_SPLITKB_AURORA_LILY58_RIGHT config ZMK_SPLIT default y -config ZMK_RGB_UNDERGLOW - select WS2812_STRIP - select SPI - config ZMK_DISPLAY if ZMK_DISPLAY diff --git a/app/boards/shields/splitkb_aurora_lily58/boards/nice_nano.overlay b/app/boards/shields/splitkb_aurora_lily58/boards/nice_nano_nrf52840_zmk.overlay similarity index 100% rename from app/boards/shields/splitkb_aurora_lily58/boards/nice_nano.overlay rename to app/boards/shields/splitkb_aurora_lily58/boards/nice_nano_nrf52840_zmk.overlay diff --git a/app/boards/shields/splitkb_aurora_lily58/boards/nice_nano_v2.overlay b/app/boards/shields/splitkb_aurora_lily58/boards/nice_nano_v2.overlay deleted file mode 100644 index 08452266..00000000 --- a/app/boards/shields/splitkb_aurora_lily58/boards/nice_nano_v2.overlay +++ /dev/null @@ -1,45 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; -}; - -&spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; - - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; - - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; - - /* WS2812 */ - chain-length = <5>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; - color-mapping = ; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; diff --git a/app/boards/shields/splitkb_aurora_lily58/splitkb_aurora_lily58.dtsi b/app/boards/shields/splitkb_aurora_lily58/splitkb_aurora_lily58.dtsi index 93625d28..b270890d 100644 --- a/app/boards/shields/splitkb_aurora_lily58/splitkb_aurora_lily58.dtsi +++ b/app/boards/shields/splitkb_aurora_lily58/splitkb_aurora_lily58.dtsi @@ -6,11 +6,13 @@ #include +#include + / { chosen { zephyr,display = &oled; - zmk,matrix-transform = &default_transform; + zmk,physical-layout = &kata0510_lily58_layout; }; default_transform: keymap_transform_0 { @@ -56,6 +58,10 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,1) RC(4,10) RC(3,6) RC(3,7) }; }; +&kata0510_lily58_layout { + transform = <&default_transform>; +}; + &pro_micro_i2c { status = "okay"; diff --git a/app/boards/shields/splitkb_aurora_lily58/splitkb_aurora_lily58.keymap b/app/boards/shields/splitkb_aurora_lily58/splitkb_aurora_lily58.keymap index b8a9103b..1a18e1df 100644 --- a/app/boards/shields/splitkb_aurora_lily58/splitkb_aurora_lily58.keymap +++ b/app/boards/shields/splitkb_aurora_lily58/splitkb_aurora_lily58.keymap @@ -14,6 +14,7 @@ compatible = "zmk,keymap"; default_layer { + display-name = "Default Layer"; // ------------------------------------------------------------------------------------------------------------ // | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ` | // | TAB | Q | W | E | R | T | | Y | U | I | O | P | - | @@ -32,6 +33,7 @@ }; lower_layer { + display-name = "Lower Layer"; // ------------------------------------------------------------------------------------------------------------ // | BTCLR | BT1 | BT2 | BT3 | BT4 | BT5 | | | | | | | | // | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | @@ -50,6 +52,7 @@ }; raise_layer { + display-name = "Raise Layer"; // ------------------------------------------------------------------------------------------------------------ // | | | | | | | | | | | | | | // | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | diff --git a/app/boards/shields/splitkb_aurora_lily58/splitkb_aurora_lily58.zmk.yml b/app/boards/shields/splitkb_aurora_lily58/splitkb_aurora_lily58.zmk.yml index 47d49a4c..2e9c5c64 100644 --- a/app/boards/shields/splitkb_aurora_lily58/splitkb_aurora_lily58.zmk.yml +++ b/app/boards/shields/splitkb_aurora_lily58/splitkb_aurora_lily58.zmk.yml @@ -7,6 +7,7 @@ requires: [pro_micro] exposes: [i2c_oled] features: - keys + - studio siblings: - splitkb_aurora_lily58_left - splitkb_aurora_lily58_right diff --git a/app/boards/shields/splitkb_aurora_sofle/Kconfig.defconfig b/app/boards/shields/splitkb_aurora_sofle/Kconfig.defconfig index 172548e8..603c35c7 100644 --- a/app/boards/shields/splitkb_aurora_sofle/Kconfig.defconfig +++ b/app/boards/shields/splitkb_aurora_sofle/Kconfig.defconfig @@ -16,10 +16,6 @@ if SHIELD_SPLITKB_AURORA_SOFLE_LEFT || SHIELD_SPLITKB_AURORA_SOFLE_RIGHT config ZMK_SPLIT default y -config ZMK_RGB_UNDERGLOW - select WS2812_STRIP - select SPI - if ZMK_DISPLAY config SSD1306 diff --git a/app/boards/shields/splitkb_aurora_sofle/boards/nice_nano.overlay b/app/boards/shields/splitkb_aurora_sofle/boards/nice_nano.overlay deleted file mode 100644 index 8228d530..00000000 --- a/app/boards/shields/splitkb_aurora_sofle/boards/nice_nano.overlay +++ /dev/null @@ -1,45 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; -}; - -&spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; - - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; - - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; - - /* WS2812 */ - chain-length = <6>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; - color-mapping = ; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; diff --git a/app/boards/shields/splitkb_aurora_helix/boards/nice_nano_v2.overlay b/app/boards/shields/splitkb_aurora_sofle/boards/nice_nano_nrf52840_zmk.overlay similarity index 100% rename from app/boards/shields/splitkb_aurora_helix/boards/nice_nano_v2.overlay rename to app/boards/shields/splitkb_aurora_sofle/boards/nice_nano_nrf52840_zmk.overlay diff --git a/app/boards/shields/splitkb_aurora_sofle/boards/nice_nano_v2.overlay b/app/boards/shields/splitkb_aurora_sofle/boards/nice_nano_v2.overlay deleted file mode 100644 index 8228d530..00000000 --- a/app/boards/shields/splitkb_aurora_sofle/boards/nice_nano_v2.overlay +++ /dev/null @@ -1,45 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; -}; - -&spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; - - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; - - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; - - /* WS2812 */ - chain-length = <6>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; - color-mapping = ; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; diff --git a/app/boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle.dtsi b/app/boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle.dtsi index e360528f..a40d29ae 100644 --- a/app/boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle.dtsi +++ b/app/boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle.dtsi @@ -16,6 +16,7 @@ chosen { zephyr,display = &oled; + zmk,physical-layout = &josefadamcik_sofle_layout; }; default_transform: keymap_transform_0 { diff --git a/app/boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle.keymap b/app/boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle.keymap index 23127416..61cdebd2 100644 --- a/app/boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle.keymap +++ b/app/boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle.keymap @@ -22,6 +22,7 @@ compatible = "zmk,keymap"; default_layer { + display-name = "Default Layer"; // ------------------------------------------------------------------------------------------------------------ // | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ` | // | TAB | Q | W | E | R | T | | Y | U | I | O | P | - | @@ -40,6 +41,7 @@ }; lower_layer { + display-name = "Lower Layer"; // ------------------------------------------------------------------------------------------------------------ // | BTCLR | BT1 | BT2 | BT3 | BT4 | BT5 | | | | | | | | // | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | @@ -58,6 +60,7 @@ }; raise_layer { + display-name = "Raise Layer"; // ------------------------------------------------------------------------------------------------------------ // | | | | | | | | | | | | | | // | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | diff --git a/app/boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle.zmk.yml b/app/boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle.zmk.yml index d832d3e1..0f54b4b8 100644 --- a/app/boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle.zmk.yml +++ b/app/boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle.zmk.yml @@ -10,6 +10,7 @@ features: - display - encoder - underglow + - studio siblings: - splitkb_aurora_sofle_left - splitkb_aurora_sofle_right diff --git a/app/boards/shields/splitkb_aurora_sweep/Kconfig.defconfig b/app/boards/shields/splitkb_aurora_sweep/Kconfig.defconfig index 6a0e3728..c84cf94c 100644 --- a/app/boards/shields/splitkb_aurora_sweep/Kconfig.defconfig +++ b/app/boards/shields/splitkb_aurora_sweep/Kconfig.defconfig @@ -16,10 +16,6 @@ if SHIELD_SPLITKB_AURORA_SWEEP_LEFT || SHIELD_SPLITKB_AURORA_SWEEP_RIGHT config ZMK_SPLIT default y -config ZMK_RGB_UNDERGLOW - select WS2812_STRIP - select SPI - config ZMK_DISPLAY if ZMK_DISPLAY diff --git a/app/boards/shields/splitkb_aurora_sweep/boards/nice_nano.overlay b/app/boards/shields/splitkb_aurora_sweep/boards/nice_nano.overlay deleted file mode 100644 index 424a617b..00000000 --- a/app/boards/shields/splitkb_aurora_sweep/boards/nice_nano.overlay +++ /dev/null @@ -1,46 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; -}; - -&spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; - - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; - - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; - - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; - - color-mapping = ; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; diff --git a/app/boards/shields/kyria/boards/nice_nano.overlay b/app/boards/shields/splitkb_aurora_sweep/boards/nice_nano_nrf52840_zmk.overlay similarity index 100% rename from app/boards/shields/kyria/boards/nice_nano.overlay rename to app/boards/shields/splitkb_aurora_sweep/boards/nice_nano_nrf52840_zmk.overlay diff --git a/app/boards/shields/splitkb_aurora_sweep/boards/nice_nano_v2.overlay b/app/boards/shields/splitkb_aurora_sweep/boards/nice_nano_v2.overlay deleted file mode 100644 index 424a617b..00000000 --- a/app/boards/shields/splitkb_aurora_sweep/boards/nice_nano_v2.overlay +++ /dev/null @@ -1,46 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; -}; - -&spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; - - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; - - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; - - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; - - color-mapping = ; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; diff --git a/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep.dtsi b/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep.dtsi index 4e1a0a97..c00b73f9 100644 --- a/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep.dtsi +++ b/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep.dtsi @@ -15,6 +15,7 @@ / { chosen { zephyr,display = &oled; + zmk,physical-layout = &cuddlykeyboards_ferris_layout; }; default_transform: keymap_transform_0 { diff --git a/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep.keymap b/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep.keymap index 891a36b6..0e719f30 100644 --- a/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep.keymap +++ b/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep.keymap @@ -63,6 +63,7 @@ compatible = "zmk,keymap"; default_layer { + display-name = "Default Layer"; bindings = < &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SQT @@ -72,6 +73,7 @@ }; left_layer { + display-name = "Left Layer"; bindings = < &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp TAB &kp LC(S) &kp DQT &kp PIPE2 &kp HASH &kp MINUS &kp EQUAL &kp LBKT &kp RBKT &kp DEL @@ -81,6 +83,7 @@ }; right_layer { + display-name = "Right Layer"; bindings = < &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp KP_MULTIPLY &kp LPAR &kp RPAR &kp HASH &kp QMARK &kp FSLH &kp COLON &kp SEMI &kp MINUS &kp KP_EQUAL &kp LBRC &kp RBRC &kp BSPC @@ -90,6 +93,7 @@ }; tri_layer { + display-name = "Tri Layer"; bindings = < &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &trans &trans &trans &trans &trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &trans &kp PG_UP &kp K_VOL_UP &kp K_MUTE &trans diff --git a/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep.zmk.yml b/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep.zmk.yml index 97d3c53b..b0295b56 100644 --- a/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep.zmk.yml +++ b/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep.zmk.yml @@ -7,6 +7,7 @@ requires: [pro_micro] exposes: [i2c_oled] features: - keys + - studio siblings: - splitkb_aurora_sweep_left - splitkb_aurora_sweep_right diff --git a/app/boards/shields/splitreus62/splitreus62.keymap b/app/boards/shields/splitreus62/splitreus62.keymap index 09666009..2a017881 100644 --- a/app/boards/shields/splitreus62/splitreus62.keymap +++ b/app/boards/shields/splitreus62/splitreus62.keymap @@ -13,6 +13,7 @@ compatible = "zmk,keymap"; default_layer { + display-name = "Default Layer"; // ------------------------------------------------------------------------------------------------------------ // | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | // | TAB | Q | W | E | R | T | | Y | U | I | O | P | \ | diff --git a/app/boards/shields/tester_pro_micro/Kconfig.defconfig b/app/boards/shields/tester_pro_micro/Kconfig.defconfig new file mode 100644 index 00000000..d1103ac1 --- /dev/null +++ b/app/boards/shields/tester_pro_micro/Kconfig.defconfig @@ -0,0 +1,12 @@ +if SHIELD_TESTER_PRO_MICRO + +config ZMK_KEYBOARD_NAME + default "ZMK Tester" + +config ZMK_BLE + def_bool n + +config SETTINGS + def_bool n + +endif \ No newline at end of file diff --git a/app/boards/shields/tester_pro_micro/Kconfig.shield b/app/boards/shields/tester_pro_micro/Kconfig.shield new file mode 100644 index 00000000..68afa488 --- /dev/null +++ b/app/boards/shields/tester_pro_micro/Kconfig.shield @@ -0,0 +1,2 @@ +config SHIELD_TESTER_PRO_MICRO + def_bool $(shields_list_contains,tester_pro_micro) \ No newline at end of file diff --git a/app/boards/shields/tester_pro_micro/tester_pro_micro-layouts.dtsi b/app/boards/shields/tester_pro_micro/tester_pro_micro-layouts.dtsi new file mode 100644 index 00000000..9892295d --- /dev/null +++ b/app/boards/shields/tester_pro_micro/tester_pro_micro-layouts.dtsi @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2025 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include + +/ { + tester_position_map { + compatible = "zmk,physical-layout-position-map"; + complete; + + pinout_map: pinout_positions { + physical-layout = <&physical_layout0>; + positions = <0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17>; + }; + inline_map: single_row_positions { + physical-layout = <&physical_layout1>; + positions = <0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17>; + }; + }; + + physical_layout0: physical_layout_0 { + compatible = "zmk,physical-layout"; + display-name = "Pro Micro Pinout"; + + // Map key positions to the Pro Micro pinout. The coordinate + // deltas jump around a little because some of the Pro Micro + // pins are out of order: D0 is "after" D1 and D16 is "before" + // D14. + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 100 0 0 0> // D0 + , <&key_physical_attrs 100 100 0 0 0 0 0> // D1 + , <&key_physical_attrs 100 100 0 400 0 0 0> // D2 + , <&key_physical_attrs 100 100 0 500 0 0 0> // D3 + , <&key_physical_attrs 100 100 0 600 0 0 0> // D4 + , <&key_physical_attrs 100 100 0 700 0 0 0> // D5 + , <&key_physical_attrs 100 100 0 800 0 0 0> // D6 + , <&key_physical_attrs 100 100 0 900 0 0 0> // D7 + , <&key_physical_attrs 100 100 0 1000 0 0 0> // D8 + , <&key_physical_attrs 100 100 0 1100 0 0 0> // D9 + , <&key_physical_attrs 100 100 600 1100 0 0 0> // D10 + , <&key_physical_attrs 100 100 600 900 0 0 0> // D14 + , <&key_physical_attrs 100 100 600 800 0 0 0> // D15 + , <&key_physical_attrs 100 100 600 1000 0 0 0> // D16 + , <&key_physical_attrs 100 100 600 700 0 0 0> // D18 + , <&key_physical_attrs 100 100 600 600 0 0 0> // D19 + , <&key_physical_attrs 100 100 600 500 0 0 0> // D20 + , <&key_physical_attrs 100 100 600 400 0 0 0> // D21 + ; + }; + + physical_layout1: physical_layout_1 { + compatible = "zmk,physical-layout"; + display-name = "Single Row"; + + // Single row of eighteen "keys", in ascending "Arduino" order. + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 0 0 0 0> + , <&key_physical_attrs 100 100 100 0 0 0 0> + , <&key_physical_attrs 100 100 200 0 0 0 0> + , <&key_physical_attrs 100 100 300 0 0 0 0> + , <&key_physical_attrs 100 100 400 0 0 0 0> + , <&key_physical_attrs 100 100 500 0 0 0 0> + , <&key_physical_attrs 100 100 600 0 0 0 0> + , <&key_physical_attrs 100 100 700 0 0 0 0> + , <&key_physical_attrs 100 100 800 0 0 0 0> + , <&key_physical_attrs 100 100 900 0 0 0 0> + , <&key_physical_attrs 100 100 1000 0 0 0 0> + , <&key_physical_attrs 100 100 1100 0 0 0 0> + , <&key_physical_attrs 100 100 1200 0 0 0 0> + , <&key_physical_attrs 100 100 1300 0 0 0 0> + , <&key_physical_attrs 100 100 1400 0 0 0 0> + , <&key_physical_attrs 100 100 1500 0 0 0 0> + , <&key_physical_attrs 100 100 1600 0 0 0 0> + , <&key_physical_attrs 100 100 1700 0 0 0 0> + ; + }; +}; diff --git a/app/boards/shields/tester_pro_micro/tester_pro_micro.keymap b/app/boards/shields/tester_pro_micro/tester_pro_micro.keymap new file mode 100644 index 00000000..fbda0c49 --- /dev/null +++ b/app/boards/shields/tester_pro_micro/tester_pro_micro.keymap @@ -0,0 +1,61 @@ +#include +#include + +#define PIN_MACRO(name, pin) \ +/ { \ + macros { \ + name: name { \ + compatible = "zmk,behavior-macro"; \ + wait-ms = <5>; \ + tap-ms = <5>; \ + #binding-cells = <0>; \ + bindings = <&kp P &kp I &kp N &kp SPACE>, pin, <&kp ENTER>; \ + }; \ + }; \ +}; + +PIN_MACRO(pin0, <&kp N0>) +PIN_MACRO(pin1, <&kp N1>) +PIN_MACRO(pin2, <&kp N2>) +PIN_MACRO(pin3, <&kp N3>) +PIN_MACRO(pin4, <&kp N4>) +PIN_MACRO(pin5, <&kp N5>) +PIN_MACRO(pin6, <&kp N6>) +PIN_MACRO(pin7, <&kp N7>) +PIN_MACRO(pin8, <&kp N8>) +PIN_MACRO(pin9, <&kp N9>) +PIN_MACRO(pin10, <&kp N1 &kp N0>) +PIN_MACRO(pin14, <&kp N1 &kp N4>) +PIN_MACRO(pin15, <&kp N1 &kp N5>) +PIN_MACRO(pin16, <&kp N1 &kp N6>) +PIN_MACRO(pin18, <&kp N1 &kp N8>) +PIN_MACRO(pin19, <&kp N1 &kp N9>) +PIN_MACRO(pin20, <&kp N2 &kp N0>) +PIN_MACRO(pin21, <&kp N2 &kp N1>) + +/ { + keymap { + compatible = "zmk,keymap"; + + default_layer { + bindings = <&pin0 + &pin1 + &pin2 + &pin3 + &pin4 + &pin5 + &pin6 + &pin7 + &pin8 + &pin9 + &pin10 + &pin14 + &pin15 + &pin16 + &pin18 + &pin19 + &pin20 + &pin21>; + }; + }; +}; diff --git a/app/boards/shields/tester_pro_micro/tester_pro_micro.overlay b/app/boards/shields/tester_pro_micro/tester_pro_micro.overlay new file mode 100644 index 00000000..779f47e7 --- /dev/null +++ b/app/boards/shields/tester_pro_micro/tester_pro_micro.overlay @@ -0,0 +1,53 @@ +#include +#include "tester_pro_micro-layouts.dtsi" + +&physical_layout0 { + transform = <&transform0>; +}; + +&physical_layout1 { + transform = <&transform0>; +}; + +/ { + chosen { + zmk,kscan = &kscan0; + zmk,physical-layout = &physical_layout0; + }; + + kscan0: kscan { + compatible = "zmk,kscan-gpio-direct"; + wakeup-source; + debounce-press-ms = <10>; + debounce-release-ms = <10>; + input-gpios + = <&pro_micro 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 15 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 16 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 18 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 19 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 20 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 21 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + ; + }; + + transform0: keymap_transform { + compatible = "zmk,matrix-transform"; + columns = <18>; + rows = <1>; + map = < + RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,13) RC(0,14) RC(0,15) RC(0,16) RC(0,17) + >; + }; +}; diff --git a/app/boards/shields/tester_pro_micro/tester_pro_micro.zmk.yml b/app/boards/shields/tester_pro_micro/tester_pro_micro.zmk.yml new file mode 100644 index 00000000..289f47b6 --- /dev/null +++ b/app/boards/shields/tester_pro_micro/tester_pro_micro.zmk.yml @@ -0,0 +1,6 @@ +file_format: "1" +id: tester_pro_micro +name: TesterProMicro +type: shield +url: https://zmk.dev/docs/troubleshooting/hardware-issues +requires: [pro_micro] diff --git a/app/boards/shields/tester_rpi_pico/Kconfig.defconfig b/app/boards/shields/tester_rpi_pico/Kconfig.defconfig new file mode 100644 index 00000000..740c6b67 --- /dev/null +++ b/app/boards/shields/tester_rpi_pico/Kconfig.defconfig @@ -0,0 +1,12 @@ +if SHIELD_TESTER_RPI_PICO + +config ZMK_KEYBOARD_NAME + default "ZMK Tester" + +config ZMK_BLE + def_bool n + +config SETTINGS + def_bool n + +endif \ No newline at end of file diff --git a/app/boards/shields/tester_rpi_pico/Kconfig.shield b/app/boards/shields/tester_rpi_pico/Kconfig.shield new file mode 100644 index 00000000..19246d18 --- /dev/null +++ b/app/boards/shields/tester_rpi_pico/Kconfig.shield @@ -0,0 +1,2 @@ +config SHIELD_TESTER_RPI_PICO + def_bool $(shields_list_contains,tester_rpi_pico) \ No newline at end of file diff --git a/app/boards/shields/tester_rpi_pico/tester_rpi_pico-layouts.dtsi b/app/boards/shields/tester_rpi_pico/tester_rpi_pico-layouts.dtsi new file mode 100644 index 00000000..77eda01e --- /dev/null +++ b/app/boards/shields/tester_rpi_pico/tester_rpi_pico-layouts.dtsi @@ -0,0 +1,95 @@ +/* + * Copyright (c) 2025 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include + +/ { + tester_position_map { + compatible = "zmk,physical-layout-position-map"; + complete; + + pinout_map: pinout_positions { + physical-layout = <&physical_layout0>; + positions = <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>; + }; + inline_map: single_row_positions { + physical-layout = <&physical_layout1>; + positions = <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>; + }; + }; + + physical_layout0: physical_layout_0 { + compatible = "zmk,physical-layout"; + display-name = "Rpi Pico Pinout"; + + kscan = <&kscan0>; + transform = <&matrix_transform0>; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 0 0 0 0> + , <&key_physical_attrs 100 100 0 100 0 0 0> + , <&key_physical_attrs 100 100 0 300 0 0 0> + , <&key_physical_attrs 100 100 0 400 0 0 0> + , <&key_physical_attrs 100 100 0 500 0 0 0> + , <&key_physical_attrs 100 100 0 600 0 0 0> + , <&key_physical_attrs 100 100 0 800 0 0 0> + , <&key_physical_attrs 100 100 0 900 0 0 0> + , <&key_physical_attrs 100 100 0 1000 0 0 0> + , <&key_physical_attrs 100 100 0 1100 0 0 0> + , <&key_physical_attrs 100 100 0 1300 0 0 0> + , <&key_physical_attrs 100 100 0 1400 0 0 0> + , <&key_physical_attrs 100 100 0 1500 0 0 0> + , <&key_physical_attrs 100 100 0 1600 0 0 0> + , <&key_physical_attrs 100 100 0 1800 0 0 0> + , <&key_physical_attrs 100 100 0 1900 0 0 0> + , <&key_physical_attrs 100 100 600 1900 0 0 0> + , <&key_physical_attrs 100 100 600 1800 0 0 0> + , <&key_physical_attrs 100 100 600 1600 0 0 0> + , <&key_physical_attrs 100 100 600 1500 0 0 0> + , <&key_physical_attrs 100 100 600 1400 0 0 0> + , <&key_physical_attrs 100 100 600 1300 0 0 0> + , <&key_physical_attrs 100 100 600 1100 0 0 0> + , <&key_physical_attrs 100 100 600 900 0 0 0> + , <&key_physical_attrs 100 100 600 800 0 0 0> + , <&key_physical_attrs 100 100 600 600 0 0 0> + ; + }; + + physical_layout1: physical_layout_1 { + compatible = "zmk,physical-layout"; + display-name = "Single Row"; + + // Single row of eighteen "keys", in ascending "Arduino" order. + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 0 0 0 0> + , <&key_physical_attrs 100 100 100 0 0 0 0> + , <&key_physical_attrs 100 100 200 0 0 0 0> + , <&key_physical_attrs 100 100 300 0 0 0 0> + , <&key_physical_attrs 100 100 400 0 0 0 0> + , <&key_physical_attrs 100 100 500 0 0 0 0> + , <&key_physical_attrs 100 100 600 0 0 0 0> + , <&key_physical_attrs 100 100 700 0 0 0 0> + , <&key_physical_attrs 100 100 800 0 0 0 0> + , <&key_physical_attrs 100 100 900 0 0 0 0> + , <&key_physical_attrs 100 100 1000 0 0 0 0> + , <&key_physical_attrs 100 100 1100 0 0 0 0> + , <&key_physical_attrs 100 100 1200 0 0 0 0> + , <&key_physical_attrs 100 100 1300 0 0 0 0> + , <&key_physical_attrs 100 100 1400 0 0 0 0> + , <&key_physical_attrs 100 100 1500 0 0 0 0> + , <&key_physical_attrs 100 100 1600 0 0 0 0> + , <&key_physical_attrs 100 100 1700 0 0 0 0> + , <&key_physical_attrs 100 100 1800 0 0 0 0> + , <&key_physical_attrs 100 100 1900 0 0 0 0> + , <&key_physical_attrs 100 100 2000 0 0 0 0> + , <&key_physical_attrs 100 100 2100 0 0 0 0> + , <&key_physical_attrs 100 100 2200 0 0 0 0> + , <&key_physical_attrs 100 100 2300 0 0 0 0> + , <&key_physical_attrs 100 100 2400 0 0 0 0> + , <&key_physical_attrs 100 100 2500 0 0 0 0> + ; + }; +}; diff --git a/app/boards/shields/tester_rpi_pico/tester_rpi_pico.keymap b/app/boards/shields/tester_rpi_pico/tester_rpi_pico.keymap new file mode 100644 index 00000000..9f263c87 --- /dev/null +++ b/app/boards/shields/tester_rpi_pico/tester_rpi_pico.keymap @@ -0,0 +1,77 @@ +#include +#include + +#define PIN_MACRO(name, pin) \ +/ { \ + macros { \ + name: name { \ + compatible = "zmk,behavior-macro"; \ + wait-ms = <5>; \ + tap-ms = <5>; \ + #binding-cells = <0>; \ + bindings = <&kp P &kp I &kp N &kp SPACE>, pin, <&kp ENTER>; \ + }; \ + }; \ +}; + +PIN_MACRO(pin0, <&kp N0>) +PIN_MACRO(pin1, <&kp N1>) +PIN_MACRO(pin2, <&kp N2>) +PIN_MACRO(pin3, <&kp N3>) +PIN_MACRO(pin4, <&kp N4>) +PIN_MACRO(pin5, <&kp N5>) +PIN_MACRO(pin6, <&kp N6>) +PIN_MACRO(pin7, <&kp N7>) +PIN_MACRO(pin8, <&kp N8>) +PIN_MACRO(pin9, <&kp N9>) +PIN_MACRO(pin10, <&kp N1 &kp N0>) +PIN_MACRO(pin11, <&kp N1 &kp N1>) +PIN_MACRO(pin12, <&kp N1 &kp N2>) +PIN_MACRO(pin13, <&kp N1 &kp N3>) +PIN_MACRO(pin14, <&kp N1 &kp N4>) +PIN_MACRO(pin15, <&kp N1 &kp N5>) +PIN_MACRO(pin16, <&kp N1 &kp N6>) +PIN_MACRO(pin17, <&kp N1 &kp N7>) +PIN_MACRO(pin18, <&kp N1 &kp N8>) +PIN_MACRO(pin19, <&kp N1 &kp N9>) +PIN_MACRO(pin20, <&kp N2 &kp N0>) +PIN_MACRO(pin21, <&kp N2 &kp N1>) +PIN_MACRO(pin22, <&kp N2 &kp N2>) +PIN_MACRO(pin26, <&kp N2 &kp N6>) +PIN_MACRO(pin27, <&kp N2 &kp N7>) +PIN_MACRO(pin28, <&kp N2 &kp N8>) + +/ { + keymap { + compatible = "zmk,keymap"; + + default_layer { + bindings = <&pin0 + &pin1 + &pin2 + &pin3 + &pin4 + &pin5 + &pin6 + &pin7 + &pin8 + &pin9 + &pin10 + &pin11 + &pin12 + &pin13 + &pin14 + &pin15 + &pin16 + &pin17 + &pin18 + &pin19 + &pin20 + &pin21 + &pin22 + &pin26 + &pin27 + &pin28>; + }; + }; +}; diff --git a/app/boards/shields/tester_rpi_pico/tester_rpi_pico.overlay b/app/boards/shields/tester_rpi_pico/tester_rpi_pico.overlay new file mode 100644 index 00000000..6fcacd70 --- /dev/null +++ b/app/boards/shields/tester_rpi_pico/tester_rpi_pico.overlay @@ -0,0 +1,63 @@ +#include +#include "tester_rpi_pico-layouts.dtsi" + +&physical_layout0 { + transform = <&transform0>; +}; + +&physical_layout1 { + transform = <&transform0>; +}; + +/ { + chosen { + zmk,kscan = &kscan0; + zmk,physical-layout = &physical_layout0; + }; + + kscan0: kscan { + compatible = "zmk,kscan-gpio-direct"; + wakeup-source; + debounce-press-ms = <10>; + debounce-release-ms = <10>; + input-gpios + = <&pico_header 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pico_header 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pico_header 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pico_header 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pico_header 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pico_header 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pico_header 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pico_header 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pico_header 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pico_header 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pico_header 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pico_header 11 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pico_header 12 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pico_header 13 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pico_header 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pico_header 15 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pico_header 16 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pico_header 17 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pico_header 18 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pico_header 19 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pico_header 20 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pico_header 21 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pico_header 22 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pico_header 26 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pico_header 27 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pico_header 28 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + ; + }; + + transform0: keymap_transform { + compatible = "zmk,matrix-transform"; + columns = <26>; + rows = <1>; + map = < + RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) + RC(0,10) RC(0,11) RC(0,12) RC(0,13) RC(0,14) RC(0,15) RC(0,16) RC(0,17) RC(0,18) RC(0,19) + RC(0,20) RC(0,21) RC(0,22) RC(0,23) RC(0,24) RC(0,25) + >; + }; +}; diff --git a/app/boards/shields/tester_rpi_pico/tester_rpi_pico.zmk.yml b/app/boards/shields/tester_rpi_pico/tester_rpi_pico.zmk.yml new file mode 100644 index 00000000..560eca58 --- /dev/null +++ b/app/boards/shields/tester_rpi_pico/tester_rpi_pico.zmk.yml @@ -0,0 +1,6 @@ +file_format: "1" +id: tester_rpi_pico +name: TesterRpiPico +type: shield +url: https://zmk.dev/docs/troubleshooting/hardware-issues +requires: [rpi_pico] diff --git a/app/boards/shields/tester_xiao/Kconfig.defconfig b/app/boards/shields/tester_xiao/Kconfig.defconfig new file mode 100644 index 00000000..15316dce --- /dev/null +++ b/app/boards/shields/tester_xiao/Kconfig.defconfig @@ -0,0 +1,12 @@ +if SHIELD_TESTER_XIAO + +config ZMK_KEYBOARD_NAME + default "ZMK Tester" + +config ZMK_BLE + def_bool n + +config SETTINGS + def_bool n + +endif \ No newline at end of file diff --git a/app/boards/shields/tester_xiao/Kconfig.shield b/app/boards/shields/tester_xiao/Kconfig.shield new file mode 100644 index 00000000..336dfaff --- /dev/null +++ b/app/boards/shields/tester_xiao/Kconfig.shield @@ -0,0 +1,2 @@ +config SHIELD_TESTER_XIAO + def_bool $(shields_list_contains,tester_xiao) \ No newline at end of file diff --git a/app/boards/shields/tester_xiao/tester_xiao-layouts.dtsi b/app/boards/shields/tester_xiao/tester_xiao-layouts.dtsi new file mode 100644 index 00000000..361fb9dd --- /dev/null +++ b/app/boards/shields/tester_xiao/tester_xiao-layouts.dtsi @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2025 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include + +// The tester might not have any physical keys at all, so these +// physical layouts are pretty much imaginary. + +/ { + tester_position_map { + compatible = "zmk,physical-layout-position-map"; + complete; + + pinout_map: pinout_positions { + physical-layout = <&physical_layout0>; + positions = <0 1 2 3 4 5 6 7 8 9 10>; + }; + inline_map: single_row_positions { + physical-layout = <&physical_layout1>; + positions = <0 1 2 3 4 5 6 7 8 9 10>; + }; + }; + + physical_layout0: physical_layout_0 { + compatible = "zmk,physical-layout"; + display-name = "XIAO Pinout"; + + // Map key positions to the XIAO pinout. + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 0 0 0 0> + , <&key_physical_attrs 100 100 0 100 0 0 0> + , <&key_physical_attrs 100 100 0 200 0 0 0> + , <&key_physical_attrs 100 100 0 300 0 0 0> + , <&key_physical_attrs 100 100 0 400 0 0 0> + , <&key_physical_attrs 100 100 0 500 0 0 0> + , <&key_physical_attrs 100 100 0 600 0 0 0> + , <&key_physical_attrs 100 100 600 600 0 0 0> + , <&key_physical_attrs 100 100 600 500 0 0 0> + , <&key_physical_attrs 100 100 600 400 0 0 0> + , <&key_physical_attrs 100 100 600 300 0 0 0> + ; + }; + + physical_layout1: physical_layout_1 { + compatible = "zmk,physical-layout"; + display-name = "Single Row"; + + // Single row of eleven "keys". + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 0 0 0 0> + , <&key_physical_attrs 100 100 100 0 0 0 0> + , <&key_physical_attrs 100 100 200 0 0 0 0> + , <&key_physical_attrs 100 100 300 0 0 0 0> + , <&key_physical_attrs 100 100 400 0 0 0 0> + , <&key_physical_attrs 100 100 500 0 0 0 0> + , <&key_physical_attrs 100 100 600 0 0 0 0> + , <&key_physical_attrs 100 100 700 0 0 0 0> + , <&key_physical_attrs 100 100 800 0 0 0 0> + , <&key_physical_attrs 100 100 900 0 0 0 0> + , <&key_physical_attrs 100 100 1000 0 0 0 0> + ; + }; +}; diff --git a/app/boards/shields/tester_xiao/tester_xiao.keymap b/app/boards/shields/tester_xiao/tester_xiao.keymap new file mode 100644 index 00000000..29a5f3db --- /dev/null +++ b/app/boards/shields/tester_xiao/tester_xiao.keymap @@ -0,0 +1,47 @@ +#include +#include + +#define PIN_MACRO(name, pin) \ +/ { \ + macros { \ + name: name { \ + compatible = "zmk,behavior-macro"; \ + wait-ms = <5>; \ + tap-ms = <5>; \ + #binding-cells = <0>; \ + bindings = <&kp P &kp I &kp N &kp SPACE>, pin, <&kp ENTER>; \ + }; \ + }; \ +}; + +PIN_MACRO(pin0, <&kp N0>) +PIN_MACRO(pin1, <&kp N1>) +PIN_MACRO(pin2, <&kp N2>) +PIN_MACRO(pin3, <&kp N3>) +PIN_MACRO(pin4, <&kp N4>) +PIN_MACRO(pin5, <&kp N5>) +PIN_MACRO(pin6, <&kp N6>) +PIN_MACRO(pin7, <&kp N7>) +PIN_MACRO(pin8, <&kp N8>) +PIN_MACRO(pin9, <&kp N9>) +PIN_MACRO(pin10, <&kp N1 &kp N0>) + +/ { + keymap { + compatible = "zmk,keymap"; + + default_layer { + bindings = <&pin0 + &pin1 + &pin2 + &pin3 + &pin4 + &pin5 + &pin6 + &pin7 + &pin8 + &pin9 + &pin10>; + }; + }; +}; diff --git a/app/boards/shields/tester_xiao/tester_xiao.overlay b/app/boards/shields/tester_xiao/tester_xiao.overlay new file mode 100644 index 00000000..22a7f747 --- /dev/null +++ b/app/boards/shields/tester_xiao/tester_xiao.overlay @@ -0,0 +1,46 @@ +#include +#include "tester_xiao-layouts.dtsi" + +&physical_layout0 { + transform = <&transform0>; +}; + +&physical_layout1 { + transform = <&transform0>; +}; + +/ { + chosen { + zmk,kscan = &kscan0; + zmk,physical-layout = &physical_layout0; + }; + + kscan0: kscan { + compatible = "zmk,kscan-gpio-direct"; + wakeup-source; + debounce-press-ms = <10>; + debounce-release-ms = <10>; + input-gpios + = <&xiao_d 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&xiao_d 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&xiao_d 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&xiao_d 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&xiao_d 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&xiao_d 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&xiao_d 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&xiao_d 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&xiao_d 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&xiao_d 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&xiao_d 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + ; + }; + + transform0: keymap_transform { + compatible = "zmk,matrix-transform"; + columns = <11>; + rows = <1>; + map = < + RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) + >; + }; +}; diff --git a/app/boards/shields/tester_xiao/tester_xiao.zmk.yml b/app/boards/shields/tester_xiao/tester_xiao.zmk.yml new file mode 100644 index 00000000..77ab90d2 --- /dev/null +++ b/app/boards/shields/tester_xiao/tester_xiao.zmk.yml @@ -0,0 +1,6 @@ +file_format: "1" +id: tester_xiao +name: TesterXiao +type: shield +url: https://zmk.dev/docs/troubleshooting/hardware-issues +requires: [seeed_xiao] diff --git a/app/boards/shields/tg4x/boards/nice_nano.conf b/app/boards/shields/tg4x/boards/nice_nano.conf index 7b077948..c93ed4de 100644 --- a/app/boards/shields/tg4x/boards/nice_nano.conf +++ b/app/boards/shields/tg4x/boards/nice_nano.conf @@ -3,5 +3,3 @@ # Enable underglow CONFIG_ZMK_RGB_UNDERGLOW=y -# Use the STRIP config specific to the LEDs you're using -CONFIG_WS2812_STRIP=y \ No newline at end of file diff --git a/app/boards/shields/tg4x/boards/nice_nano.overlay b/app/boards/shields/tg4x/boards/nice_nano_nrf52840_zmk.overlay similarity index 100% rename from app/boards/shields/tg4x/boards/nice_nano.overlay rename to app/boards/shields/tg4x/boards/nice_nano_nrf52840_zmk.overlay diff --git a/app/boards/shields/tg4x/boards/nice_nano_v2.overlay b/app/boards/shields/tg4x/boards/nice_nano_v2.overlay deleted file mode 100644 index 84441899..00000000 --- a/app/boards/shields/tg4x/boards/nice_nano_v2.overlay +++ /dev/null @@ -1,46 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; -}; - -&spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; - - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; - - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; - - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; - - color-mapping = ; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; diff --git a/app/boards/shields/tg4x/tg4x.keymap b/app/boards/shields/tg4x/tg4x.keymap index 5c71ae5c..8c272f79 100644 --- a/app/boards/shields/tg4x/tg4x.keymap +++ b/app/boards/shields/tg4x/tg4x.keymap @@ -23,6 +23,7 @@ compatible = "zmk,keymap"; default_layer { + display-name = "Default Layer"; bindings = < &kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp SEMI &kp BSPC &ht CAPS TAB &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp APOS &kp RET @@ -32,6 +33,7 @@ }; function_layer { + display-name = "Function Layer"; bindings = < &kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp DEL &none &kp HOME &kp PG_UP &trans &trans &trans &kp LBKT &kp RBKT &kp EQUAL &kp BSLH &kp FSLH &trans @@ -41,6 +43,7 @@ }; other_layer { + display-name = "Other Layer"; bindings = < &kp PRINTSCREEN &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans diff --git a/app/boards/shields/tidbit/boards/nice_nano.overlay b/app/boards/shields/tidbit/boards/nice_nano_nrf52840_zmk.overlay similarity index 100% rename from app/boards/shields/tidbit/boards/nice_nano.overlay rename to app/boards/shields/tidbit/boards/nice_nano_nrf52840_zmk.overlay diff --git a/app/boards/shields/tidbit/tidbit.conf b/app/boards/shields/tidbit/tidbit.conf index 82bd3477..bb2d0d9a 100644 --- a/app/boards/shields/tidbit/tidbit.conf +++ b/app/boards/shields/tidbit/tidbit.conf @@ -7,8 +7,6 @@ CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y # Uncomment to enable underglow #CONFIG_ZMK_RGB_UNDERGLOW=y -# Use the STRIP config specific to the LEDs you're using -#CONFIG_WS2812_STRIP=y # Uncomment to enable the display # Note that an I2C OLED cannot be used at the same time as encoder 3. diff --git a/app/boards/shields/tidbit/tidbit.keymap b/app/boards/shields/tidbit/tidbit.keymap index 2a311365..dbc9e907 100644 --- a/app/boards/shields/tidbit/tidbit.keymap +++ b/app/boards/shields/tidbit/tidbit.keymap @@ -44,6 +44,7 @@ compatible = "zmk,keymap"; default_layer { + display-name = "Default Layer"; bindings = < &kp KP_NUMLOCK &kp KP_ASTERISK &kp KP_MINUS &kp KP_NUMBER_7 &kp KP_NUMBER_8 &kp KP_NUMBER_9 &kp KP_PLUS @@ -56,6 +57,7 @@ }; func_layer { + display-name = "Func Layer"; bindings = < &none &sys_reset &bootloader &out OUT_TOG &out OUT_USB &out OUT_BLE &none diff --git a/app/boards/shields/two_percent_milk/boards/nice_nano.overlay b/app/boards/shields/two_percent_milk/boards/nice_nano.overlay deleted file mode 100644 index b0895433..00000000 --- a/app/boards/shields/two_percent_milk/boards/nice_nano.overlay +++ /dev/null @@ -1,46 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; -}; - -&spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; - - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; - - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; - - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; - - color-mapping = ; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; diff --git a/app/boards/shields/tidbit/boards/nice_nano_v2.overlay b/app/boards/shields/two_percent_milk/boards/nice_nano_nrf52840_zmk.overlay similarity index 100% rename from app/boards/shields/tidbit/boards/nice_nano_v2.overlay rename to app/boards/shields/two_percent_milk/boards/nice_nano_nrf52840_zmk.overlay diff --git a/app/boards/shields/two_percent_milk/boards/nice_nano_v2.overlay b/app/boards/shields/two_percent_milk/boards/nice_nano_v2.overlay deleted file mode 100644 index b0895433..00000000 --- a/app/boards/shields/two_percent_milk/boards/nice_nano_v2.overlay +++ /dev/null @@ -1,46 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; -}; - -&spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; - - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; - - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; - - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; - - color-mapping = ; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; diff --git a/app/boards/shields/two_percent_milk/boards/nrfmicro_11_flipped.overlay b/app/boards/shields/two_percent_milk/boards/nrfmicro_nrf52840_flipped_zmk_1_1_0.overlay similarity index 100% rename from app/boards/shields/two_percent_milk/boards/nrfmicro_11_flipped.overlay rename to app/boards/shields/two_percent_milk/boards/nrfmicro_nrf52840_flipped_zmk_1_1_0.overlay diff --git a/app/boards/shields/two_percent_milk/boards/nrfmicro_11.overlay b/app/boards/shields/two_percent_milk/boards/nrfmicro_nrf52840_zmk_1_1_0.overlay similarity index 100% rename from app/boards/shields/two_percent_milk/boards/nrfmicro_11.overlay rename to app/boards/shields/two_percent_milk/boards/nrfmicro_nrf52840_zmk_1_1_0.overlay diff --git a/app/boards/shields/two_percent_milk/boards/nrfmicro_13.overlay b/app/boards/shields/two_percent_milk/boards/nrfmicro_nrf52840_zmk_1_3_0.overlay similarity index 100% rename from app/boards/shields/two_percent_milk/boards/nrfmicro_13.overlay rename to app/boards/shields/two_percent_milk/boards/nrfmicro_nrf52840_zmk_1_3_0.overlay diff --git a/app/boards/shields/two_percent_milk/two_percent_milk.conf b/app/boards/shields/two_percent_milk/two_percent_milk.conf index 4baccacf..077ebcf6 100644 --- a/app/boards/shields/two_percent_milk/two_percent_milk.conf +++ b/app/boards/shields/two_percent_milk/two_percent_milk.conf @@ -3,7 +3,6 @@ # Uncomment the following lines to enable RGB Underglow # CONFIG_ZMK_RGB_UNDERGLOW=y -# CONFIG_WS2812_STRIP=y # Uncomment the following line to turn on logging, and set ZMK logging to debug output -# CONFIG_ZMK_USB_LOGGING=y \ No newline at end of file +# CONFIG_ZMK_USB_LOGGING=y diff --git a/app/boards/shields/two_percent_milk/two_percent_milk.keymap b/app/boards/shields/two_percent_milk/two_percent_milk.keymap index 132793b3..1e500237 100644 --- a/app/boards/shields/two_percent_milk/two_percent_milk.keymap +++ b/app/boards/shields/two_percent_milk/two_percent_milk.keymap @@ -13,10 +13,11 @@ compatible = "zmk,keymap"; default_layer { + display-name = "Default Layer"; bindings = < &kp X &kp Z >; }; }; -}; \ No newline at end of file +}; diff --git a/app/boards/shields/waterfowl/waterfowl.keymap b/app/boards/shields/waterfowl/waterfowl.keymap index 197a34fa..50cabf68 100644 --- a/app/boards/shields/waterfowl/waterfowl.keymap +++ b/app/boards/shields/waterfowl/waterfowl.keymap @@ -13,6 +13,7 @@ compatible = "zmk,keymap"; default_layer { + display-name = "Default Layer"; /* QWERTY * * ,----------------------------------. ,----------------------------------. @@ -42,6 +43,7 @@ }; navnum_layer { + display-name = "Navnum Layer"; /* NAVNUM * * ,----------------------------------. ,----------------------------------. @@ -71,6 +73,7 @@ }; symbol_layer { + display-name = "Symbol Layer"; /* SYM * * ,----------------------------------. ,----------------------------------. @@ -100,6 +103,7 @@ }; function_layer { + display-name = "Function Layer"; /* FUNC * * ,----------------------------------. ,----------------------------------. diff --git a/app/boards/shields/zmk_uno/Kconfig.defconfig b/app/boards/shields/zmk_uno/Kconfig.defconfig index 95602ca7..9898a6e6 100644 --- a/app/boards/shields/zmk_uno/Kconfig.defconfig +++ b/app/boards/shields/zmk_uno/Kconfig.defconfig @@ -16,10 +16,6 @@ config SHIELD_SSD1306_128X64 config SHIELD_SSD1306_128X32 select ZMK_DISPLAY -config ZMK_RGB_UNDERGLOW - select WS2812_STRIP - select SPI - config ZMK_PM_SOFT_OFF default y if BOARD_NRF52840DK_NRF52840 diff --git a/app/boards/shields/zmk_uno/zmk_uno-layouts.dtsi b/app/boards/shields/zmk_uno/zmk_uno-layouts.dtsi new file mode 100644 index 00000000..e5b752db --- /dev/null +++ b/app/boards/shields/zmk_uno/zmk_uno-layouts.dtsi @@ -0,0 +1,27 @@ +#include + +/ { + matrix_physical_layout: matrix_physical_layout { + compatible = "zmk,physical-layout"; + display-name = "Matrix Layout"; + + keys + = <&key_physical_attrs 100 100 0 0 0 0 0> + , <&key_physical_attrs 100 100 100 0 0 0 0> + , <&key_physical_attrs 100 100 0 100 0 0 0> + , <&key_physical_attrs 100 100 100 100 0 0 0> + ; + }; + + direct_physical_layout: direct_physical_layout { + compatible = "zmk,physical-layout"; + display-name = "Direct Wire Layout"; + + keys + = <&key_physical_attrs 100 100 0 0 0 0 0> + , <&key_physical_attrs 100 100 100 0 0 0 0> + , <&key_physical_attrs 100 100 0 100 0 0 0> + , <&key_physical_attrs 100 100 100 100 0 0 0> + ; + }; +}; \ No newline at end of file diff --git a/app/boards/shields/zmk_uno/zmk_uno.dtsi b/app/boards/shields/zmk_uno/zmk_uno.dtsi index 9ea625a4..26451cf9 100644 --- a/app/boards/shields/zmk_uno/zmk_uno.dtsi +++ b/app/boards/shields/zmk_uno/zmk_uno.dtsi @@ -6,6 +6,8 @@ #include #include +#include "zmk_uno-layouts.dtsi" + &arduino_i2c { status = "okay"; @@ -135,3 +137,13 @@ nice_view_spi: &arduino_spi { b-gpios = <&arduino_header 14 GPIO_PULL_UP>; }; }; + +&matrix_physical_layout { + kscan = <&kscan_matrix>; + transform = <&matrix_transform>; +}; + +&direct_physical_layout { + kscan = <&kscan_direct>; + transform = <&direct_matrix_transform>; +}; \ No newline at end of file diff --git a/app/boards/shields/zmk_uno/zmk_uno.keymap b/app/boards/shields/zmk_uno/zmk_uno.keymap index 186cdb60..7fe0a044 100644 --- a/app/boards/shields/zmk_uno/zmk_uno.keymap +++ b/app/boards/shields/zmk_uno/zmk_uno.keymap @@ -24,6 +24,7 @@ compatible = "zmk,keymap"; default_layer { + display-name = "Default Layer"; bindings = < &kp A &bl BL_TOG &rgb_ug RGB_EFF &bt BT_CLR diff --git a/app/boards/shields/zmk_uno/zmk_uno.overlay b/app/boards/shields/zmk_uno/zmk_uno.overlay index 2a8eb266..3516611a 100644 --- a/app/boards/shields/zmk_uno/zmk_uno.overlay +++ b/app/boards/shields/zmk_uno/zmk_uno.overlay @@ -4,10 +4,9 @@ * SPDX-License-Identifier: MIT */ - #include "zmk_uno.dtsi" +#include "zmk_uno.dtsi" #include -#include #include #include @@ -59,36 +58,4 @@ bindings = <&ble_one>; }; }; - - matrix_physical_layout: matrix_physical_layout { - compatible = "zmk,physical-layout"; - display-name = "Matrix Layout"; - - kscan = <&kscan_matrix>; - transform = <&matrix_transform>; - - keys - = <&key_physical_attrs 100 100 0 0 0 0 0> - , <&key_physical_attrs 100 100 100 0 0 0 0> - , <&key_physical_attrs 100 100 0 100 0 0 0> - , <&key_physical_attrs 100 100 100 100 0 0 0> - ; - }; - - direct_physical_layout: direct_physical_layout { - compatible = "zmk,physical-layout"; - - display-name = "Direct Wire Layout"; - - kscan = <&kscan_direct>; - transform = <&direct_matrix_transform>; - - keys - = <&key_physical_attrs 100 100 0 0 0 0 0> - , <&key_physical_attrs 100 100 100 0 0 0 0> - , <&key_physical_attrs 100 100 0 100 0 0 0> - , <&key_physical_attrs 100 100 100 100 0 0 0> - ; - }; - }; diff --git a/app/boards/shields/zmk_uno/zmk_uno.zmk.yml b/app/boards/shields/zmk_uno/zmk_uno.zmk.yml index cee108fa..4893754e 100644 --- a/app/boards/shields/zmk_uno/zmk_uno.zmk.yml +++ b/app/boards/shields/zmk_uno/zmk_uno.zmk.yml @@ -8,3 +8,4 @@ features: - keys - encoder - display + - studio diff --git a/app/boards/shields/zmk_uno/zmk_uno_split-layouts.dtsi b/app/boards/shields/zmk_uno/zmk_uno_split-layouts.dtsi new file mode 100644 index 00000000..7a0c4934 --- /dev/null +++ b/app/boards/shields/zmk_uno/zmk_uno_split-layouts.dtsi @@ -0,0 +1,37 @@ +#include + +/ { + split_matrix_physical_layout: matrix_physical_layout { + compatible = "zmk,physical-layout"; + display-name = "Matrix Layout"; + + keys + = <&key_physical_attrs 100 100 0 0 0 0 0> + , <&key_physical_attrs 100 100 100 0 0 0 0> + , <&key_physical_attrs 100 100 0 100 0 0 0> + , <&key_physical_attrs 100 100 100 100 0 0 0> + , <&key_physical_attrs 100 100 0 200 0 0 0> + , <&key_physical_attrs 100 100 100 200 0 0 0> + , <&key_physical_attrs 100 100 0 300 0 0 0> + , <&key_physical_attrs 100 100 100 300 0 0 0> + ; + }; + + split_direct_physical_layout: direct_physical_layout { + compatible = "zmk,physical-layout"; + + display-name = "Direct Wire Layout"; + + keys + = <&key_physical_attrs 100 100 0 0 0 0 0> + , <&key_physical_attrs 100 100 100 0 0 0 0> + , <&key_physical_attrs 100 100 0 100 0 0 0> + , <&key_physical_attrs 100 100 100 100 0 0 0> + , <&key_physical_attrs 100 100 0 200 0 0 0> + , <&key_physical_attrs 100 100 100 200 0 0 0> + , <&key_physical_attrs 100 100 0 300 0 0 0> + , <&key_physical_attrs 100 100 100 300 0 0 0> + ; + }; + +}; \ No newline at end of file diff --git a/app/boards/shields/zmk_uno/zmk_uno_split.dtsi b/app/boards/shields/zmk_uno/zmk_uno_split.dtsi index 9afbf79a..a555862b 100644 --- a/app/boards/shields/zmk_uno/zmk_uno_split.dtsi +++ b/app/boards/shields/zmk_uno/zmk_uno_split.dtsi @@ -4,17 +4,25 @@ * SPDX-License-Identifier: MIT */ - #include "zmk_uno.dtsi" +#include "zmk_uno.dtsi" +#include "zmk_uno_split-layouts.dtsi" - #include - - left_encoder: &encoder { +left_encoder: &encoder { status = "disabled"; - }; +}; - / { +&arduino_serial { + status = "okay"; +}; + +/ { chosen { - zmk,physical-layout = &matrix_physical_layout; + zmk,physical-layout = &split_matrix_physical_layout; + }; + + wired_split { + compatible = "zmk,wired-split"; + device = <&arduino_serial>; }; split_matrix_transform: split_matrix_transform { @@ -45,45 +53,6 @@ >; }; - matrix_physical_layout: matrix_physical_layout { - compatible = "zmk,physical-layout"; - display-name = "Matrix Layout"; - - kscan = <&kscan_matrix>; - transform = <&split_matrix_transform>; - - keys - = <&key_physical_attrs 100 100 0 0 0 0 0> - , <&key_physical_attrs 100 100 100 0 0 0 0> - , <&key_physical_attrs 100 100 0 100 0 0 0> - , <&key_physical_attrs 100 100 100 100 0 0 0> - , <&key_physical_attrs 100 100 0 200 0 0 0> - , <&key_physical_attrs 100 100 100 200 0 0 0> - , <&key_physical_attrs 100 100 0 300 0 0 0> - , <&key_physical_attrs 100 100 100 300 0 0 0> - ; - }; - - direct_physical_layout: direct_physical_layout { - compatible = "zmk,physical-layout"; - - display-name = "Direct Wire Layout"; - - kscan = <&kscan_direct>; - transform = <&split_direct_matrix_transform>; - - keys - = <&key_physical_attrs 100 100 0 0 0 0 0> - , <&key_physical_attrs 100 100 100 0 0 0 0> - , <&key_physical_attrs 100 100 0 100 0 0 0> - , <&key_physical_attrs 100 100 100 100 0 0 0> - , <&key_physical_attrs 100 100 0 200 0 0 0> - , <&key_physical_attrs 100 100 100 200 0 0 0> - , <&key_physical_attrs 100 100 0 300 0 0 0> - , <&key_physical_attrs 100 100 100 300 0 0 0> - ; - }; - right_encoder: right_encoder { steps = <80>; status = "disabled"; @@ -97,4 +66,14 @@ sensors = <&encoder &right_encoder>; triggers-per-rotation = <20>; }; - }; +}; + +&split_matrix_physical_layout { + kscan = <&kscan_matrix>; + transform = <&split_matrix_transform>; +}; + +&split_direct_physical_layout { + kscan = <&kscan_direct>; + transform = <&split_direct_matrix_transform>; +}; \ No newline at end of file diff --git a/app/boards/shields/zmk_uno/zmk_uno_split.keymap b/app/boards/shields/zmk_uno/zmk_uno_split.keymap index d2daa6ea..0e479869 100644 --- a/app/boards/shields/zmk_uno/zmk_uno_split.keymap +++ b/app/boards/shields/zmk_uno/zmk_uno_split.keymap @@ -26,6 +26,7 @@ compatible = "zmk,keymap"; default_layer { + display-name = "Default Layer"; bindings = < &kp A &bl BL_TOG &rgb_ug RGB_EFF &bt BT_CLR diff --git a/app/boards/shields/zodiark/zodiark.keymap b/app/boards/shields/zodiark/zodiark.keymap index 82639edc..7ca8d301 100644 --- a/app/boards/shields/zodiark/zodiark.keymap +++ b/app/boards/shields/zodiark/zodiark.keymap @@ -13,6 +13,7 @@ compatible = "zmk,keymap"; default_layer { + display-name = "Default Layer"; // ------------------------------------------------------------------------------------------------------------ // | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BKSPC | // | TAB | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | \ | @@ -31,6 +32,7 @@ }; lower_layer { + display-name = "Lower Layer"; // ------------------------------------------------------------------------------------------------------------ // | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | // | N.LC | 7 | 8 | 9 |PRTSC | SCRLK| | | | PAUSE| | 7 | 8 | 9 | F12 | @@ -49,6 +51,7 @@ }; raise_layer { + display-name = "Raise Layer"; // ------------------------------------------------------------------------------------------------------------ // |BTCLR | BT1 | BT2 | BT3 | BT4 | BT5 | | | | | | | RESET | // | | | | | | | | | | | | | | |BLOADER| diff --git a/app/boards/sparkfun/pro_micro_rp2040/Kconfig.sparkfun_pro_micro_rp2040 b/app/boards/sparkfun/pro_micro_rp2040/Kconfig.sparkfun_pro_micro_rp2040 new file mode 100644 index 00000000..97f117f1 --- /dev/null +++ b/app/boards/sparkfun/pro_micro_rp2040/Kconfig.sparkfun_pro_micro_rp2040 @@ -0,0 +1,10 @@ +# Copyright (c) 2026 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config BOARD_SPARKFUN_PRO_MICRO_RP2040 + select ZMK_BOARD_COMPAT if BOARD_SPARKFUN_PRO_MICRO_RP2040_RP2040_ZMK + imply RETAINED_MEM if BOARD_SPARKFUN_PRO_MICRO_RP2040_RP2040_ZMK + imply RETENTION if BOARD_SPARKFUN_PRO_MICRO_RP2040_RP2040_ZMK + imply RETENTION_BOOT_MODE if BOARD_SPARKFUN_PRO_MICRO_RP2040_RP2040_ZMK + + diff --git a/app/boards/sparkfun/pro_micro_rp2040/board.yml b/app/boards/sparkfun/pro_micro_rp2040/board.yml new file mode 100644 index 00000000..4f3dd49a --- /dev/null +++ b/app/boards/sparkfun/pro_micro_rp2040/board.yml @@ -0,0 +1,5 @@ +board: + extend: sparkfun_pro_micro_rp2040 + variants: + - name: zmk + qualifier: rp2040 diff --git a/app/boards/arm/sparkfun_pro_micro_rp2040/sparkfun_pro_micro_rp2040.zmk.yml b/app/boards/sparkfun/pro_micro_rp2040/sparkfun_pro_micro_rp2040.zmk.yml similarity index 81% rename from app/boards/arm/sparkfun_pro_micro_rp2040/sparkfun_pro_micro_rp2040.zmk.yml rename to app/boards/sparkfun/pro_micro_rp2040/sparkfun_pro_micro_rp2040.zmk.yml index 26a2ca64..d9243be0 100644 --- a/app/boards/arm/sparkfun_pro_micro_rp2040/sparkfun_pro_micro_rp2040.zmk.yml +++ b/app/boards/sparkfun/pro_micro_rp2040/sparkfun_pro_micro_rp2040.zmk.yml @@ -1,5 +1,5 @@ file_format: "1" -id: sparkfun_pro_micro_rp2040 +id: sparkfun_pro_micro_rp2040//zmk name: SparkFun Pro Micro RP2040 type: board arch: arm diff --git a/app/boards/sparkfun/pro_micro_rp2040/sparkfun_pro_micro_rp2040_zmk.dts b/app/boards/sparkfun/pro_micro_rp2040/sparkfun_pro_micro_rp2040_zmk.dts new file mode 100644 index 00000000..733e2d08 --- /dev/null +++ b/app/boards/sparkfun/pro_micro_rp2040/sparkfun_pro_micro_rp2040_zmk.dts @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2023 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include <../boards/sparkfun/pro_micro_rp2040/sparkfun_pro_micro_rp2040.dts> +#include + +&pro_micro_serial { status = "disabled"; }; + +// We override to 2MB for maximum compatibility +&code_partition { + reg = <0x100 (DT_SIZE_M(2) - 0x100 - DT_SIZE_K(512))>; +}; + +&flash0 { + reg = <0x10000000 DT_SIZE_M(2)>; + + partitions { + storage_partition: partition@180000 { + reg = <0x180000 DT_SIZE_K(512)>; + read-only; + }; + }; +}; diff --git a/app/boards/sparkfun/pro_micro_rp2040/sparkfun_pro_micro_rp2040_zmk_defconfig b/app/boards/sparkfun/pro_micro_rp2040/sparkfun_pro_micro_rp2040_zmk_defconfig new file mode 100644 index 00000000..0c1a531e --- /dev/null +++ b/app/boards/sparkfun/pro_micro_rp2040/sparkfun_pro_micro_rp2040_zmk_defconfig @@ -0,0 +1,30 @@ +# SPDX-License-Identifier: MIT + +CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=125000000 + +CONFIG_RESET=y + +# Enable clock control by default +CONFIG_CLOCK_CONTROL=y + +# Code partition needed to target the correct flash range +CONFIG_USE_DT_CODE_PARTITION=y + +# Output UF2 by default, native bootloader supports it. +CONFIG_BUILD_OUTPUT_UF2=y + +# USB HID +CONFIG_ZMK_USB=y + +# Settings Support +CONFIG_MPU_ALLOW_FLASH_WRITE=y +CONFIG_NVS=y +CONFIG_SETTINGS_NVS=y +CONFIG_FLASH=y +CONFIG_FLASH_PAGE_LAYOUT=y +CONFIG_FLASH_MAP=y + +# Bootloader Support +CONFIG_RETAINED_MEM=y +CONFIG_RETENTION=y +CONFIG_RETENTION_BOOT_MODE=y diff --git a/app/boards/sparkfun_pro_micro_rp2040.conf b/app/boards/sparkfun_pro_micro_rp2040.conf deleted file mode 100644 index 21c1893d..00000000 --- a/app/boards/sparkfun_pro_micro_rp2040.conf +++ /dev/null @@ -1,4 +0,0 @@ -CONFIG_CONSOLE=n -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n -CONFIG_ZMK_USB=y diff --git a/app/boards/weact/blackpill_f401cc/Kconfig.blackpill_f401cc b/app/boards/weact/blackpill_f401cc/Kconfig.blackpill_f401cc new file mode 100644 index 00000000..e4dcaeec --- /dev/null +++ b/app/boards/weact/blackpill_f401cc/Kconfig.blackpill_f401cc @@ -0,0 +1,6 @@ +# Copyright (c) 2026 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config BOARD_BLACKPILL_F401CC + select ZMK_BOARD_COMPAT + diff --git a/app/boards/arm/blackpill_f401cc/blackpill_f401cc.zmk.yml b/app/boards/weact/blackpill_f401cc/blackpill_f401cc.zmk.yml similarity index 86% rename from app/boards/arm/blackpill_f401cc/blackpill_f401cc.zmk.yml rename to app/boards/weact/blackpill_f401cc/blackpill_f401cc.zmk.yml index 329b7371..2cf8c281 100644 --- a/app/boards/arm/blackpill_f401cc/blackpill_f401cc.zmk.yml +++ b/app/boards/weact/blackpill_f401cc/blackpill_f401cc.zmk.yml @@ -1,5 +1,5 @@ file_format: "1" -id: blackpill_f401cc +id: blackpill_f401cc//zmk name: BlackPill F401CC type: board arch: arm diff --git a/app/boards/blackpill_f411ce.overlay b/app/boards/weact/blackpill_f401cc/blackpill_f401cc_zmk.dts similarity index 94% rename from app/boards/blackpill_f411ce.overlay rename to app/boards/weact/blackpill_f401cc/blackpill_f401cc_zmk.dts index 54e360a3..4704552d 100644 --- a/app/boards/blackpill_f411ce.overlay +++ b/app/boards/weact/blackpill_f401cc/blackpill_f401cc_zmk.dts @@ -1,9 +1,10 @@ /* - * Copyright (c) 2022 The ZMK Contributors + * Copyright (c) 2026 The ZMK Contributors * * SPDX-License-Identifier: MIT */ +#include <../boards/weact/blackpill_f401cc/blackpill_f401cc.dts> / { blackpill: connector { diff --git a/app/boards/weact/blackpill_f401cc/blackpill_f401cc_zmk_defconfig b/app/boards/weact/blackpill_f401cc/blackpill_f401cc_zmk_defconfig new file mode 100644 index 00000000..c0efb874 --- /dev/null +++ b/app/boards/weact/blackpill_f401cc/blackpill_f401cc_zmk_defconfig @@ -0,0 +1,17 @@ +# SPDX-License-Identifier: MIT + +# Enable MPU +CONFIG_ARM_MPU=y + +# Enable HW stack protection +CONFIG_HW_STACK_PROTECTION=y + + +# Enable GPIO +CONFIG_GPIO=y + +# USB HID +CONFIG_ZMK_USB=y + +# Defaults for matrix scanning to avoid interrupt issues +CONFIG_ZMK_KSCAN_MATRIX_POLLING=y diff --git a/app/boards/weact/blackpill_f401cc/board.yml b/app/boards/weact/blackpill_f401cc/board.yml new file mode 100644 index 00000000..7aa1253d --- /dev/null +++ b/app/boards/weact/blackpill_f401cc/board.yml @@ -0,0 +1,5 @@ +board: + extend: blackpill_f401cc + variants: + - name: zmk + qualifier: stm32f401xc diff --git a/app/boards/weact/blackpill_f401ce/Kconfig.blackpill_f401ce b/app/boards/weact/blackpill_f401ce/Kconfig.blackpill_f401ce new file mode 100644 index 00000000..870d8ef6 --- /dev/null +++ b/app/boards/weact/blackpill_f401ce/Kconfig.blackpill_f401ce @@ -0,0 +1,6 @@ +# Copyright (c) 2026 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config BOARD_BLACKPILL_F401CE + select ZMK_BOARD_COMPAT + diff --git a/app/boards/arm/blackpill_f401ce/blackpill_f401ce.zmk.yml b/app/boards/weact/blackpill_f401ce/blackpill_f401ce.zmk.yml similarity index 86% rename from app/boards/arm/blackpill_f401ce/blackpill_f401ce.zmk.yml rename to app/boards/weact/blackpill_f401ce/blackpill_f401ce.zmk.yml index 251d2c27..26115680 100644 --- a/app/boards/arm/blackpill_f401ce/blackpill_f401ce.zmk.yml +++ b/app/boards/weact/blackpill_f401ce/blackpill_f401ce.zmk.yml @@ -1,5 +1,5 @@ file_format: "1" -id: blackpill_f401ce +id: blackpill_f401ce//zmk name: BlackPill F401CE type: board arch: arm diff --git a/app/boards/blackpill_f401ce.overlay b/app/boards/weact/blackpill_f401ce/blackpill_f401ce_zmk.dts similarity index 94% rename from app/boards/blackpill_f401ce.overlay rename to app/boards/weact/blackpill_f401ce/blackpill_f401ce_zmk.dts index 54e360a3..ea7f0634 100644 --- a/app/boards/blackpill_f401ce.overlay +++ b/app/boards/weact/blackpill_f401ce/blackpill_f401ce_zmk.dts @@ -1,9 +1,10 @@ /* - * Copyright (c) 2022 The ZMK Contributors + * Copyright (c) 2026 The ZMK Contributors * * SPDX-License-Identifier: MIT */ +#include <../boards/weact/blackpill_f401ce/blackpill_f401ce.dts> / { blackpill: connector { diff --git a/app/boards/weact/blackpill_f401ce/blackpill_f401ce_zmk_defconfig b/app/boards/weact/blackpill_f401ce/blackpill_f401ce_zmk_defconfig new file mode 100644 index 00000000..c0efb874 --- /dev/null +++ b/app/boards/weact/blackpill_f401ce/blackpill_f401ce_zmk_defconfig @@ -0,0 +1,17 @@ +# SPDX-License-Identifier: MIT + +# Enable MPU +CONFIG_ARM_MPU=y + +# Enable HW stack protection +CONFIG_HW_STACK_PROTECTION=y + + +# Enable GPIO +CONFIG_GPIO=y + +# USB HID +CONFIG_ZMK_USB=y + +# Defaults for matrix scanning to avoid interrupt issues +CONFIG_ZMK_KSCAN_MATRIX_POLLING=y diff --git a/app/boards/weact/blackpill_f401ce/board.yml b/app/boards/weact/blackpill_f401ce/board.yml new file mode 100644 index 00000000..85d23de1 --- /dev/null +++ b/app/boards/weact/blackpill_f401ce/board.yml @@ -0,0 +1,5 @@ +board: + extend: blackpill_f401ce + variants: + - name: zmk + qualifier: stm32f401xe diff --git a/app/boards/weact/blackpill_f411ce/Kconfig.blackpill_f411ce b/app/boards/weact/blackpill_f411ce/Kconfig.blackpill_f411ce new file mode 100644 index 00000000..5f7a4f89 --- /dev/null +++ b/app/boards/weact/blackpill_f411ce/Kconfig.blackpill_f411ce @@ -0,0 +1,6 @@ +# Copyright (c) 2026 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config BOARD_BLACKPILL_F411CE + select ZMK_BOARD_COMPAT + diff --git a/app/boards/arm/blackpill_f411ce/blackpill_f411ce.zmk.yml b/app/boards/weact/blackpill_f411ce/blackpill_f411ce.zmk.yml similarity index 86% rename from app/boards/arm/blackpill_f411ce/blackpill_f411ce.zmk.yml rename to app/boards/weact/blackpill_f411ce/blackpill_f411ce.zmk.yml index eaa714d6..2684da2d 100644 --- a/app/boards/arm/blackpill_f411ce/blackpill_f411ce.zmk.yml +++ b/app/boards/weact/blackpill_f411ce/blackpill_f411ce.zmk.yml @@ -1,5 +1,5 @@ file_format: "1" -id: blackpill_f411ce +id: blackpill_f411ce//zmk name: BlackPill F411CE type: board arch: arm diff --git a/app/boards/blackpill_f401cc.overlay b/app/boards/weact/blackpill_f411ce/blackpill_f411ce_zmk.dts similarity index 94% rename from app/boards/blackpill_f401cc.overlay rename to app/boards/weact/blackpill_f411ce/blackpill_f411ce_zmk.dts index 6ed4c3cf..f9be15c1 100644 --- a/app/boards/blackpill_f401cc.overlay +++ b/app/boards/weact/blackpill_f411ce/blackpill_f411ce_zmk.dts @@ -1,9 +1,11 @@ /* - * Copyright (c) 2024 The ZMK Contributors + * Copyright (c) 2026 The ZMK Contributors * * SPDX-License-Identifier: MIT */ +#include <../boards/weact/blackpill_f411ce/blackpill_f411ce.dts> + / { blackpill: connector { compatible = "blackpill"; diff --git a/app/boards/weact/blackpill_f411ce/blackpill_f411ce_zmk_defconfig b/app/boards/weact/blackpill_f411ce/blackpill_f411ce_zmk_defconfig new file mode 100644 index 00000000..c0efb874 --- /dev/null +++ b/app/boards/weact/blackpill_f411ce/blackpill_f411ce_zmk_defconfig @@ -0,0 +1,17 @@ +# SPDX-License-Identifier: MIT + +# Enable MPU +CONFIG_ARM_MPU=y + +# Enable HW stack protection +CONFIG_HW_STACK_PROTECTION=y + + +# Enable GPIO +CONFIG_GPIO=y + +# USB HID +CONFIG_ZMK_USB=y + +# Defaults for matrix scanning to avoid interrupt issues +CONFIG_ZMK_KSCAN_MATRIX_POLLING=y diff --git a/app/boards/weact/blackpill_f411ce/board.yml b/app/boards/weact/blackpill_f411ce/board.yml new file mode 100644 index 00000000..d0bb7691 --- /dev/null +++ b/app/boards/weact/blackpill_f411ce/board.yml @@ -0,0 +1,5 @@ +board: + extend: blackpill_f411ce + variants: + - name: zmk + qualifier: stm32f411xe diff --git a/app/boards/zhiayang/mikoto/Kconfig.mikoto b/app/boards/zhiayang/mikoto/Kconfig.mikoto new file mode 100644 index 00000000..6e952890 --- /dev/null +++ b/app/boards/zhiayang/mikoto/Kconfig.mikoto @@ -0,0 +1,10 @@ +# Copyright (c) 2020 The ZMK Contributors +# SPDX-License-Identifier: Apache-2.0 + +config BOARD_MIKOTO + select SOC_NRF52840_QIAA + select ZMK_BOARD_COMPAT if BOARD_MIKOTO_NRF52840_ZMK + imply RETAINED_MEM if BOARD_MIKOTO_NRF52840_ZMK + imply RETENTION if BOARD_MIKOTO_NRF52840_ZMK + imply RETENTION_BOOT_MODE if BOARD_MIKOTO_NRF52840_ZMK + imply I2C if BOARD_REVISION="7.2.0" diff --git a/app/boards/arm/nrfmicro/board.cmake b/app/boards/zhiayang/mikoto/board.cmake similarity index 100% rename from app/boards/arm/nrfmicro/board.cmake rename to app/boards/zhiayang/mikoto/board.cmake diff --git a/app/boards/zhiayang/mikoto/board.yml b/app/boards/zhiayang/mikoto/board.yml new file mode 100644 index 00000000..745ed1c3 --- /dev/null +++ b/app/boards/zhiayang/mikoto/board.yml @@ -0,0 +1,5 @@ +board: + extend: mikoto + variants: + - name: zmk + qualifier: nrf52840 diff --git a/app/boards/arm/mikoto/mikoto_520.zmk.yml b/app/boards/zhiayang/mikoto/mikoto.zmk.yml similarity index 54% rename from app/boards/arm/mikoto/mikoto_520.zmk.yml rename to app/boards/zhiayang/mikoto/mikoto.zmk.yml index 91dcc9e0..7726e82b 100644 --- a/app/boards/arm/mikoto/mikoto_520.zmk.yml +++ b/app/boards/zhiayang/mikoto/mikoto.zmk.yml @@ -1,6 +1,6 @@ file_format: "1" -id: mikoto_520 -name: Mikoto 5.20 +id: mikoto//zmk +name: Mikoto type: board arch: arm outputs: @@ -8,3 +8,9 @@ outputs: - ble url: https://github.com/zhiayang/mikoto exposes: [pro_micro] +revisions: + - "5.20" + - "6.1" + - "6.3" + - "7.2" +default_revision: "5.20" diff --git a/app/boards/zhiayang/mikoto/mikoto_nrf52840_zmk.dts b/app/boards/zhiayang/mikoto/mikoto_nrf52840_zmk.dts new file mode 100644 index 00000000..7363967a --- /dev/null +++ b/app/boards/zhiayang/mikoto/mikoto_nrf52840_zmk.dts @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2026 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include <../boards/zhiayang/mikoto/mikoto.dts> +#include + +/ { + chosen { + zmk,battery = &vbatt; + }; + + // Node name must match original "EXT_POWER" label to preserve user settings. + EXT_POWER { + compatible = "zmk,ext-power-generic"; + control-gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>; + init-delay-ms = <50>; + }; + + vbatt: vbatt { + compatible = "zmk,battery-voltage-divider"; + io-channels = <&adc 1>; + output-ohms = <10000000>; + full-ohms = <(10000000 + 4000000)>; + }; +}; diff --git a/app/boards/zhiayang/mikoto/mikoto_nrf52840_zmk_5_20_0.overlay b/app/boards/zhiayang/mikoto/mikoto_nrf52840_zmk_5_20_0.overlay new file mode 100644 index 00000000..e5ea4864 --- /dev/null +++ b/app/boards/zhiayang/mikoto/mikoto_nrf52840_zmk_5_20_0.overlay @@ -0,0 +1,8 @@ +/* + * Copyright (c) 2026 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include <../boards/zhiayang/mikoto/mikoto-pinctrl.dtsi> +#include <../boards/zhiayang/mikoto/arduino_pro_micro_pins_v5.dtsi> diff --git a/app/boards/zhiayang/mikoto/mikoto_nrf52840_zmk_6_1_0.overlay b/app/boards/zhiayang/mikoto/mikoto_nrf52840_zmk_6_1_0.overlay new file mode 100644 index 00000000..e5ea4864 --- /dev/null +++ b/app/boards/zhiayang/mikoto/mikoto_nrf52840_zmk_6_1_0.overlay @@ -0,0 +1,8 @@ +/* + * Copyright (c) 2026 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include <../boards/zhiayang/mikoto/mikoto-pinctrl.dtsi> +#include <../boards/zhiayang/mikoto/arduino_pro_micro_pins_v5.dtsi> diff --git a/app/boards/zhiayang/mikoto/mikoto_nrf52840_zmk_7_2_0.overlay b/app/boards/zhiayang/mikoto/mikoto_nrf52840_zmk_7_2_0.overlay new file mode 100644 index 00000000..06db3f9c --- /dev/null +++ b/app/boards/zhiayang/mikoto/mikoto_nrf52840_zmk_7_2_0.overlay @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2026 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include <../boards/zhiayang/mikoto/mikoto-pinctrl.dtsi> +#include <../boards/zhiayang/mikoto/arduino_pro_micro_pins_v6.dtsi> + +&pinctrl { + i2c1_default: i2c1_default { + group1 { + psels = , + ; + bias-pull-up; + }; + }; + + i2c1_sleep: i2c1_sleep { + group1 { + psels = , + ; + low-power-enable; + bias-pull-up; + }; + }; +}; + +&i2c1 { + status = "okay"; + compatible = "nordic,nrf-twi"; + pinctrl-0 = <&i2c1_default>; + pinctrl-1 = <&i2c1_sleep>; + pinctrl-names = "default", "sleep"; + + builtin_fuel_gauge: max17048@36 { + compatible = "zmk,maxim-max17048"; + status = "okay"; + reg = <0x36>; + }; +}; + +/ { + chosen { + zmk,battery = &builtin_fuel_gauge; + }; +}; diff --git a/app/boards/zhiayang/mikoto/mikoto_nrf52840_zmk_7_2_0_defconfig b/app/boards/zhiayang/mikoto/mikoto_nrf52840_zmk_7_2_0_defconfig new file mode 100644 index 00000000..8bf92886 --- /dev/null +++ b/app/boards/zhiayang/mikoto/mikoto_nrf52840_zmk_7_2_0_defconfig @@ -0,0 +1,2 @@ +CONFIG_I2C=y +CONFIG_ZMK_MAX17048=y diff --git a/app/boards/arm/mikoto/mikoto_520_defconfig b/app/boards/zhiayang/mikoto/mikoto_nrf52840_zmk_defconfig similarity index 80% rename from app/boards/arm/mikoto/mikoto_520_defconfig rename to app/boards/zhiayang/mikoto/mikoto_nrf52840_zmk_defconfig index 354fa56a..56aa9526 100644 --- a/app/boards/arm/mikoto/mikoto_520_defconfig +++ b/app/boards/zhiayang/mikoto/mikoto_nrf52840_zmk_defconfig @@ -1,12 +1,7 @@ # SPDX-License-Identifier: MIT -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_MIKOTO_520=y - # Enable MPU CONFIG_ARM_MPU=y - CONFIG_PINCTRL=y # enable GPIO diff --git a/app/boards/arm/puchi_ble/pre_dt_board.cmake b/app/boards/zhiayang/mikoto/pre_dt_board.cmake similarity index 100% rename from app/boards/arm/puchi_ble/pre_dt_board.cmake rename to app/boards/zhiayang/mikoto/pre_dt_board.cmake diff --git a/app/core-coverage.yml b/app/core-coverage.yml index 28a8788c..beefb2eb 100644 --- a/app/core-coverage.yml +++ b/app/core-coverage.yml @@ -1,7 +1,7 @@ board: - - nice_nano_v2 - - nrfmicro_13 - - proton_c + - nice_nano//zmk + - nrfmicro/nrf52840/zmk + - proton_c//zmk shield: - corne_left - corne_right @@ -9,62 +9,62 @@ shield: - settings_reset - tidbit include: - - board: bdn9_rev2 - - board: nice60 - - board: seeeduino_xiao_ble + - board: bdn9//zmk + - board: nice60//zmk + - board: xiao_ble//zmk shield: hummingbird - - board: nrf52840_m2 + - board: nrf52840_m2//zmk shield: m60 - - board: planck_rev6 - - board: proton_c + - board: planck//zmk + - board: proton_c//zmk shield: clueboard_california - - board: nice_nano_v2 + - board: nice_nano//zmk shield: kyria_left cmake-args: "-DCONFIG_ZMK_DISPLAY=y" nickname: "display" - - board: nice_nano_v2 + - board: nice_nano//zmk shield: kyria_left - cmake-args: "-DCONFIG_ZMK_MOUSE=y" + cmake-args: "-DCONFIG_ZMK_POINTING=y" nickname: "mouse" - - board: sparkfun_pro_micro_rp2040 + - board: sparkfun_pro_micro_rp2040//zmk shield: reviung41 cmake-args: "-DSNIPPET='zmk-usb-logging'" - - board: nice_nano_v2 + - board: nice_nano//zmk shield: kyria_right cmake-args: "-DCONFIG_ZMK_DISPLAY=y" nickname: "display" - - board: nice_nano + - board: nice_nano//zmk shield: romac_plus - cmake-args: "-DCONFIG_ZMK_RGB_UNDERGLOW=y -DCONFIG_WS2812_STRIP=y" + cmake-args: "-DCONFIG_ZMK_RGB_UNDERGLOW=y" nickname: "underglow" - - board: nice_nano_v2 + - board: nice_nano//zmk shield: lily58_left nice_view_adapter nice_view nickname: "niceview" - - board: bdn9_rev2 + - board: bdn9//zmk snippet: studio-rpc-usb-uart cmake-args: "-DCONFIG_ZMK_STUDIO=y" nickname: "stm32-studio" - - board: nice_nano_v2 + - board: nice_nano//zmk shield: reviung41 snippet: studio-rpc-usb-uart cmake-args: "-DCONFIG_ZMK_STUDIO=y" nickname: "nrf52-studio" - - board: nice_nano_v2 + - board: nice_nano//zmk shield: corne_left snippet: studio-rpc-usb-uart cmake-args: "-DCONFIG_ZMK_STUDIO=y" nickname: "split-left-studio" - - board: nice_nano_v2 + - board: nice_nano//zmk shield: corne_right snippet: studio-rpc-usb-uart cmake-args: "-DCONFIG_ZMK_STUDIO=y" nickname: "split-right-studio" - - board: sparkfun_pro_micro_rp2040 + - board: sparkfun_pro_micro_rp2040//zmk shield: reviung41 snippet: studio-rpc-usb-uart cmake-args: "-DCONFIG_ZMK_STUDIO=y" nickname: "rp2040-studio" - - board: seeeduino_xiao + - board: seeeduino_xiao//zmk shield: hummingbird snippet: studio-rpc-usb-uart cmake-args: "-DCONFIG_ZMK_STUDIO=y" diff --git a/app/dts/behaviors.dtsi b/app/dts/behaviors.dtsi index fcb4a63d..653b085d 100644 --- a/app/dts/behaviors.dtsi +++ b/app/dts/behaviors.dtsi @@ -1,3 +1,9 @@ +/* + * Copyright (c) 2024 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + #include #include #include @@ -19,6 +25,6 @@ #include #include #include -#include #include #include +#include diff --git a/app/dts/behaviors/mouse_key_press.dtsi b/app/dts/behaviors/mouse_key_press.dtsi index 4fbc2eb4..c20f04c0 100644 --- a/app/dts/behaviors/mouse_key_press.dtsi +++ b/app/dts/behaviors/mouse_key_press.dtsi @@ -14,6 +14,12 @@ mkp: mouse_key_press { compatible = "zmk,behavior-mouse-key-press"; #binding-cells = <1>; + display-name = "Mouse Key Press"; }; }; + + mkp_input_listener: mkp_input_listener { + compatible = "zmk,input-listener"; + device = <&mkp>; + }; }; diff --git a/app/dts/behaviors/mouse_keys.dtsi b/app/dts/behaviors/mouse_keys.dtsi new file mode 100644 index 00000000..f9a99fed --- /dev/null +++ b/app/dts/behaviors/mouse_keys.dtsi @@ -0,0 +1,9 @@ +/* + * Copyright (c) 2024 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include "mouse_key_press.dtsi" +#include "mouse_move.dtsi" +#include "mouse_scroll.dtsi" \ No newline at end of file diff --git a/app/dts/behaviors/mouse_move.dtsi b/app/dts/behaviors/mouse_move.dtsi new file mode 100644 index 00000000..09b93520 --- /dev/null +++ b/app/dts/behaviors/mouse_move.dtsi @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2024 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include + +/ { + behaviors { + /omit-if-no-ref/ mmv: mouse_move { + compatible = "zmk,behavior-input-two-axis"; + #binding-cells = <1>; + x-input-code = ; + y-input-code = ; + time-to-max-speed-ms = <300>; + acceleration-exponent = <1>; + }; + }; + + mmv_input_listener: mmv_input_listener { + compatible = "zmk,input-listener"; + device = <&mmv>; + }; +}; diff --git a/app/dts/behaviors/mouse_scroll.dtsi b/app/dts/behaviors/mouse_scroll.dtsi new file mode 100644 index 00000000..b482efde --- /dev/null +++ b/app/dts/behaviors/mouse_scroll.dtsi @@ -0,0 +1,26 @@ + +/* + * Copyright (c) 2024 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include + +/ { + behaviors { + /omit-if-no-ref/ msc: mouse_scroll { + compatible = "zmk,behavior-input-two-axis"; + #binding-cells = <1>; + x-input-code = ; + y-input-code = ; + time-to-max-speed-ms = <300>; + acceleration-exponent = <0>; + }; + }; + + msc_input_listener: msc_input_listener { + compatible = "zmk,input-listener"; + device = <&msc>; + }; +}; diff --git a/app/dts/behaviors/reset.dtsi b/app/dts/behaviors/reset.dtsi index 2aa41d7d..1b29f9d1 100644 --- a/app/dts/behaviors/reset.dtsi +++ b/app/dts/behaviors/reset.dtsi @@ -19,6 +19,7 @@ bootloader: bootload { compatible = "zmk,behavior-reset"; type = ; + bootloader; #binding-cells = <0>; display-name = "Bootloader"; }; diff --git a/app/dts/behaviors/to_layer.dtsi b/app/dts/behaviors/to_layer.dtsi index 532636a6..89bc91ca 100644 --- a/app/dts/behaviors/to_layer.dtsi +++ b/app/dts/behaviors/to_layer.dtsi @@ -15,6 +15,7 @@ compatible = "zmk,behavior-to-layer"; #binding-cells = <1>; display-name = "To Layer"; + locking; }; }; }; diff --git a/app/dts/behaviors/toggle_layer.dtsi b/app/dts/behaviors/toggle_layer.dtsi index 81846e77..a0c85340 100644 --- a/app/dts/behaviors/toggle_layer.dtsi +++ b/app/dts/behaviors/toggle_layer.dtsi @@ -15,6 +15,7 @@ compatible = "zmk,behavior-toggle-layer"; #binding-cells = <1>; display-name = "Toggle Layer"; + locking; }; }; }; diff --git a/app/dts/bindings/behaviors/zmk,behavior-input-two-axis.yaml b/app/dts/bindings/behaviors/zmk,behavior-input-two-axis.yaml new file mode 100644 index 00000000..80972212 --- /dev/null +++ b/app/dts/bindings/behaviors/zmk,behavior-input-two-axis.yaml @@ -0,0 +1,28 @@ +# Copyright (c) 2024 The ZMK Contributors +# SPDX-License-Identifier: MIT + +description: Two axis input behavior + +compatible: "zmk,behavior-input-two-axis" + +include: one_param.yaml + +properties: + x-input-code: + type: int + required: true + y-input-code: + type: int + required: true + trigger-period-ms: + type: int + default: 16 + description: The time (in ms) between generated inputs when an input has non-zero speed. + delay-ms: + type: int + time-to-max-speed-ms: + type: int + required: true + acceleration-exponent: + type: int + default: 1 diff --git a/app/dts/bindings/behaviors/zmk,behavior-key-toggle.yaml b/app/dts/bindings/behaviors/zmk,behavior-key-toggle.yaml index e3ec86f7..7e465e88 100644 --- a/app/dts/bindings/behaviors/zmk,behavior-key-toggle.yaml +++ b/app/dts/bindings/behaviors/zmk,behavior-key-toggle.yaml @@ -6,3 +6,13 @@ description: Key toggle behavior compatible: "zmk,behavior-key-toggle" include: one_param.yaml + +properties: + toggle-mode: + type: string + required: false + default: "flip" + enum: + - "on" + - "off" + - "flip" diff --git a/app/dts/bindings/behaviors/zmk,behavior-momentary-layer.yaml b/app/dts/bindings/behaviors/zmk,behavior-momentary-layer.yaml index 5423e29c..453dbcd2 100644 --- a/app/dts/bindings/behaviors/zmk,behavior-momentary-layer.yaml +++ b/app/dts/bindings/behaviors/zmk,behavior-momentary-layer.yaml @@ -6,3 +6,8 @@ description: Momentary layer on press/release behavior compatible: "zmk,behavior-momentary-layer" include: one_param.yaml + +properties: + locking: + type: boolean + description: Whether to "lock" the layer active, preventing behaviors without the "locking" property from deactivating the layer diff --git a/app/dts/bindings/behaviors/zmk,behavior-reset.yaml b/app/dts/bindings/behaviors/zmk,behavior-reset.yaml index 9eb7aa6a..aeb9450e 100644 --- a/app/dts/bindings/behaviors/zmk,behavior-reset.yaml +++ b/app/dts/bindings/behaviors/zmk,behavior-reset.yaml @@ -11,3 +11,5 @@ properties: type: type: int default: 0 + bootloader: + type: boolean diff --git a/app/dts/bindings/behaviors/zmk,behavior-to-layer.yaml b/app/dts/bindings/behaviors/zmk,behavior-to-layer.yaml index cbafddf7..52deecd3 100644 --- a/app/dts/bindings/behaviors/zmk,behavior-to-layer.yaml +++ b/app/dts/bindings/behaviors/zmk,behavior-to-layer.yaml @@ -6,3 +6,8 @@ description: To Layer compatible: "zmk,behavior-to-layer" include: one_param.yaml + +properties: + locking: + type: boolean + description: Whether to "lock" the layer active, preventing behaviors without the "locking" property from deactivating the layer diff --git a/app/dts/bindings/behaviors/zmk,behavior-toggle-layer.yaml b/app/dts/bindings/behaviors/zmk,behavior-toggle-layer.yaml index 0a9723f7..71d70a3a 100644 --- a/app/dts/bindings/behaviors/zmk,behavior-toggle-layer.yaml +++ b/app/dts/bindings/behaviors/zmk,behavior-toggle-layer.yaml @@ -6,3 +6,15 @@ description: Toggle Layer compatible: "zmk,behavior-toggle-layer" include: one_param.yaml + +properties: + toggle-mode: + type: string + default: "flip" + enum: + - "on" + - "off" + - "flip" + locking: + type: boolean + description: Whether to "lock" the layer active, preventing behaviors without the "locking" property from deactivating the layer diff --git a/app/dts/bindings/gpio/moergo,glove80-ext.yaml b/app/dts/bindings/gpio/moergo,glove80-ext.yaml new file mode 100644 index 00000000..ca438a1c --- /dev/null +++ b/app/dts/bindings/gpio/moergo,glove80-ext.yaml @@ -0,0 +1,24 @@ +# Copyright (C) 2024 The ZMK Contributors +# SPDX-License-Identifier: MIT + +description: | + GPIO pins exposed on the Glove80 internal extension header. + + See https://docs.moergo.com/glove80-user-guide/appendix-more-customizations/ + + Both sides of the Glove80 split keyboard expose a set of 6 extra GPIO pins + for customization, with different underlying nRF52 pins used on each side. + This nexus node allows referencing the pins generically without being tied + to a specific left/right side pin assignment. + + + - GND VEXT - + - VDDH EXT1 1 + 2 EXT2 EXT3 3 + 4 EXT4 EXT5 5 + 6 SWO_EXT6 RESET - + - SWDCLK SWDIO - + +compatible: "moergo,glove80-ext" + +include: [gpio-nexus.yaml, base.yaml] diff --git a/app/dts/bindings/indicators/zmk,indicator-leds.yaml b/app/dts/bindings/indicators/zmk,indicator-leds.yaml new file mode 100644 index 00000000..e6ea5b06 --- /dev/null +++ b/app/dts/bindings/indicators/zmk,indicator-leds.yaml @@ -0,0 +1,37 @@ +# Copyright (c) 2025, The ZMK Contributors +# SPDX-License-Identifier: MIT + +description: Display the states of HID indicators using LEDs + +compatible: "zmk,indicator-leds" + +child-binding: + properties: + leds: + type: phandles + required: true + description: One or more LED devices to control + + indicator: + type: int + required: true + description: HID_INDICATOR_* value to indicate (see dt-bindings/zmk/hid_indicators.h) + + active-brightness: + type: int + description: LED brightness in percent when the indicator is active + default: 100 + + inactive-brightness: + type: int + description: LED brightness in percent when the indicator is not active + default: 0 + + disconnected-brightness: + type: int + description: LED brightness in percent when the keyboard is not connected to any device + default: 0 + + on-while-idle: + type: boolean + description: Keep LEDs enabled even when the keyboard is idle and on battery power diff --git a/app/dts/bindings/input_processors/ip_common.yaml b/app/dts/bindings/input_processors/ip_common.yaml new file mode 100644 index 00000000..9add07ac --- /dev/null +++ b/app/dts/bindings/input_processors/ip_common.yaml @@ -0,0 +1,6 @@ +# Copyright (c) 2024 The ZMK Contributors +# SPDX-License-Identifier: MIT + +properties: + track-remainders: + type: boolean diff --git a/app/dts/bindings/input_processors/ip_one_param.yaml b/app/dts/bindings/input_processors/ip_one_param.yaml new file mode 100644 index 00000000..6ef83b14 --- /dev/null +++ b/app/dts/bindings/input_processors/ip_one_param.yaml @@ -0,0 +1,13 @@ +# Copyright (c) 2024 The ZMK Contributors +# SPDX-License-Identifier: MIT + +include: ip_common.yaml + +properties: + "#input-processor-cells": + type: int + required: true + const: 1 + +input-processor-cells: + - param1 diff --git a/app/dts/bindings/input_processors/ip_two_param.yaml b/app/dts/bindings/input_processors/ip_two_param.yaml new file mode 100644 index 00000000..f9538eb1 --- /dev/null +++ b/app/dts/bindings/input_processors/ip_two_param.yaml @@ -0,0 +1,14 @@ +# Copyright (c) 2024 The ZMK Contributors +# SPDX-License-Identifier: MIT + +include: ip_common.yaml + +properties: + "#input-processor-cells": + type: int + required: true + const: 2 + +input-processor-cells: + - param1 + - param2 diff --git a/app/dts/bindings/input_processors/ip_zero_param.yaml b/app/dts/bindings/input_processors/ip_zero_param.yaml new file mode 100644 index 00000000..c22f6ec8 --- /dev/null +++ b/app/dts/bindings/input_processors/ip_zero_param.yaml @@ -0,0 +1,10 @@ +# Copyright (c) 2024 The ZMK Contributors +# SPDX-License-Identifier: MIT + +include: ip_common.yaml + +properties: + "#input-processor-cells": + type: int + required: true + const: 0 diff --git a/app/dts/bindings/input_processors/zmk,input-processor-behaviors.yaml b/app/dts/bindings/input_processors/zmk,input-processor-behaviors.yaml new file mode 100644 index 00000000..c8c54c55 --- /dev/null +++ b/app/dts/bindings/input_processors/zmk,input-processor-behaviors.yaml @@ -0,0 +1,18 @@ +# Copyright (c) 2024, The ZMK Contributors +# SPDX-License-Identifier: MIT + +description: Input Processor for invoking behaviors on certain events + +compatible: "zmk,input-processor-behaviors" + +include: ip_zero_param.yaml + +properties: + type: + type: int + codes: + type: array + required: true + bindings: + type: phandle-array + required: true diff --git a/app/dts/bindings/input_processors/zmk,input-processor-code-mapper.yaml b/app/dts/bindings/input_processors/zmk,input-processor-code-mapper.yaml new file mode 100644 index 00000000..6cad85a8 --- /dev/null +++ b/app/dts/bindings/input_processors/zmk,input-processor-code-mapper.yaml @@ -0,0 +1,16 @@ +# Copyright (c) 2024, The ZMK Contributors +# SPDX-License-Identifier: MIT + +description: Input Processor for remapping certain input codes to other codes + +compatible: "zmk,input-processor-code-mapper" + +include: ip_zero_param.yaml + +properties: + type: + type: int + required: true + map: + type: array + required: true diff --git a/app/dts/bindings/input_processors/zmk,input-processor-scaler.yaml b/app/dts/bindings/input_processors/zmk,input-processor-scaler.yaml new file mode 100644 index 00000000..da7ca13f --- /dev/null +++ b/app/dts/bindings/input_processors/zmk,input-processor-scaler.yaml @@ -0,0 +1,16 @@ +# Copyright (c) 2024, The ZMK Contributors +# SPDX-License-Identifier: MIT + +description: Input Processor for scaling values + +compatible: "zmk,input-processor-scaler" + +include: ip_two_param.yaml + +properties: + type: + type: int + required: true + codes: + type: array + required: true diff --git a/app/dts/bindings/input_processors/zmk,input-processor-temp-layer.yaml b/app/dts/bindings/input_processors/zmk,input-processor-temp-layer.yaml new file mode 100644 index 00000000..e69cd58d --- /dev/null +++ b/app/dts/bindings/input_processors/zmk,input-processor-temp-layer.yaml @@ -0,0 +1,21 @@ +# Copyright (c) 2024, The ZMK Contributors +# SPDX-License-Identifier: MIT + +description: Input Processor for temporarily enabling a layer after input events + +compatible: "zmk,input-processor-temp-layer" + +include: ip_two_param.yaml + +properties: + require-prior-idle-ms: + type: int + required: false + default: 0 + description: Time in milliseconds that must pass after the last keystroke before the layer can be toggled + + excluded-positions: + type: array + required: false + default: [] + description: Array of key positions that will NOT trigger layer deactivation when pressed diff --git a/app/dts/bindings/input_processors/zmk,input-processor-transform.yaml b/app/dts/bindings/input_processors/zmk,input-processor-transform.yaml new file mode 100644 index 00000000..24fbd288 --- /dev/null +++ b/app/dts/bindings/input_processors/zmk,input-processor-transform.yaml @@ -0,0 +1,18 @@ +# Copyright (c) 2024, The ZMK Contributors +# SPDX-License-Identifier: MIT + +description: Input Processor for transforming values in various ways + +compatible: "zmk,input-processor-transform" + +include: ip_one_param.yaml + +properties: + type: + type: int + x-codes: + type: array + required: true + y-codes: + type: array + required: true diff --git a/app/dts/bindings/retained_mem/zmk,bootmode-to-magic-mapper.yaml b/app/dts/bindings/retained_mem/zmk,bootmode-to-magic-mapper.yaml new file mode 100644 index 00000000..5d8b70c6 --- /dev/null +++ b/app/dts/bindings/retained_mem/zmk,bootmode-to-magic-mapper.yaml @@ -0,0 +1,9 @@ +# Copyright (c) 2024 The ZMK Contributors +# SPDX-License-Identifier: MIT + +description: | + Driver for mapping bootloader boot mode to a magic value + +compatible: "zmk,bootmode-to-magic-mapper" + +include: base.yaml diff --git a/app/dts/bindings/vendor-prefixes.txt b/app/dts/bindings/vendor-prefixes.txt index 72066dfb..889ba584 100644 --- a/app/dts/bindings/vendor-prefixes.txt +++ b/app/dts/bindings/vendor-prefixes.txt @@ -1 +1,2 @@ -zmk ZMK Project \ No newline at end of file +zmk ZMK Project +moergo MoErgo \ No newline at end of file diff --git a/app/dts/bindings/zmk,combos.yaml b/app/dts/bindings/zmk,combos.yaml index f146ab7a..5ab0085d 100644 --- a/app/dts/bindings/zmk,combos.yaml +++ b/app/dts/bindings/zmk,combos.yaml @@ -25,4 +25,3 @@ child-binding: type: boolean layers: type: array - default: [-1] diff --git a/app/dts/bindings/zmk,input-listener.yaml b/app/dts/bindings/zmk,input-listener.yaml new file mode 100644 index 00000000..5516794c --- /dev/null +++ b/app/dts/bindings/zmk,input-listener.yaml @@ -0,0 +1,26 @@ +# Copyright (c) 2024 The ZMK Contributors +# SPDX-License-Identifier: MIT + +description: | + Listener to subscribe to input events and send HID updates after processing + +compatible: "zmk,input-listener" + +properties: + device: + type: phandle + required: true + input-processors: + type: phandle-array + +child-binding: + description: "Listener overrides for certain layers" + + properties: + layers: + type: array + required: true + process-next: + type: boolean + input-processors: + type: phandle-array diff --git a/app/dts/bindings/zmk,input-split.yaml b/app/dts/bindings/zmk,input-split.yaml new file mode 100644 index 00000000..76d15a36 --- /dev/null +++ b/app/dts/bindings/zmk,input-split.yaml @@ -0,0 +1,18 @@ +# Copyright (c) 2024 The ZMK Contributors +# SPDX-License-Identifier: MIT + +include: [base.yaml] + +compatible: "zmk,input-split" + +description: Device to wire up an input device for split use. + +properties: + reg: + required: true + + device: + type: phandle + + input-processors: + type: phandle-array diff --git a/app/dts/bindings/zmk,kscan-composite.yaml b/app/dts/bindings/zmk,kscan-composite.yaml index 857ef34f..2600eab7 100644 --- a/app/dts/bindings/zmk,kscan-composite.yaml +++ b/app/dts/bindings/zmk,kscan-composite.yaml @@ -3,6 +3,8 @@ description: | compatible: "zmk,kscan-composite" +include: kscan.yaml + properties: label: type: string @@ -26,6 +28,11 @@ child-binding: row-offset: type: int default: 0 + col-offset: + type: int + default: 0 + column-offset: type: int default: 0 + deprecated: true diff --git a/app/dts/bindings/zmk,physical-layout.yaml b/app/dts/bindings/zmk,physical-layout.yaml index 3f9b8c24..7ed4cdc3 100644 --- a/app/dts/bindings/zmk,physical-layout.yaml +++ b/app/dts/bindings/zmk,physical-layout.yaml @@ -21,6 +21,9 @@ properties: kscan: type: phandle description: The kscan to use along with this layout. The `zmk,kscan` chosen will be used as a fallback if this property is omitted. + input: + type: phandle + description: The input device to use along with this layout. The `zmk,matrix-input` chosen will be used as a fallback if this property is omitted. keys: type: phandle-array description: Array of key physical attributes. diff --git a/app/dts/bindings/zmk,wired-split.yaml b/app/dts/bindings/zmk,wired-split.yaml new file mode 100644 index 00000000..311d367a --- /dev/null +++ b/app/dts/bindings/zmk,wired-split.yaml @@ -0,0 +1,27 @@ +# Copyright (c) 2025 The ZMK Contributors +# SPDX-License-Identifier: MIT + +description: | + Complete specification of wired split connection + +compatible: "zmk,wired-split" + +properties: + device: + type: phandle + required: true + description: The UART device for wired split communication + + detect-gpios: + type: phandle-array + description: | + If your split includes support for an extra GPIO to detect presence of the split cable, set + this to the GPIO pin used to detect the connection. + + half-duplex: + type: boolean + description: "Experimental: Enable half-duplex protocol mode" + + dir-gpios: + type: phandle-array + description: "Experimental: Set the communication direction. Used for RS-422 style comms." diff --git a/app/dts/common/nordic/nrf52833_uf2_boot_mode.dtsi b/app/dts/common/nordic/nrf52833_uf2_boot_mode.dtsi new file mode 100644 index 00000000..9087426c --- /dev/null +++ b/app/dts/common/nordic/nrf52833_uf2_boot_mode.dtsi @@ -0,0 +1,29 @@ + +&gpregret1 { + adafruit_boot_retention: retention@0 { + compatible = "zephyr,retention"; + status = "okay"; + reg = <0x0 0x1>; + }; +}; + +/ { + chosen { + zephyr,boot-mode = &boot_retention; + zmk,magic-boot-mode = &adafruit_boot_retention; + }; + + magic_mapper { + compatible = "zmk,bootmode-to-magic-mapper"; + status = "okay"; + + #address-cells = <1>; + #size-cells = <1>; + + boot_retention: retention@0 { + compatible = "zephyr,retention"; + status = "okay"; + reg = <0x0 0x1>; + }; + }; +}; \ No newline at end of file diff --git a/app/dts/common/nordic/nrf52840_uf2_boot_mode.dtsi b/app/dts/common/nordic/nrf52840_uf2_boot_mode.dtsi new file mode 100644 index 00000000..9087426c --- /dev/null +++ b/app/dts/common/nordic/nrf52840_uf2_boot_mode.dtsi @@ -0,0 +1,29 @@ + +&gpregret1 { + adafruit_boot_retention: retention@0 { + compatible = "zephyr,retention"; + status = "okay"; + reg = <0x0 0x1>; + }; +}; + +/ { + chosen { + zephyr,boot-mode = &boot_retention; + zmk,magic-boot-mode = &adafruit_boot_retention; + }; + + magic_mapper { + compatible = "zmk,bootmode-to-magic-mapper"; + status = "okay"; + + #address-cells = <1>; + #size-cells = <1>; + + boot_retention: retention@0 { + compatible = "zephyr,retention"; + status = "okay"; + reg = <0x0 0x1>; + }; + }; +}; \ No newline at end of file diff --git a/app/dts/input/processors.dtsi b/app/dts/input/processors.dtsi new file mode 100644 index 00000000..17398bad --- /dev/null +++ b/app/dts/input/processors.dtsi @@ -0,0 +1,11 @@ +/* + * Copyright (c) 2024 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include +#include +#include +#include +#include \ No newline at end of file diff --git a/app/dts/input/processors/behaviors.dtsi b/app/dts/input/processors/behaviors.dtsi new file mode 100644 index 00000000..a50f9384 --- /dev/null +++ b/app/dts/input/processors/behaviors.dtsi @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2024 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include + +/ { + zip_button_behaviors: zip_button_behaviors { + compatible = "zmk,input-processor-behaviors"; + #input-processor-cells = <0>; + codes = ; + bindings = <&none &none &none>; + }; +}; \ No newline at end of file diff --git a/app/dts/input/processors/code_mapper.dtsi b/app/dts/input/processors/code_mapper.dtsi new file mode 100644 index 00000000..6a9b5d16 --- /dev/null +++ b/app/dts/input/processors/code_mapper.dtsi @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2024 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include + +/ { + /omit-if-no-ref/ zip_xy_swap_mapper: zip_xy_swap_mapper { + compatible = "zmk,input-processor-code-mapper"; + #input-processor-cells = <0>; + type = ; + map + = + , + ; + }; + + /omit-if-no-ref/ zip_xy_to_scroll_mapper: zip_xy_to_scroll_mapper { + compatible = "zmk,input-processor-code-mapper"; + #input-processor-cells = <0>; + type = ; + map + = + , + ; + }; +}; \ No newline at end of file diff --git a/app/dts/input/processors/scaler.dtsi b/app/dts/input/processors/scaler.dtsi new file mode 100644 index 00000000..7d5e3b45 --- /dev/null +++ b/app/dts/input/processors/scaler.dtsi @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2024 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + + #include + +/ { + /omit-if-no-ref/ zip_x_scaler: zip_x_scaler { + compatible = "zmk,input-processor-scaler"; + #input-processor-cells = <2>; + type = ; + codes = ; + track-remainders; + }; + + /omit-if-no-ref/ zip_y_scaler: zip_y_scaler { + compatible = "zmk,input-processor-scaler"; + #input-processor-cells = <2>; + type = ; + codes = ; + track-remainders; + }; + + /omit-if-no-ref/ zip_xy_scaler: zip_xy_scaler { + compatible = "zmk,input-processor-scaler"; + #input-processor-cells = <2>; + type = ; + codes = ; + track-remainders; + }; + + /omit-if-no-ref/ zip_scroll_scaler: zip_scroll_scaler { + compatible = "zmk,input-processor-scaler"; + #input-processor-cells = <2>; + type = ; + codes = ; + track-remainders; + }; +}; diff --git a/app/dts/input/processors/temp_layer.dtsi b/app/dts/input/processors/temp_layer.dtsi new file mode 100644 index 00000000..228ad4be --- /dev/null +++ b/app/dts/input/processors/temp_layer.dtsi @@ -0,0 +1,14 @@ +/* + * Copyright (c) 2024 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include + +/ { + /omit-if-no-ref/ zip_temp_layer: zip_temp_layer { + compatible = "zmk,input-processor-temp-layer"; + #input-processor-cells = <2>; + }; +}; \ No newline at end of file diff --git a/app/dts/input/processors/transform.dtsi b/app/dts/input/processors/transform.dtsi new file mode 100644 index 00000000..541e47d3 --- /dev/null +++ b/app/dts/input/processors/transform.dtsi @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2024 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include + +/ { + /omit-if-no-ref/ zip_xy_transform: zip_xy_transform { + compatible = "zmk,input-processor-transform"; + #input-processor-cells = <1>; + type = ; + y-codes = ; + x-codes = ; + }; + + /omit-if-no-ref/ zip_scroll_transform: zip_scroll_transform { + compatible = "zmk,input-processor-transform"; + #input-processor-cells = <1>; + type = ; + y-codes = ; + x-codes = ; + }; +}; \ No newline at end of file diff --git a/app/dts/layouts/common/60percent/all1u.dtsi b/app/dts/layouts/common/60percent/all1u.dtsi new file mode 100644 index 00000000..e99f75b5 --- /dev/null +++ b/app/dts/layouts/common/60percent/all1u.dtsi @@ -0,0 +1,91 @@ +#include +#include + +/ { + layout_60_all1u: layout_60_all1u { + compatible = "zmk,physical-layout"; + display-name = "60% All 1U"; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 0 0 0 0> + , <&key_physical_attrs 100 100 100 0 0 0 0> + , <&key_physical_attrs 100 100 200 0 0 0 0> + , <&key_physical_attrs 100 100 300 0 0 0 0> + , <&key_physical_attrs 100 100 400 0 0 0 0> + , <&key_physical_attrs 100 100 500 0 0 0 0> + , <&key_physical_attrs 100 100 600 0 0 0 0> + , <&key_physical_attrs 100 100 700 0 0 0 0> + , <&key_physical_attrs 100 100 800 0 0 0 0> + , <&key_physical_attrs 100 100 900 0 0 0 0> + , <&key_physical_attrs 100 100 1000 0 0 0 0> + , <&key_physical_attrs 100 100 1100 0 0 0 0> + , <&key_physical_attrs 100 100 1200 0 0 0 0> + , <&key_physical_attrs 100 100 1300 0 0 0 0> + , <&key_physical_attrs 100 100 1400 0 0 0 0> + , <&key_physical_attrs 150 100 0 100 0 0 0> + , <&key_physical_attrs 100 100 150 100 0 0 0> + , <&key_physical_attrs 100 100 250 100 0 0 0> + , <&key_physical_attrs 100 100 350 100 0 0 0> + , <&key_physical_attrs 100 100 450 100 0 0 0> + , <&key_physical_attrs 100 100 550 100 0 0 0> + , <&key_physical_attrs 100 100 650 100 0 0 0> + , <&key_physical_attrs 100 100 750 100 0 0 0> + , <&key_physical_attrs 100 100 850 100 0 0 0> + , <&key_physical_attrs 100 100 950 100 0 0 0> + , <&key_physical_attrs 100 100 1050 100 0 0 0> + , <&key_physical_attrs 100 100 1150 100 0 0 0> + , <&key_physical_attrs 100 100 1250 100 0 0 0> + , <&key_physical_attrs 150 100 1350 100 0 0 0> + , <&key_physical_attrs 175 100 0 200 0 0 0> + , <&key_physical_attrs 100 100 175 200 0 0 0> + , <&key_physical_attrs 100 100 275 200 0 0 0> + , <&key_physical_attrs 100 100 375 200 0 0 0> + , <&key_physical_attrs 100 100 475 200 0 0 0> + , <&key_physical_attrs 100 100 575 200 0 0 0> + , <&key_physical_attrs 100 100 675 200 0 0 0> + , <&key_physical_attrs 100 100 775 200 0 0 0> + , <&key_physical_attrs 100 100 875 200 0 0 0> + , <&key_physical_attrs 100 100 975 200 0 0 0> + , <&key_physical_attrs 100 100 1075 200 0 0 0> + , <&key_physical_attrs 100 100 1175 200 0 0 0> + , <&key_physical_attrs 225 100 1275 200 0 0 0> + , <&key_physical_attrs 100 100 0 300 0 0 0> + , <&key_physical_attrs 100 100 100 300 0 0 0> + , <&key_physical_attrs 100 100 200 300 0 0 0> + , <&key_physical_attrs 100 100 300 300 0 0 0> + , <&key_physical_attrs 100 100 400 300 0 0 0> + , <&key_physical_attrs 100 100 500 300 0 0 0> + , <&key_physical_attrs 100 100 600 300 0 0 0> + , <&key_physical_attrs 100 100 700 300 0 0 0> + , <&key_physical_attrs 100 100 800 300 0 0 0> + , <&key_physical_attrs 100 100 900 300 0 0 0> + , <&key_physical_attrs 100 100 1000 300 0 0 0> + , <&key_physical_attrs 100 100 1100 300 0 0 0> + , <&key_physical_attrs 100 100 1200 300 0 0 0> + , <&key_physical_attrs 100 100 1300 300 0 0 0> + , <&key_physical_attrs 100 100 1400 300 0 0 0> + , <&key_physical_attrs 125 100 0 400 0 0 0> + , <&key_physical_attrs 125 100 125 400 0 0 0> + , <&key_physical_attrs 125 100 250 400 0 0 0> + , <&key_physical_attrs 625 100 375 400 0 0 0> + , <&key_physical_attrs 100 100 1000 400 0 0 0> + , <&key_physical_attrs 100 100 1100 400 0 0 0> + , <&key_physical_attrs 100 100 1200 400 0 0 0> + , <&key_physical_attrs 100 100 1300 400 0 0 0> + , <&key_physical_attrs 100 100 1400 400 0 0 0> + ; + }; +}; + +&layouts_common_60_percent_position_map { + layout_60_all1u_posmap: layout_60_all1u { + physical-layout = <&layout_60_all1u>; + positions + = < 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 64 63 65> + ; + }; +}; diff --git a/app/dts/layouts/common/60percent/ansi.dtsi b/app/dts/layouts/common/60percent/ansi.dtsi new file mode 100644 index 00000000..0d6c6b9e --- /dev/null +++ b/app/dts/layouts/common/60percent/ansi.dtsi @@ -0,0 +1,86 @@ +#include +#include + +/ { + layout_60_ansi: layout_60_ansi { + compatible = "zmk,physical-layout"; + display-name = "60% ANSI"; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 0 0 0 0> + , <&key_physical_attrs 100 100 100 0 0 0 0> + , <&key_physical_attrs 100 100 200 0 0 0 0> + , <&key_physical_attrs 100 100 300 0 0 0 0> + , <&key_physical_attrs 100 100 400 0 0 0 0> + , <&key_physical_attrs 100 100 500 0 0 0 0> + , <&key_physical_attrs 100 100 600 0 0 0 0> + , <&key_physical_attrs 100 100 700 0 0 0 0> + , <&key_physical_attrs 100 100 800 0 0 0 0> + , <&key_physical_attrs 100 100 900 0 0 0 0> + , <&key_physical_attrs 100 100 1000 0 0 0 0> + , <&key_physical_attrs 100 100 1100 0 0 0 0> + , <&key_physical_attrs 100 100 1200 0 0 0 0> + , <&key_physical_attrs 200 100 1300 0 0 0 0> + , <&key_physical_attrs 150 100 0 100 0 0 0> + , <&key_physical_attrs 100 100 150 100 0 0 0> + , <&key_physical_attrs 100 100 250 100 0 0 0> + , <&key_physical_attrs 100 100 350 100 0 0 0> + , <&key_physical_attrs 100 100 450 100 0 0 0> + , <&key_physical_attrs 100 100 550 100 0 0 0> + , <&key_physical_attrs 100 100 650 100 0 0 0> + , <&key_physical_attrs 100 100 750 100 0 0 0> + , <&key_physical_attrs 100 100 850 100 0 0 0> + , <&key_physical_attrs 100 100 950 100 0 0 0> + , <&key_physical_attrs 100 100 1050 100 0 0 0> + , <&key_physical_attrs 100 100 1150 100 0 0 0> + , <&key_physical_attrs 100 100 1250 100 0 0 0> + , <&key_physical_attrs 150 100 1350 100 0 0 0> + , <&key_physical_attrs 175 100 0 200 0 0 0> + , <&key_physical_attrs 100 100 175 200 0 0 0> + , <&key_physical_attrs 100 100 275 200 0 0 0> + , <&key_physical_attrs 100 100 375 200 0 0 0> + , <&key_physical_attrs 100 100 475 200 0 0 0> + , <&key_physical_attrs 100 100 575 200 0 0 0> + , <&key_physical_attrs 100 100 675 200 0 0 0> + , <&key_physical_attrs 100 100 775 200 0 0 0> + , <&key_physical_attrs 100 100 875 200 0 0 0> + , <&key_physical_attrs 100 100 975 200 0 0 0> + , <&key_physical_attrs 100 100 1075 200 0 0 0> + , <&key_physical_attrs 100 100 1175 200 0 0 0> + , <&key_physical_attrs 225 100 1275 200 0 0 0> + , <&key_physical_attrs 225 100 0 300 0 0 0> + , <&key_physical_attrs 100 100 225 300 0 0 0> + , <&key_physical_attrs 100 100 325 300 0 0 0> + , <&key_physical_attrs 100 100 425 300 0 0 0> + , <&key_physical_attrs 100 100 525 300 0 0 0> + , <&key_physical_attrs 100 100 625 300 0 0 0> + , <&key_physical_attrs 100 100 725 300 0 0 0> + , <&key_physical_attrs 100 100 825 300 0 0 0> + , <&key_physical_attrs 100 100 925 300 0 0 0> + , <&key_physical_attrs 100 100 1025 300 0 0 0> + , <&key_physical_attrs 100 100 1125 300 0 0 0> + , <&key_physical_attrs 275 100 1225 300 0 0 0> + , <&key_physical_attrs 125 100 0 400 0 0 0> + , <&key_physical_attrs 125 100 125 400 0 0 0> + , <&key_physical_attrs 125 100 250 400 0 0 0> + , <&key_physical_attrs 625 100 375 400 0 0 0> + , <&key_physical_attrs 125 100 1000 400 0 0 0> + , <&key_physical_attrs 125 100 1125 400 0 0 0> + , <&key_physical_attrs 125 100 1250 400 0 0 0> + , <&key_physical_attrs 125 100 1375 400 0 0 0> + ; + }; +}; + +&layouts_common_60_percent_position_map { + layout_60_ansi_posmap: layout_60_ansi { + physical-layout = <&layout_60_ansi>; + positions + = < 0 1 2 3 4 5 6 7 8 9 10 11 12 13 61> + , <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 62 42 43 44 45 46 47 48 49 50 51 52 63 64> + , <53 54 55 56 57 58 60 59 65> + ; + }; +}; diff --git a/app/dts/layouts/common/60percent/hhkb.dtsi b/app/dts/layouts/common/60percent/hhkb.dtsi new file mode 100644 index 00000000..dcefbfc6 --- /dev/null +++ b/app/dts/layouts/common/60percent/hhkb.dtsi @@ -0,0 +1,85 @@ +#include +#include + +/ { + layout_60_hhkb: layout_60_hhkb { + compatible = "zmk,physical-layout"; + display-name = "60% HHKB/Tsangan layout"; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 0 0 0 0> + , <&key_physical_attrs 100 100 100 0 0 0 0> + , <&key_physical_attrs 100 100 200 0 0 0 0> + , <&key_physical_attrs 100 100 300 0 0 0 0> + , <&key_physical_attrs 100 100 400 0 0 0 0> + , <&key_physical_attrs 100 100 500 0 0 0 0> + , <&key_physical_attrs 100 100 600 0 0 0 0> + , <&key_physical_attrs 100 100 700 0 0 0 0> + , <&key_physical_attrs 100 100 800 0 0 0 0> + , <&key_physical_attrs 100 100 900 0 0 0 0> + , <&key_physical_attrs 100 100 1000 0 0 0 0> + , <&key_physical_attrs 100 100 1100 0 0 0 0> + , <&key_physical_attrs 100 100 1200 0 0 0 0> + , <&key_physical_attrs 200 100 1300 0 0 0 0> + , <&key_physical_attrs 150 100 0 100 0 0 0> + , <&key_physical_attrs 100 100 150 100 0 0 0> + , <&key_physical_attrs 100 100 250 100 0 0 0> + , <&key_physical_attrs 100 100 350 100 0 0 0> + , <&key_physical_attrs 100 100 450 100 0 0 0> + , <&key_physical_attrs 100 100 550 100 0 0 0> + , <&key_physical_attrs 100 100 650 100 0 0 0> + , <&key_physical_attrs 100 100 750 100 0 0 0> + , <&key_physical_attrs 100 100 850 100 0 0 0> + , <&key_physical_attrs 100 100 950 100 0 0 0> + , <&key_physical_attrs 100 100 1050 100 0 0 0> + , <&key_physical_attrs 100 100 1150 100 0 0 0> + , <&key_physical_attrs 100 100 1250 100 0 0 0> + , <&key_physical_attrs 150 100 1350 100 0 0 0> + , <&key_physical_attrs 175 100 0 200 0 0 0> + , <&key_physical_attrs 100 100 175 200 0 0 0> + , <&key_physical_attrs 100 100 275 200 0 0 0> + , <&key_physical_attrs 100 100 375 200 0 0 0> + , <&key_physical_attrs 100 100 475 200 0 0 0> + , <&key_physical_attrs 100 100 575 200 0 0 0> + , <&key_physical_attrs 100 100 675 200 0 0 0> + , <&key_physical_attrs 100 100 775 200 0 0 0> + , <&key_physical_attrs 100 100 875 200 0 0 0> + , <&key_physical_attrs 100 100 975 200 0 0 0> + , <&key_physical_attrs 100 100 1075 200 0 0 0> + , <&key_physical_attrs 100 100 1175 200 0 0 0> + , <&key_physical_attrs 225 100 1275 200 0 0 0> + , <&key_physical_attrs 225 100 0 300 0 0 0> + , <&key_physical_attrs 100 100 225 300 0 0 0> + , <&key_physical_attrs 100 100 325 300 0 0 0> + , <&key_physical_attrs 100 100 425 300 0 0 0> + , <&key_physical_attrs 100 100 525 300 0 0 0> + , <&key_physical_attrs 100 100 625 300 0 0 0> + , <&key_physical_attrs 100 100 725 300 0 0 0> + , <&key_physical_attrs 100 100 825 300 0 0 0> + , <&key_physical_attrs 100 100 925 300 0 0 0> + , <&key_physical_attrs 100 100 1025 300 0 0 0> + , <&key_physical_attrs 100 100 1125 300 0 0 0> + , <&key_physical_attrs 275 100 1225 300 0 0 0> + , <&key_physical_attrs 150 100 0 400 0 0 0> + , <&key_physical_attrs 100 100 150 400 0 0 0> + , <&key_physical_attrs 150 100 250 400 0 0 0> + , <&key_physical_attrs 700 100 400 400 0 0 0> + , <&key_physical_attrs 150 100 1100 400 0 0 0> + , <&key_physical_attrs 100 100 1250 400 0 0 0> + , <&key_physical_attrs 150 100 1350 400 0 0 0> + ; + }; +}; + +&layouts_common_60_percent_position_map { + layout_60_hhkb_posmap: layout_60_hhkb { + physical-layout = <&layout_60_hhkb>; + positions + = < 0 1 2 3 4 5 6 7 8 9 10 11 12 13 60> + , <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 61 42 43 44 45 46 47 48 49 50 51 52 62 63> + , <53 54 55 56 57 58 59 64 65> + ; + }; +}; diff --git a/app/dts/layouts/common/60percent/iso.dtsi b/app/dts/layouts/common/60percent/iso.dtsi new file mode 100644 index 00000000..1f9ae26d --- /dev/null +++ b/app/dts/layouts/common/60percent/iso.dtsi @@ -0,0 +1,87 @@ +#include +#include + +/ { + layout_60_iso: layout_60_iso { + compatible = "zmk,physical-layout"; + display-name = "60% ISO"; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 0 0 0 0> + , <&key_physical_attrs 100 100 100 0 0 0 0> + , <&key_physical_attrs 100 100 200 0 0 0 0> + , <&key_physical_attrs 100 100 300 0 0 0 0> + , <&key_physical_attrs 100 100 400 0 0 0 0> + , <&key_physical_attrs 100 100 500 0 0 0 0> + , <&key_physical_attrs 100 100 600 0 0 0 0> + , <&key_physical_attrs 100 100 700 0 0 0 0> + , <&key_physical_attrs 100 100 800 0 0 0 0> + , <&key_physical_attrs 100 100 900 0 0 0 0> + , <&key_physical_attrs 100 100 1000 0 0 0 0> + , <&key_physical_attrs 100 100 1100 0 0 0 0> + , <&key_physical_attrs 100 100 1200 0 0 0 0> + , <&key_physical_attrs 200 100 1300 0 0 0 0> + , <&key_physical_attrs 150 100 0 100 0 0 0> + , <&key_physical_attrs 100 100 150 100 0 0 0> + , <&key_physical_attrs 100 100 250 100 0 0 0> + , <&key_physical_attrs 100 100 350 100 0 0 0> + , <&key_physical_attrs 100 100 450 100 0 0 0> + , <&key_physical_attrs 100 100 550 100 0 0 0> + , <&key_physical_attrs 100 100 650 100 0 0 0> + , <&key_physical_attrs 100 100 750 100 0 0 0> + , <&key_physical_attrs 100 100 850 100 0 0 0> + , <&key_physical_attrs 100 100 950 100 0 0 0> + , <&key_physical_attrs 100 100 1050 100 0 0 0> + , <&key_physical_attrs 100 100 1150 100 0 0 0> + , <&key_physical_attrs 100 100 1250 100 0 0 0> + , <&key_physical_attrs 175 100 0 200 0 0 0> + , <&key_physical_attrs 100 100 175 200 0 0 0> + , <&key_physical_attrs 100 100 275 200 0 0 0> + , <&key_physical_attrs 100 100 375 200 0 0 0> + , <&key_physical_attrs 100 100 475 200 0 0 0> + , <&key_physical_attrs 100 100 575 200 0 0 0> + , <&key_physical_attrs 100 100 675 200 0 0 0> + , <&key_physical_attrs 100 100 775 200 0 0 0> + , <&key_physical_attrs 100 100 875 200 0 0 0> + , <&key_physical_attrs 100 100 975 200 0 0 0> + , <&key_physical_attrs 100 100 1075 200 0 0 0> + , <&key_physical_attrs 100 100 1175 200 0 0 0> + , <&key_physical_attrs 100 100 1275 200 0 0 0> + , <&key_physical_attrs 125 200 1375 100 0 0 0> + , <&key_physical_attrs 125 100 0 300 0 0 0> + , <&key_physical_attrs 100 100 125 300 0 0 0> + , <&key_physical_attrs 100 100 225 300 0 0 0> + , <&key_physical_attrs 100 100 325 300 0 0 0> + , <&key_physical_attrs 100 100 425 300 0 0 0> + , <&key_physical_attrs 100 100 525 300 0 0 0> + , <&key_physical_attrs 100 100 625 300 0 0 0> + , <&key_physical_attrs 100 100 725 300 0 0 0> + , <&key_physical_attrs 100 100 825 300 0 0 0> + , <&key_physical_attrs 100 100 925 300 0 0 0> + , <&key_physical_attrs 100 100 1025 300 0 0 0> + , <&key_physical_attrs 100 100 1125 300 0 0 0> + , <&key_physical_attrs 275 100 1225 300 0 0 0> + , <&key_physical_attrs 125 100 0 400 0 0 0> + , <&key_physical_attrs 125 100 125 400 0 0 0> + , <&key_physical_attrs 125 100 250 400 0 0 0> + , <&key_physical_attrs 625 100 375 400 0 0 0> + , <&key_physical_attrs 125 100 1000 400 0 0 0> + , <&key_physical_attrs 125 100 1125 400 0 0 0> + , <&key_physical_attrs 125 100 1250 400 0 0 0> + , <&key_physical_attrs 125 100 1375 400 0 0 0> + ; + }; +}; + +&layouts_common_60_percent_position_map { + layout_60_iso_posmap: layout_60_iso { + physical-layout = <&layout_60_iso>; + positions + = < 0 1 2 3 4 5 6 7 8 9 10 11 12 13 62> + , <14 15 16 17 18 19 20 21 22 23 24 25 26 63> + , <27 28 29 30 31 32 33 34 35 36 37 38 40> + , <41 42 43 44 45 46 47 48 49 50 51 52 53 64 65> + , <54 55 56 57 58 59 61 60 39> + ; + }; +}; diff --git a/app/dts/layouts/common/60percent/position_map.dtsi b/app/dts/layouts/common/60percent/position_map.dtsi new file mode 100644 index 00000000..b8db2d01 --- /dev/null +++ b/app/dts/layouts/common/60percent/position_map.dtsi @@ -0,0 +1,7 @@ +/ { + layouts_common_60_percent_position_map: layouts_common_60_percent_position_map { + compatible = "zmk,physical-layout-position-map"; + + complete; + }; +}; diff --git a/app/dts/layouts/common/65percent/all1u.dtsi b/app/dts/layouts/common/65percent/all1u.dtsi new file mode 100644 index 00000000..f5d3121d --- /dev/null +++ b/app/dts/layouts/common/65percent/all1u.dtsi @@ -0,0 +1,99 @@ +#include +#include + +/ { + layout_65_all1u: layout_65_all1u { + compatible = "zmk,physical-layout"; + display-name = "65% All 1U"; + + kscan = <&kscan0>; + transform = <&matrix_transform_65_all1u>; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 0 0 0 0> + , <&key_physical_attrs 100 100 100 0 0 0 0> + , <&key_physical_attrs 100 100 200 0 0 0 0> + , <&key_physical_attrs 100 100 300 0 0 0 0> + , <&key_physical_attrs 100 100 400 0 0 0 0> + , <&key_physical_attrs 100 100 500 0 0 0 0> + , <&key_physical_attrs 100 100 600 0 0 0 0> + , <&key_physical_attrs 100 100 700 0 0 0 0> + , <&key_physical_attrs 100 100 800 0 0 0 0> + , <&key_physical_attrs 100 100 900 0 0 0 0> + , <&key_physical_attrs 100 100 1000 0 0 0 0> + , <&key_physical_attrs 100 100 1100 0 0 0 0> + , <&key_physical_attrs 100 100 1200 0 0 0 0> + , <&key_physical_attrs 100 100 1300 0 0 0 0> + , <&key_physical_attrs 100 100 1400 0 0 0 0> + , <&key_physical_attrs 100 100 1500 0 0 0 0> + , <&key_physical_attrs 150 100 0 100 0 0 0> + , <&key_physical_attrs 100 100 150 100 0 0 0> + , <&key_physical_attrs 100 100 250 100 0 0 0> + , <&key_physical_attrs 100 100 350 100 0 0 0> + , <&key_physical_attrs 100 100 450 100 0 0 0> + , <&key_physical_attrs 100 100 550 100 0 0 0> + , <&key_physical_attrs 100 100 650 100 0 0 0> + , <&key_physical_attrs 100 100 750 100 0 0 0> + , <&key_physical_attrs 100 100 850 100 0 0 0> + , <&key_physical_attrs 100 100 950 100 0 0 0> + , <&key_physical_attrs 100 100 1050 100 0 0 0> + , <&key_physical_attrs 100 100 1150 100 0 0 0> + , <&key_physical_attrs 100 100 1250 100 0 0 0> + , <&key_physical_attrs 150 100 1350 100 0 0 0> + , <&key_physical_attrs 100 100 1500 100 0 0 0> + , <&key_physical_attrs 175 100 0 200 0 0 0> + , <&key_physical_attrs 100 100 175 200 0 0 0> + , <&key_physical_attrs 100 100 275 200 0 0 0> + , <&key_physical_attrs 100 100 375 200 0 0 0> + , <&key_physical_attrs 100 100 475 200 0 0 0> + , <&key_physical_attrs 100 100 575 200 0 0 0> + , <&key_physical_attrs 100 100 675 200 0 0 0> + , <&key_physical_attrs 100 100 775 200 0 0 0> + , <&key_physical_attrs 100 100 875 200 0 0 0> + , <&key_physical_attrs 100 100 975 200 0 0 0> + , <&key_physical_attrs 100 100 1075 200 0 0 0> + , <&key_physical_attrs 100 100 1175 200 0 0 0> + , <&key_physical_attrs 225 100 1275 200 0 0 0> + , <&key_physical_attrs 100 100 1500 200 0 0 0> + , <&key_physical_attrs 100 100 0 300 0 0 0> + , <&key_physical_attrs 100 100 100 300 0 0 0> + , <&key_physical_attrs 100 100 200 300 0 0 0> + , <&key_physical_attrs 100 100 300 300 0 0 0> + , <&key_physical_attrs 100 100 400 300 0 0 0> + , <&key_physical_attrs 100 100 500 300 0 0 0> + , <&key_physical_attrs 100 100 600 300 0 0 0> + , <&key_physical_attrs 100 100 700 300 0 0 0> + , <&key_physical_attrs 100 100 800 300 0 0 0> + , <&key_physical_attrs 100 100 900 300 0 0 0> + , <&key_physical_attrs 100 100 1000 300 0 0 0> + , <&key_physical_attrs 100 100 1100 300 0 0 0> + , <&key_physical_attrs 100 100 1200 300 0 0 0> + , <&key_physical_attrs 100 100 1300 300 0 0 0> + , <&key_physical_attrs 100 100 1400 300 0 0 0> + , <&key_physical_attrs 100 100 1500 300 0 0 0> + , <&key_physical_attrs 125 100 0 400 0 0 0> + , <&key_physical_attrs 125 100 125 400 0 0 0> + , <&key_physical_attrs 125 100 250 400 0 0 0> + , <&key_physical_attrs 625 100 375 400 0 0 0> + , <&key_physical_attrs 100 100 1000 400 0 0 0> + , <&key_physical_attrs 100 100 1100 400 0 0 0> + , <&key_physical_attrs 100 100 1200 400 0 0 0> + , <&key_physical_attrs 100 100 1300 400 0 0 0> + , <&key_physical_attrs 100 100 1400 400 0 0 0> + , <&key_physical_attrs 100 100 1500 400 0 0 0> + ; + }; +}; + +&layouts_common_65_percent_position_map { + layout_65_all1u_posmap: layout_65_all1u { + physical-layout = <&layout_65_all1u>; + positions + = < 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> + ; + }; +}; diff --git a/app/dts/layouts/common/65percent/ansi.dtsi b/app/dts/layouts/common/65percent/ansi.dtsi new file mode 100644 index 00000000..d6938ce8 --- /dev/null +++ b/app/dts/layouts/common/65percent/ansi.dtsi @@ -0,0 +1,93 @@ +#include +#include + +/ { + layout_65_ansi: layout_65_ansi { + compatible = "zmk,physical-layout"; + display-name = "65% ANSI"; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 0 0 0 0> + , <&key_physical_attrs 100 100 100 0 0 0 0> + , <&key_physical_attrs 100 100 200 0 0 0 0> + , <&key_physical_attrs 100 100 300 0 0 0 0> + , <&key_physical_attrs 100 100 400 0 0 0 0> + , <&key_physical_attrs 100 100 500 0 0 0 0> + , <&key_physical_attrs 100 100 600 0 0 0 0> + , <&key_physical_attrs 100 100 700 0 0 0 0> + , <&key_physical_attrs 100 100 800 0 0 0 0> + , <&key_physical_attrs 100 100 900 0 0 0 0> + , <&key_physical_attrs 100 100 1000 0 0 0 0> + , <&key_physical_attrs 100 100 1100 0 0 0 0> + , <&key_physical_attrs 100 100 1200 0 0 0 0> + , <&key_physical_attrs 200 100 1300 0 0 0 0> + , <&key_physical_attrs 100 100 1500 0 0 0 0> + , <&key_physical_attrs 150 100 0 100 0 0 0> + , <&key_physical_attrs 100 100 150 100 0 0 0> + , <&key_physical_attrs 100 100 250 100 0 0 0> + , <&key_physical_attrs 100 100 350 100 0 0 0> + , <&key_physical_attrs 100 100 450 100 0 0 0> + , <&key_physical_attrs 100 100 550 100 0 0 0> + , <&key_physical_attrs 100 100 650 100 0 0 0> + , <&key_physical_attrs 100 100 750 100 0 0 0> + , <&key_physical_attrs 100 100 850 100 0 0 0> + , <&key_physical_attrs 100 100 950 100 0 0 0> + , <&key_physical_attrs 100 100 1050 100 0 0 0> + , <&key_physical_attrs 100 100 1150 100 0 0 0> + , <&key_physical_attrs 100 100 1250 100 0 0 0> + , <&key_physical_attrs 150 100 1350 100 0 0 0> + , <&key_physical_attrs 100 100 1500 100 0 0 0> + , <&key_physical_attrs 175 100 0 200 0 0 0> + , <&key_physical_attrs 100 100 175 200 0 0 0> + , <&key_physical_attrs 100 100 275 200 0 0 0> + , <&key_physical_attrs 100 100 375 200 0 0 0> + , <&key_physical_attrs 100 100 475 200 0 0 0> + , <&key_physical_attrs 100 100 575 200 0 0 0> + , <&key_physical_attrs 100 100 675 200 0 0 0> + , <&key_physical_attrs 100 100 775 200 0 0 0> + , <&key_physical_attrs 100 100 875 200 0 0 0> + , <&key_physical_attrs 100 100 975 200 0 0 0> + , <&key_physical_attrs 100 100 1075 200 0 0 0> + , <&key_physical_attrs 100 100 1175 200 0 0 0> + , <&key_physical_attrs 225 100 1275 200 0 0 0> + , <&key_physical_attrs 100 100 1500 200 0 0 0> + , <&key_physical_attrs 225 100 0 300 0 0 0> + , <&key_physical_attrs 100 100 225 300 0 0 0> + , <&key_physical_attrs 100 100 325 300 0 0 0> + , <&key_physical_attrs 100 100 425 300 0 0 0> + , <&key_physical_attrs 100 100 525 300 0 0 0> + , <&key_physical_attrs 100 100 625 300 0 0 0> + , <&key_physical_attrs 100 100 725 300 0 0 0> + , <&key_physical_attrs 100 100 825 300 0 0 0> + , <&key_physical_attrs 100 100 925 300 0 0 0> + , <&key_physical_attrs 100 100 1025 300 0 0 0> + , <&key_physical_attrs 100 100 1125 300 0 0 0> + , <&key_physical_attrs 175 100 1225 300 0 0 0> + , <&key_physical_attrs 100 100 1400 300 0 0 0> + , <&key_physical_attrs 100 100 1500 300 0 0 0> + , <&key_physical_attrs 125 100 0 400 0 0 0> + , <&key_physical_attrs 125 100 125 400 0 0 0> + , <&key_physical_attrs 125 100 250 400 0 0 0> + , <&key_physical_attrs 625 100 375 400 0 0 0> + , <&key_physical_attrs 100 100 1000 400 0 0 0> + , <&key_physical_attrs 100 100 1100 400 0 0 0> + , <&key_physical_attrs 100 100 1200 400 0 0 0> + , <&key_physical_attrs 100 100 1300 400 0 0 0> + , <&key_physical_attrs 100 100 1400 400 0 0 0> + , <&key_physical_attrs 100 100 1500 400 0 0 0> + ; + }; +}; + +&layouts_common_65_percent_position_map { + layout_65_ansi_posmap: layout_65_ansi { + physical-layout = <&layout_65_ansi>; + positions + = < 0 1 2 3 4 5 6 7 8 9 10 11 12 13 68 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 69 45 46 47 48 49 50 51 52 53 54 55 70 56 57> + , <58 59 60 61 62 63 64 65 66 67> + ; + }; +}; diff --git a/app/dts/layouts/common/65percent/hhkb.dtsi b/app/dts/layouts/common/65percent/hhkb.dtsi new file mode 100644 index 00000000..a20fb6dc --- /dev/null +++ b/app/dts/layouts/common/65percent/hhkb.dtsi @@ -0,0 +1,90 @@ +#include +#include + +/ { + layout_65_hhkb: layout_65_hhkb { + compatible = "zmk,physical-layout"; + display-name = "65% HHKB/Tsangan"; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 0 0 0 0> + , <&key_physical_attrs 100 100 100 0 0 0 0> + , <&key_physical_attrs 100 100 200 0 0 0 0> + , <&key_physical_attrs 100 100 300 0 0 0 0> + , <&key_physical_attrs 100 100 400 0 0 0 0> + , <&key_physical_attrs 100 100 500 0 0 0 0> + , <&key_physical_attrs 100 100 600 0 0 0 0> + , <&key_physical_attrs 100 100 700 0 0 0 0> + , <&key_physical_attrs 100 100 800 0 0 0 0> + , <&key_physical_attrs 100 100 900 0 0 0 0> + , <&key_physical_attrs 100 100 1000 0 0 0 0> + , <&key_physical_attrs 100 100 1100 0 0 0 0> + , <&key_physical_attrs 100 100 1200 0 0 0 0> + , <&key_physical_attrs 200 100 1300 0 0 0 0> + , <&key_physical_attrs 100 100 1500 0 0 0 0> + , <&key_physical_attrs 150 100 0 100 0 0 0> + , <&key_physical_attrs 100 100 150 100 0 0 0> + , <&key_physical_attrs 100 100 250 100 0 0 0> + , <&key_physical_attrs 100 100 350 100 0 0 0> + , <&key_physical_attrs 100 100 450 100 0 0 0> + , <&key_physical_attrs 100 100 550 100 0 0 0> + , <&key_physical_attrs 100 100 650 100 0 0 0> + , <&key_physical_attrs 100 100 750 100 0 0 0> + , <&key_physical_attrs 100 100 850 100 0 0 0> + , <&key_physical_attrs 100 100 950 100 0 0 0> + , <&key_physical_attrs 100 100 1050 100 0 0 0> + , <&key_physical_attrs 100 100 1150 100 0 0 0> + , <&key_physical_attrs 100 100 1250 100 0 0 0> + , <&key_physical_attrs 150 100 1350 100 0 0 0> + , <&key_physical_attrs 100 100 1500 100 0 0 0> + , <&key_physical_attrs 175 100 0 200 0 0 0> + , <&key_physical_attrs 100 100 175 200 0 0 0> + , <&key_physical_attrs 100 100 275 200 0 0 0> + , <&key_physical_attrs 100 100 375 200 0 0 0> + , <&key_physical_attrs 100 100 475 200 0 0 0> + , <&key_physical_attrs 100 100 575 200 0 0 0> + , <&key_physical_attrs 100 100 675 200 0 0 0> + , <&key_physical_attrs 100 100 775 200 0 0 0> + , <&key_physical_attrs 100 100 875 200 0 0 0> + , <&key_physical_attrs 100 100 975 200 0 0 0> + , <&key_physical_attrs 100 100 1075 200 0 0 0> + , <&key_physical_attrs 100 100 1175 200 0 0 0> + , <&key_physical_attrs 225 100 1275 200 0 0 0> + , <&key_physical_attrs 100 100 1500 200 0 0 0> + , <&key_physical_attrs 225 100 0 300 0 0 0> + , <&key_physical_attrs 100 100 225 300 0 0 0> + , <&key_physical_attrs 100 100 325 300 0 0 0> + , <&key_physical_attrs 100 100 425 300 0 0 0> + , <&key_physical_attrs 100 100 525 300 0 0 0> + , <&key_physical_attrs 100 100 625 300 0 0 0> + , <&key_physical_attrs 100 100 725 300 0 0 0> + , <&key_physical_attrs 100 100 825 300 0 0 0> + , <&key_physical_attrs 100 100 925 300 0 0 0> + , <&key_physical_attrs 100 100 1025 300 0 0 0> + , <&key_physical_attrs 100 100 1125 300 0 0 0> + , <&key_physical_attrs 275 100 1225 300 0 0 0> + , <&key_physical_attrs 100 100 1500 300 0 0 0> + , <&key_physical_attrs 150 100 0 400 0 0 0> + , <&key_physical_attrs 100 100 150 400 0 0 0> + , <&key_physical_attrs 150 100 250 400 0 0 0> + , <&key_physical_attrs 700 100 400 400 0 0 0> + , <&key_physical_attrs 150 100 1100 400 0 0 0> + , <&key_physical_attrs 100 100 1250 400 0 0 0> + , <&key_physical_attrs 150 100 1350 400 0 0 0> + , <&key_physical_attrs 100 100 1500 400 0 0 0> + ; + }; +}; + +&layouts_common_65_percent_position_map { + layout_65_hhkb_posmap: layout_65_hhkb { + physical-layout = <&layout_65_hhkb>; + positions + = < 0 1 2 3 4 5 6 7 8 9 10 11 12 13 65 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 66 45 46 47 48 49 50 51 52 53 54 55 67 68 56> + , <57 58 59 60 61 62 63 69 70 64> + ; + }; +}; diff --git a/app/dts/layouts/common/65percent/iso.dtsi b/app/dts/layouts/common/65percent/iso.dtsi new file mode 100644 index 00000000..9117b70f --- /dev/null +++ b/app/dts/layouts/common/65percent/iso.dtsi @@ -0,0 +1,94 @@ +#include +#include + +/ { + layout_65_iso: layout_65_iso { + compatible = "zmk,physical-layout"; + display-name = "65% ISO"; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 0 0 0 0> + , <&key_physical_attrs 100 100 100 0 0 0 0> + , <&key_physical_attrs 100 100 200 0 0 0 0> + , <&key_physical_attrs 100 100 300 0 0 0 0> + , <&key_physical_attrs 100 100 400 0 0 0 0> + , <&key_physical_attrs 100 100 500 0 0 0 0> + , <&key_physical_attrs 100 100 600 0 0 0 0> + , <&key_physical_attrs 100 100 700 0 0 0 0> + , <&key_physical_attrs 100 100 800 0 0 0 0> + , <&key_physical_attrs 100 100 900 0 0 0 0> + , <&key_physical_attrs 100 100 1000 0 0 0 0> + , <&key_physical_attrs 100 100 1100 0 0 0 0> + , <&key_physical_attrs 100 100 1200 0 0 0 0> + , <&key_physical_attrs 200 100 1300 0 0 0 0> + , <&key_physical_attrs 100 100 1500 0 0 0 0> + , <&key_physical_attrs 150 100 0 100 0 0 0> + , <&key_physical_attrs 100 100 150 100 0 0 0> + , <&key_physical_attrs 100 100 250 100 0 0 0> + , <&key_physical_attrs 100 100 350 100 0 0 0> + , <&key_physical_attrs 100 100 450 100 0 0 0> + , <&key_physical_attrs 100 100 550 100 0 0 0> + , <&key_physical_attrs 100 100 650 100 0 0 0> + , <&key_physical_attrs 100 100 750 100 0 0 0> + , <&key_physical_attrs 100 100 850 100 0 0 0> + , <&key_physical_attrs 100 100 950 100 0 0 0> + , <&key_physical_attrs 100 100 1050 100 0 0 0> + , <&key_physical_attrs 100 100 1150 100 0 0 0> + , <&key_physical_attrs 100 100 1250 100 0 0 0> + , <&key_physical_attrs 100 100 1500 100 0 0 0> + , <&key_physical_attrs 175 100 0 200 0 0 0> + , <&key_physical_attrs 100 100 175 200 0 0 0> + , <&key_physical_attrs 100 100 275 200 0 0 0> + , <&key_physical_attrs 100 100 375 200 0 0 0> + , <&key_physical_attrs 100 100 475 200 0 0 0> + , <&key_physical_attrs 100 100 575 200 0 0 0> + , <&key_physical_attrs 100 100 675 200 0 0 0> + , <&key_physical_attrs 100 100 775 200 0 0 0> + , <&key_physical_attrs 100 100 875 200 0 0 0> + , <&key_physical_attrs 100 100 975 200 0 0 0> + , <&key_physical_attrs 100 100 1075 200 0 0 0> + , <&key_physical_attrs 100 100 1175 200 0 0 0> + , <&key_physical_attrs 100 100 1275 200 0 0 0> + , <&key_physical_attrs 125 200 1375 100 0 0 0> + , <&key_physical_attrs 100 100 1500 200 0 0 0> + , <&key_physical_attrs 125 100 0 300 0 0 0> + , <&key_physical_attrs 100 100 125 300 0 0 0> + , <&key_physical_attrs 100 100 225 300 0 0 0> + , <&key_physical_attrs 100 100 325 300 0 0 0> + , <&key_physical_attrs 100 100 425 300 0 0 0> + , <&key_physical_attrs 100 100 525 300 0 0 0> + , <&key_physical_attrs 100 100 625 300 0 0 0> + , <&key_physical_attrs 100 100 725 300 0 0 0> + , <&key_physical_attrs 100 100 825 300 0 0 0> + , <&key_physical_attrs 100 100 925 300 0 0 0> + , <&key_physical_attrs 100 100 1025 300 0 0 0> + , <&key_physical_attrs 100 100 1125 300 0 0 0> + , <&key_physical_attrs 175 100 1225 300 0 0 0> + , <&key_physical_attrs 100 100 1400 300 0 0 0> + , <&key_physical_attrs 100 100 1500 300 0 0 0> + , <&key_physical_attrs 125 100 0 400 0 0 0> + , <&key_physical_attrs 125 100 125 400 0 0 0> + , <&key_physical_attrs 125 100 250 400 0 0 0> + , <&key_physical_attrs 625 100 375 400 0 0 0> + , <&key_physical_attrs 100 100 1000 400 0 0 0> + , <&key_physical_attrs 100 100 1100 400 0 0 0> + , <&key_physical_attrs 100 100 1200 400 0 0 0> + , <&key_physical_attrs 100 100 1300 400 0 0 0> + , <&key_physical_attrs 100 100 1400 400 0 0 0> + , <&key_physical_attrs 100 100 1500 400 0 0 0> + ; + }; +}; + +&layouts_common_65_percent_position_map { + layout_65_iso_posmap: layout_65_iso { + physical-layout = <&layout_65_iso>; + positions + = < 0 1 2 3 4 5 6 7 8 9 10 11 12 13 69 14> + , <15 16 17 18 19 20 21 22 23 24 25 26 27 70 28> + , <29 30 31 32 33 34 35 36 37 38 39 40 42 43> + , <44 45 46 47 48 49 50 51 52 53 54 55 56 41 57 58> + , <59 60 61 62 63 64 65 66 67 68> + ; + }; +}; diff --git a/app/dts/layouts/common/65percent/position_map.dtsi b/app/dts/layouts/common/65percent/position_map.dtsi new file mode 100644 index 00000000..b761b858 --- /dev/null +++ b/app/dts/layouts/common/65percent/position_map.dtsi @@ -0,0 +1,7 @@ +/ { + layouts_common_65_percent_position_map: layouts_common_65_percent_position_map { + compatible = "zmk,physical-layout-position-map"; + + complete; + }; +}; diff --git a/app/dts/layouts/common/75percent/all1u.dtsi b/app/dts/layouts/common/75percent/all1u.dtsi new file mode 100644 index 00000000..702de021 --- /dev/null +++ b/app/dts/layouts/common/75percent/all1u.dtsi @@ -0,0 +1,113 @@ +#include +#include + +/ { + layout_75_all1u: layout_75_all1u { + compatible = "zmk,physical-layout"; + display-name = "75% All 1U"; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 0 0 0 0> + , <&key_physical_attrs 100 100 100 0 0 0 0> + , <&key_physical_attrs 100 100 200 0 0 0 0> + , <&key_physical_attrs 100 100 300 0 0 0 0> + , <&key_physical_attrs 100 100 400 0 0 0 0> + , <&key_physical_attrs 100 100 500 0 0 0 0> + , <&key_physical_attrs 100 100 600 0 0 0 0> + , <&key_physical_attrs 100 100 700 0 0 0 0> + , <&key_physical_attrs 100 100 800 0 0 0 0> + , <&key_physical_attrs 100 100 900 0 0 0 0> + , <&key_physical_attrs 100 100 1000 0 0 0 0> + , <&key_physical_attrs 100 100 1100 0 0 0 0> + , <&key_physical_attrs 100 100 1200 0 0 0 0> + , <&key_physical_attrs 100 100 1300 0 0 0 0> + , <&key_physical_attrs 100 100 1400 0 0 0 0> + , <&key_physical_attrs 100 100 1500 0 0 0 0> + , <&key_physical_attrs 100 100 0 100 0 0 0> + , <&key_physical_attrs 100 100 100 100 0 0 0> + , <&key_physical_attrs 100 100 200 100 0 0 0> + , <&key_physical_attrs 100 100 300 100 0 0 0> + , <&key_physical_attrs 100 100 400 100 0 0 0> + , <&key_physical_attrs 100 100 500 100 0 0 0> + , <&key_physical_attrs 100 100 600 100 0 0 0> + , <&key_physical_attrs 100 100 700 100 0 0 0> + , <&key_physical_attrs 100 100 800 100 0 0 0> + , <&key_physical_attrs 100 100 900 100 0 0 0> + , <&key_physical_attrs 100 100 1000 100 0 0 0> + , <&key_physical_attrs 100 100 1100 100 0 0 0> + , <&key_physical_attrs 100 100 1200 100 0 0 0> + , <&key_physical_attrs 100 100 1300 100 0 0 0> + , <&key_physical_attrs 100 100 1400 100 0 0 0> + , <&key_physical_attrs 100 100 1500 100 0 0 0> + , <&key_physical_attrs 150 100 0 200 0 0 0> + , <&key_physical_attrs 100 100 150 200 0 0 0> + , <&key_physical_attrs 100 100 250 200 0 0 0> + , <&key_physical_attrs 100 100 350 200 0 0 0> + , <&key_physical_attrs 100 100 450 200 0 0 0> + , <&key_physical_attrs 100 100 550 200 0 0 0> + , <&key_physical_attrs 100 100 650 200 0 0 0> + , <&key_physical_attrs 100 100 750 200 0 0 0> + , <&key_physical_attrs 100 100 850 200 0 0 0> + , <&key_physical_attrs 100 100 950 200 0 0 0> + , <&key_physical_attrs 100 100 1050 200 0 0 0> + , <&key_physical_attrs 100 100 1150 200 0 0 0> + , <&key_physical_attrs 100 100 1250 200 0 0 0> + , <&key_physical_attrs 150 100 1350 200 0 0 0> + , <&key_physical_attrs 100 100 1500 200 0 0 0> + , <&key_physical_attrs 175 100 0 300 0 0 0> + , <&key_physical_attrs 100 100 175 300 0 0 0> + , <&key_physical_attrs 100 100 275 300 0 0 0> + , <&key_physical_attrs 100 100 375 300 0 0 0> + , <&key_physical_attrs 100 100 475 300 0 0 0> + , <&key_physical_attrs 100 100 575 300 0 0 0> + , <&key_physical_attrs 100 100 675 300 0 0 0> + , <&key_physical_attrs 100 100 775 300 0 0 0> + , <&key_physical_attrs 100 100 875 300 0 0 0> + , <&key_physical_attrs 100 100 975 300 0 0 0> + , <&key_physical_attrs 100 100 1075 300 0 0 0> + , <&key_physical_attrs 100 100 1175 300 0 0 0> + , <&key_physical_attrs 225 100 1275 300 0 0 0> + , <&key_physical_attrs 100 100 1500 300 0 0 0> + , <&key_physical_attrs 100 100 0 400 0 0 0> + , <&key_physical_attrs 100 100 100 400 0 0 0> + , <&key_physical_attrs 100 100 200 400 0 0 0> + , <&key_physical_attrs 100 100 300 400 0 0 0> + , <&key_physical_attrs 100 100 400 400 0 0 0> + , <&key_physical_attrs 100 100 500 400 0 0 0> + , <&key_physical_attrs 100 100 600 400 0 0 0> + , <&key_physical_attrs 100 100 700 400 0 0 0> + , <&key_physical_attrs 100 100 800 400 0 0 0> + , <&key_physical_attrs 100 100 900 400 0 0 0> + , <&key_physical_attrs 100 100 1000 400 0 0 0> + , <&key_physical_attrs 100 100 1100 400 0 0 0> + , <&key_physical_attrs 100 100 1200 400 0 0 0> + , <&key_physical_attrs 100 100 1300 400 0 0 0> + , <&key_physical_attrs 100 100 1400 400 0 0 0> + , <&key_physical_attrs 100 100 1500 400 0 0 0> + , <&key_physical_attrs 125 100 0 500 0 0 0> + , <&key_physical_attrs 125 100 125 500 0 0 0> + , <&key_physical_attrs 125 100 250 500 0 0 0> + , <&key_physical_attrs 625 100 375 500 0 0 0> + , <&key_physical_attrs 100 100 1000 500 0 0 0> + , <&key_physical_attrs 100 100 1100 500 0 0 0> + , <&key_physical_attrs 100 100 1200 500 0 0 0> + , <&key_physical_attrs 100 100 1300 500 0 0 0> + , <&key_physical_attrs 100 100 1400 500 0 0 0> + , <&key_physical_attrs 100 100 1500 500 0 0 0> + ; + }; +}; + +&layouts_common_75_percent_position_map { + layout_75_all1u_posmap: layout_75_all1u { + physical-layout = <&layout_75_all1u>; + positions + = < 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> + ; + }; +}; diff --git a/app/dts/layouts/common/75percent/ansi.dtsi b/app/dts/layouts/common/75percent/ansi.dtsi new file mode 100644 index 00000000..0395bd69 --- /dev/null +++ b/app/dts/layouts/common/75percent/ansi.dtsi @@ -0,0 +1,110 @@ +#include +#include + +/ { + layout_75_ansi: layout_75_ansi { + compatible = "zmk,physical-layout"; + display-name = "75% ANSI"; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 0 0 0 0> + , <&key_physical_attrs 100 100 100 0 0 0 0> + , <&key_physical_attrs 100 100 200 0 0 0 0> + , <&key_physical_attrs 100 100 300 0 0 0 0> + , <&key_physical_attrs 100 100 400 0 0 0 0> + , <&key_physical_attrs 100 100 500 0 0 0 0> + , <&key_physical_attrs 100 100 600 0 0 0 0> + , <&key_physical_attrs 100 100 700 0 0 0 0> + , <&key_physical_attrs 100 100 800 0 0 0 0> + , <&key_physical_attrs 100 100 900 0 0 0 0> + , <&key_physical_attrs 100 100 1000 0 0 0 0> + , <&key_physical_attrs 100 100 1100 0 0 0 0> + , <&key_physical_attrs 100 100 1200 0 0 0 0> + , <&key_physical_attrs 100 100 1300 0 0 0 0> + , <&key_physical_attrs 100 100 1400 0 0 0 0> + , <&key_physical_attrs 100 100 1500 0 0 0 0> + , <&key_physical_attrs 100 100 0 100 0 0 0> + , <&key_physical_attrs 100 100 100 100 0 0 0> + , <&key_physical_attrs 100 100 200 100 0 0 0> + , <&key_physical_attrs 100 100 300 100 0 0 0> + , <&key_physical_attrs 100 100 400 100 0 0 0> + , <&key_physical_attrs 100 100 500 100 0 0 0> + , <&key_physical_attrs 100 100 600 100 0 0 0> + , <&key_physical_attrs 100 100 700 100 0 0 0> + , <&key_physical_attrs 100 100 800 100 0 0 0> + , <&key_physical_attrs 100 100 900 100 0 0 0> + , <&key_physical_attrs 100 100 1000 100 0 0 0> + , <&key_physical_attrs 100 100 1100 100 0 0 0> + , <&key_physical_attrs 100 100 1200 100 0 0 0> + , <&key_physical_attrs 200 100 1300 100 0 0 0> + , <&key_physical_attrs 100 100 1500 100 0 0 0> + , <&key_physical_attrs 150 100 0 200 0 0 0> + , <&key_physical_attrs 100 100 150 200 0 0 0> + , <&key_physical_attrs 100 100 250 200 0 0 0> + , <&key_physical_attrs 100 100 350 200 0 0 0> + , <&key_physical_attrs 100 100 450 200 0 0 0> + , <&key_physical_attrs 100 100 550 200 0 0 0> + , <&key_physical_attrs 100 100 650 200 0 0 0> + , <&key_physical_attrs 100 100 750 200 0 0 0> + , <&key_physical_attrs 100 100 850 200 0 0 0> + , <&key_physical_attrs 100 100 950 200 0 0 0> + , <&key_physical_attrs 100 100 1050 200 0 0 0> + , <&key_physical_attrs 100 100 1150 200 0 0 0> + , <&key_physical_attrs 100 100 1250 200 0 0 0> + , <&key_physical_attrs 150 100 1350 200 0 0 0> + , <&key_physical_attrs 100 100 1500 200 0 0 0> + , <&key_physical_attrs 175 100 0 300 0 0 0> + , <&key_physical_attrs 100 100 175 300 0 0 0> + , <&key_physical_attrs 100 100 275 300 0 0 0> + , <&key_physical_attrs 100 100 375 300 0 0 0> + , <&key_physical_attrs 100 100 475 300 0 0 0> + , <&key_physical_attrs 100 100 575 300 0 0 0> + , <&key_physical_attrs 100 100 675 300 0 0 0> + , <&key_physical_attrs 100 100 775 300 0 0 0> + , <&key_physical_attrs 100 100 875 300 0 0 0> + , <&key_physical_attrs 100 100 975 300 0 0 0> + , <&key_physical_attrs 100 100 1075 300 0 0 0> + , <&key_physical_attrs 100 100 1175 300 0 0 0> + , <&key_physical_attrs 225 100 1275 300 0 0 0> + , <&key_physical_attrs 100 100 1500 300 0 0 0> + , <&key_physical_attrs 225 100 0 400 0 0 0> + , <&key_physical_attrs 100 100 225 400 0 0 0> + , <&key_physical_attrs 100 100 325 400 0 0 0> + , <&key_physical_attrs 100 100 425 400 0 0 0> + , <&key_physical_attrs 100 100 525 400 0 0 0> + , <&key_physical_attrs 100 100 625 400 0 0 0> + , <&key_physical_attrs 100 100 725 400 0 0 0> + , <&key_physical_attrs 100 100 825 400 0 0 0> + , <&key_physical_attrs 100 100 925 400 0 0 0> + , <&key_physical_attrs 100 100 1025 400 0 0 0> + , <&key_physical_attrs 100 100 1125 400 0 0 0> + , <&key_physical_attrs 175 100 1225 400 0 0 0> + , <&key_physical_attrs 100 100 1400 400 0 0 0> + , <&key_physical_attrs 100 100 1500 400 0 0 0> + , <&key_physical_attrs 125 100 0 500 0 0 0> + , <&key_physical_attrs 125 100 125 500 0 0 0> + , <&key_physical_attrs 125 100 250 500 0 0 0> + , <&key_physical_attrs 625 100 375 500 0 0 0> + , <&key_physical_attrs 100 100 1000 500 0 0 0> + , <&key_physical_attrs 100 100 1100 500 0 0 0> + , <&key_physical_attrs 100 100 1200 500 0 0 0> + , <&key_physical_attrs 100 100 1300 500 0 0 0> + , <&key_physical_attrs 100 100 1400 500 0 0 0> + , <&key_physical_attrs 100 100 1500 500 0 0 0> + ; + }; +}; + +&layouts_common_75_percent_position_map { + layout_75_ansi_posmap: layout_75_ansi { + physical-layout = <&layout_75_ansi>; + positions + = < 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 84 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 85 61 62 63 64 65 66 67 68 69 70 71 86 72 73> + , <74 75 76 77 78 79 80 81 82 83> + ; + }; +}; diff --git a/app/dts/layouts/common/75percent/iso.dtsi b/app/dts/layouts/common/75percent/iso.dtsi new file mode 100644 index 00000000..7002b89c --- /dev/null +++ b/app/dts/layouts/common/75percent/iso.dtsi @@ -0,0 +1,111 @@ +#include +#include + +/ { + layout_75_iso: layout_75_iso { + compatible = "zmk,physical-layout"; + display-name = "75% ISO"; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 0 0 0 0> + , <&key_physical_attrs 100 100 100 0 0 0 0> + , <&key_physical_attrs 100 100 200 0 0 0 0> + , <&key_physical_attrs 100 100 300 0 0 0 0> + , <&key_physical_attrs 100 100 400 0 0 0 0> + , <&key_physical_attrs 100 100 500 0 0 0 0> + , <&key_physical_attrs 100 100 600 0 0 0 0> + , <&key_physical_attrs 100 100 700 0 0 0 0> + , <&key_physical_attrs 100 100 800 0 0 0 0> + , <&key_physical_attrs 100 100 900 0 0 0 0> + , <&key_physical_attrs 100 100 1000 0 0 0 0> + , <&key_physical_attrs 100 100 1100 0 0 0 0> + , <&key_physical_attrs 100 100 1200 0 0 0 0> + , <&key_physical_attrs 100 100 1300 0 0 0 0> + , <&key_physical_attrs 100 100 1400 0 0 0 0> + , <&key_physical_attrs 100 100 1500 0 0 0 0> + , <&key_physical_attrs 100 100 0 100 0 0 0> + , <&key_physical_attrs 100 100 100 100 0 0 0> + , <&key_physical_attrs 100 100 200 100 0 0 0> + , <&key_physical_attrs 100 100 300 100 0 0 0> + , <&key_physical_attrs 100 100 400 100 0 0 0> + , <&key_physical_attrs 100 100 500 100 0 0 0> + , <&key_physical_attrs 100 100 600 100 0 0 0> + , <&key_physical_attrs 100 100 700 100 0 0 0> + , <&key_physical_attrs 100 100 800 100 0 0 0> + , <&key_physical_attrs 100 100 900 100 0 0 0> + , <&key_physical_attrs 100 100 1000 100 0 0 0> + , <&key_physical_attrs 100 100 1100 100 0 0 0> + , <&key_physical_attrs 100 100 1200 100 0 0 0> + , <&key_physical_attrs 200 100 1300 100 0 0 0> + , <&key_physical_attrs 100 100 1500 100 0 0 0> + , <&key_physical_attrs 150 100 0 200 0 0 0> + , <&key_physical_attrs 100 100 150 200 0 0 0> + , <&key_physical_attrs 100 100 250 200 0 0 0> + , <&key_physical_attrs 100 100 350 200 0 0 0> + , <&key_physical_attrs 100 100 450 200 0 0 0> + , <&key_physical_attrs 100 100 550 200 0 0 0> + , <&key_physical_attrs 100 100 650 200 0 0 0> + , <&key_physical_attrs 100 100 750 200 0 0 0> + , <&key_physical_attrs 100 100 850 200 0 0 0> + , <&key_physical_attrs 100 100 950 200 0 0 0> + , <&key_physical_attrs 100 100 1050 200 0 0 0> + , <&key_physical_attrs 100 100 1150 200 0 0 0> + , <&key_physical_attrs 100 100 1250 200 0 0 0> + , <&key_physical_attrs 100 100 1500 200 0 0 0> + , <&key_physical_attrs 175 100 0 300 0 0 0> + , <&key_physical_attrs 100 100 175 300 0 0 0> + , <&key_physical_attrs 100 100 275 300 0 0 0> + , <&key_physical_attrs 100 100 375 300 0 0 0> + , <&key_physical_attrs 100 100 475 300 0 0 0> + , <&key_physical_attrs 100 100 575 300 0 0 0> + , <&key_physical_attrs 100 100 675 300 0 0 0> + , <&key_physical_attrs 100 100 775 300 0 0 0> + , <&key_physical_attrs 100 100 875 300 0 0 0> + , <&key_physical_attrs 100 100 975 300 0 0 0> + , <&key_physical_attrs 100 100 1075 300 0 0 0> + , <&key_physical_attrs 100 100 1175 300 0 0 0> + , <&key_physical_attrs 100 100 1275 300 0 0 0> + , <&key_physical_attrs 125 200 1375 200 0 0 0> + , <&key_physical_attrs 100 100 1500 300 0 0 0> + , <&key_physical_attrs 125 100 0 400 0 0 0> + , <&key_physical_attrs 100 100 125 400 0 0 0> + , <&key_physical_attrs 100 100 225 400 0 0 0> + , <&key_physical_attrs 100 100 325 400 0 0 0> + , <&key_physical_attrs 100 100 425 400 0 0 0> + , <&key_physical_attrs 100 100 525 400 0 0 0> + , <&key_physical_attrs 100 100 625 400 0 0 0> + , <&key_physical_attrs 100 100 725 400 0 0 0> + , <&key_physical_attrs 100 100 825 400 0 0 0> + , <&key_physical_attrs 100 100 925 400 0 0 0> + , <&key_physical_attrs 100 100 1025 400 0 0 0> + , <&key_physical_attrs 100 100 1125 400 0 0 0> + , <&key_physical_attrs 175 100 1225 400 0 0 0> + , <&key_physical_attrs 100 100 1400 400 0 0 0> + , <&key_physical_attrs 100 100 1500 400 0 0 0> + , <&key_physical_attrs 125 100 0 500 0 0 0> + , <&key_physical_attrs 125 100 125 500 0 0 0> + , <&key_physical_attrs 125 100 250 500 0 0 0> + , <&key_physical_attrs 625 100 375 500 0 0 0> + , <&key_physical_attrs 100 100 1000 500 0 0 0> + , <&key_physical_attrs 100 100 1100 500 0 0 0> + , <&key_physical_attrs 100 100 1200 500 0 0 0> + , <&key_physical_attrs 100 100 1300 500 0 0 0> + , <&key_physical_attrs 100 100 1400 500 0 0 0> + , <&key_physical_attrs 100 100 1500 500 0 0 0> + ; + }; +}; + +&layouts_common_75_percent_position_map { + layout_75_iso_posmap: layout_75_iso { + physical-layout = <&layout_75_iso>; + positions + = < 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 85 30> + , <31 32 33 34 35 36 37 38 39 40 41 42 43 86 44> + , <45 46 47 48 49 50 51 52 53 54 55 56 58 59> + , <60 61 62 63 64 65 66 67 68 69 70 71 72 57 73 74> + , <75 76 77 78 79 80 81 82 83 84> + ; + }; +}; diff --git a/app/dts/layouts/common/75percent/position_map.dtsi b/app/dts/layouts/common/75percent/position_map.dtsi new file mode 100644 index 00000000..d5f9cdbb --- /dev/null +++ b/app/dts/layouts/common/75percent/position_map.dtsi @@ -0,0 +1,7 @@ +/ { + layouts_common_75_percent_position_map: layouts_common_75_percent_position_map { + compatible = "zmk,physical-layout-position-map"; + + complete; + }; +}; diff --git a/app/dts/layouts/common/numpad/17_key.dtsi b/app/dts/layouts/common/numpad/17_key.dtsi new file mode 100644 index 00000000..2645803c --- /dev/null +++ b/app/dts/layouts/common/numpad/17_key.dtsi @@ -0,0 +1,43 @@ +#include +#include + +/ { + layout_numpad_17_key: layout_numpad_17_key { + compatible = "zmk,physical-layout"; + display-name = "17 Key Numpad"; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 0 0 0 0> + , <&key_physical_attrs 100 100 100 0 0 0 0> + , <&key_physical_attrs 100 100 200 0 0 0 0> + , <&key_physical_attrs 100 100 300 0 0 0 0> + , <&key_physical_attrs 100 100 0 100 0 0 0> + , <&key_physical_attrs 100 100 100 100 0 0 0> + , <&key_physical_attrs 100 100 200 100 0 0 0> + , <&key_physical_attrs 100 200 300 100 0 0 0> + , <&key_physical_attrs 100 100 0 200 0 0 0> + , <&key_physical_attrs 100 100 100 200 0 0 0> + , <&key_physical_attrs 100 100 200 200 0 0 0> + , <&key_physical_attrs 100 100 0 300 0 0 0> + , <&key_physical_attrs 100 100 100 300 0 0 0> + , <&key_physical_attrs 100 100 200 300 0 0 0> + , <&key_physical_attrs 100 200 300 300 0 0 0> + , <&key_physical_attrs 200 100 0 400 0 0 0> + , <&key_physical_attrs 100 100 200 400 0 0 0> + ; + }; +}; + +&layouts_common_numpad_position_map { + layout_numpad_17_key { + physical-layout = <&layout_numpad_17_key>; + positions + = <17 18 19 20> + , < 0 1 2 3> + , < 4 5 6 7> + , < 8 9 10 21> + , <11 12 13 14> + , <15 22 16 23> + ; + }; +}; diff --git a/app/dts/layouts/common/numpad/18_key.dtsi b/app/dts/layouts/common/numpad/18_key.dtsi new file mode 100644 index 00000000..82493a38 --- /dev/null +++ b/app/dts/layouts/common/numpad/18_key.dtsi @@ -0,0 +1,44 @@ +#include +#include + +/ { + layout_numpad_18_key: layout_numpad_18_key { + compatible = "zmk,physical-layout"; + display-name = "18 Key Numpad"; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 0 0 0 0> + , <&key_physical_attrs 100 100 100 0 0 0 0> + , <&key_physical_attrs 100 100 200 0 0 0 0> + , <&key_physical_attrs 100 100 300 0 0 0 0> + , <&key_physical_attrs 100 100 0 100 0 0 0> + , <&key_physical_attrs 100 100 100 100 0 0 0> + , <&key_physical_attrs 100 100 200 100 0 0 0> + , <&key_physical_attrs 100 100 300 100 0 0 0> + , <&key_physical_attrs 100 100 0 200 0 0 0> + , <&key_physical_attrs 100 100 100 200 0 0 0> + , <&key_physical_attrs 100 100 200 200 0 0 0> + , <&key_physical_attrs 100 100 300 200 0 0 0> + , <&key_physical_attrs 100 100 0 300 0 0 0> + , <&key_physical_attrs 100 100 100 300 0 0 0> + , <&key_physical_attrs 100 100 200 300 0 0 0> + , <&key_physical_attrs 100 200 300 300 0 0 0> + , <&key_physical_attrs 200 100 0 400 0 0 0> + , <&key_physical_attrs 100 100 200 400 0 0 0> + ; + }; +}; + +&layouts_common_numpad_position_map { + layout_numpad_18_key { + physical-layout = <&layout_numpad_18_key>; + positions + = <18 19 20 21> + , < 0 1 2 3> + , < 4 5 6 7> + , < 8 9 10 11> + , <12 13 14 15> + , <16 22 17 23> + ; + }; +}; diff --git a/app/dts/layouts/common/numpad/18_key_00.dtsi b/app/dts/layouts/common/numpad/18_key_00.dtsi new file mode 100644 index 00000000..e363bf5f --- /dev/null +++ b/app/dts/layouts/common/numpad/18_key_00.dtsi @@ -0,0 +1,44 @@ +#include +#include + +/ { + layout_numpad_18_key_00: layout_numpad_18_key_00 { + compatible = "zmk,physical-layout"; + display-name = "18 Key Numpad (00)"; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 0 0 0 0> + , <&key_physical_attrs 100 100 100 0 0 0 0> + , <&key_physical_attrs 100 100 200 0 0 0 0> + , <&key_physical_attrs 100 100 300 0 0 0 0> + , <&key_physical_attrs 100 100 0 100 0 0 0> + , <&key_physical_attrs 100 100 100 100 0 0 0> + , <&key_physical_attrs 100 100 200 100 0 0 0> + , <&key_physical_attrs 100 200 300 100 0 0 0> + , <&key_physical_attrs 100 100 0 200 0 0 0> + , <&key_physical_attrs 100 100 100 200 0 0 0> + , <&key_physical_attrs 100 100 200 200 0 0 0> + , <&key_physical_attrs 100 100 0 300 0 0 0> + , <&key_physical_attrs 100 100 100 300 0 0 0> + , <&key_physical_attrs 100 100 200 300 0 0 0> + , <&key_physical_attrs 100 200 300 300 0 0 0> + , <&key_physical_attrs 100 100 0 400 0 0 0> + , <&key_physical_attrs 100 100 100 400 0 0 0> + , <&key_physical_attrs 100 100 200 400 0 0 0> + ; + }; +}; + +&layouts_common_numpad_position_map { + layout_numpad_18_key_00 { + physical-layout = <&layout_numpad_18_key_00>; + positions + = <18 19 20 21> + , < 0 1 2 3> + , < 4 5 6 7> + , < 8 9 10 22> + , <11 12 13 14> + , <15 16 17 23> + ; + }; +}; diff --git a/app/dts/layouts/common/numpad/19_key_00.dtsi b/app/dts/layouts/common/numpad/19_key_00.dtsi new file mode 100644 index 00000000..89f4d1a1 --- /dev/null +++ b/app/dts/layouts/common/numpad/19_key_00.dtsi @@ -0,0 +1,45 @@ +#include +#include + +/ { + layout_numpad_19_key_00: layout_numpad_19_key_00 { + compatible = "zmk,physical-layout"; + display-name = "19 Key Numpad (00)"; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 0 0 0 0> + , <&key_physical_attrs 100 100 100 0 0 0 0> + , <&key_physical_attrs 100 100 200 0 0 0 0> + , <&key_physical_attrs 100 100 300 0 0 0 0> + , <&key_physical_attrs 100 100 0 100 0 0 0> + , <&key_physical_attrs 100 100 100 100 0 0 0> + , <&key_physical_attrs 100 100 200 100 0 0 0> + , <&key_physical_attrs 100 100 300 100 0 0 0> + , <&key_physical_attrs 100 100 0 200 0 0 0> + , <&key_physical_attrs 100 100 100 200 0 0 0> + , <&key_physical_attrs 100 100 200 200 0 0 0> + , <&key_physical_attrs 100 100 300 200 0 0 0> + , <&key_physical_attrs 100 100 0 300 0 0 0> + , <&key_physical_attrs 100 100 100 300 0 0 0> + , <&key_physical_attrs 100 100 200 300 0 0 0> + , <&key_physical_attrs 100 200 300 300 0 0 0> + , <&key_physical_attrs 100 100 0 400 0 0 0> + , <&key_physical_attrs 100 100 100 400 0 0 0> + , <&key_physical_attrs 100 100 200 400 0 0 0> + ; + }; +}; + +&layouts_common_numpad_position_map { + layout_numpad_19_key_00 { + physical-layout = <&layout_numpad_19_key_00>; + positions + = <19 20 21 22> + , < 0 1 2 3> + , < 4 5 6 7> + , < 8 9 10 11> + , <12 13 14 15> + , <16 17 18 23> + ; + }; +}; diff --git a/app/dts/layouts/common/numpad/20_key.dtsi b/app/dts/layouts/common/numpad/20_key.dtsi new file mode 100644 index 00000000..ec908524 --- /dev/null +++ b/app/dts/layouts/common/numpad/20_key.dtsi @@ -0,0 +1,46 @@ +#include +#include + +/ { + layout_numpad_20_key: layout_numpad_20_key { + compatible = "zmk,physical-layout"; + display-name = "20 Key Numpad"; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 0 0 0 0> + , <&key_physical_attrs 100 100 100 0 0 0 0> + , <&key_physical_attrs 100 100 200 0 0 0 0> + , <&key_physical_attrs 100 100 300 0 0 0 0> + , <&key_physical_attrs 100 100 0 100 0 0 0> + , <&key_physical_attrs 100 100 100 100 0 0 0> + , <&key_physical_attrs 100 100 200 100 0 0 0> + , <&key_physical_attrs 100 100 300 100 0 0 0> + , <&key_physical_attrs 100 100 0 200 0 0 0> + , <&key_physical_attrs 100 100 100 200 0 0 0> + , <&key_physical_attrs 100 100 200 200 0 0 0> + , <&key_physical_attrs 100 100 300 200 0 0 0> + , <&key_physical_attrs 100 100 0 300 0 0 0> + , <&key_physical_attrs 100 100 100 300 0 0 0> + , <&key_physical_attrs 100 100 200 300 0 0 0> + , <&key_physical_attrs 100 100 300 300 0 0 0> + , <&key_physical_attrs 100 100 0 400 0 0 0> + , <&key_physical_attrs 100 100 100 400 0 0 0> + , <&key_physical_attrs 100 100 200 400 0 0 0> + , <&key_physical_attrs 100 100 300 400 0 0 0> + ; + }; +}; + +&layouts_common_numpad_position_map { + layout_numpad_20_key { + physical-layout = <&layout_numpad_20_key>; + positions + = <20 21 22 23> + , < 0 1 2 3> + , < 4 5 6 7> + , < 8 9 10 11> + , <12 13 14 15> + , <16 17 18 19> + ; + }; +}; diff --git a/app/dts/layouts/common/numpad/21_key.dtsi b/app/dts/layouts/common/numpad/21_key.dtsi new file mode 100644 index 00000000..b4ab99cb --- /dev/null +++ b/app/dts/layouts/common/numpad/21_key.dtsi @@ -0,0 +1,47 @@ +#include +#include + +/ { + layout_numpad_21_key: layout_numpad_21_key { + compatible = "zmk,physical-layout"; + display-name = "21 Key Numpad"; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 0 0 0 0> + , <&key_physical_attrs 100 100 100 0 0 0 0> + , <&key_physical_attrs 100 100 200 0 0 0 0> + , <&key_physical_attrs 100 100 300 0 0 0 0> + , <&key_physical_attrs 100 100 0 125 0 0 0> + , <&key_physical_attrs 100 100 100 125 0 0 0> + , <&key_physical_attrs 100 100 200 125 0 0 0> + , <&key_physical_attrs 100 100 300 125 0 0 0> + , <&key_physical_attrs 100 100 0 225 0 0 0> + , <&key_physical_attrs 100 100 100 225 0 0 0> + , <&key_physical_attrs 100 100 200 225 0 0 0> + , <&key_physical_attrs 100 200 300 225 0 0 0> + , <&key_physical_attrs 100 100 0 325 0 0 0> + , <&key_physical_attrs 100 100 100 325 0 0 0> + , <&key_physical_attrs 100 100 200 325 0 0 0> + , <&key_physical_attrs 100 100 0 425 0 0 0> + , <&key_physical_attrs 100 100 100 425 0 0 0> + , <&key_physical_attrs 100 100 200 425 0 0 0> + , <&key_physical_attrs 100 200 300 425 0 0 0> + , <&key_physical_attrs 200 100 0 525 0 0 0> + , <&key_physical_attrs 100 100 200 525 0 0 0> + ; + }; +}; + +&layouts_common_numpad_position_map { + layout_numpad_21_key { + physical-layout = <&layout_numpad_21_key>; + positions + = < 0 1 2 3> + , < 4 5 6 7> + , < 8 9 10 11> + , <12 13 14 21> + , <15 16 17 18> + , <19 22 20 23> + ; + }; +}; diff --git a/app/dts/layouts/common/numpad/22_key.dtsi b/app/dts/layouts/common/numpad/22_key.dtsi new file mode 100644 index 00000000..29bd5ac8 --- /dev/null +++ b/app/dts/layouts/common/numpad/22_key.dtsi @@ -0,0 +1,48 @@ +#include +#include + +/ { + layout_numpad_22_key: layout_numpad_22_key { + compatible = "zmk,physical-layout"; + display-name = "22 Key Numpad"; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 0 0 0 0> + , <&key_physical_attrs 100 100 100 0 0 0 0> + , <&key_physical_attrs 100 100 200 0 0 0 0> + , <&key_physical_attrs 100 100 300 0 0 0 0> + , <&key_physical_attrs 100 100 0 125 0 0 0> + , <&key_physical_attrs 100 100 100 125 0 0 0> + , <&key_physical_attrs 100 100 200 125 0 0 0> + , <&key_physical_attrs 100 100 300 125 0 0 0> + , <&key_physical_attrs 100 100 0 225 0 0 0> + , <&key_physical_attrs 100 100 100 225 0 0 0> + , <&key_physical_attrs 100 100 200 225 0 0 0> + , <&key_physical_attrs 100 100 300 225 0 0 0> + , <&key_physical_attrs 100 100 0 325 0 0 0> + , <&key_physical_attrs 100 100 100 325 0 0 0> + , <&key_physical_attrs 100 100 200 325 0 0 0> + , <&key_physical_attrs 100 100 300 325 0 0 0> + , <&key_physical_attrs 100 100 0 425 0 0 0> + , <&key_physical_attrs 100 100 100 425 0 0 0> + , <&key_physical_attrs 100 100 200 425 0 0 0> + , <&key_physical_attrs 100 200 300 425 0 0 0> + , <&key_physical_attrs 200 100 0 525 0 0 0> + , <&key_physical_attrs 100 100 200 525 0 0 0> + ; + }; +}; + +&layouts_common_numpad_position_map { + layout_numpad_22_key { + physical-layout = <&layout_numpad_22_key>; + positions + = < 0 1 2 3> + , < 4 5 6 7> + , < 8 9 10 11> + , <12 13 14 15> + , <16 17 18 19> + , <20 22 21 23> + ; + }; +}; diff --git a/app/dts/layouts/common/numpad/22_key_00.dtsi b/app/dts/layouts/common/numpad/22_key_00.dtsi new file mode 100644 index 00000000..28666d14 --- /dev/null +++ b/app/dts/layouts/common/numpad/22_key_00.dtsi @@ -0,0 +1,48 @@ +#include +#include + +/ { + layout_numpad_22_key_00: layout_numpad_22_key_00 { + compatible = "zmk,physical-layout"; + display-name = "22 Key Numpad (00)"; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 0 0 0 0> + , <&key_physical_attrs 100 100 100 0 0 0 0> + , <&key_physical_attrs 100 100 200 0 0 0 0> + , <&key_physical_attrs 100 100 300 0 0 0 0> + , <&key_physical_attrs 100 100 0 125 0 0 0> + , <&key_physical_attrs 100 100 100 125 0 0 0> + , <&key_physical_attrs 100 100 200 125 0 0 0> + , <&key_physical_attrs 100 100 300 125 0 0 0> + , <&key_physical_attrs 100 100 0 225 0 0 0> + , <&key_physical_attrs 100 100 100 225 0 0 0> + , <&key_physical_attrs 100 100 200 225 0 0 0> + , <&key_physical_attrs 100 200 300 225 0 0 0> + , <&key_physical_attrs 100 100 0 325 0 0 0> + , <&key_physical_attrs 100 100 100 325 0 0 0> + , <&key_physical_attrs 100 100 200 325 0 0 0> + , <&key_physical_attrs 100 100 0 425 0 0 0> + , <&key_physical_attrs 100 100 100 425 0 0 0> + , <&key_physical_attrs 100 100 200 425 0 0 0> + , <&key_physical_attrs 100 200 300 425 0 0 0> + , <&key_physical_attrs 100 100 0 525 0 0 0> + , <&key_physical_attrs 100 100 100 525 0 0 0> + , <&key_physical_attrs 100 100 200 525 0 0 0> + ; + }; +}; + +&layouts_common_numpad_position_map { + layout_numpad_22_key_00 { + physical-layout = <&layout_numpad_22_key_00>; + positions + = < 0 1 2 3> + , < 4 5 6 7> + , < 8 9 10 11> + , <12 13 14 22> + , <15 16 17 18> + , <19 20 21 23> + ; + }; +}; diff --git a/app/dts/layouts/common/numpad/23_key_00.dtsi b/app/dts/layouts/common/numpad/23_key_00.dtsi new file mode 100644 index 00000000..b27da92b --- /dev/null +++ b/app/dts/layouts/common/numpad/23_key_00.dtsi @@ -0,0 +1,49 @@ +#include +#include + +/ { + layout_numpad_23_key_00: layout_numpad_23_key_00 { + compatible = "zmk,physical-layout"; + display-name = "23 Key Numpad (00)"; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 0 0 0 0> + , <&key_physical_attrs 100 100 100 0 0 0 0> + , <&key_physical_attrs 100 100 200 0 0 0 0> + , <&key_physical_attrs 100 100 300 0 0 0 0> + , <&key_physical_attrs 100 100 0 125 0 0 0> + , <&key_physical_attrs 100 100 100 125 0 0 0> + , <&key_physical_attrs 100 100 200 125 0 0 0> + , <&key_physical_attrs 100 100 300 125 0 0 0> + , <&key_physical_attrs 100 100 0 225 0 0 0> + , <&key_physical_attrs 100 100 100 225 0 0 0> + , <&key_physical_attrs 100 100 200 225 0 0 0> + , <&key_physical_attrs 100 100 300 225 0 0 0> + , <&key_physical_attrs 100 100 0 325 0 0 0> + , <&key_physical_attrs 100 100 100 325 0 0 0> + , <&key_physical_attrs 100 100 200 325 0 0 0> + , <&key_physical_attrs 100 100 300 325 0 0 0> + , <&key_physical_attrs 100 100 0 425 0 0 0> + , <&key_physical_attrs 100 100 100 425 0 0 0> + , <&key_physical_attrs 100 100 200 425 0 0 0> + , <&key_physical_attrs 100 200 300 425 0 0 0> + , <&key_physical_attrs 100 100 0 525 0 0 0> + , <&key_physical_attrs 100 100 100 525 0 0 0> + , <&key_physical_attrs 100 100 200 525 0 0 0> + ; + }; +}; + +&layouts_common_numpad_position_map { + layout_numpad_23_key_00 { + physical-layout = <&layout_numpad_23_key_00>; + positions + = < 0 1 2 3> + , < 4 5 6 7> + , < 8 9 10 11> + , <12 13 14 15> + , <16 17 18 19> + , <20 21 22 23> + ; + }; +}; diff --git a/app/dts/layouts/common/numpad/24_key.dtsi b/app/dts/layouts/common/numpad/24_key.dtsi new file mode 100644 index 00000000..c410a532 --- /dev/null +++ b/app/dts/layouts/common/numpad/24_key.dtsi @@ -0,0 +1,50 @@ +#include +#include + +/ { + layout_numpad_24_key: layout_numpad_24_key { + compatible = "zmk,physical-layout"; + display-name = "24 Key Numpad"; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 0 0 0 0> + , <&key_physical_attrs 100 100 100 0 0 0 0> + , <&key_physical_attrs 100 100 200 0 0 0 0> + , <&key_physical_attrs 100 100 300 0 0 0 0> + , <&key_physical_attrs 100 100 0 125 0 0 0> + , <&key_physical_attrs 100 100 100 125 0 0 0> + , <&key_physical_attrs 100 100 200 125 0 0 0> + , <&key_physical_attrs 100 100 300 125 0 0 0> + , <&key_physical_attrs 100 100 0 225 0 0 0> + , <&key_physical_attrs 100 100 100 225 0 0 0> + , <&key_physical_attrs 100 100 200 225 0 0 0> + , <&key_physical_attrs 100 100 300 225 0 0 0> + , <&key_physical_attrs 100 100 0 325 0 0 0> + , <&key_physical_attrs 100 100 100 325 0 0 0> + , <&key_physical_attrs 100 100 200 325 0 0 0> + , <&key_physical_attrs 100 100 300 325 0 0 0> + , <&key_physical_attrs 100 100 0 425 0 0 0> + , <&key_physical_attrs 100 100 100 425 0 0 0> + , <&key_physical_attrs 100 100 200 425 0 0 0> + , <&key_physical_attrs 100 100 300 425 0 0 0> + , <&key_physical_attrs 100 100 0 525 0 0 0> + , <&key_physical_attrs 100 100 100 525 0 0 0> + , <&key_physical_attrs 100 100 200 525 0 0 0> + , <&key_physical_attrs 100 100 300 525 0 0 0> + ; + }; +}; + +&layouts_common_numpad_position_map { + layout_numpad_24_key { + physical-layout = <&layout_numpad_24_key>; + positions + = < 0 1 2 3> + , < 4 5 6 7> + , < 8 9 10 11> + , <12 13 14 15> + , <16 17 18 19> + , <20 21 22 23> + ; + }; +}; diff --git a/app/dts/layouts/common/numpad/position_map.dtsi b/app/dts/layouts/common/numpad/position_map.dtsi new file mode 100644 index 00000000..541cc518 --- /dev/null +++ b/app/dts/layouts/common/numpad/position_map.dtsi @@ -0,0 +1,7 @@ +/ { + layouts_common_numpad_position_map: layouts_common_numpad_position_map { + compatible = "zmk,physical-layout-position-map"; + + complete; + }; +}; diff --git a/app/dts/layouts/common/ortho_4x10/1x2u.dtsi b/app/dts/layouts/common/ortho_4x10/1x2u.dtsi new file mode 100644 index 00000000..6ffead4f --- /dev/null +++ b/app/dts/layouts/common/ortho_4x10/1x2u.dtsi @@ -0,0 +1,64 @@ +#include +#include + +/ { + layout_ortho_4x10_1x2u: layout_ortho_4x10_1x2u { + compatible = "zmk,physical-layout"; + display-name = "1x2U Space"; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 0 0 0 0> + , <&key_physical_attrs 100 100 100 0 0 0 0> + , <&key_physical_attrs 100 100 200 0 0 0 0> + , <&key_physical_attrs 100 100 300 0 0 0 0> + , <&key_physical_attrs 100 100 400 0 0 0 0> + , <&key_physical_attrs 100 100 500 0 0 0 0> + , <&key_physical_attrs 100 100 600 0 0 0 0> + , <&key_physical_attrs 100 100 700 0 0 0 0> + , <&key_physical_attrs 100 100 800 0 0 0 0> + , <&key_physical_attrs 100 100 900 0 0 0 0> + , <&key_physical_attrs 100 100 0 100 0 0 0> + , <&key_physical_attrs 100 100 100 100 0 0 0> + , <&key_physical_attrs 100 100 200 100 0 0 0> + , <&key_physical_attrs 100 100 300 100 0 0 0> + , <&key_physical_attrs 100 100 400 100 0 0 0> + , <&key_physical_attrs 100 100 500 100 0 0 0> + , <&key_physical_attrs 100 100 600 100 0 0 0> + , <&key_physical_attrs 100 100 700 100 0 0 0> + , <&key_physical_attrs 100 100 800 100 0 0 0> + , <&key_physical_attrs 100 100 900 100 0 0 0> + , <&key_physical_attrs 100 100 0 200 0 0 0> + , <&key_physical_attrs 100 100 100 200 0 0 0> + , <&key_physical_attrs 100 100 200 200 0 0 0> + , <&key_physical_attrs 100 100 300 200 0 0 0> + , <&key_physical_attrs 100 100 400 200 0 0 0> + , <&key_physical_attrs 100 100 500 200 0 0 0> + , <&key_physical_attrs 100 100 600 200 0 0 0> + , <&key_physical_attrs 100 100 700 200 0 0 0> + , <&key_physical_attrs 100 100 800 200 0 0 0> + , <&key_physical_attrs 100 100 900 200 0 0 0> + , <&key_physical_attrs 100 100 0 300 0 0 0> + , <&key_physical_attrs 100 100 100 300 0 0 0> + , <&key_physical_attrs 100 100 200 300 0 0 0> + , <&key_physical_attrs 100 100 300 300 0 0 0> + , <&key_physical_attrs 200 100 400 300 0 0 0> + , <&key_physical_attrs 100 100 600 300 0 0 0> + , <&key_physical_attrs 100 100 700 300 0 0 0> + , <&key_physical_attrs 100 100 800 300 0 0 0> + , <&key_physical_attrs 100 100 900 300 0 0 0> + ; + }; +}; + +&layouts_common_ortho_4x10_position_map { + layout_ortho_4x10_1x2u_posmap: layout_ortho_4x10_1x2u { + physical-layout = <&layout_ortho_4x10_1x2u>; + positions + = < 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 39 35 36 37 38> + ; + }; +}; + diff --git a/app/dts/layouts/common/ortho_4x10/all1u.dtsi b/app/dts/layouts/common/ortho_4x10/all1u.dtsi new file mode 100644 index 00000000..d3c13f78 --- /dev/null +++ b/app/dts/layouts/common/ortho_4x10/all1u.dtsi @@ -0,0 +1,64 @@ +#include +#include + +/ { + layout_ortho_4x10_all1u: layout_ortho_4x10_all1u { + compatible = "zmk,physical-layout"; + display-name = "All 1U/Grid"; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 0 0 0 0> + , <&key_physical_attrs 100 100 100 0 0 0 0> + , <&key_physical_attrs 100 100 200 0 0 0 0> + , <&key_physical_attrs 100 100 300 0 0 0 0> + , <&key_physical_attrs 100 100 400 0 0 0 0> + , <&key_physical_attrs 100 100 500 0 0 0 0> + , <&key_physical_attrs 100 100 600 0 0 0 0> + , <&key_physical_attrs 100 100 700 0 0 0 0> + , <&key_physical_attrs 100 100 800 0 0 0 0> + , <&key_physical_attrs 100 100 900 0 0 0 0> + , <&key_physical_attrs 100 100 0 100 0 0 0> + , <&key_physical_attrs 100 100 100 100 0 0 0> + , <&key_physical_attrs 100 100 200 100 0 0 0> + , <&key_physical_attrs 100 100 300 100 0 0 0> + , <&key_physical_attrs 100 100 400 100 0 0 0> + , <&key_physical_attrs 100 100 500 100 0 0 0> + , <&key_physical_attrs 100 100 600 100 0 0 0> + , <&key_physical_attrs 100 100 700 100 0 0 0> + , <&key_physical_attrs 100 100 800 100 0 0 0> + , <&key_physical_attrs 100 100 900 100 0 0 0> + , <&key_physical_attrs 100 100 0 200 0 0 0> + , <&key_physical_attrs 100 100 100 200 0 0 0> + , <&key_physical_attrs 100 100 200 200 0 0 0> + , <&key_physical_attrs 100 100 300 200 0 0 0> + , <&key_physical_attrs 100 100 400 200 0 0 0> + , <&key_physical_attrs 100 100 500 200 0 0 0> + , <&key_physical_attrs 100 100 600 200 0 0 0> + , <&key_physical_attrs 100 100 700 200 0 0 0> + , <&key_physical_attrs 100 100 800 200 0 0 0> + , <&key_physical_attrs 100 100 900 200 0 0 0> + , <&key_physical_attrs 100 100 0 300 0 0 0> + , <&key_physical_attrs 100 100 100 300 0 0 0> + , <&key_physical_attrs 100 100 200 300 0 0 0> + , <&key_physical_attrs 100 100 300 300 0 0 0> + , <&key_physical_attrs 100 100 400 300 0 0 0> + , <&key_physical_attrs 100 100 500 300 0 0 0> + , <&key_physical_attrs 100 100 600 300 0 0 0> + , <&key_physical_attrs 100 100 700 300 0 0 0> + , <&key_physical_attrs 100 100 800 300 0 0 0> + , <&key_physical_attrs 100 100 900 300 0 0 0> + ; + }; +}; + +&layouts_common_ortho_4x10_position_map { + layout_ortho_4x10_all1u_posmap: layout_ortho_4x10_all1u { + physical-layout = <&layout_ortho_4x10_all1u>; + positions + = < 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> + ; + }; +}; diff --git a/app/dts/layouts/common/ortho_4x10/position_map.dtsi b/app/dts/layouts/common/ortho_4x10/position_map.dtsi new file mode 100644 index 00000000..51bc87a0 --- /dev/null +++ b/app/dts/layouts/common/ortho_4x10/position_map.dtsi @@ -0,0 +1,7 @@ +/ { + layouts_common_ortho_4x10_position_map: layouts_common_ortho_4x10_position_map { + compatible = "zmk,physical-layout-position-map"; + + complete; + }; +}; diff --git a/app/dts/layouts/common/ortho_4x12/1x2u.dtsi b/app/dts/layouts/common/ortho_4x12/1x2u.dtsi new file mode 100644 index 00000000..451743ff --- /dev/null +++ b/app/dts/layouts/common/ortho_4x12/1x2u.dtsi @@ -0,0 +1,71 @@ +#include +#include + +/ { + layout_ortho_4x12_1x2u: layout_ortho_4x12_1x2u { + compatible = "zmk,physical-layout"; + display-name = "40% 1x2U Space"; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 0 0 0 0> + , <&key_physical_attrs 100 100 100 0 0 0 0> + , <&key_physical_attrs 100 100 200 0 0 0 0> + , <&key_physical_attrs 100 100 300 0 0 0 0> + , <&key_physical_attrs 100 100 400 0 0 0 0> + , <&key_physical_attrs 100 100 500 0 0 0 0> + , <&key_physical_attrs 100 100 600 0 0 0 0> + , <&key_physical_attrs 100 100 700 0 0 0 0> + , <&key_physical_attrs 100 100 800 0 0 0 0> + , <&key_physical_attrs 100 100 900 0 0 0 0> + , <&key_physical_attrs 100 100 1000 0 0 0 0> + , <&key_physical_attrs 100 100 1100 0 0 0 0> + , <&key_physical_attrs 100 100 0 100 0 0 0> + , <&key_physical_attrs 100 100 100 100 0 0 0> + , <&key_physical_attrs 100 100 200 100 0 0 0> + , <&key_physical_attrs 100 100 300 100 0 0 0> + , <&key_physical_attrs 100 100 400 100 0 0 0> + , <&key_physical_attrs 100 100 500 100 0 0 0> + , <&key_physical_attrs 100 100 600 100 0 0 0> + , <&key_physical_attrs 100 100 700 100 0 0 0> + , <&key_physical_attrs 100 100 800 100 0 0 0> + , <&key_physical_attrs 100 100 900 100 0 0 0> + , <&key_physical_attrs 100 100 1000 100 0 0 0> + , <&key_physical_attrs 100 100 1100 100 0 0 0> + , <&key_physical_attrs 100 100 0 200 0 0 0> + , <&key_physical_attrs 100 100 100 200 0 0 0> + , <&key_physical_attrs 100 100 200 200 0 0 0> + , <&key_physical_attrs 100 100 300 200 0 0 0> + , <&key_physical_attrs 100 100 400 200 0 0 0> + , <&key_physical_attrs 100 100 500 200 0 0 0> + , <&key_physical_attrs 100 100 600 200 0 0 0> + , <&key_physical_attrs 100 100 700 200 0 0 0> + , <&key_physical_attrs 100 100 800 200 0 0 0> + , <&key_physical_attrs 100 100 900 200 0 0 0> + , <&key_physical_attrs 100 100 1000 200 0 0 0> + , <&key_physical_attrs 100 100 1100 200 0 0 0> + , <&key_physical_attrs 100 100 0 300 0 0 0> + , <&key_physical_attrs 100 100 100 300 0 0 0> + , <&key_physical_attrs 100 100 200 300 0 0 0> + , <&key_physical_attrs 100 100 300 300 0 0 0> + , <&key_physical_attrs 100 100 400 300 0 0 0> + , <&key_physical_attrs 200 100 500 300 0 0 0> + , <&key_physical_attrs 100 100 700 300 0 0 0> + , <&key_physical_attrs 100 100 800 300 0 0 0> + , <&key_physical_attrs 100 100 900 300 0 0 0> + , <&key_physical_attrs 100 100 1000 300 0 0 0> + , <&key_physical_attrs 100 100 1100 300 0 0 0> + ; + }; +}; + +&layouts_common_ortho_4x12_position_map { + layout_ortho_4x12_1x2u_posmap: layout_ortho_4x12_1x2u { + physical-layout = <&layout_ortho_4x12_1x2u>; + positions + = < 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 47 42 43 44 45 46> + ; + }; +}; diff --git a/app/dts/layouts/common/ortho_4x12/2x2u.dtsi b/app/dts/layouts/common/ortho_4x12/2x2u.dtsi new file mode 100644 index 00000000..69afe35f --- /dev/null +++ b/app/dts/layouts/common/ortho_4x12/2x2u.dtsi @@ -0,0 +1,70 @@ +#include +#include + +/ { + layout_ortho_4x12_2x2u: layout_ortho_4x12_2x2u { + compatible = "zmk,physical-layout"; + display-name = "40% 2x2U Space"; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 0 0 0 0> + , <&key_physical_attrs 100 100 100 0 0 0 0> + , <&key_physical_attrs 100 100 200 0 0 0 0> + , <&key_physical_attrs 100 100 300 0 0 0 0> + , <&key_physical_attrs 100 100 400 0 0 0 0> + , <&key_physical_attrs 100 100 500 0 0 0 0> + , <&key_physical_attrs 100 100 600 0 0 0 0> + , <&key_physical_attrs 100 100 700 0 0 0 0> + , <&key_physical_attrs 100 100 800 0 0 0 0> + , <&key_physical_attrs 100 100 900 0 0 0 0> + , <&key_physical_attrs 100 100 1000 0 0 0 0> + , <&key_physical_attrs 100 100 1100 0 0 0 0> + , <&key_physical_attrs 100 100 0 100 0 0 0> + , <&key_physical_attrs 100 100 100 100 0 0 0> + , <&key_physical_attrs 100 100 200 100 0 0 0> + , <&key_physical_attrs 100 100 300 100 0 0 0> + , <&key_physical_attrs 100 100 400 100 0 0 0> + , <&key_physical_attrs 100 100 500 100 0 0 0> + , <&key_physical_attrs 100 100 600 100 0 0 0> + , <&key_physical_attrs 100 100 700 100 0 0 0> + , <&key_physical_attrs 100 100 800 100 0 0 0> + , <&key_physical_attrs 100 100 900 100 0 0 0> + , <&key_physical_attrs 100 100 1000 100 0 0 0> + , <&key_physical_attrs 100 100 1100 100 0 0 0> + , <&key_physical_attrs 100 100 0 200 0 0 0> + , <&key_physical_attrs 100 100 100 200 0 0 0> + , <&key_physical_attrs 100 100 200 200 0 0 0> + , <&key_physical_attrs 100 100 300 200 0 0 0> + , <&key_physical_attrs 100 100 400 200 0 0 0> + , <&key_physical_attrs 100 100 500 200 0 0 0> + , <&key_physical_attrs 100 100 600 200 0 0 0> + , <&key_physical_attrs 100 100 700 200 0 0 0> + , <&key_physical_attrs 100 100 800 200 0 0 0> + , <&key_physical_attrs 100 100 900 200 0 0 0> + , <&key_physical_attrs 100 100 1000 200 0 0 0> + , <&key_physical_attrs 100 100 1100 200 0 0 0> + , <&key_physical_attrs 100 100 0 300 0 0 0> + , <&key_physical_attrs 100 100 100 300 0 0 0> + , <&key_physical_attrs 100 100 200 300 0 0 0> + , <&key_physical_attrs 100 100 300 300 0 0 0> + , <&key_physical_attrs 200 100 400 300 0 0 0> + , <&key_physical_attrs 200 100 600 300 0 0 0> + , <&key_physical_attrs 100 100 800 300 0 0 0> + , <&key_physical_attrs 100 100 900 300 0 0 0> + , <&key_physical_attrs 100 100 1000 300 0 0 0> + , <&key_physical_attrs 100 100 1100 300 0 0 0> + ; + }; +}; + +&layouts_common_ortho_4x12_position_map { + layout_ortho_4x12_2x2u_posmap: layout_ortho_4x12_2x2u { + physical-layout = <&layout_ortho_4x12_2x2u>; + positions + = < 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 46 47 41 42 43 44 45> + ; + }; +}; diff --git a/app/dts/layouts/common/ortho_4x12/all1u.dtsi b/app/dts/layouts/common/ortho_4x12/all1u.dtsi new file mode 100644 index 00000000..00e4bded --- /dev/null +++ b/app/dts/layouts/common/ortho_4x12/all1u.dtsi @@ -0,0 +1,72 @@ +#include +#include + +/ { + layout_ortho_4x12_all1u: layout_ortho_4x12_all1u { + compatible = "zmk,physical-layout"; + display-name = "40% All 1U/Grid"; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 0 0 0 0> + , <&key_physical_attrs 100 100 100 0 0 0 0> + , <&key_physical_attrs 100 100 200 0 0 0 0> + , <&key_physical_attrs 100 100 300 0 0 0 0> + , <&key_physical_attrs 100 100 400 0 0 0 0> + , <&key_physical_attrs 100 100 500 0 0 0 0> + , <&key_physical_attrs 100 100 600 0 0 0 0> + , <&key_physical_attrs 100 100 700 0 0 0 0> + , <&key_physical_attrs 100 100 800 0 0 0 0> + , <&key_physical_attrs 100 100 900 0 0 0 0> + , <&key_physical_attrs 100 100 1000 0 0 0 0> + , <&key_physical_attrs 100 100 1100 0 0 0 0> + , <&key_physical_attrs 100 100 0 100 0 0 0> + , <&key_physical_attrs 100 100 100 100 0 0 0> + , <&key_physical_attrs 100 100 200 100 0 0 0> + , <&key_physical_attrs 100 100 300 100 0 0 0> + , <&key_physical_attrs 100 100 400 100 0 0 0> + , <&key_physical_attrs 100 100 500 100 0 0 0> + , <&key_physical_attrs 100 100 600 100 0 0 0> + , <&key_physical_attrs 100 100 700 100 0 0 0> + , <&key_physical_attrs 100 100 800 100 0 0 0> + , <&key_physical_attrs 100 100 900 100 0 0 0> + , <&key_physical_attrs 100 100 1000 100 0 0 0> + , <&key_physical_attrs 100 100 1100 100 0 0 0> + , <&key_physical_attrs 100 100 0 200 0 0 0> + , <&key_physical_attrs 100 100 100 200 0 0 0> + , <&key_physical_attrs 100 100 200 200 0 0 0> + , <&key_physical_attrs 100 100 300 200 0 0 0> + , <&key_physical_attrs 100 100 400 200 0 0 0> + , <&key_physical_attrs 100 100 500 200 0 0 0> + , <&key_physical_attrs 100 100 600 200 0 0 0> + , <&key_physical_attrs 100 100 700 200 0 0 0> + , <&key_physical_attrs 100 100 800 200 0 0 0> + , <&key_physical_attrs 100 100 900 200 0 0 0> + , <&key_physical_attrs 100 100 1000 200 0 0 0> + , <&key_physical_attrs 100 100 1100 200 0 0 0> + , <&key_physical_attrs 100 100 0 300 0 0 0> + , <&key_physical_attrs 100 100 100 300 0 0 0> + , <&key_physical_attrs 100 100 200 300 0 0 0> + , <&key_physical_attrs 100 100 300 300 0 0 0> + , <&key_physical_attrs 100 100 400 300 0 0 0> + , <&key_physical_attrs 100 100 500 300 0 0 0> + , <&key_physical_attrs 100 100 600 300 0 0 0> + , <&key_physical_attrs 100 100 700 300 0 0 0> + , <&key_physical_attrs 100 100 800 300 0 0 0> + , <&key_physical_attrs 100 100 900 300 0 0 0> + , <&key_physical_attrs 100 100 1000 300 0 0 0> + , <&key_physical_attrs 100 100 1100 300 0 0 0> + ; + }; +}; + +&layouts_common_ortho_4x12_position_map { + layout_ortho_4x12_all1u_posmap: layout_ortho_4x12_all1u { + physical-layout = <&layout_ortho_4x12_all1u>; + positions + = < 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> + ; + }; +}; diff --git a/app/dts/layouts/common/ortho_4x12/position_map.dtsi b/app/dts/layouts/common/ortho_4x12/position_map.dtsi new file mode 100644 index 00000000..c93a32bd --- /dev/null +++ b/app/dts/layouts/common/ortho_4x12/position_map.dtsi @@ -0,0 +1,7 @@ +/ { + layouts_common_ortho_4x12_position_map: layouts_common_ortho_4x12_position_map { + compatible = "zmk,physical-layout-position-map"; + + complete; + }; +}; diff --git a/app/dts/layouts/common/ortho_5x12/1x2u.dtsi b/app/dts/layouts/common/ortho_5x12/1x2u.dtsi new file mode 100644 index 00000000..bbe101ba --- /dev/null +++ b/app/dts/layouts/common/ortho_5x12/1x2u.dtsi @@ -0,0 +1,84 @@ +#include +#include + +/ { + layout_ortho_5x12_1x2u: layout_ortho_5x12_1x2u { + compatible = "zmk,physical-layout"; + display-name = "50% 1x2U Space"; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 0 0 0 0> + , <&key_physical_attrs 100 100 100 0 0 0 0> + , <&key_physical_attrs 100 100 200 0 0 0 0> + , <&key_physical_attrs 100 100 300 0 0 0 0> + , <&key_physical_attrs 100 100 400 0 0 0 0> + , <&key_physical_attrs 100 100 500 0 0 0 0> + , <&key_physical_attrs 100 100 600 0 0 0 0> + , <&key_physical_attrs 100 100 700 0 0 0 0> + , <&key_physical_attrs 100 100 800 0 0 0 0> + , <&key_physical_attrs 100 100 900 0 0 0 0> + , <&key_physical_attrs 100 100 1000 0 0 0 0> + , <&key_physical_attrs 100 100 1100 0 0 0 0> + , <&key_physical_attrs 100 100 0 100 0 0 0> + , <&key_physical_attrs 100 100 100 100 0 0 0> + , <&key_physical_attrs 100 100 200 100 0 0 0> + , <&key_physical_attrs 100 100 300 100 0 0 0> + , <&key_physical_attrs 100 100 400 100 0 0 0> + , <&key_physical_attrs 100 100 500 100 0 0 0> + , <&key_physical_attrs 100 100 600 100 0 0 0> + , <&key_physical_attrs 100 100 700 100 0 0 0> + , <&key_physical_attrs 100 100 800 100 0 0 0> + , <&key_physical_attrs 100 100 900 100 0 0 0> + , <&key_physical_attrs 100 100 1000 100 0 0 0> + , <&key_physical_attrs 100 100 1100 100 0 0 0> + , <&key_physical_attrs 100 100 0 200 0 0 0> + , <&key_physical_attrs 100 100 100 200 0 0 0> + , <&key_physical_attrs 100 100 200 200 0 0 0> + , <&key_physical_attrs 100 100 300 200 0 0 0> + , <&key_physical_attrs 100 100 400 200 0 0 0> + , <&key_physical_attrs 100 100 500 200 0 0 0> + , <&key_physical_attrs 100 100 600 200 0 0 0> + , <&key_physical_attrs 100 100 700 200 0 0 0> + , <&key_physical_attrs 100 100 800 200 0 0 0> + , <&key_physical_attrs 100 100 900 200 0 0 0> + , <&key_physical_attrs 100 100 1000 200 0 0 0> + , <&key_physical_attrs 100 100 1100 200 0 0 0> + , <&key_physical_attrs 100 100 0 300 0 0 0> + , <&key_physical_attrs 100 100 100 300 0 0 0> + , <&key_physical_attrs 100 100 200 300 0 0 0> + , <&key_physical_attrs 100 100 300 300 0 0 0> + , <&key_physical_attrs 100 100 400 300 0 0 0> + , <&key_physical_attrs 100 100 500 300 0 0 0> + , <&key_physical_attrs 100 100 600 300 0 0 0> + , <&key_physical_attrs 100 100 700 300 0 0 0> + , <&key_physical_attrs 100 100 800 300 0 0 0> + , <&key_physical_attrs 100 100 900 300 0 0 0> + , <&key_physical_attrs 100 100 1000 300 0 0 0> + , <&key_physical_attrs 100 100 1100 300 0 0 0> + , <&key_physical_attrs 100 100 0 400 0 0 0> + , <&key_physical_attrs 100 100 100 400 0 0 0> + , <&key_physical_attrs 100 100 200 400 0 0 0> + , <&key_physical_attrs 100 100 300 400 0 0 0> + , <&key_physical_attrs 100 100 400 400 0 0 0> + , <&key_physical_attrs 200 100 500 400 0 0 0> + , <&key_physical_attrs 100 100 700 400 0 0 0> + , <&key_physical_attrs 100 100 800 400 0 0 0> + , <&key_physical_attrs 100 100 900 400 0 0 0> + , <&key_physical_attrs 100 100 1000 400 0 0 0> + , <&key_physical_attrs 100 100 1100 400 0 0 0> + ; + }; +}; + +&layouts_common_ortho_5x12_position_map { + layout_ortho_5x12_1x2u_posmap: layout_ortho_5x12_1x2u { + physical-layout = <&layout_ortho_5x12_1x2u>; + positions + = < 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 59 54 55 56 57 58> + ; + }; +}; diff --git a/app/dts/layouts/common/ortho_5x12/2x2u.dtsi b/app/dts/layouts/common/ortho_5x12/2x2u.dtsi new file mode 100644 index 00000000..c2f7efb7 --- /dev/null +++ b/app/dts/layouts/common/ortho_5x12/2x2u.dtsi @@ -0,0 +1,83 @@ +#include +#include + +/ { + layout_ortho_5x12_2x2u: layout_ortho_5x12_2x2u { + compatible = "zmk,physical-layout"; + display-name = "50% 2x2U Space"; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 0 0 0 0> + , <&key_physical_attrs 100 100 100 0 0 0 0> + , <&key_physical_attrs 100 100 200 0 0 0 0> + , <&key_physical_attrs 100 100 300 0 0 0 0> + , <&key_physical_attrs 100 100 400 0 0 0 0> + , <&key_physical_attrs 100 100 500 0 0 0 0> + , <&key_physical_attrs 100 100 600 0 0 0 0> + , <&key_physical_attrs 100 100 700 0 0 0 0> + , <&key_physical_attrs 100 100 800 0 0 0 0> + , <&key_physical_attrs 100 100 900 0 0 0 0> + , <&key_physical_attrs 100 100 1000 0 0 0 0> + , <&key_physical_attrs 100 100 1100 0 0 0 0> + , <&key_physical_attrs 100 100 0 100 0 0 0> + , <&key_physical_attrs 100 100 100 100 0 0 0> + , <&key_physical_attrs 100 100 200 100 0 0 0> + , <&key_physical_attrs 100 100 300 100 0 0 0> + , <&key_physical_attrs 100 100 400 100 0 0 0> + , <&key_physical_attrs 100 100 500 100 0 0 0> + , <&key_physical_attrs 100 100 600 100 0 0 0> + , <&key_physical_attrs 100 100 700 100 0 0 0> + , <&key_physical_attrs 100 100 800 100 0 0 0> + , <&key_physical_attrs 100 100 900 100 0 0 0> + , <&key_physical_attrs 100 100 1000 100 0 0 0> + , <&key_physical_attrs 100 100 1100 100 0 0 0> + , <&key_physical_attrs 100 100 0 200 0 0 0> + , <&key_physical_attrs 100 100 100 200 0 0 0> + , <&key_physical_attrs 100 100 200 200 0 0 0> + , <&key_physical_attrs 100 100 300 200 0 0 0> + , <&key_physical_attrs 100 100 400 200 0 0 0> + , <&key_physical_attrs 100 100 500 200 0 0 0> + , <&key_physical_attrs 100 100 600 200 0 0 0> + , <&key_physical_attrs 100 100 700 200 0 0 0> + , <&key_physical_attrs 100 100 800 200 0 0 0> + , <&key_physical_attrs 100 100 900 200 0 0 0> + , <&key_physical_attrs 100 100 1000 200 0 0 0> + , <&key_physical_attrs 100 100 1100 200 0 0 0> + , <&key_physical_attrs 100 100 0 300 0 0 0> + , <&key_physical_attrs 100 100 100 300 0 0 0> + , <&key_physical_attrs 100 100 200 300 0 0 0> + , <&key_physical_attrs 100 100 300 300 0 0 0> + , <&key_physical_attrs 100 100 400 300 0 0 0> + , <&key_physical_attrs 100 100 500 300 0 0 0> + , <&key_physical_attrs 100 100 600 300 0 0 0> + , <&key_physical_attrs 100 100 700 300 0 0 0> + , <&key_physical_attrs 100 100 800 300 0 0 0> + , <&key_physical_attrs 100 100 900 300 0 0 0> + , <&key_physical_attrs 100 100 1000 300 0 0 0> + , <&key_physical_attrs 100 100 1100 300 0 0 0> + , <&key_physical_attrs 100 100 0 400 0 0 0> + , <&key_physical_attrs 100 100 100 400 0 0 0> + , <&key_physical_attrs 100 100 200 400 0 0 0> + , <&key_physical_attrs 100 100 300 400 0 0 0> + , <&key_physical_attrs 200 100 400 400 0 0 0> + , <&key_physical_attrs 200 100 600 400 0 0 0> + , <&key_physical_attrs 100 100 800 400 0 0 0> + , <&key_physical_attrs 100 100 900 400 0 0 0> + , <&key_physical_attrs 100 100 1000 400 0 0 0> + , <&key_physical_attrs 100 100 1100 400 0 0 0> + ; + }; +}; + +&layouts_common_ortho_5x12_position_map { + layout_ortho_5x12_2x2u_posmap: layout_ortho_5x12_2x2u { + physical-layout = <&layout_ortho_5x12_2x2u>; + positions + = < 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 58 59 53 54 55 56 57> + ; + }; +}; diff --git a/app/dts/layouts/common/ortho_5x12/all1u.dtsi b/app/dts/layouts/common/ortho_5x12/all1u.dtsi new file mode 100644 index 00000000..e8648789 --- /dev/null +++ b/app/dts/layouts/common/ortho_5x12/all1u.dtsi @@ -0,0 +1,85 @@ +#include +#include + +/ { + layout_ortho_5x12_all1u: layout_ortho_5x12_all1u { + compatible = "zmk,physical-layout"; + display-name = "50% All 1U/Grid"; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 0 0 0 0> + , <&key_physical_attrs 100 100 100 0 0 0 0> + , <&key_physical_attrs 100 100 200 0 0 0 0> + , <&key_physical_attrs 100 100 300 0 0 0 0> + , <&key_physical_attrs 100 100 400 0 0 0 0> + , <&key_physical_attrs 100 100 500 0 0 0 0> + , <&key_physical_attrs 100 100 600 0 0 0 0> + , <&key_physical_attrs 100 100 700 0 0 0 0> + , <&key_physical_attrs 100 100 800 0 0 0 0> + , <&key_physical_attrs 100 100 900 0 0 0 0> + , <&key_physical_attrs 100 100 1000 0 0 0 0> + , <&key_physical_attrs 100 100 1100 0 0 0 0> + , <&key_physical_attrs 100 100 0 100 0 0 0> + , <&key_physical_attrs 100 100 100 100 0 0 0> + , <&key_physical_attrs 100 100 200 100 0 0 0> + , <&key_physical_attrs 100 100 300 100 0 0 0> + , <&key_physical_attrs 100 100 400 100 0 0 0> + , <&key_physical_attrs 100 100 500 100 0 0 0> + , <&key_physical_attrs 100 100 600 100 0 0 0> + , <&key_physical_attrs 100 100 700 100 0 0 0> + , <&key_physical_attrs 100 100 800 100 0 0 0> + , <&key_physical_attrs 100 100 900 100 0 0 0> + , <&key_physical_attrs 100 100 1000 100 0 0 0> + , <&key_physical_attrs 100 100 1100 100 0 0 0> + , <&key_physical_attrs 100 100 0 200 0 0 0> + , <&key_physical_attrs 100 100 100 200 0 0 0> + , <&key_physical_attrs 100 100 200 200 0 0 0> + , <&key_physical_attrs 100 100 300 200 0 0 0> + , <&key_physical_attrs 100 100 400 200 0 0 0> + , <&key_physical_attrs 100 100 500 200 0 0 0> + , <&key_physical_attrs 100 100 600 200 0 0 0> + , <&key_physical_attrs 100 100 700 200 0 0 0> + , <&key_physical_attrs 100 100 800 200 0 0 0> + , <&key_physical_attrs 100 100 900 200 0 0 0> + , <&key_physical_attrs 100 100 1000 200 0 0 0> + , <&key_physical_attrs 100 100 1100 200 0 0 0> + , <&key_physical_attrs 100 100 0 300 0 0 0> + , <&key_physical_attrs 100 100 100 300 0 0 0> + , <&key_physical_attrs 100 100 200 300 0 0 0> + , <&key_physical_attrs 100 100 300 300 0 0 0> + , <&key_physical_attrs 100 100 400 300 0 0 0> + , <&key_physical_attrs 100 100 500 300 0 0 0> + , <&key_physical_attrs 100 100 600 300 0 0 0> + , <&key_physical_attrs 100 100 700 300 0 0 0> + , <&key_physical_attrs 100 100 800 300 0 0 0> + , <&key_physical_attrs 100 100 900 300 0 0 0> + , <&key_physical_attrs 100 100 1000 300 0 0 0> + , <&key_physical_attrs 100 100 1100 300 0 0 0> + , <&key_physical_attrs 100 100 0 400 0 0 0> + , <&key_physical_attrs 100 100 100 400 0 0 0> + , <&key_physical_attrs 100 100 200 400 0 0 0> + , <&key_physical_attrs 100 100 300 400 0 0 0> + , <&key_physical_attrs 100 100 400 400 0 0 0> + , <&key_physical_attrs 100 100 500 400 0 0 0> + , <&key_physical_attrs 100 100 600 400 0 0 0> + , <&key_physical_attrs 100 100 700 400 0 0 0> + , <&key_physical_attrs 100 100 800 400 0 0 0> + , <&key_physical_attrs 100 100 900 400 0 0 0> + , <&key_physical_attrs 100 100 1000 400 0 0 0> + , <&key_physical_attrs 100 100 1100 400 0 0 0> + ; + }; +}; + +&layouts_common_ortho_5x12_position_map { + layout_ortho_5x12_all1u_posmap: layout_ortho_5x12_all1u { + physical-layout = <&layout_ortho_5x12_all1u>; + positions + = < 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> + ; + }; +}; diff --git a/app/dts/layouts/common/ortho_5x12/position_map.dtsi b/app/dts/layouts/common/ortho_5x12/position_map.dtsi new file mode 100644 index 00000000..e292b4e7 --- /dev/null +++ b/app/dts/layouts/common/ortho_5x12/position_map.dtsi @@ -0,0 +1,7 @@ +/ { + layouts_common_ortho_5x12_position_map: layouts_common_ortho_5x12_position_map { + compatible = "zmk,physical-layout-position-map"; + + complete; + }; +}; diff --git a/app/dts/layouts/common/tkl/ansi.dtsi b/app/dts/layouts/common/tkl/ansi.dtsi new file mode 100644 index 00000000..83354c4f --- /dev/null +++ b/app/dts/layouts/common/tkl/ansi.dtsi @@ -0,0 +1,99 @@ +#include +#include + +/ { + layout_tkl_ansi: layout_tkl_ansi { + compatible = "zmk,physical-layout"; + display-name = "TKL 87 Key ANSI"; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 0 0 0 0> + , <&key_physical_attrs 100 100 200 0 0 0 0> + , <&key_physical_attrs 100 100 300 0 0 0 0> + , <&key_physical_attrs 100 100 400 0 0 0 0> + , <&key_physical_attrs 100 100 500 0 0 0 0> + , <&key_physical_attrs 100 100 650 0 0 0 0> + , <&key_physical_attrs 100 100 750 0 0 0 0> + , <&key_physical_attrs 100 100 850 0 0 0 0> + , <&key_physical_attrs 100 100 950 0 0 0 0> + , <&key_physical_attrs 100 100 1100 0 0 0 0> + , <&key_physical_attrs 100 100 1200 0 0 0 0> + , <&key_physical_attrs 100 100 1300 0 0 0 0> + , <&key_physical_attrs 100 100 1400 0 0 0 0> + , <&key_physical_attrs 100 100 1525 0 0 0 0> + , <&key_physical_attrs 100 100 1625 0 0 0 0> + , <&key_physical_attrs 100 100 1725 0 0 0 0> + , <&key_physical_attrs 100 100 0 150 0 0 0> + , <&key_physical_attrs 100 100 100 150 0 0 0> + , <&key_physical_attrs 100 100 200 150 0 0 0> + , <&key_physical_attrs 100 100 300 150 0 0 0> + , <&key_physical_attrs 100 100 400 150 0 0 0> + , <&key_physical_attrs 100 100 500 150 0 0 0> + , <&key_physical_attrs 100 100 600 150 0 0 0> + , <&key_physical_attrs 100 100 700 150 0 0 0> + , <&key_physical_attrs 100 100 800 150 0 0 0> + , <&key_physical_attrs 100 100 900 150 0 0 0> + , <&key_physical_attrs 100 100 1000 150 0 0 0> + , <&key_physical_attrs 100 100 1100 150 0 0 0> + , <&key_physical_attrs 100 100 1200 150 0 0 0> + , <&key_physical_attrs 200 100 1300 150 0 0 0> + , <&key_physical_attrs 100 100 1525 150 0 0 0> + , <&key_physical_attrs 100 100 1625 150 0 0 0> + , <&key_physical_attrs 100 100 1725 150 0 0 0> + , <&key_physical_attrs 150 100 0 250 0 0 0> + , <&key_physical_attrs 100 100 150 250 0 0 0> + , <&key_physical_attrs 100 100 250 250 0 0 0> + , <&key_physical_attrs 100 100 350 250 0 0 0> + , <&key_physical_attrs 100 100 450 250 0 0 0> + , <&key_physical_attrs 100 100 550 250 0 0 0> + , <&key_physical_attrs 100 100 650 250 0 0 0> + , <&key_physical_attrs 100 100 750 250 0 0 0> + , <&key_physical_attrs 100 100 850 250 0 0 0> + , <&key_physical_attrs 100 100 950 250 0 0 0> + , <&key_physical_attrs 100 100 1050 250 0 0 0> + , <&key_physical_attrs 100 100 1150 250 0 0 0> + , <&key_physical_attrs 100 100 1250 250 0 0 0> + , <&key_physical_attrs 150 100 1350 250 0 0 0> + , <&key_physical_attrs 100 100 1525 250 0 0 0> + , <&key_physical_attrs 100 100 1625 250 0 0 0> + , <&key_physical_attrs 100 100 1725 250 0 0 0> + , <&key_physical_attrs 175 100 0 350 0 0 0> + , <&key_physical_attrs 100 100 175 350 0 0 0> + , <&key_physical_attrs 100 100 275 350 0 0 0> + , <&key_physical_attrs 100 100 375 350 0 0 0> + , <&key_physical_attrs 100 100 475 350 0 0 0> + , <&key_physical_attrs 100 100 575 350 0 0 0> + , <&key_physical_attrs 100 100 675 350 0 0 0> + , <&key_physical_attrs 100 100 775 350 0 0 0> + , <&key_physical_attrs 100 100 875 350 0 0 0> + , <&key_physical_attrs 100 100 975 350 0 0 0> + , <&key_physical_attrs 100 100 1075 350 0 0 0> + , <&key_physical_attrs 100 100 1175 350 0 0 0> + , <&key_physical_attrs 225 100 1275 350 0 0 0> + , <&key_physical_attrs 225 100 0 450 0 0 0> + , <&key_physical_attrs 100 100 225 450 0 0 0> + , <&key_physical_attrs 100 100 325 450 0 0 0> + , <&key_physical_attrs 100 100 425 450 0 0 0> + , <&key_physical_attrs 100 100 525 450 0 0 0> + , <&key_physical_attrs 100 100 625 450 0 0 0> + , <&key_physical_attrs 100 100 725 450 0 0 0> + , <&key_physical_attrs 100 100 825 450 0 0 0> + , <&key_physical_attrs 100 100 925 450 0 0 0> + , <&key_physical_attrs 100 100 1025 450 0 0 0> + , <&key_physical_attrs 100 100 1125 450 0 0 0> + , <&key_physical_attrs 275 100 1225 450 0 0 0> + , <&key_physical_attrs 100 100 1625 450 0 0 0> + , <&key_physical_attrs 125 100 0 550 0 0 0> + , <&key_physical_attrs 125 100 125 550 0 0 0> + , <&key_physical_attrs 125 100 250 550 0 0 0> + , <&key_physical_attrs 625 100 375 550 0 0 0> + , <&key_physical_attrs 125 100 1000 550 0 0 0> + , <&key_physical_attrs 125 100 1125 550 0 0 0> + , <&key_physical_attrs 125 100 1250 550 0 0 0> + , <&key_physical_attrs 125 100 1375 550 0 0 0> + , <&key_physical_attrs 100 100 1525 550 0 0 0> + , <&key_physical_attrs 100 100 1625 550 0 0 0> + , <&key_physical_attrs 100 100 1725 550 0 0 0> + ; + }; +}; diff --git a/app/dts/layouts/common/tkl/position_map.dtsi b/app/dts/layouts/common/tkl/position_map.dtsi new file mode 100644 index 00000000..8ac528e3 --- /dev/null +++ b/app/dts/layouts/common/tkl/position_map.dtsi @@ -0,0 +1,7 @@ +/ { + layouts_common_tkl_position_map: layouts_common_tkl_position_map { + compatible = "zmk,physical-layout-position-map"; + + complete; + }; +}; diff --git a/app/dts/layouts/foostan/corne.dtsi b/app/dts/layouts/foostan/corne.dtsi deleted file mode 100644 index ddafc789..00000000 --- a/app/dts/layouts/foostan/corne.dtsi +++ /dev/null @@ -1,121 +0,0 @@ -#include - -/ { - foostan_corne_6col_layout: foostan_corne_6col_layout { - compatible = "zmk,physical-layout"; - display-name = "6-column"; - - keys // w h x y rot rx ry - = <&key_physical_attrs 100 100 0 37 0 0 0> - , <&key_physical_attrs 100 100 100 37 0 0 0> - , <&key_physical_attrs 100 100 200 12 0 0 0> - , <&key_physical_attrs 100 100 300 0 0 0 0> - , <&key_physical_attrs 100 100 400 12 0 0 0> - , <&key_physical_attrs 100 100 500 24 0 0 0> - , <&key_physical_attrs 100 100 800 24 0 0 0> - , <&key_physical_attrs 100 100 900 12 0 0 0> - , <&key_physical_attrs 100 100 1000 0 0 0 0> - , <&key_physical_attrs 100 100 1100 12 0 0 0> - , <&key_physical_attrs 100 100 1200 37 0 0 0> - , <&key_physical_attrs 100 100 1300 37 0 0 0> - , <&key_physical_attrs 100 100 0 137 0 0 0> - , <&key_physical_attrs 100 100 100 137 0 0 0> - , <&key_physical_attrs 100 100 200 112 0 0 0> - , <&key_physical_attrs 100 100 300 100 0 0 0> - , <&key_physical_attrs 100 100 400 112 0 0 0> - , <&key_physical_attrs 100 100 500 124 0 0 0> - , <&key_physical_attrs 100 100 800 124 0 0 0> - , <&key_physical_attrs 100 100 900 112 0 0 0> - , <&key_physical_attrs 100 100 1000 100 0 0 0> - , <&key_physical_attrs 100 100 1100 112 0 0 0> - , <&key_physical_attrs 100 100 1200 137 0 0 0> - , <&key_physical_attrs 100 100 1300 137 0 0 0> - , <&key_physical_attrs 100 100 0 237 0 0 0> - , <&key_physical_attrs 100 100 100 237 0 0 0> - , <&key_physical_attrs 100 100 200 212 0 0 0> - , <&key_physical_attrs 100 100 300 200 0 0 0> - , <&key_physical_attrs 100 100 400 212 0 0 0> - , <&key_physical_attrs 100 100 500 224 0 0 0> - , <&key_physical_attrs 100 100 800 224 0 0 0> - , <&key_physical_attrs 100 100 900 212 0 0 0> - , <&key_physical_attrs 100 100 1000 200 0 0 0> - , <&key_physical_attrs 100 100 1100 212 0 0 0> - , <&key_physical_attrs 100 100 1200 237 0 0 0> - , <&key_physical_attrs 100 100 1300 237 0 0 0> - , <&key_physical_attrs 100 100 350 312 0 0 0> - , <&key_physical_attrs 100 100 450 312 1200 450 412> - , <&key_physical_attrs 100 150 548 283 2400 548 433> - , <&key_physical_attrs 100 150 752 283 (-2400) 852 433> - , <&key_physical_attrs 100 100 850 312 (-1200) 950 412> - , <&key_physical_attrs 100 100 950 312 0 0 0> - ; - }; - - foostan_corne_5col_layout: foostan_corne_5col_layout { - compatible = "zmk,physical-layout"; - display-name = "5-column"; - - keys // w h x y rot rx ry - = <&key_physical_attrs 100 100 0 37 0 0 0> - , <&key_physical_attrs 100 100 100 12 0 0 0> - , <&key_physical_attrs 100 100 200 0 0 0 0> - , <&key_physical_attrs 100 100 300 12 0 0 0> - , <&key_physical_attrs 100 100 400 24 0 0 0> - , <&key_physical_attrs 100 100 700 24 0 0 0> - , <&key_physical_attrs 100 100 800 12 0 0 0> - , <&key_physical_attrs 100 100 900 0 0 0 0> - , <&key_physical_attrs 100 100 1000 12 0 0 0> - , <&key_physical_attrs 100 100 1100 37 0 0 0> - , <&key_physical_attrs 100 100 0 137 0 0 0> - , <&key_physical_attrs 100 100 100 112 0 0 0> - , <&key_physical_attrs 100 100 200 100 0 0 0> - , <&key_physical_attrs 100 100 300 112 0 0 0> - , <&key_physical_attrs 100 100 400 124 0 0 0> - , <&key_physical_attrs 100 100 700 124 0 0 0> - , <&key_physical_attrs 100 100 800 112 0 0 0> - , <&key_physical_attrs 100 100 900 100 0 0 0> - , <&key_physical_attrs 100 100 1000 112 0 0 0> - , <&key_physical_attrs 100 100 1100 137 0 0 0> - , <&key_physical_attrs 100 100 0 237 0 0 0> - , <&key_physical_attrs 100 100 100 212 0 0 0> - , <&key_physical_attrs 100 100 200 200 0 0 0> - , <&key_physical_attrs 100 100 300 212 0 0 0> - , <&key_physical_attrs 100 100 400 224 0 0 0> - , <&key_physical_attrs 100 100 700 224 0 0 0> - , <&key_physical_attrs 100 100 800 212 0 0 0> - , <&key_physical_attrs 100 100 900 200 0 0 0> - , <&key_physical_attrs 100 100 1000 212 0 0 0> - , <&key_physical_attrs 100 100 1100 237 0 0 0> - , <&key_physical_attrs 100 100 250 312 0 0 0> - , <&key_physical_attrs 100 100 350 312 1200 350 412> - , <&key_physical_attrs 100 150 448 283 2400 448 433> - , <&key_physical_attrs 100 150 652 283 (-2400) 752 433> - , <&key_physical_attrs 100 100 750 312 (-1200) 850 412> - , <&key_physical_attrs 100 100 850 312 0 0 0> - ; - }; - - foostan_corne_position_map { - compatible = "zmk,physical-layout-position-map"; - - complete; - - twelve { - physical-layout = <&foostan_corne_6col_layout>; - positions - = < 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 >; - }; - - ten { - physical-layout = <&foostan_corne_5col_layout>; - positions - = <36 0 1 2 3 4 5 6 7 8 9 37> - , <38 10 11 12 13 14 15 16 17 18 19 39> - , <40 20 21 22 23 24 25 26 27 28 29 41> - , < 30 31 32 33 34 35 >; - }; - }; -}; \ No newline at end of file diff --git a/app/dts/layouts/foostan/corne/5column.dtsi b/app/dts/layouts/foostan/corne/5column.dtsi new file mode 100644 index 00000000..72d52a60 --- /dev/null +++ b/app/dts/layouts/foostan/corne/5column.dtsi @@ -0,0 +1,59 @@ +#include +#include + +/ { + foostan_corne_5col_layout: foostan_corne_5col_layout { + compatible = "zmk,physical-layout"; + display-name = "5 Column"; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 37 0 0 0> + , <&key_physical_attrs 100 100 100 12 0 0 0> + , <&key_physical_attrs 100 100 200 0 0 0 0> + , <&key_physical_attrs 100 100 300 12 0 0 0> + , <&key_physical_attrs 100 100 400 24 0 0 0> + , <&key_physical_attrs 100 100 700 24 0 0 0> + , <&key_physical_attrs 100 100 800 12 0 0 0> + , <&key_physical_attrs 100 100 900 0 0 0 0> + , <&key_physical_attrs 100 100 1000 12 0 0 0> + , <&key_physical_attrs 100 100 1100 37 0 0 0> + , <&key_physical_attrs 100 100 0 137 0 0 0> + , <&key_physical_attrs 100 100 100 112 0 0 0> + , <&key_physical_attrs 100 100 200 100 0 0 0> + , <&key_physical_attrs 100 100 300 112 0 0 0> + , <&key_physical_attrs 100 100 400 124 0 0 0> + , <&key_physical_attrs 100 100 700 124 0 0 0> + , <&key_physical_attrs 100 100 800 112 0 0 0> + , <&key_physical_attrs 100 100 900 100 0 0 0> + , <&key_physical_attrs 100 100 1000 112 0 0 0> + , <&key_physical_attrs 100 100 1100 137 0 0 0> + , <&key_physical_attrs 100 100 0 237 0 0 0> + , <&key_physical_attrs 100 100 100 212 0 0 0> + , <&key_physical_attrs 100 100 200 200 0 0 0> + , <&key_physical_attrs 100 100 300 212 0 0 0> + , <&key_physical_attrs 100 100 400 224 0 0 0> + , <&key_physical_attrs 100 100 700 224 0 0 0> + , <&key_physical_attrs 100 100 800 212 0 0 0> + , <&key_physical_attrs 100 100 900 200 0 0 0> + , <&key_physical_attrs 100 100 1000 212 0 0 0> + , <&key_physical_attrs 100 100 1100 237 0 0 0> + , <&key_physical_attrs 100 100 250 312 0 0 0> + , <&key_physical_attrs 100 100 350 312 1200 350 412> + , <&key_physical_attrs 100 150 448 283 2400 448 433> + , <&key_physical_attrs 100 150 652 283 (-2400) 752 433> + , <&key_physical_attrs 100 100 750 312 (-1200) 850 412> + , <&key_physical_attrs 100 100 850 312 0 0 0> + ; + }; +}; + +&layouts_foostan_corne_position_map { + foostan_corne_5col_posmap: five { + physical-layout = <&foostan_corne_5col_layout>; + positions + = <36 0 1 2 3 4 5 6 7 8 9 37> + , <38 10 11 12 13 14 15 16 17 18 19 39> + , <40 20 21 22 23 24 25 26 27 28 29 41> + , < 30 31 32 33 34 35 >; + }; +}; diff --git a/app/dts/layouts/foostan/corne/6column.dtsi b/app/dts/layouts/foostan/corne/6column.dtsi new file mode 100644 index 00000000..4747a1e3 --- /dev/null +++ b/app/dts/layouts/foostan/corne/6column.dtsi @@ -0,0 +1,65 @@ +#include +#include + +/ { + foostan_corne_6col_layout: foostan_corne_6col_layout { + compatible = "zmk,physical-layout"; + display-name = "6 Column"; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 37 0 0 0> + , <&key_physical_attrs 100 100 100 37 0 0 0> + , <&key_physical_attrs 100 100 200 12 0 0 0> + , <&key_physical_attrs 100 100 300 0 0 0 0> + , <&key_physical_attrs 100 100 400 12 0 0 0> + , <&key_physical_attrs 100 100 500 24 0 0 0> + , <&key_physical_attrs 100 100 800 24 0 0 0> + , <&key_physical_attrs 100 100 900 12 0 0 0> + , <&key_physical_attrs 100 100 1000 0 0 0 0> + , <&key_physical_attrs 100 100 1100 12 0 0 0> + , <&key_physical_attrs 100 100 1200 37 0 0 0> + , <&key_physical_attrs 100 100 1300 37 0 0 0> + , <&key_physical_attrs 100 100 0 137 0 0 0> + , <&key_physical_attrs 100 100 100 137 0 0 0> + , <&key_physical_attrs 100 100 200 112 0 0 0> + , <&key_physical_attrs 100 100 300 100 0 0 0> + , <&key_physical_attrs 100 100 400 112 0 0 0> + , <&key_physical_attrs 100 100 500 124 0 0 0> + , <&key_physical_attrs 100 100 800 124 0 0 0> + , <&key_physical_attrs 100 100 900 112 0 0 0> + , <&key_physical_attrs 100 100 1000 100 0 0 0> + , <&key_physical_attrs 100 100 1100 112 0 0 0> + , <&key_physical_attrs 100 100 1200 137 0 0 0> + , <&key_physical_attrs 100 100 1300 137 0 0 0> + , <&key_physical_attrs 100 100 0 237 0 0 0> + , <&key_physical_attrs 100 100 100 237 0 0 0> + , <&key_physical_attrs 100 100 200 212 0 0 0> + , <&key_physical_attrs 100 100 300 200 0 0 0> + , <&key_physical_attrs 100 100 400 212 0 0 0> + , <&key_physical_attrs 100 100 500 224 0 0 0> + , <&key_physical_attrs 100 100 800 224 0 0 0> + , <&key_physical_attrs 100 100 900 212 0 0 0> + , <&key_physical_attrs 100 100 1000 200 0 0 0> + , <&key_physical_attrs 100 100 1100 212 0 0 0> + , <&key_physical_attrs 100 100 1200 237 0 0 0> + , <&key_physical_attrs 100 100 1300 237 0 0 0> + , <&key_physical_attrs 100 100 350 312 0 0 0> + , <&key_physical_attrs 100 100 450 312 1200 450 412> + , <&key_physical_attrs 100 150 548 283 2400 548 433> + , <&key_physical_attrs 100 150 752 283 (-2400) 852 433> + , <&key_physical_attrs 100 100 850 312 (-1200) 950 412> + , <&key_physical_attrs 100 100 950 312 0 0 0> + ; + }; +}; + +&layouts_foostan_corne_position_map { + foostan_corne_6col_posmap: six { + physical-layout = <&foostan_corne_6col_layout>; + positions + = < 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 >; + }; +}; diff --git a/app/dts/layouts/foostan/corne/position_map.dtsi b/app/dts/layouts/foostan/corne/position_map.dtsi new file mode 100644 index 00000000..7cf87d72 --- /dev/null +++ b/app/dts/layouts/foostan/corne/position_map.dtsi @@ -0,0 +1,7 @@ +/ { + layouts_foostan_corne_position_map: layouts_foostan_corne_position_map { + compatible = "zmk,physical-layout-position-map"; + + complete; + }; +}; diff --git a/app/dts/layouts/gtips/reviung41.dtsi b/app/dts/layouts/gtips/reviung41.dtsi new file mode 100644 index 00000000..08f45b3c --- /dev/null +++ b/app/dts/layouts/gtips/reviung41.dtsi @@ -0,0 +1,55 @@ +#include + +/ { + gtips_reviung41_layout: gtips_reviung41_layout { + compatible = "zmk,physical-layout"; + display-name = "reviung41"; + + keys + = <&key_physical_attrs 100 100 000 53 700 400 338> + , <&key_physical_attrs 100 100 100 53 700 400 338> + , <&key_physical_attrs 100 100 200 28 700 400 338> + , <&key_physical_attrs 100 100 300 03 700 400 338> + , <&key_physical_attrs 100 100 400 28 700 400 338> + , <&key_physical_attrs 100 100 500 38 700 400 338> + , <&key_physical_attrs 100 100 700 38 (-700) 900 338> + , <&key_physical_attrs 100 100 800 28 (-700) 900 338> + , <&key_physical_attrs 100 100 900 03 (-700) 900 338> + , <&key_physical_attrs 100 100 1000 28 (-700) 900 338> + , <&key_physical_attrs 100 100 1100 53 (-700) 900 338> + , <&key_physical_attrs 100 100 1200 53 (-700) 900 338> + + , <&key_physical_attrs 100 100 000 153 700 400 338> + , <&key_physical_attrs 100 100 100 153 700 400 338> + , <&key_physical_attrs 100 100 200 128 700 400 338> + , <&key_physical_attrs 100 100 300 103 700 400 338> + , <&key_physical_attrs 100 100 400 128 700 400 338> + , <&key_physical_attrs 100 100 500 138 700 400 338> + , <&key_physical_attrs 100 100 700 138 (-700) 900 338> + , <&key_physical_attrs 100 100 800 128 (-700) 900 338> + , <&key_physical_attrs 100 100 900 103 (-700) 900 338> + , <&key_physical_attrs 100 100 1000 128 (-700) 900 338> + , <&key_physical_attrs 100 100 1100 153 (-700) 900 338> + , <&key_physical_attrs 100 100 1200 153 (-700) 900 338> + + , <&key_physical_attrs 100 100 000 253 700 400 338> + , <&key_physical_attrs 100 100 100 253 700 400 338> + , <&key_physical_attrs 100 100 200 228 700 400 338> + , <&key_physical_attrs 100 100 300 203 700 400 338> + , <&key_physical_attrs 100 100 400 228 700 400 338> + , <&key_physical_attrs 100 100 500 238 700 400 338> + , <&key_physical_attrs 100 100 700 238 (-700) 900 338> + , <&key_physical_attrs 100 100 800 228 (-700) 900 338> + , <&key_physical_attrs 100 100 900 203 (-700) 900 338> + , <&key_physical_attrs 100 100 1000 228 (-700) 900 338> + , <&key_physical_attrs 100 100 1100 253 (-700) 900 338> + , <&key_physical_attrs 100 100 1200 253 (-700) 900 338> + + , <&key_physical_attrs 100 100 339 338 0 0 0> + , <&key_physical_attrs 100 100 450 365 700 500 415> + , <&key_physical_attrs 200 100 555 394 0 0 0> + , <&key_physical_attrs 100 100 760 365 (-700) 710 415> + , <&key_physical_attrs 100 100 871 338 0 0 0> + ; + }; +}; \ No newline at end of file diff --git a/app/dts/layouts/kata0510/lily58.dtsi b/app/dts/layouts/kata0510/lily58.dtsi new file mode 100644 index 00000000..7cb1f25e --- /dev/null +++ b/app/dts/layouts/kata0510/lily58.dtsi @@ -0,0 +1,69 @@ +#include + +/ { + kata0510_lily58_layout: kata0510_lily58_layout { + compatible = "zmk,physical-layout"; + display-name = "Default"; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 50 0 0 0> + , <&key_physical_attrs 100 100 100 37 0 0 0> + , <&key_physical_attrs 100 100 200 12 0 0 0> + , <&key_physical_attrs 100 100 300 0 0 0 0> + , <&key_physical_attrs 100 100 400 12 0 0 0> + , <&key_physical_attrs 100 100 500 25 0 0 0> + , <&key_physical_attrs 100 100 1050 25 0 0 0> + , <&key_physical_attrs 100 100 1150 12 0 0 0> + , <&key_physical_attrs 100 100 1250 0 0 0 0> + , <&key_physical_attrs 100 100 1350 12 0 0 0> + , <&key_physical_attrs 100 100 1450 37 0 0 0> + , <&key_physical_attrs 100 100 1550 50 0 0 0> + , <&key_physical_attrs 100 100 0 150 0 0 0> + , <&key_physical_attrs 100 100 100 137 0 0 0> + , <&key_physical_attrs 100 100 200 112 0 0 0> + , <&key_physical_attrs 100 100 300 100 0 0 0> + , <&key_physical_attrs 100 100 400 112 0 0 0> + , <&key_physical_attrs 100 100 500 125 0 0 0> + , <&key_physical_attrs 100 100 1050 125 0 0 0> + , <&key_physical_attrs 100 100 1150 112 0 0 0> + , <&key_physical_attrs 100 100 1250 100 0 0 0> + , <&key_physical_attrs 100 100 1350 112 0 0 0> + , <&key_physical_attrs 100 100 1450 137 0 0 0> + , <&key_physical_attrs 100 100 1550 150 0 0 0> + , <&key_physical_attrs 100 100 0 250 0 0 0> + , <&key_physical_attrs 100 100 100 237 0 0 0> + , <&key_physical_attrs 100 100 200 212 0 0 0> + , <&key_physical_attrs 100 100 300 200 0 0 0> + , <&key_physical_attrs 100 100 400 212 0 0 0> + , <&key_physical_attrs 100 100 500 225 0 0 0> + , <&key_physical_attrs 100 100 1050 225 0 0 0> + , <&key_physical_attrs 100 100 1150 212 0 0 0> + , <&key_physical_attrs 100 100 1250 200 0 0 0> + , <&key_physical_attrs 100 100 1350 212 0 0 0> + , <&key_physical_attrs 100 100 1450 237 0 0 0> + , <&key_physical_attrs 100 100 1550 250 0 0 0> + , <&key_physical_attrs 100 100 0 350 0 0 0> + , <&key_physical_attrs 100 100 100 337 0 0 0> + , <&key_physical_attrs 100 100 200 312 0 0 0> + , <&key_physical_attrs 100 100 300 300 0 0 0> + , <&key_physical_attrs 100 100 400 312 0 0 0> + , <&key_physical_attrs 100 100 500 325 0 0 0> + , <&key_physical_attrs 100 100 600 275 0 0 0> + , <&key_physical_attrs 100 100 950 275 0 0 0> + , <&key_physical_attrs 100 100 1050 325 0 0 0> + , <&key_physical_attrs 100 100 1150 312 0 0 0> + , <&key_physical_attrs 100 100 1250 300 0 0 0> + , <&key_physical_attrs 100 100 1350 312 0 0 0> + , <&key_physical_attrs 100 100 1450 337 0 0 0> + , <&key_physical_attrs 100 100 1550 350 0 0 0> + , <&key_physical_attrs 100 100 250 412 0 0 0> + , <&key_physical_attrs 100 100 350 415 0 0 0> + , <&key_physical_attrs 100 100 450 425 0 0 0> + , <&key_physical_attrs 100 150 575 400 3000 625 475> + , <&key_physical_attrs 100 150 975 400 (-3000) 1025 475> + , <&key_physical_attrs 100 100 1100 425 0 0 0> + , <&key_physical_attrs 100 100 1200 415 0 0 0> + , <&key_physical_attrs 100 100 1300 415 0 0 0> + ; + }; +}; diff --git a/app/dts/layouts/kgoh/jian/5column.dtsi b/app/dts/layouts/kgoh/jian/5column.dtsi new file mode 100644 index 00000000..c54d07fd --- /dev/null +++ b/app/dts/layouts/kgoh/jian/5column.dtsi @@ -0,0 +1,59 @@ +#include +#include + +/ { + kgoh_jian_5col_layout: kgoh_jian_5col_layout { + compatible = "zmk,physical-layout"; + display-name = "5 Column"; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 62 0 0 0> + , <&key_physical_attrs 100 100 100 25 0 0 0> + , <&key_physical_attrs 100 100 200 0 0 0 0> + , <&key_physical_attrs 100 100 300 25 0 0 0> + , <&key_physical_attrs 100 100 400 37 0 0 0> + , <&key_physical_attrs 100 100 800 37 0 0 0> + , <&key_physical_attrs 100 100 900 25 0 0 0> + , <&key_physical_attrs 100 100 1000 0 0 0 0> + , <&key_physical_attrs 100 100 1100 25 0 0 0> + , <&key_physical_attrs 100 100 1200 62 0 0 0> + , <&key_physical_attrs 100 100 0 162 0 0 0> + , <&key_physical_attrs 100 100 100 125 0 0 0> + , <&key_physical_attrs 100 100 200 100 0 0 0> + , <&key_physical_attrs 100 100 300 125 0 0 0> + , <&key_physical_attrs 100 100 400 137 0 0 0> + , <&key_physical_attrs 100 100 800 137 0 0 0> + , <&key_physical_attrs 100 100 900 125 0 0 0> + , <&key_physical_attrs 100 100 1000 100 0 0 0> + , <&key_physical_attrs 100 100 1100 125 0 0 0> + , <&key_physical_attrs 100 100 1200 162 0 0 0> + , <&key_physical_attrs 100 100 0 262 0 0 0> + , <&key_physical_attrs 100 100 100 225 0 0 0> + , <&key_physical_attrs 100 100 200 200 0 0 0> + , <&key_physical_attrs 100 100 300 225 0 0 0> + , <&key_physical_attrs 100 100 400 237 0 0 0> + , <&key_physical_attrs 100 100 800 237 0 0 0> + , <&key_physical_attrs 100 100 900 225 0 0 0> + , <&key_physical_attrs 100 100 1000 200 0 0 0> + , <&key_physical_attrs 100 100 1100 225 0 0 0> + , <&key_physical_attrs 100 100 1200 262 0 0 0> + , <&key_physical_attrs 100 100 300 325 0 0 0> + , <&key_physical_attrs 100 100 400 337 0 0 0> + , <&key_physical_attrs 100 100 500 350 0 0 0> + , <&key_physical_attrs 100 100 700 350 0 0 0> + , <&key_physical_attrs 100 100 800 337 0 0 0> + , <&key_physical_attrs 100 100 900 325 0 0 0> + ; + }; +}; + +&layouts_kgoh_jian_position_map { + kgoh_jian_5col_posmap: five { + physical-layout = <&kgoh_jian_5col_layout>; + positions + = <36 37 0 1 2 3 4 5 6 7 8 9 38 39> + , < 40 10 11 12 13 14 15 16 17 18 19 41 > + , < 42 20 21 22 23 24 25 26 27 28 29 43 > + , < 30 31 32 33 34 35 >; + }; +}; diff --git a/app/dts/layouts/kgoh/jian/6column.dtsi b/app/dts/layouts/kgoh/jian/6column.dtsi new file mode 100644 index 00000000..ec648846 --- /dev/null +++ b/app/dts/layouts/kgoh/jian/6column.dtsi @@ -0,0 +1,65 @@ +#include +#include + +/ { + kgoh_jian_6col_layout: kgoh_jian_6col_layout { + compatible = "zmk,physical-layout"; + display-name = "6 Column"; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 75 0 0 0> + , <&key_physical_attrs 100 100 100 62 0 0 0> + , <&key_physical_attrs 100 100 200 25 0 0 0> + , <&key_physical_attrs 100 100 300 0 0 0 0> + , <&key_physical_attrs 100 100 400 25 0 0 0> + , <&key_physical_attrs 100 100 500 37 0 0 0> + , <&key_physical_attrs 100 100 900 37 0 0 0> + , <&key_physical_attrs 100 100 1000 25 0 0 0> + , <&key_physical_attrs 100 100 1100 0 0 0 0> + , <&key_physical_attrs 100 100 1200 25 0 0 0> + , <&key_physical_attrs 100 100 1300 62 0 0 0> + , <&key_physical_attrs 100 100 1400 75 0 0 0> + , <&key_physical_attrs 100 100 0 175 0 0 0> + , <&key_physical_attrs 100 100 100 162 0 0 0> + , <&key_physical_attrs 100 100 200 125 0 0 0> + , <&key_physical_attrs 100 100 300 100 0 0 0> + , <&key_physical_attrs 100 100 400 125 0 0 0> + , <&key_physical_attrs 100 100 500 137 0 0 0> + , <&key_physical_attrs 100 100 900 137 0 0 0> + , <&key_physical_attrs 100 100 1000 125 0 0 0> + , <&key_physical_attrs 100 100 1100 100 0 0 0> + , <&key_physical_attrs 100 100 1200 125 0 0 0> + , <&key_physical_attrs 100 100 1300 162 0 0 0> + , <&key_physical_attrs 100 100 1400 175 0 0 0> + , <&key_physical_attrs 100 100 0 275 0 0 0> + , <&key_physical_attrs 100 100 100 262 0 0 0> + , <&key_physical_attrs 100 100 200 225 0 0 0> + , <&key_physical_attrs 100 100 300 200 0 0 0> + , <&key_physical_attrs 100 100 400 225 0 0 0> + , <&key_physical_attrs 100 100 500 237 0 0 0> + , <&key_physical_attrs 100 100 900 237 0 0 0> + , <&key_physical_attrs 100 100 1000 225 0 0 0> + , <&key_physical_attrs 100 100 1100 200 0 0 0> + , <&key_physical_attrs 100 100 1200 225 0 0 0> + , <&key_physical_attrs 100 100 1300 262 0 0 0> + , <&key_physical_attrs 100 100 1400 275 0 0 0> + , <&key_physical_attrs 100 100 400 325 0 0 0> + , <&key_physical_attrs 100 100 500 337 0 0 0> + , <&key_physical_attrs 100 100 600 350 0 0 0> + , <&key_physical_attrs 100 100 800 350 0 0 0> + , <&key_physical_attrs 100 100 900 337 0 0 0> + , <&key_physical_attrs 100 100 1000 325 0 0 0> + ; + }; +}; + +&layouts_kgoh_jian_position_map { + kgoh_jian_6col_posmap: six { + physical-layout = <&kgoh_jian_6col_layout>; + positions + = <42 0 1 2 3 4 5 6 7 8 9 10 11 43> + , < 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 >; + }; +}; diff --git a/app/dts/layouts/kgoh/jian/full.dtsi b/app/dts/layouts/kgoh/jian/full.dtsi new file mode 100644 index 00000000..a16903d3 --- /dev/null +++ b/app/dts/layouts/kgoh/jian/full.dtsi @@ -0,0 +1,67 @@ +#include +#include + +/ { + kgoh_jian_full_layout: kgoh_jian_full_layout { + compatible = "zmk,physical-layout"; + display-name = "Full (with pinky)"; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 150 0 0 0> + , <&key_physical_attrs 100 100 100 75 0 0 0> + , <&key_physical_attrs 100 100 200 62 0 0 0> + , <&key_physical_attrs 100 100 300 25 0 0 0> + , <&key_physical_attrs 100 100 400 0 0 0 0> + , <&key_physical_attrs 100 100 500 25 0 0 0> + , <&key_physical_attrs 100 100 600 37 0 0 0> + , <&key_physical_attrs 100 100 1000 37 0 0 0> + , <&key_physical_attrs 100 100 1100 25 0 0 0> + , <&key_physical_attrs 100 100 1200 0 0 0 0> + , <&key_physical_attrs 100 100 1300 25 0 0 0> + , <&key_physical_attrs 100 100 1400 62 0 0 0> + , <&key_physical_attrs 100 100 1500 75 0 0 0> + , <&key_physical_attrs 100 100 1600 150 0 0 0> + , <&key_physical_attrs 100 100 100 175 0 0 0> + , <&key_physical_attrs 100 100 200 162 0 0 0> + , <&key_physical_attrs 100 100 300 125 0 0 0> + , <&key_physical_attrs 100 100 400 100 0 0 0> + , <&key_physical_attrs 100 100 500 125 0 0 0> + , <&key_physical_attrs 100 100 600 137 0 0 0> + , <&key_physical_attrs 100 100 1000 137 0 0 0> + , <&key_physical_attrs 100 100 1100 125 0 0 0> + , <&key_physical_attrs 100 100 1200 100 0 0 0> + , <&key_physical_attrs 100 100 1300 125 0 0 0> + , <&key_physical_attrs 100 100 1400 162 0 0 0> + , <&key_physical_attrs 100 100 1500 175 0 0 0> + , <&key_physical_attrs 100 100 100 275 0 0 0> + , <&key_physical_attrs 100 100 200 262 0 0 0> + , <&key_physical_attrs 100 100 300 225 0 0 0> + , <&key_physical_attrs 100 100 400 200 0 0 0> + , <&key_physical_attrs 100 100 500 225 0 0 0> + , <&key_physical_attrs 100 100 600 237 0 0 0> + , <&key_physical_attrs 100 100 1000 237 0 0 0> + , <&key_physical_attrs 100 100 1100 225 0 0 0> + , <&key_physical_attrs 100 100 1200 200 0 0 0> + , <&key_physical_attrs 100 100 1300 225 0 0 0> + , <&key_physical_attrs 100 100 1400 262 0 0 0> + , <&key_physical_attrs 100 100 1500 275 0 0 0> + , <&key_physical_attrs 100 100 500 325 0 0 0> + , <&key_physical_attrs 100 100 600 337 0 0 0> + , <&key_physical_attrs 100 100 700 350 0 0 0> + , <&key_physical_attrs 100 100 900 350 0 0 0> + , <&key_physical_attrs 100 100 1000 337 0 0 0> + , <&key_physical_attrs 100 100 1100 325 0 0 0> + ; + }; +}; + +&layouts_kgoh_jian_position_map { + kgoh_jian_full_posmap: full { + physical-layout = <&kgoh_jian_full_layout>; + positions + = < 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 >; + }; +}; diff --git a/app/dts/layouts/kgoh/jian/position_map.dtsi b/app/dts/layouts/kgoh/jian/position_map.dtsi new file mode 100644 index 00000000..126e0772 --- /dev/null +++ b/app/dts/layouts/kgoh/jian/position_map.dtsi @@ -0,0 +1,7 @@ +/ { + layouts_kgoh_jian_position_map: layouts_kgoh_jian_position_map { + compatible = "zmk,physical-layout-position-map"; + + complete; + }; +}; diff --git a/app/include/drivers/behavior.h b/app/include/drivers/behavior.h index 7c99f04e..56c26a01 100644 --- a/app/include/drivers/behavior.h +++ b/app/include/drivers/behavior.h @@ -122,7 +122,9 @@ struct zmk_behavior_local_id_map { #if IS_ENABLED(CONFIG_ZMK_BEHAVIOR_METADATA) #define ZMK_BEHAVIOR_METADATA_INITIALIZER(node_id) \ - { .display_name = DT_PROP_OR(node_id, display_name, DEVICE_DT_NAME(node_id)), } + { \ + .display_name = DT_PROP_OR(node_id, display_name, DEVICE_DT_NAME(node_id)), \ + } #else @@ -132,10 +134,15 @@ struct zmk_behavior_local_id_map { #endif // IS_ENABLED(CONFIG_ZMK_BEHAVIOR_METADATA) #define ZMK_BEHAVIOR_REF_INITIALIZER(node_id, _dev) \ - { .device = _dev, .metadata = ZMK_BEHAVIOR_METADATA_INITIALIZER(node_id), } + { \ + .device = _dev, \ + .metadata = ZMK_BEHAVIOR_METADATA_INITIALIZER(node_id), \ + } #define ZMK_BEHAVIOR_LOCAL_ID_MAP_INITIALIZER(node_id, _dev) \ - { .device = _dev, } + { \ + .device = _dev, \ + } #define ZMK_BEHAVIOR_REF_DEFINE(name, node_id, _dev) \ static const STRUCT_SECTION_ITERABLE(zmk_behavior_ref, name) = \ diff --git a/app/include/drivers/input_processor.h b/app/include/drivers/input_processor.h new file mode 100644 index 00000000..fac4459b --- /dev/null +++ b/app/include/drivers/input_processor.h @@ -0,0 +1,71 @@ +/* + * Copyright (c) 2024 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#pragma once + +#include +#include +#include +#include +#include +#include + +#define ZMK_INPUT_PROC_CONTINUE 0 +#define ZMK_INPUT_PROC_STOP 1 + +struct zmk_input_processor_entry { + const struct device *dev; + uint32_t param1; + uint32_t param2; + bool track_remainders; +}; + +#define ZMK_INPUT_PROCESSOR_ENTRY_AT_IDX(idx, n) \ + { \ + .dev = DEVICE_DT_GET(DT_PHANDLE_BY_IDX(n, input_processors, idx)), \ + .param1 = COND_CODE_0(DT_PHA_HAS_CELL_AT_IDX(n, input_processors, idx, param1), (0), \ + (DT_PHA_BY_IDX(n, input_processors, idx, param1))), \ + .param2 = COND_CODE_0(DT_PHA_HAS_CELL_AT_IDX(n, input_processors, idx, param2), (0), \ + (DT_PHA_BY_IDX(n, input_processors, idx, param2))), \ + .track_remainders = \ + COND_CODE_1(DT_PROP(DT_PHANDLE_BY_IDX(n, input_processors, idx), track_remainders), \ + (true), (false)), \ + } + +struct zmk_input_processor_state { + uint8_t input_device_index; + int16_t *remainder; +}; + +// TODO: Need the ability to store remainders? Some data passed in? +typedef int (*zmk_input_processor_handle_event_callback_t)(const struct device *dev, + struct input_event *event, + uint32_t param1, uint32_t param2, + struct zmk_input_processor_state *state); + +__subsystem struct zmk_input_processor_driver_api { + zmk_input_processor_handle_event_callback_t handle_event; +}; + +__syscall int zmk_input_processor_handle_event(const struct device *dev, struct input_event *event, + uint32_t param1, uint32_t param2, + struct zmk_input_processor_state *state); + +static inline int z_impl_zmk_input_processor_handle_event(const struct device *dev, + struct input_event *event, + uint32_t param1, uint32_t param2, + struct zmk_input_processor_state *state) { + const struct zmk_input_processor_driver_api *api = + (const struct zmk_input_processor_driver_api *)dev->api; + + if (api->handle_event == NULL) { + return -ENOTSUP; + } + + return api->handle_event(dev, event, param1, param2, state); +} + +#include diff --git a/app/include/dt-bindings/input.h b/app/include/dt-bindings/input.h new file mode 100644 index 00000000..2437b504 --- /dev/null +++ b/app/include/dt-bindings/input.h @@ -0,0 +1,12 @@ +/* + * Copyright (c) 2024 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#pragma once + +#define ZMK_INPUT_EXPLICIT_CODE(type, code) ((type << 16) & code) + +#define ZMK_INPUT_EXPLICIT_CODE_TYPE(val) ((val >> 16) & 0xFF) +#define ZMK_INPUT_EXPLICIT_CODE_CODE(val) (val & 0xFFFF) \ No newline at end of file diff --git a/app/include/dt-bindings/zmk/hid_indicators.h b/app/include/dt-bindings/zmk/hid_indicators.h new file mode 100644 index 00000000..fcd27700 --- /dev/null +++ b/app/include/dt-bindings/zmk/hid_indicators.h @@ -0,0 +1,18 @@ +/* + * Copyright (c) 2026 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#pragma once + +#include + +// hid.h defines HID_USAGE_LED_NUM_LOCK as the minimum value, so that is bit +// zero in the report, and all other indicators are relative to that. + +#define HID_INDICATOR_NUM_LOCK (1 << (HID_USAGE_LED_NUM_LOCK - HID_USAGE_LED_NUM_LOCK)) +#define HID_INDICATOR_CAPS_LOCK (1 << (HID_USAGE_LED_CAPS_LOCK - HID_USAGE_LED_NUM_LOCK)) +#define HID_INDICATOR_SCROLL_LOCK (1 << (HID_USAGE_LED_SCROLL_LOCK - HID_USAGE_LED_NUM_LOCK)) +#define HID_INDICATOR_COMPOSE (1 << (HID_USAGE_LED_COMPOSE - HID_USAGE_LED_NUM_LOCK)) +#define HID_INDICATOR_KANA (1 << (HID_USAGE_LED_KANA - HID_USAGE_LED_NUM_LOCK)) diff --git a/app/include/dt-bindings/zmk/input_transform.h b/app/include/dt-bindings/zmk/input_transform.h new file mode 100644 index 00000000..f75c6dab --- /dev/null +++ b/app/include/dt-bindings/zmk/input_transform.h @@ -0,0 +1,11 @@ +/* + * Copyright (c) 2024 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include + +#define INPUT_TRANSFORM_XY_SWAP BIT(0) +#define INPUT_TRANSFORM_X_INVERT BIT(1) +#define INPUT_TRANSFORM_Y_INVERT BIT(2) \ No newline at end of file diff --git a/app/include/dt-bindings/zmk/mouse.h b/app/include/dt-bindings/zmk/mouse.h index 582518af..ce41e7f7 100644 --- a/app/include/dt-bindings/zmk/mouse.h +++ b/app/include/dt-bindings/zmk/mouse.h @@ -1,24 +1,9 @@ + /* - * Copyright (c) 2020 The ZMK Contributors + * Copyright (c) 2024 The ZMK Contributors * * SPDX-License-Identifier: MIT */ #pragma once -#include - -/* Mouse press behavior */ -/* Left click */ -#define MB1 BIT(0) -#define LCLK (MB1) - -/* Right click */ -#define MB2 BIT(1) -#define RCLK (MB2) - -/* Middle click */ -#define MB3 BIT(2) -#define MCLK (MB3) - -#define MB4 BIT(3) -#define MB5 BIT(4) +#include "pointing.h" \ No newline at end of file diff --git a/app/include/dt-bindings/zmk/outputs.h b/app/include/dt-bindings/zmk/outputs.h index f24380f7..1bb8d740 100644 --- a/app/include/dt-bindings/zmk/outputs.h +++ b/app/include/dt-bindings/zmk/outputs.h @@ -6,4 +6,5 @@ #define OUT_TOG 0 #define OUT_USB 1 -#define OUT_BLE 2 \ No newline at end of file +#define OUT_BLE 2 +#define OUT_NONE 3 \ No newline at end of file diff --git a/app/include/dt-bindings/zmk/pointing.h b/app/include/dt-bindings/zmk/pointing.h new file mode 100644 index 00000000..48246504 --- /dev/null +++ b/app/include/dt-bindings/zmk/pointing.h @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2023 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ +#pragma once + +#include + +/* Mouse press behavior */ +/* Left click */ +#define MB1 BIT(0) +#define LCLK (MB1) + +/* Right click */ +#define MB2 BIT(1) +#define RCLK (MB2) + +/* Middle click */ +#define MB3 BIT(2) +#define MCLK (MB3) + +#define MB4 BIT(3) +#define MB5 BIT(4) + +#ifndef ZMK_POINTING_DEFAULT_MOVE_VAL +#define ZMK_POINTING_DEFAULT_MOVE_VAL 600 +#endif + +#ifndef ZMK_POINTING_DEFAULT_SCRL_VAL +#define ZMK_POINTING_DEFAULT_SCRL_VAL 10 +#endif + +/* Mouse move behavior */ +#define MOVE_Y(vert) ((vert) & 0xFFFF) +#define MOVE_Y_DECODE(encoded) (int16_t)((encoded) & 0x0000FFFF) +#define MOVE_X(hor) (((hor) & 0xFFFF) << 16) +#define MOVE_X_DECODE(encoded) (int16_t)(((encoded) & 0xFFFF0000) >> 16) + +#define MOVE(hor, vert) (MOVE_X(hor) + MOVE_Y(vert)) + +#define MOVE_UP MOVE_Y(-ZMK_POINTING_DEFAULT_MOVE_VAL) +#define MOVE_DOWN MOVE_Y(ZMK_POINTING_DEFAULT_MOVE_VAL) +#define MOVE_LEFT MOVE_X(-ZMK_POINTING_DEFAULT_MOVE_VAL) +#define MOVE_RIGHT MOVE_X(ZMK_POINTING_DEFAULT_MOVE_VAL) + +#define SCRL_UP MOVE_Y(ZMK_POINTING_DEFAULT_SCRL_VAL) +#define SCRL_DOWN MOVE_Y(-ZMK_POINTING_DEFAULT_SCRL_VAL) +#define SCRL_LEFT MOVE_X(-ZMK_POINTING_DEFAULT_SCRL_VAL) +#define SCRL_RIGHT MOVE_X(ZMK_POINTING_DEFAULT_SCRL_VAL) diff --git a/app/include/linker/zmk-split-transport-central.ld b/app/include/linker/zmk-split-transport-central.ld new file mode 100644 index 00000000..50456875 --- /dev/null +++ b/app/include/linker/zmk-split-transport-central.ld @@ -0,0 +1,9 @@ +/* + * Copyright (c) 2025 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include + +ITERABLE_SECTION_ROM(zmk_split_transport_central, 4) diff --git a/app/include/linker/zmk-split-transport-peripheral.ld b/app/include/linker/zmk-split-transport-peripheral.ld new file mode 100644 index 00000000..e49e1156 --- /dev/null +++ b/app/include/linker/zmk-split-transport-peripheral.ld @@ -0,0 +1,9 @@ +/* + * Copyright (c) 2025 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include + +ITERABLE_SECTION_ROM(zmk_split_transport_peripheral, 4) diff --git a/app/include/zmk/behavior.h b/app/include/zmk/behavior.h index d45bbfff..5028d320 100644 --- a/app/include/zmk/behavior.h +++ b/app/include/zmk/behavior.h @@ -26,6 +26,9 @@ struct zmk_behavior_binding_event { int layer; uint32_t position; int64_t timestamp; +#if IS_ENABLED(CONFIG_ZMK_SPLIT) + uint8_t source; +#endif }; /** @@ -42,6 +45,19 @@ struct zmk_behavior_binding_event { */ const struct device *zmk_behavior_get_binding(const char *name); +/** + * @brief Invoke a behavior given its binding and invoking event details. + * + * @param src_binding Behavior binding to invoke. + * @param event The binding event struct containing details of the event that invoked it. + * @param pressed Whether the binding is pressed or released. + * + * @retval 0 If successful. + * @retval Negative errno code if failure. + */ +int zmk_behavior_invoke_binding(const struct zmk_behavior_binding *src_binding, + struct zmk_behavior_binding_event event, bool pressed); + /** * @brief Get a local ID for a behavior from its @p name field. * diff --git a/app/include/zmk/behavior_queue.h b/app/include/zmk/behavior_queue.h index 307482e7..b942bd28 100644 --- a/app/include/zmk/behavior_queue.h +++ b/app/include/zmk/behavior_queue.h @@ -10,5 +10,5 @@ #include #include -int zmk_behavior_queue_add(uint32_t position, const struct zmk_behavior_binding behavior, - bool press, uint32_t wait); +int zmk_behavior_queue_add(const struct zmk_behavior_binding_event *event, + const struct zmk_behavior_binding behavior, bool press, uint32_t wait); diff --git a/app/include/zmk/ble.h b/app/include/zmk/ble.h index cc55a6ce..92b2107d 100644 --- a/app/include/zmk/ble.h +++ b/app/include/zmk/ble.h @@ -10,8 +10,7 @@ #include #define ZMK_BLE_IS_CENTRAL \ - (IS_ENABLED(CONFIG_ZMK_SPLIT) && IS_ENABLED(CONFIG_ZMK_BLE) && \ - IS_ENABLED(CONFIG_ZMK_SPLIT_ROLE_CENTRAL)) + (IS_ENABLED(CONFIG_ZMK_SPLIT_BLE) && IS_ENABLED(CONFIG_ZMK_SPLIT_ROLE_CENTRAL)) #if ZMK_BLE_IS_CENTRAL #define ZMK_BLE_PROFILE_COUNT (CONFIG_BT_MAX_PAIRED - CONFIG_ZMK_SPLIT_BLE_CENTRAL_PERIPHERALS) @@ -29,16 +28,22 @@ int zmk_ble_prof_disconnect(uint8_t index); int zmk_ble_active_profile_index(void); int zmk_ble_profile_index(const bt_addr_le_t *addr); +bt_addr_le_t *zmk_ble_profile_address(uint8_t index); bt_addr_le_t *zmk_ble_active_profile_addr(void); struct bt_conn *zmk_ble_active_profile_conn(void); +bool zmk_ble_profile_is_connected(uint8_t index); +bool zmk_ble_profile_is_open(uint8_t index); + bool zmk_ble_active_profile_is_open(void); bool zmk_ble_active_profile_is_connected(void); char *zmk_ble_active_profile_name(void); int zmk_ble_unpair_all(void); +int zmk_ble_set_device_name(char *name); + #if IS_ENABLED(CONFIG_ZMK_SPLIT_ROLE_CENTRAL) int zmk_ble_put_peripheral_addr(const bt_addr_le_t *addr); #endif /* IS_ENABLED(CONFIG_ZMK_SPLIT_ROLE_CENTRAL) */ diff --git a/app/include/zmk/combos.h b/app/include/zmk/combos.h new file mode 100644 index 00000000..644a2b53 --- /dev/null +++ b/app/include/zmk/combos.h @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#pragma once + +#include + +#define ZMK_COMBOS_UTIL_ONE(n) +1 + +#define ZMK_COMBOS_LEN \ + COND_CODE_1(DT_HAS_COMPAT_STATUS_OKAY(zmk_combos), \ + (0 DT_FOREACH_CHILD_STATUS_OKAY(DT_INST(0, zmk_combos), ZMK_COMBOS_UTIL_ONE)), \ + (0)) diff --git a/app/include/zmk/endpoints.h b/app/include/zmk/endpoints.h index f2aff2bc..c10e387d 100644 --- a/app/include/zmk/endpoints.h +++ b/app/include/zmk/endpoints.h @@ -14,6 +14,8 @@ */ #define ZMK_ENDPOINT_STR_LEN 10 +#define ZMK_ENDPOINT_NONE_COUNT 1 + #ifdef CONFIG_ZMK_USB #define ZMK_ENDPOINT_USB_COUNT 1 #else @@ -33,7 +35,8 @@ * Note that this value may change between firmware versions, so it should not * be used in any persistent storage. */ -#define ZMK_ENDPOINT_COUNT (ZMK_ENDPOINT_USB_COUNT + ZMK_ENDPOINT_BLE_COUNT) +#define ZMK_ENDPOINT_COUNT \ + (ZMK_ENDPOINT_NONE_COUNT + ZMK_ENDPOINT_USB_COUNT + ZMK_ENDPOINT_BLE_COUNT) bool zmk_endpoint_instance_eq(struct zmk_endpoint_instance a, struct zmk_endpoint_instance b); @@ -57,21 +60,53 @@ int zmk_endpoint_instance_to_str(struct zmk_endpoint_instance endpoint, char *st int zmk_endpoint_instance_to_index(struct zmk_endpoint_instance endpoint); /** - * Sets the preferred endpoint transport to use. (If the preferred endpoint is - * not available, a different one may automatically be selected.) + * Sets the preferred endpoint transport to use. + * + * If the preferred endpoint is not available, zmk_endpoint_get_selected() may + * automatically fall back to another transport. */ -int zmk_endpoints_select_transport(enum zmk_transport transport); -int zmk_endpoints_toggle_transport(void); +int zmk_endpoint_set_preferred_transport(enum zmk_transport transport); + +enum zmk_transport zmk_endpoint_get_preferred_transport(void); /** - * Gets the currently-selected endpoint. + * If the preferred endpoint transport is USB, sets it to BLE, else sets it to USB. */ -struct zmk_endpoint_instance zmk_endpoints_selected(void); +int zmk_endpoint_toggle_preferred_transport(void); -int zmk_endpoints_send_report(uint16_t usage_page); +/** + * Gets the endpoint instance that will be preferred if it is connected. + */ +struct zmk_endpoint_instance zmk_endpoint_get_preferred(void); -#if IS_ENABLED(CONFIG_ZMK_MOUSE) -int zmk_endpoints_send_mouse_report(); -#endif // IS_ENABLE(CONFIG_ZMK_MOUSE) +/** + * Gets the endpoint instance that is currently in use. + * + * This may differ from zmk_endpoint_get_preferred(), for example if the preferred + * endpoint is not connected, then this will return an instance for ZMK_TRANSPORT_NONE. + */ +struct zmk_endpoint_instance zmk_endpoint_get_selected(void); -void zmk_endpoints_clear_current(void); +/** + * Returns whether the keyboard is connected to an endpoint. + * + * This is equivalent to zmk_endpoint_get_selected().transport != ZMK_TRANSPORT_NONE + */ +bool zmk_endpoint_is_connected(void); + +/** + * Sends the HID report for the given usage page to the selected endpoint. + */ +int zmk_endpoint_send_report(uint16_t usage_page); + +#if IS_ENABLED(CONFIG_ZMK_POINTING) +/** + * Sends the HID mouse report to the selected endpoint. + */ +int zmk_endpoint_send_mouse_report(); +#endif // IS_ENABLED(CONFIG_ZMK_POINTING) + +/** + * Clears all HID reports for the selected endpoint. + */ +void zmk_endpoint_clear_reports(void); diff --git a/app/include/zmk/endpoints_types.h b/app/include/zmk/endpoints_types.h index ea51c8aa..5117544b 100644 --- a/app/include/zmk/endpoints_types.h +++ b/app/include/zmk/endpoints_types.h @@ -8,10 +8,12 @@ /** * The method by which data is sent. + * @note This type is used in settings. Do not modify existing values. */ enum zmk_transport { - ZMK_TRANSPORT_USB, - ZMK_TRANSPORT_BLE, + ZMK_TRANSPORT_NONE = 0, + ZMK_TRANSPORT_USB = 1, + ZMK_TRANSPORT_BLE = 2, }; /** diff --git a/app/include/zmk/events/layer_state_changed.h b/app/include/zmk/events/layer_state_changed.h index 0d66853e..3bf5c870 100644 --- a/app/include/zmk/events/layer_state_changed.h +++ b/app/include/zmk/events/layer_state_changed.h @@ -12,12 +12,13 @@ struct zmk_layer_state_changed { uint8_t layer; bool state; + bool locked; int64_t timestamp; }; ZMK_EVENT_DECLARE(zmk_layer_state_changed); -static inline int raise_layer_state_changed(uint8_t layer, bool state) { +static inline int raise_layer_state_changed(uint8_t layer, bool state, bool locked) { return raise_zmk_layer_state_changed((struct zmk_layer_state_changed){ - .layer = layer, .state = state, .timestamp = k_uptime_get()}); + .layer = layer, .state = state, .locked = locked, .timestamp = k_uptime_get()}); } diff --git a/app/include/zmk/events/mouse_button_state_changed.h b/app/include/zmk/events/mouse_button_state_changed.h index ff3ccecd..336b6ca9 100644 --- a/app/include/zmk/events/mouse_button_state_changed.h +++ b/app/include/zmk/events/mouse_button_state_changed.h @@ -9,7 +9,7 @@ #include #include -#include +#include struct zmk_mouse_button_state_changed { zmk_mouse_button_t buttons; diff --git a/app/include/zmk/hid.h b/app/include/zmk/hid.h index 766fb9c4..962180e7 100644 --- a/app/include/zmk/hid.h +++ b/app/include/zmk/hid.h @@ -12,9 +12,9 @@ #include #include -#if IS_ENABLED(CONFIG_ZMK_MOUSE) -#include -#endif // IS_ENABLED(CONFIG_ZMK_MOUSE) +#if IS_ENABLED(CONFIG_ZMK_POINTING) +#include +#endif // IS_ENABLED(CONFIG_ZMK_POINTING) #include #include @@ -77,6 +77,30 @@ #define ZMK_HID_REPORT_ID_CONSUMER 0x02 #define ZMK_HID_REPORT_ID_MOUSE 0x03 +#ifndef HID_ITEM_TAG_PUSH +#define HID_ITEM_TAG_PUSH 0xA +#endif + +#ifndef HID_ITEM_TAG_POP +#define HID_ITEM_TAG_POP 0xB +#endif + +#define HID_PUSH HID_ITEM(HID_ITEM_TAG_PUSH, HID_ITEM_TYPE_GLOBAL, 0) + +#define HID_POP HID_ITEM(HID_ITEM_TAG_POP, HID_ITEM_TYPE_GLOBAL, 0) + +#ifndef HID_PHYSICAL_MIN8 +#define HID_PHYSICAL_MIN8(a) HID_ITEM(HID_ITEM_TAG_PHYSICAL_MIN, HID_ITEM_TYPE_GLOBAL, 1), a +#endif + +#ifndef HID_PHYSICAL_MAX8 +#define HID_PHYSICAL_MAX8(a) HID_ITEM(HID_ITEM_TAG_PHYSICAL_MAX, HID_ITEM_TYPE_GLOBAL, 1), a +#endif + +#define HID_USAGE16(a, b) HID_ITEM(HID_ITEM_TAG_USAGE, HID_ITEM_TYPE_LOCAL, 2), a, b + +#define HID_USAGE16_SINGLE(a) HID_USAGE16((a & 0xFF), ((a >> 8) & 0xFF)) + static const uint8_t zmk_hid_report_desc[] = { HID_USAGE_PAGE(HID_USAGE_GEN_DESKTOP), HID_USAGE(HID_USAGE_GD_KEYBOARD), @@ -161,7 +185,7 @@ static const uint8_t zmk_hid_report_desc[] = { HID_INPUT(ZMK_HID_MAIN_VAL_DATA | ZMK_HID_MAIN_VAL_ARRAY | ZMK_HID_MAIN_VAL_ABS), HID_END_COLLECTION, -#if IS_ENABLED(CONFIG_ZMK_MOUSE) +#if IS_ENABLED(CONFIG_ZMK_POINTING) HID_USAGE_PAGE(HID_USAGE_GD), HID_USAGE(HID_USAGE_GD_MOUSE), HID_COLLECTION(HID_COLLECTION_APPLICATION), @@ -184,15 +208,51 @@ static const uint8_t zmk_hid_report_desc[] = { HID_USAGE_PAGE(HID_USAGE_GEN_DESKTOP), HID_USAGE(HID_USAGE_GD_X), HID_USAGE(HID_USAGE_GD_Y), + HID_LOGICAL_MIN16(0x00, 0x80), + HID_LOGICAL_MAX16(0xFF, 0x7F), + HID_REPORT_SIZE(0x10), + HID_REPORT_COUNT(0x02), + HID_INPUT(ZMK_HID_MAIN_VAL_DATA | ZMK_HID_MAIN_VAL_VAR | ZMK_HID_MAIN_VAL_REL), + HID_COLLECTION(HID_COLLECTION_LOGICAL), +#if IS_ENABLED(CONFIG_ZMK_POINTING_SMOOTH_SCROLLING) + HID_USAGE(HID_USAGE_GD_RESOLUTION_MULTIPLIER), + HID_LOGICAL_MIN8(0x00), + HID_LOGICAL_MAX8(0x0F), + HID_PHYSICAL_MIN8(0x01), + HID_PHYSICAL_MAX8(0x10), + HID_REPORT_SIZE(0x04), + HID_REPORT_COUNT(0x01), + HID_PUSH, + HID_FEATURE(ZMK_HID_MAIN_VAL_DATA | ZMK_HID_MAIN_VAL_VAR | ZMK_HID_MAIN_VAL_ABS), +#endif // IS_ENABLED(CONFIG_ZMK_POINTING_SMOOTH_SCROLLING) HID_USAGE(HID_USAGE_GD_WHEEL), - HID_LOGICAL_MIN8(-0x7F), - HID_LOGICAL_MAX8(0x7F), - HID_REPORT_SIZE(0x08), - HID_REPORT_COUNT(0x03), + HID_LOGICAL_MIN16(0x00, 0x80), + HID_LOGICAL_MAX16(0xFF, 0x7F), + HID_PHYSICAL_MIN8(0x00), + HID_PHYSICAL_MAX8(0x00), + HID_REPORT_SIZE(0x10), + HID_REPORT_COUNT(0x01), + HID_INPUT(ZMK_HID_MAIN_VAL_DATA | ZMK_HID_MAIN_VAL_VAR | ZMK_HID_MAIN_VAL_REL), + HID_END_COLLECTION, + HID_COLLECTION(HID_COLLECTION_LOGICAL), +#if IS_ENABLED(CONFIG_ZMK_POINTING_SMOOTH_SCROLLING) + HID_USAGE(HID_USAGE_GD_RESOLUTION_MULTIPLIER), + HID_POP, + HID_FEATURE(ZMK_HID_MAIN_VAL_DATA | ZMK_HID_MAIN_VAL_VAR | ZMK_HID_MAIN_VAL_ABS), +#endif // IS_ENABLED(CONFIG_ZMK_POINTING_SMOOTH_SCROLLING) + HID_USAGE_PAGE(HID_USAGE_CONSUMER), + HID_USAGE16_SINGLE(HID_USAGE_CONSUMER_AC_PAN), + HID_LOGICAL_MIN16(0x00, 0x80), + HID_LOGICAL_MAX16(0xFF, 0x7F), + HID_PHYSICAL_MIN8(0x00), + HID_PHYSICAL_MAX8(0x00), + HID_REPORT_SIZE(0x10), + HID_REPORT_COUNT(0x01), HID_INPUT(ZMK_HID_MAIN_VAL_DATA | ZMK_HID_MAIN_VAL_VAR | ZMK_HID_MAIN_VAL_REL), HID_END_COLLECTION, HID_END_COLLECTION, -#endif // IS_ENABLED(CONFIG_ZMK_MOUSE) + HID_END_COLLECTION, +#endif // IS_ENABLED(CONFIG_ZMK_POINTING) }; #if IS_ENABLED(CONFIG_ZMK_USB_BOOT) @@ -229,8 +289,6 @@ struct zmk_hid_keyboard_report { struct zmk_hid_keyboard_report_body body; } __packed; -#if IS_ENABLED(CONFIG_ZMK_HID_INDICATORS) - struct zmk_hid_led_report_body { uint8_t leds; } __packed; @@ -240,8 +298,6 @@ struct zmk_hid_led_report { struct zmk_hid_led_report_body body; } __packed; -#endif // IS_ENABLED(CONFIG_ZMK_HID_INDICATORS) - struct zmk_hid_consumer_report_body { #if IS_ENABLED(CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC) uint8_t keys[CONFIG_ZMK_HID_CONSUMER_REPORT_SIZE]; @@ -255,12 +311,13 @@ struct zmk_hid_consumer_report { struct zmk_hid_consumer_report_body body; } __packed; -#if IS_ENABLED(CONFIG_ZMK_MOUSE) +#if IS_ENABLED(CONFIG_ZMK_POINTING) struct zmk_hid_mouse_report_body { zmk_mouse_button_flags_t buttons; - int8_t d_x; - int8_t d_y; - int8_t d_wheel; + int16_t d_x; + int16_t d_y; + int16_t d_scroll_y; + int16_t d_scroll_x; } __packed; struct zmk_hid_mouse_report { @@ -268,7 +325,21 @@ struct zmk_hid_mouse_report { struct zmk_hid_mouse_report_body body; } __packed; -#endif // IS_ENABLED(CONFIG_ZMK_MOUSE) +#if IS_ENABLED(CONFIG_ZMK_POINTING_SMOOTH_SCROLLING) + +struct zmk_hid_mouse_resolution_feature_report_body { + uint8_t wheel_res : 4; + uint8_t hwheel_res : 4; +} __packed; + +struct zmk_hid_mouse_resolution_feature_report { + uint8_t report_id; + struct zmk_hid_mouse_resolution_feature_report_body body; +} __packed; + +#endif // IS_ENABLED(CONFIG_ZMK_POINTING_SMOOTH_SCROLLING) + +#endif // IS_ENABLED(CONFIG_ZMK_POINTING) zmk_mod_flags_t zmk_hid_get_explicit_mods(void); int zmk_hid_register_mod(zmk_mod_t modifier); @@ -296,13 +367,18 @@ int zmk_hid_press(uint32_t usage); int zmk_hid_release(uint32_t usage); bool zmk_hid_is_pressed(uint32_t usage); -#if IS_ENABLED(CONFIG_ZMK_MOUSE) +#if IS_ENABLED(CONFIG_ZMK_POINTING) int zmk_hid_mouse_button_press(zmk_mouse_button_t button); int zmk_hid_mouse_button_release(zmk_mouse_button_t button); int zmk_hid_mouse_buttons_press(zmk_mouse_button_flags_t buttons); int zmk_hid_mouse_buttons_release(zmk_mouse_button_flags_t buttons); +void zmk_hid_mouse_movement_set(int16_t x, int16_t y); +void zmk_hid_mouse_scroll_set(int16_t x, int16_t y); +void zmk_hid_mouse_movement_update(int16_t x, int16_t y); +void zmk_hid_mouse_scroll_update(int16_t x, int16_t y); void zmk_hid_mouse_clear(void); -#endif // IS_ENABLED(CONFIG_ZMK_MOUSE) + +#endif // IS_ENABLED(CONFIG_ZMK_POINTING) struct zmk_hid_keyboard_report *zmk_hid_get_keyboard_report(void); struct zmk_hid_consumer_report *zmk_hid_get_consumer_report(void); @@ -311,6 +387,6 @@ struct zmk_hid_consumer_report *zmk_hid_get_consumer_report(void); zmk_hid_boot_report_t *zmk_hid_get_boot_report(); #endif -#if IS_ENABLED(CONFIG_ZMK_MOUSE) +#if IS_ENABLED(CONFIG_ZMK_POINTING) struct zmk_hid_mouse_report *zmk_hid_get_mouse_report(); -#endif // IS_ENABLED(CONFIG_ZMK_MOUSE) +#endif // IS_ENABLED(CONFIG_ZMK_POINTING) diff --git a/app/include/zmk/hog.h b/app/include/zmk/hog.h index eb6e653f..0b79decb 100644 --- a/app/include/zmk/hog.h +++ b/app/include/zmk/hog.h @@ -12,6 +12,6 @@ int zmk_hog_send_keyboard_report(struct zmk_hid_keyboard_report_body *body); int zmk_hog_send_consumer_report(struct zmk_hid_consumer_report_body *body); -#if IS_ENABLED(CONFIG_ZMK_MOUSE) +#if IS_ENABLED(CONFIG_ZMK_POINTING) int zmk_hog_send_mouse_report(struct zmk_hid_mouse_report_body *body); -#endif // IS_ENABLED(CONFIG_ZMK_MOUSE) +#endif // IS_ENABLED(CONFIG_ZMK_POINTING) diff --git a/app/include/zmk/input.h b/app/include/zmk/input.h new file mode 100644 index 00000000..b1cbae6f --- /dev/null +++ b/app/include/zmk/input.h @@ -0,0 +1,14 @@ +/* + * Copyright (c) 2024 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#pragma once + +#include + +struct zmk_input_explicit_code { + uint8_t type; + uint16_t code; +}; diff --git a/app/include/zmk/input_listeners.h b/app/include/zmk/input_listeners.h new file mode 100644 index 00000000..1a1cdfb9 --- /dev/null +++ b/app/include/zmk/input_listeners.h @@ -0,0 +1,14 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#pragma once + +#include + +#define ZMK_INPUT_LISTENERS_UTIL_ONE(n) 1 + + +#define ZMK_INPUT_LISTENERS_LEN \ + (DT_FOREACH_STATUS_OKAY(zmk_input_listener, ZMK_INPUT_LISTENERS_UTIL_ONE) 0) diff --git a/app/include/zmk/keymap.h b/app/include/zmk/keymap.h index 50b358ba..26fd2d16 100644 --- a/app/include/zmk/keymap.h +++ b/app/include/zmk/keymap.h @@ -7,10 +7,21 @@ #pragma once #include +#include +#include + +#define ZMK_KEYMAP_LAYERS_FOREACH(_fn) \ + COND_CODE_1(IS_ENABLED(CONFIG_ZMK_KEYMAP_LAYER_REORDERING), \ + (DT_FOREACH_CHILD(DT_INST(0, zmk_keymap), _fn)), \ + (DT_FOREACH_CHILD_STATUS_OKAY(DT_INST(0, zmk_keymap), _fn))) + +#define ZMK_KEYMAP_LAYERS_FOREACH_SEP(_fn, _sep) \ + COND_CODE_1(IS_ENABLED(CONFIG_ZMK_KEYMAP_LAYER_REORDERING), \ + (DT_FOREACH_CHILD_SEP(DT_INST(0, zmk_keymap), _fn, _sep)), \ + (DT_FOREACH_CHILD_STATUS_OKAY_SEP(DT_INST(0, zmk_keymap), _fn, _sep))) #define ZMK_LAYER_CHILD_LEN_PLUS_ONE(node) 1 + -#define ZMK_KEYMAP_LAYERS_LEN \ - (DT_FOREACH_CHILD(DT_INST(0, zmk_keymap), ZMK_LAYER_CHILD_LEN_PLUS_ONE) 0) +#define ZMK_KEYMAP_LAYERS_LEN (ZMK_KEYMAP_LAYERS_FOREACH(ZMK_LAYER_CHILD_LEN_PLUS_ONE) 0) /** * @brief A layer ID is a stable identifier to refer to a layer, regardless of ordering. @@ -33,17 +44,19 @@ zmk_keymap_layer_id_t zmk_keymap_layer_index_to_id(zmk_keymap_layer_index_t laye zmk_keymap_layer_id_t zmk_keymap_layer_default(void); zmk_keymap_layers_state_t zmk_keymap_layer_state(void); +zmk_keymap_layers_state_t zmk_keymap_layer_locks(void); bool zmk_keymap_layer_active(zmk_keymap_layer_id_t layer); -zmk_keymap_layer_id_t zmk_keymap_highest_layer_active(void); -int zmk_keymap_layer_activate(zmk_keymap_layer_id_t layer); -int zmk_keymap_layer_deactivate(zmk_keymap_layer_id_t layer); -int zmk_keymap_layer_toggle(zmk_keymap_layer_id_t layer); -int zmk_keymap_layer_to(zmk_keymap_layer_id_t layer); +bool zmk_keymap_layer_locked(zmk_keymap_layer_id_t layer); +zmk_keymap_layer_index_t zmk_keymap_highest_layer_active(void); +int zmk_keymap_layer_activate(zmk_keymap_layer_id_t layer, bool locking); +int zmk_keymap_layer_deactivate(zmk_keymap_layer_id_t layer, bool locking); +int zmk_keymap_layer_toggle(zmk_keymap_layer_id_t layer, bool locking); +int zmk_keymap_layer_to(zmk_keymap_layer_id_t layer, bool locking); const char *zmk_keymap_layer_name(zmk_keymap_layer_id_t layer); const struct zmk_behavior_binding *zmk_keymap_get_layer_binding_at_idx(zmk_keymap_layer_id_t layer, - uint8_t binding_idx); -int zmk_keymap_set_layer_binding_at_idx(zmk_keymap_layer_id_t layer, uint8_t binding_idx, + uint16_t binding_idx); +int zmk_keymap_set_layer_binding_at_idx(zmk_keymap_layer_id_t layer, uint16_t binding_idx, const struct zmk_behavior_binding binding); #if IS_ENABLED(CONFIG_ZMK_KEYMAP_LAYER_REORDERING) diff --git a/app/include/zmk/matrix.h b/app/include/zmk/matrix.h index e38f5a49..436f86f5 100644 --- a/app/include/zmk/matrix.h +++ b/app/include/zmk/matrix.h @@ -13,10 +13,6 @@ #if DT_HAS_COMPAT_STATUS_OKAY(zmk_physical_layout) -#if ZMK_MATRIX_HAS_TRANSFORM -#error "To use physical layouts, remove the chosen `zmk,matrix-transform` value." -#endif - #define ZMK_PHYSICAL_LAYOUT_BYTE_ARRAY(node_id) \ uint8_t _CONCAT(prop_, node_id)[DT_PROP_LEN(DT_PHANDLE(node_id, transform), map)]; diff --git a/app/include/zmk/physical_layouts.h b/app/include/zmk/physical_layouts.h index e78602e3..e28c194f 100644 --- a/app/include/zmk/physical_layouts.h +++ b/app/include/zmk/physical_layouts.h @@ -8,15 +8,24 @@ #include #include +#include + +struct zmk_physical_layout_selection_changed { + uint8_t selection; +}; + +ZMK_EVENT_DECLARE(zmk_physical_layout_selection_changed); struct zmk_key_physical_attrs { int16_t width; int16_t height; int16_t x; int16_t y; +#if IS_ENABLED(CONFIG_ZMK_PHYSICAL_LAYOUT_KEY_ROTATION) int16_t rx; int16_t ry; int16_t r; +#endif }; struct zmk_physical_layout { @@ -24,6 +33,9 @@ struct zmk_physical_layout { zmk_matrix_transform_t matrix_transform; const struct device *kscan; +#if IS_ENABLED(CONFIG_INPUT) + const struct device *input; +#endif const struct zmk_key_physical_attrs *keys; size_t keys_len; @@ -42,3 +54,12 @@ int zmk_physical_layouts_revert_selected(void); int zmk_physical_layouts_get_position_map(uint8_t source, uint8_t dest, size_t map_size, uint32_t map[map_size]); + +/** + * @brief Get a pointer to a position map array for mapping a key position in the selected + * physical layout to the stock/chosen physical layout + * + * @retval a negative errno value in the case of errors + * @retval a positive length of the position map array that map is updated to point to. + */ +int zmk_physical_layouts_get_selected_to_stock_position_map(uint32_t const **map); \ No newline at end of file diff --git a/app/include/zmk/mouse.h b/app/include/zmk/pointing.h similarity index 62% rename from app/include/zmk/mouse.h rename to app/include/zmk/pointing.h index d873f156..1bd53d63 100644 --- a/app/include/zmk/mouse.h +++ b/app/include/zmk/pointing.h @@ -1,12 +1,12 @@ /* - * Copyright (c) 2021 The ZMK Contributors + * Copyright (c) 2023 The ZMK Contributors * * SPDX-License-Identifier: MIT */ #pragma once -#include +#include typedef uint8_t zmk_mouse_button_flags_t; typedef uint16_t zmk_mouse_button_t; diff --git a/app/include/zmk/pointing/input_split.h b/app/include/zmk/pointing/input_split.h new file mode 100644 index 00000000..235ea495 --- /dev/null +++ b/app/include/zmk/pointing/input_split.h @@ -0,0 +1,11 @@ +/* + * Copyright (c) 2024 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#pragma once + +int zmk_input_split_report_peripheral_event(uint8_t reg, uint8_t type, uint16_t code, int32_t value, + bool sync); +int zmk_input_split_peripheral_disconnected(uint8_t reg); \ No newline at end of file diff --git a/app/include/zmk/pointing/resolution_multipliers.h b/app/include/zmk/pointing/resolution_multipliers.h new file mode 100644 index 00000000..1e50b781 --- /dev/null +++ b/app/include/zmk/pointing/resolution_multipliers.h @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2024 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#pragma once + +#include +#include + +struct zmk_pointing_resolution_multipliers { + uint8_t wheel; + uint8_t hor_wheel; +}; + +struct zmk_pointing_resolution_multipliers +zmk_pointing_resolution_multipliers_get_current_profile(void); +struct zmk_pointing_resolution_multipliers +zmk_pointing_resolution_multipliers_get_profile(struct zmk_endpoint_instance endpoint); +void zmk_pointing_resolution_multipliers_set_profile( + struct zmk_pointing_resolution_multipliers multipliers, struct zmk_endpoint_instance endpoint); + +void zmk_pointing_resolution_multipliers_process_report( + struct zmk_hid_mouse_resolution_feature_report_body *report, + struct zmk_endpoint_instance endpoint); diff --git a/app/include/zmk/split/bluetooth/central.h b/app/include/zmk/split/bluetooth/central.h deleted file mode 100644 index 5e9e09ff..00000000 --- a/app/include/zmk/split/bluetooth/central.h +++ /dev/null @@ -1,24 +0,0 @@ - -#pragma once - -#include -#include - -#if IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) -#include -#endif // IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) - -int zmk_split_bt_invoke_behavior(uint8_t source, struct zmk_behavior_binding *binding, - struct zmk_behavior_binding_event event, bool state); - -#if IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) - -int zmk_split_bt_update_hid_indicator(zmk_hid_indicators_t indicators); - -#endif // IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) - -#if IS_ENABLED(CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_FETCHING) - -int zmk_split_get_peripheral_battery_level(uint8_t source, uint8_t *level); - -#endif // IS_ENABLED(CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_FETCHING) \ No newline at end of file diff --git a/app/include/zmk/split/bluetooth/service.h b/app/include/zmk/split/bluetooth/service.h index 112cd552..931385be 100644 --- a/app/include/zmk/split/bluetooth/service.h +++ b/app/include/zmk/split/bluetooth/service.h @@ -20,6 +20,7 @@ struct sensor_event { struct zmk_split_run_behavior_data { uint8_t position; + uint8_t source; uint8_t state; uint32_t param1; uint32_t param2; @@ -30,8 +31,9 @@ struct zmk_split_run_behavior_payload { char behavior_dev[ZMK_SPLIT_RUN_BEHAVIOR_DEV_LEN]; } __packed; -int zmk_split_bt_position_pressed(uint8_t position); -int zmk_split_bt_position_released(uint8_t position); -int zmk_split_bt_sensor_triggered(uint8_t sensor_index, - const struct zmk_sensor_channel_data channel_data[], - size_t channel_data_size); +struct zmk_split_input_event_payload { + uint8_t type; + uint16_t code; + uint32_t value; + uint8_t sync; +} __packed; diff --git a/app/include/zmk/split/bluetooth/uuid.h b/app/include/zmk/split/bluetooth/uuid.h index dccdfc80..c9a63efa 100644 --- a/app/include/zmk/split/bluetooth/uuid.h +++ b/app/include/zmk/split/bluetooth/uuid.h @@ -18,3 +18,5 @@ #define ZMK_SPLIT_BT_CHAR_RUN_BEHAVIOR_UUID ZMK_BT_SPLIT_UUID(0x00000002) #define ZMK_SPLIT_BT_CHAR_SENSOR_STATE_UUID ZMK_BT_SPLIT_UUID(0x00000003) #define ZMK_SPLIT_BT_UPDATE_HID_INDICATORS_UUID ZMK_BT_SPLIT_UUID(0x00000004) +#define ZMK_SPLIT_BT_SELECT_PHYS_LAYOUT_UUID ZMK_BT_SPLIT_UUID(0x00000005) +#define ZMK_SPLIT_BT_INPUT_EVENT_UUID ZMK_BT_SPLIT_UUID(0x00000006) diff --git a/app/include/zmk/split/central.h b/app/include/zmk/split/central.h new file mode 100644 index 00000000..ff971bfc --- /dev/null +++ b/app/include/zmk/split/central.h @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2025 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#pragma once + +#include +#include + +#if IS_ENABLED(CONFIG_ZMK_SPLIT_BLE) + +#include +#define BLE_PERIPHERAL_COUNT ZMK_SPLIT_BLE_PERIPHERAL_COUNT + +#else + +#define BLE_PERIPHERAL_COUNT 0 + +#endif + +#if IS_ENABLED(CONFIG_ZMK_SPLIT_WIRED) +#define WIRED_PERIPHERAL_COUNT 1 +#else +#define WIRED_PERIPHERAL_COUNT 0 +#endif + +#define ZMK_SPLIT_CENTRAL_PERIPHERAL_COUNT MAX(BLE_PERIPHERAL_COUNT, WIRED_PERIPHERAL_COUNT) + +#if IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) +#include +#endif // IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) + +int zmk_split_central_invoke_behavior(uint8_t source, struct zmk_behavior_binding *binding, + struct zmk_behavior_binding_event event, bool state); + +#if IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) + +int zmk_split_central_update_hid_indicator(zmk_hid_indicators_t indicators); + +#endif // IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) + +#if IS_ENABLED(CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_FETCHING) + +int zmk_split_central_get_peripheral_battery_level(uint8_t source, uint8_t *level); + +#endif // IS_ENABLED(CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_FETCHING) diff --git a/app/include/zmk/split/peripheral.h b/app/include/zmk/split/peripheral.h new file mode 100644 index 00000000..6fb2301c --- /dev/null +++ b/app/include/zmk/split/peripheral.h @@ -0,0 +1,11 @@ +/* + * Copyright (c) 2025 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#pragma once + +#include + +int zmk_split_peripheral_report_event(const struct zmk_split_transport_peripheral_event *event); diff --git a/app/include/zmk/split/transport/central.h b/app/include/zmk/split/transport/central.h new file mode 100644 index 00000000..a6b819d1 --- /dev/null +++ b/app/include/zmk/split/transport/central.h @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2025 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#pragma once + +#include + +#include + +struct zmk_split_transport_central; + +typedef int (*zmk_split_transport_central_status_changed_cb_t)( + const struct zmk_split_transport_central *transport, struct zmk_split_transport_status status); + +typedef int (*zmk_split_transport_central_send_command_t)( + uint8_t source, struct zmk_split_transport_central_command cmd); +typedef int (*zmk_split_transport_central_get_available_source_ids_t)(uint8_t *sources); +typedef int (*zmk_split_transport_central_set_status_callback_t)( + zmk_split_transport_central_status_changed_cb_t cb); + +struct zmk_split_transport_central_api { + zmk_split_transport_central_send_command_t send_command; + zmk_split_transport_central_get_available_source_ids_t get_available_source_ids; + zmk_split_transport_set_enabled_t set_enabled; + zmk_split_transport_get_status_t get_status; + zmk_split_transport_central_set_status_callback_t set_status_callback; +}; + +struct zmk_split_transport_central { + const struct zmk_split_transport_central_api *api; +}; + +int zmk_split_transport_central_peripheral_event_handler( + const struct zmk_split_transport_central *transport, uint8_t source, + struct zmk_split_transport_peripheral_event ev); + +#define ZMK_SPLIT_TRANSPORT_CENTRAL_REGISTER(name, _api, priority) \ + STRUCT_SECTION_ITERABLE_NAMED(zmk_split_transport_central, _CONCAT(priority, _##name), \ + name) = { \ + .api = _api, \ + }; diff --git a/app/include/zmk/split/transport/peripheral.h b/app/include/zmk/split/transport/peripheral.h new file mode 100644 index 00000000..fdc3943d --- /dev/null +++ b/app/include/zmk/split/transport/peripheral.h @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2025 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#pragma once + +#include + +#include + +struct zmk_split_transport_peripheral; + +typedef int (*zmk_split_transport_peripheral_status_changed_cb_t)( + const struct zmk_split_transport_peripheral *transport, + struct zmk_split_transport_status status); + +typedef int (*zmk_split_transport_peripheral_report_event_callback_t)( + const struct zmk_split_transport_peripheral_event *event); +typedef int (*zmk_split_transport_peripheral_set_status_callback_t)( + zmk_split_transport_peripheral_status_changed_cb_t cb); + +struct zmk_split_transport_peripheral_api { + zmk_split_transport_peripheral_report_event_callback_t report_event; + zmk_split_transport_set_enabled_t set_enabled; + zmk_split_transport_get_status_t get_status; + zmk_split_transport_peripheral_set_status_callback_t set_status_callback; +}; + +struct zmk_split_transport_peripheral { + const struct zmk_split_transport_peripheral_api *api; +}; + +int zmk_split_transport_peripheral_command_handler( + const struct zmk_split_transport_peripheral *transport, + struct zmk_split_transport_central_command cmd); + +#define ZMK_SPLIT_TRANSPORT_PERIPHERAL_REGISTER(name, _api, priority) \ + STRUCT_SECTION_ITERABLE_NAMED(zmk_split_transport_peripheral, _CONCAT(priority, _##name), \ + name) = { \ + .api = _api, \ + }; diff --git a/app/include/zmk/split/transport/types.h b/app/include/zmk/split/transport/types.h new file mode 100644 index 00000000..1d6eb734 --- /dev/null +++ b/app/include/zmk/split/transport/types.h @@ -0,0 +1,91 @@ +/* + * Copyright (c) 2025 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#pragma once + +#include +#include +#include + +enum zmk_split_transport_connections_status { + ZMK_SPLIT_TRANSPORT_CONNECTIONS_STATUS_DISCONNECTED = 0, + ZMK_SPLIT_TRANSPORT_CONNECTIONS_STATUS_SOME_CONNECTED, + ZMK_SPLIT_TRANSPORT_CONNECTIONS_STATUS_ALL_CONNECTED, +}; + +struct zmk_split_transport_status { + bool available; + bool enabled; + enum zmk_split_transport_connections_status connections; +}; + +typedef struct zmk_split_transport_status (*zmk_split_transport_get_status_t)(void); +typedef int (*zmk_split_transport_set_enabled_t)(bool enabled); + +enum zmk_split_transport_peripheral_event_type { + ZMK_SPLIT_TRANSPORT_PERIPHERAL_EVENT_TYPE_KEY_POSITION_EVENT, + ZMK_SPLIT_TRANSPORT_PERIPHERAL_EVENT_TYPE_SENSOR_EVENT, + ZMK_SPLIT_TRANSPORT_PERIPHERAL_EVENT_TYPE_INPUT_EVENT, + ZMK_SPLIT_TRANSPORT_PERIPHERAL_EVENT_TYPE_BATTERY_EVENT, +}; + +struct zmk_split_transport_peripheral_event { + enum zmk_split_transport_peripheral_event_type type; + + union { + struct { + uint8_t position; + uint8_t pressed; + } key_position_event; + + struct { + struct zmk_sensor_channel_data channel_data; + + uint8_t sensor_index; + } sensor_event; + + struct { + uint8_t reg; + uint8_t sync; + uint8_t type; + uint16_t code; + int32_t value; + } input_event; + + struct { + uint8_t level; + } battery_event; + } data; +} __packed; + +enum zmk_split_transport_central_command_type { + ZMK_SPLIT_TRANSPORT_CENTRAL_CMD_TYPE_POLL_EVENTS, + ZMK_SPLIT_TRANSPORT_CENTRAL_CMD_TYPE_INVOKE_BEHAVIOR, + ZMK_SPLIT_TRANSPORT_CENTRAL_CMD_TYPE_SET_PHYSICAL_LAYOUT, + ZMK_SPLIT_TRANSPORT_CENTRAL_CMD_TYPE_SET_HID_INDICATORS, +} __packed; + +struct zmk_split_transport_central_command { + enum zmk_split_transport_central_command_type type; + + union { + struct { + char behavior_dev[16]; + uint32_t param1, param2; + uint32_t position; + uint8_t event_source; + uint8_t state; + } invoke_behavior; + + struct { + uint8_t layout_idx; + } set_physical_layout; + + struct { + zmk_hid_indicators_t indicators; + } set_hid_indicators; + } data; +} __packed; \ No newline at end of file diff --git a/app/include/zmk/usb.h b/app/include/zmk/usb.h index 540cdd9c..a5e5089f 100644 --- a/app/include/zmk/usb.h +++ b/app/include/zmk/usb.h @@ -24,6 +24,4 @@ enum zmk_usb_conn_state zmk_usb_get_conn_state(void); static inline bool zmk_usb_is_powered(void) { return zmk_usb_get_conn_state() != ZMK_USB_CONN_NONE; } -static inline bool zmk_usb_is_hid_ready(void) { - return zmk_usb_get_conn_state() == ZMK_USB_CONN_HID; -} +bool zmk_usb_is_hid_ready(void); diff --git a/app/include/zmk/usb_hid.h b/app/include/zmk/usb_hid.h index c0cbc08a..785f6af8 100644 --- a/app/include/zmk/usb_hid.h +++ b/app/include/zmk/usb_hid.h @@ -10,7 +10,7 @@ int zmk_usb_hid_send_keyboard_report(void); int zmk_usb_hid_send_consumer_report(void); -#if IS_ENABLED(CONFIG_ZMK_MOUSE) +#if IS_ENABLED(CONFIG_ZMK_POINTING) int zmk_usb_hid_send_mouse_report(void); -#endif // IS_ENABLED(CONFIG_ZMK_MOUSE) +#endif // IS_ENABLED(CONFIG_ZMK_POINTING) void zmk_usb_hid_set_protocol(uint8_t protocol); diff --git a/app/include/zmk/virtual_key_position.h b/app/include/zmk/virtual_key_position.h index b8f20683..466ea3ef 100644 --- a/app/include/zmk/virtual_key_position.h +++ b/app/include/zmk/virtual_key_position.h @@ -7,6 +7,8 @@ #pragma once #include +#include +#include #include /** @@ -17,9 +19,14 @@ /** * Gets the sensor number from the virtual key position. */ -#define ZMK_SENSOR_POSITION_FROM_VIRTUAL_KEY_POSITION(vkp) ((vkp)-ZMK_KEYMAP_LEN) +#define ZMK_SENSOR_POSITION_FROM_VIRTUAL_KEY_POSITION(vkp) ((vkp) - ZMK_KEYMAP_LEN) /** * Gets the virtual key position to use for the combo with the given index. */ -#define ZMK_VIRTUAL_KEY_POSITION_COMBO(index) (ZMK_KEYMAP_LEN + ZMK_KEYMAP_SENSORS_LEN + (index)) +#define ZMK_VIRTUAL_KEY_POSITION_COMBO(index) \ + (ZMK_VIRTUAL_KEY_POSITION_SENSOR(ZMK_KEYMAP_SENSORS_LEN) + (index)) + +#define ZMK_VIRTUAL_KEY_POSITION_BEHAVIOR_INPUT_PROCESSOR(listener_index, processor_index) \ + (ZMK_VIRTUAL_KEY_POSITION_COMBO(ZMK_COMBOS_LEN) + \ + (ZMK_INPUT_LISTENERS_LEN * (processor_index)) + (listener_index)) diff --git a/app/keymap-module/modules/modules.cmake b/app/keymap-module/modules/modules.cmake index f513bcc4..e19230c8 100644 --- a/app/keymap-module/modules/modules.cmake +++ b/app/keymap-module/modules/modules.cmake @@ -50,170 +50,12 @@ if (ZMK_CONFIG) set(ENV{ZMK_CONFIG} "${ZMK_CONFIG}") if(EXISTS ${ZMK_CONFIG}/boards) message(STATUS "Adding ZMK config directory as board root: ${ZMK_CONFIG}") + message(DEPRECATION "The `config/boards` folder is deprecated. Please use a module instead. See https://zmk.dev/docs/hardware-integration/new-shield and https://zmk.dev/docs/development/module-creation for more information.") list(APPEND BOARD_ROOT ${ZMK_CONFIG}) endif() if(EXISTS ${ZMK_CONFIG}/dts) message(STATUS "Adding ZMK config directory as DTS root: ${ZMK_CONFIG}") + message(DEPRECATION "The `config/dts` folder is deprecated. Please use a module instead. See https://zmk.dev/docs/hardware-integration/new-shield and https://zmk.dev/docs/development/module-creation for more information.") list(APPEND DTS_ROOT ${ZMK_CONFIG}) endif() endif() - - -if(DEFINED SHIELD) - string(REPLACE " " ";" SHIELD_AS_LIST "${SHIELD}") -endif() - -string(FIND "${BOARD}" "@" REVISION_SEPARATOR_INDEX) -if(NOT (REVISION_SEPARATOR_INDEX EQUAL -1)) - math(EXPR BOARD_REVISION_INDEX "${REVISION_SEPARATOR_INDEX} + 1") - string(SUBSTRING ${BOARD} ${BOARD_REVISION_INDEX} -1 BOARD_REVISION) - string(SUBSTRING ${BOARD} 0 ${REVISION_SEPARATOR_INDEX} BOARD) -endif() - -foreach(root ${BOARD_ROOT}) - set(shield_dir ${root}/boards/shields) - # Match the Kconfig.shield files in the shield directories to make sure we are - # finding shields, e.g. x_nucleo_iks01a1/Kconfig.shield - file(GLOB_RECURSE shields_refs_list ${shield_dir}/*/Kconfig.shield) - unset(SHIELD_LIST) - foreach(shields_refs ${shields_refs_list}) - get_filename_component(shield_path ${shields_refs} DIRECTORY) - file(GLOB shield_overlays RELATIVE ${shield_path} ${shield_path}/*.overlay) - foreach(overlay ${shield_overlays}) - get_filename_component(shield ${overlay} NAME_WE) - list(APPEND SHIELD_LIST ${shield}) - set(SHIELD_DIR_${shield} ${shield_path}) - endforeach() - endforeach() - - if (EXISTS "${root}/boards/${BOARD}.overlay") - list(APPEND shield_dts_files "${root}/boards/${BOARD}.overlay") - endif() - if (NOT DEFINED BOARD_DIR_NAME) - find_path(BOARD_DIR - NAMES ${BOARD}_defconfig - PATHS ${root}/boards/*/* - NO_DEFAULT_PATH - ) - if(BOARD_DIR) - get_filename_component(BOARD_DIR_NAME ${BOARD_DIR} NAME) - list(APPEND KEYMAP_DIRS ${BOARD_DIR}) - endif() - endif() - - if(DEFINED SHIELD) - foreach(s ${SHIELD_AS_LIST}) - if(NOT ${s} IN_LIST SHIELD_LIST) - continue() - endif() - message(STATUS "Adding ${SHIELD_DIR_${s}}") - list(APPEND KEYMAP_DIRS ${SHIELD_DIR_${s}}) - get_filename_component(shield_dir_name ${SHIELD_DIR_${s}} NAME) - list(APPEND SHIELD_DIR ${shield_dir_name}) - endforeach() - endif() -endforeach() - -if(EXISTS ${BOARD_DIR}/revision.cmake) - # Board provides revision handling. - include(${BOARD_DIR}/revision.cmake) -elseif(BOARD_REVISION) - message(WARNING "Board revision ${BOARD_REVISION} specified for ${BOARD}, \ - but board has no revision so revision will be ignored.") -endif() - -if(DEFINED BOARD_REVISION) - string(REPLACE "." "_" BOARD_REVISION_STRING ${BOARD_REVISION}) - set(KEYMAP_BOARD_REVISION_PREFIX "${BOARD}_${BOARD_REVISION_STRING}") -else() - set(KEYMAP_BOARD_REVISION_PREFIX "") -endif() - -# Give a shield like `kyria_rev2_left` we want to use `kyria_rev2` and `kyria` as candidate names for -# overlay/conf/keymap files. -if(DEFINED SHIELD) - foreach(s ${SHIELD_AS_LIST}) - if (DEFINED $SHIELD_DIR_${s}) - get_filename_component(shield_dir_name ${SHIELD_DIR_${s}} NAME) - endif() - string(REPLACE "_" ";" S_PIECES ${s}) - list(LENGTH S_PIECES S_PIECES_LEN) - while(NOT S_PIECES STREQUAL "") - list(POP_BACK S_PIECES) - list(JOIN S_PIECES "_" s_substr) - if ("${s_substr}" STREQUAL "" OR "${s_substr}" STREQUAL "${shield_dir_name}") - break() - endif() - list(APPEND shield_candidate_names ${s_substr}) - endwhile() - endforeach() -endif() - -if (ZMK_CONFIG) - if (EXISTS ${ZMK_CONFIG}) - message(STATUS "ZMK Config directory: ${ZMK_CONFIG}") - list(PREPEND KEYMAP_DIRS "${ZMK_CONFIG}") - - if (DEFINED SHIELD) - foreach (s ${shield_candidate_names} ${SHIELD_AS_LIST}) - if (DEFINED ${SHIELD_DIR_${s}}) - get_filename_component(shield_dir_name ${SHIELD_DIR_${s}} NAME) - endif() - list(APPEND overlay_candidates "${ZMK_CONFIG}/${s}_${BOARD}.overlay") - list(APPEND overlay_candidates "${ZMK_CONFIG}/${s}.overlay") - if (NOT "${shield_dir_name}" STREQUAL "${s}") - list(APPEND config_candidates "${ZMK_CONFIG}/${shield_dir_name}_${BOARD}.conf") - list(APPEND config_candidates "${ZMK_CONFIG}/${shield_dir_name}.conf") - endif() - list(APPEND config_candidates "${ZMK_CONFIG}/${s}_${BOARD}.conf") - list(APPEND config_candidates "${ZMK_CONFIG}/${s}.conf") - endforeach() - endif() - - # TODO: Board revisions? - list(APPEND overlay_candidates "${ZMK_CONFIG}/${BOARD_DIR_NAME}.overlay") - list(APPEND overlay_candidates "${ZMK_CONFIG}/${BOARD}.overlay") - list(APPEND overlay_candidates "${ZMK_CONFIG}/default.overlay") - list(APPEND config_candidates "${ZMK_CONFIG}/${BOARD_DIR_NAME}.conf") - list(APPEND config_candidates "${ZMK_CONFIG}/${BOARD}.conf") - list(APPEND config_candidates "${ZMK_CONFIG}/default.conf") - - foreach(overlay ${overlay_candidates}) - if (EXISTS "${overlay}") - message(STATUS "ZMK Config devicetree overlay: ${overlay}") - list(APPEND shield_dts_files "${overlay}") - break() - endif() - endforeach() - - foreach(conf ${config_candidates}) - if (EXISTS "${conf}") - message(STATUS "ZMK Config Kconfig: ${conf}") - list(APPEND shield_conf_files "${conf}") - endif() - endforeach() - else() - message(WARNING "Unable to locate ZMK config at: ${ZMK_CONFIG}") - endif() -endif() - - -if(NOT KEYMAP_FILE) - foreach(keymap_dir ${KEYMAP_DIRS}) - foreach(keymap_prefix ${shield_candidate_names} ${SHIELD_AS_LIST} ${SHIELD_DIR} ${KEYMAP_BOARD_REVISION_PREFIX} ${BOARD} ${BOARD_DIR_NAME}) - if (EXISTS ${keymap_dir}/${keymap_prefix}.keymap) - set(KEYMAP_FILE "${keymap_dir}/${keymap_prefix}.keymap" CACHE STRING "Selected keymap file") - message(STATUS "Using keymap file: ${KEYMAP_FILE}") - set(DTC_OVERLAY_FILE ${KEYMAP_FILE}) - break() - endif() - endforeach() - endforeach() -else() - message(STATUS "Using keymap file: ${KEYMAP_FILE}") - set(DTC_OVERLAY_FILE ${KEYMAP_FILE}) -endif() - -if (NOT KEYMAP_FILE) - message(WARNING "Failed to locate keymap file!") -endif() diff --git a/app/module/CMakeLists.txt b/app/module/CMakeLists.txt index db886ac6..8c4afb06 100644 --- a/app/module/CMakeLists.txt +++ b/app/module/CMakeLists.txt @@ -1,4 +1,5 @@ zephyr_include_directories(include) add_subdirectory(drivers) +add_subdirectory(test-behaviors) add_subdirectory(lib) \ No newline at end of file diff --git a/app/module/Kconfig b/app/module/Kconfig index 52c01315..e86c0d6b 100644 --- a/app/module/Kconfig +++ b/app/module/Kconfig @@ -1,3 +1,4 @@ rsource "drivers/Kconfig" -rsource "lib/Kconfig" \ No newline at end of file +rsource "lib/Kconfig" +rsource "test-behaviors/Kconfig" \ No newline at end of file diff --git a/app/boards/arm/mikoto/CMakeLists.txt b/app/module/boards/joric/nrfmicro/CMakeLists.txt similarity index 100% rename from app/boards/arm/mikoto/CMakeLists.txt rename to app/module/boards/joric/nrfmicro/CMakeLists.txt diff --git a/app/module/boards/joric/nrfmicro/Kconfig b/app/module/boards/joric/nrfmicro/Kconfig new file mode 100644 index 00000000..f8e10e63 --- /dev/null +++ b/app/module/boards/joric/nrfmicro/Kconfig @@ -0,0 +1,4 @@ +config BOARD_NRFMICRO_CHARGER + bool "Enable battery charger" + default y + depends on (BOARD_NRFMICRO && BOARD_REVISION = "1.3.0") diff --git a/app/boards/arm/nrfmicro/Kconfig.defconfig b/app/module/boards/joric/nrfmicro/Kconfig.defconfig similarity index 50% rename from app/boards/arm/nrfmicro/Kconfig.defconfig rename to app/module/boards/joric/nrfmicro/Kconfig.defconfig index 38daacde..9207183e 100644 --- a/app/boards/arm/nrfmicro/Kconfig.defconfig +++ b/app/module/boards/joric/nrfmicro/Kconfig.defconfig @@ -3,7 +3,7 @@ # Copyright (c) 2020 The ZMK Contributors # SPDX-License-Identifier: MIT -if BOARD_NRFMICRO_11 || BOARD_NRFMICRO_11_FLIPPED || BOARD_NRFMICRO_13 || BOARD_NRFMICRO_13_52833 +if BOARD_NRFMICRO_NRF52840 || BOARD_NRFMICRO_NRF52840_FLIPPED || BOARD_NRFMICRO_NRF52833 config BOARD default "nrfmicro" @@ -18,11 +18,12 @@ endif # USB_DEVICE_STACK config BT_CTLR default BT -if BOARD_NRFMICRO_13 || BOARD_NRFMICRO_13_52833 +if BOARD_REVISION = "1.3.0" config BOARD_NRFMICRO_CHARGER default y -endif # BOARD_NRFMICRO_13 || BOARD_NRFMICRO_13_52833 +endif # BOARD_REVISION = "1.3.0" -endif # BOARD_NRFMICRO_11 || BOARD_NRFMICRO_11_FLIPPED || BOARD_NRFMICRO_13 || BOARD_NRFMICRO_13_52833 + +endif # BOARD_NRFMICRO_NRF52840 || BOARD_NRFMICRO_NRF52840_FLIPPED || BOARD_NRFMICRO_NRF52833 diff --git a/app/module/boards/joric/nrfmicro/Kconfig.nrfmicro b/app/module/boards/joric/nrfmicro/Kconfig.nrfmicro new file mode 100644 index 00000000..27eb747b --- /dev/null +++ b/app/module/boards/joric/nrfmicro/Kconfig.nrfmicro @@ -0,0 +1,9 @@ +# nrfmicro board configuration + +# Copyright (c) 2026 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config BOARD_NRFMICRO + select SOC_NRF52840_QIAA if BOARD_NRFMICRO_NRF52840 + select SOC_NRF52840_QIAA if BOARD_NRFMICRO_NRF52840_FLIPPED + select SOC_NRF52833_QIAA if BOARD_NRFMICRO_NRF52833 diff --git a/app/boards/arm/nrfmicro/arduino_pro_micro_pins.dtsi b/app/module/boards/joric/nrfmicro/arduino_pro_micro_pins.dtsi similarity index 100% rename from app/boards/arm/nrfmicro/arduino_pro_micro_pins.dtsi rename to app/module/boards/joric/nrfmicro/arduino_pro_micro_pins.dtsi diff --git a/app/boards/arm/nrfmicro/arduino_pro_micro_pins_52833.dtsi b/app/module/boards/joric/nrfmicro/arduino_pro_micro_pins_52833.dtsi similarity index 100% rename from app/boards/arm/nrfmicro/arduino_pro_micro_pins_52833.dtsi rename to app/module/boards/joric/nrfmicro/arduino_pro_micro_pins_52833.dtsi diff --git a/app/boards/arm/nrfmicro/arduino_pro_micro_pins_flipped.dtsi b/app/module/boards/joric/nrfmicro/arduino_pro_micro_pins_flipped.dtsi similarity index 100% rename from app/boards/arm/nrfmicro/arduino_pro_micro_pins_flipped.dtsi rename to app/module/boards/joric/nrfmicro/arduino_pro_micro_pins_flipped.dtsi diff --git a/app/module/boards/joric/nrfmicro/board.cmake b/app/module/boards/joric/nrfmicro/board.cmake new file mode 100644 index 00000000..73fa64a9 --- /dev/null +++ b/app/module/boards/joric/nrfmicro/board.cmake @@ -0,0 +1,5 @@ +# SPDX-License-Identifier: MIT + +board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset") +include(${ZEPHYR_BASE}/boards/common/uf2.board.cmake) +include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake) diff --git a/app/module/boards/joric/nrfmicro/board.yml b/app/module/boards/joric/nrfmicro/board.yml new file mode 100644 index 00000000..1cfcc492 --- /dev/null +++ b/app/module/boards/joric/nrfmicro/board.yml @@ -0,0 +1,14 @@ +board: + name: nrfmicro + vendor: joric + socs: + - name: nrf52840 + variants: + - name: flipped + - name: nrf52833 + revision: + format: major.minor.patch + default: 1.3.0 + revisions: + - name: 1.3.0 + - name: 1.1.0 diff --git a/app/boards/arm/nrfmicro/nrfmicro-flipped-pinctrl.dtsi b/app/module/boards/joric/nrfmicro/nrfmicro-flipped-pinctrl.dtsi similarity index 100% rename from app/boards/arm/nrfmicro/nrfmicro-flipped-pinctrl.dtsi rename to app/module/boards/joric/nrfmicro/nrfmicro-flipped-pinctrl.dtsi diff --git a/app/boards/arm/nrfmicro/nrfmicro-pinctrl.dtsi b/app/module/boards/joric/nrfmicro/nrfmicro-pinctrl.dtsi similarity index 100% rename from app/boards/arm/nrfmicro/nrfmicro-pinctrl.dtsi rename to app/module/boards/joric/nrfmicro/nrfmicro-pinctrl.dtsi diff --git a/app/boards/arm/nrfmicro/nrfmicro_11.yaml b/app/module/boards/joric/nrfmicro/nrfmicro_11.yaml similarity index 100% rename from app/boards/arm/nrfmicro/nrfmicro_11.yaml rename to app/module/boards/joric/nrfmicro/nrfmicro_11.yaml diff --git a/app/boards/arm/nrfmicro/nrfmicro_11_flipped.yaml b/app/module/boards/joric/nrfmicro/nrfmicro_11_flipped.yaml similarity index 100% rename from app/boards/arm/nrfmicro/nrfmicro_11_flipped.yaml rename to app/module/boards/joric/nrfmicro/nrfmicro_11_flipped.yaml diff --git a/app/boards/arm/nrfmicro/nrfmicro_13.yaml b/app/module/boards/joric/nrfmicro/nrfmicro_13.yaml similarity index 100% rename from app/boards/arm/nrfmicro/nrfmicro_13.yaml rename to app/module/boards/joric/nrfmicro/nrfmicro_13.yaml diff --git a/app/boards/arm/nrfmicro/nrfmicro_13_52833.yaml b/app/module/boards/joric/nrfmicro/nrfmicro_13_52833.yaml similarity index 100% rename from app/boards/arm/nrfmicro/nrfmicro_13_52833.yaml rename to app/module/boards/joric/nrfmicro/nrfmicro_13_52833.yaml diff --git a/app/boards/arm/nrfmicro/nrfmicro_13_52833.dts b/app/module/boards/joric/nrfmicro/nrfmicro_nrf52833.dts similarity index 82% rename from app/boards/arm/nrfmicro/nrfmicro_13_52833.dts rename to app/module/boards/joric/nrfmicro/nrfmicro_nrf52833.dts index 866276bb..72398716 100644 --- a/app/boards/arm/nrfmicro/nrfmicro_13_52833.dts +++ b/app/module/boards/joric/nrfmicro/nrfmicro_nrf52833.dts @@ -6,6 +6,8 @@ /dts-v1/; #include +#include + #include "arduino_pro_micro_pins_52833.dtsi" #include "nrfmicro-pinctrl.dtsi" @@ -17,7 +19,6 @@ zephyr,code-partition = &code_partition; zephyr,sram = &sram0; zephyr,flash = &flash0; - zmk,battery = &vbatt; }; leds { @@ -26,20 +27,10 @@ gpios = <&gpio0 25 GPIO_ACTIVE_HIGH>; }; }; +}; - // Node name must match original "EXT_POWER" label to preserve user settings. - EXT_POWER { - compatible = "zmk,ext-power-generic"; - control-gpios = <&gpio1 9 GPIO_ACTIVE_LOW>; - init-delay-ms = <50>; - }; - - vbatt: vbatt { - compatible = "zmk,battery-voltage-divider"; - io-channels = <&adc 2>; - output-ohms = <2000000>; - full-ohms = <(2000000 + 820000)>; - }; +®1 { + regulator-initial-mode = ; }; &adc { diff --git a/app/module/boards/joric/nrfmicro/nrfmicro_nrf52833_1_3_0.overlay b/app/module/boards/joric/nrfmicro/nrfmicro_nrf52833_1_3_0.overlay new file mode 100644 index 00000000..758f4ee8 --- /dev/null +++ b/app/module/boards/joric/nrfmicro/nrfmicro_nrf52833_1_3_0.overlay @@ -0,0 +1,6 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + diff --git a/app/module/boards/joric/nrfmicro/nrfmicro_nrf52833_1_3_0_defconfig b/app/module/boards/joric/nrfmicro/nrfmicro_nrf52833_1_3_0_defconfig new file mode 100644 index 00000000..5b140088 --- /dev/null +++ b/app/module/boards/joric/nrfmicro/nrfmicro_nrf52833_1_3_0_defconfig @@ -0,0 +1,13 @@ +# SPDX-License-Identifier: MIT + +# Enable MPU +CONFIG_ARM_MPU=y + +CONFIG_PINCTRL=y + +# enable GPIO +CONFIG_GPIO=y + +CONFIG_USE_DT_CODE_PARTITION=y +CONFIG_BUILD_OUTPUT_UF2=y + diff --git a/app/boards/arm/nrfmicro/nrfmicro_11.dts b/app/module/boards/joric/nrfmicro/nrfmicro_nrf52840.dts similarity index 89% rename from app/boards/arm/nrfmicro/nrfmicro_11.dts rename to app/module/boards/joric/nrfmicro/nrfmicro_nrf52840.dts index b80ed4c6..787cfc34 100644 --- a/app/boards/arm/nrfmicro/nrfmicro_11.dts +++ b/app/module/boards/joric/nrfmicro/nrfmicro_nrf52840.dts @@ -6,6 +6,7 @@ /dts-v1/; #include + #include "arduino_pro_micro_pins.dtsi" #include "nrfmicro-pinctrl.dtsi" @@ -25,13 +26,14 @@ gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>; }; }; +}; - // Node name must match original "EXT_POWER" label to preserve user settings. - EXT_POWER { - compatible = "zmk,ext-power-generic"; - control-gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>; - init-delay-ms = <50>; - }; +®1 { + regulator-initial-mode = ; +}; + +&adc { + status = "okay"; }; &gpiote { @@ -72,7 +74,6 @@ zephyr_udc0: &usbd { status = "okay"; }; - &flash0 { /* * For more information, see: diff --git a/app/module/boards/joric/nrfmicro/nrfmicro_nrf52840_1_1_0.overlay b/app/module/boards/joric/nrfmicro/nrfmicro_nrf52840_1_1_0.overlay new file mode 100644 index 00000000..ac8b2057 --- /dev/null +++ b/app/module/boards/joric/nrfmicro/nrfmicro_nrf52840_1_1_0.overlay @@ -0,0 +1,15 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +/ { + // Node name must match original "EXT_POWER" label to preserve user settings. + EXT_POWER { + compatible = "zmk,ext-power-generic"; + control-gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>; + init-delay-ms = <50>; + }; +}; + diff --git a/app/module/boards/joric/nrfmicro/nrfmicro_nrf52840_1_1_0_defconfig b/app/module/boards/joric/nrfmicro/nrfmicro_nrf52840_1_1_0_defconfig new file mode 100644 index 00000000..5b140088 --- /dev/null +++ b/app/module/boards/joric/nrfmicro/nrfmicro_nrf52840_1_1_0_defconfig @@ -0,0 +1,13 @@ +# SPDX-License-Identifier: MIT + +# Enable MPU +CONFIG_ARM_MPU=y + +CONFIG_PINCTRL=y + +# enable GPIO +CONFIG_GPIO=y + +CONFIG_USE_DT_CODE_PARTITION=y +CONFIG_BUILD_OUTPUT_UF2=y + diff --git a/app/module/boards/joric/nrfmicro/nrfmicro_nrf52840_1_3_0_defconfig b/app/module/boards/joric/nrfmicro/nrfmicro_nrf52840_1_3_0_defconfig new file mode 100644 index 00000000..5e669b34 --- /dev/null +++ b/app/module/boards/joric/nrfmicro/nrfmicro_nrf52840_1_3_0_defconfig @@ -0,0 +1,12 @@ +# SPDX-License-Identifier: MIT + +# Enable MPU +CONFIG_ARM_MPU=y + +CONFIG_PINCTRL=y + +# enable GPIO +CONFIG_GPIO=y + +CONFIG_USE_DT_CODE_PARTITION=y +CONFIG_BUILD_OUTPUT_UF2=y diff --git a/app/boards/arm/nrfmicro/nrfmicro_11_flipped.dts b/app/module/boards/joric/nrfmicro/nrfmicro_nrf52840_flipped.dts similarity index 89% rename from app/boards/arm/nrfmicro/nrfmicro_11_flipped.dts rename to app/module/boards/joric/nrfmicro/nrfmicro_nrf52840_flipped.dts index 7b89b62f..1e328816 100644 --- a/app/boards/arm/nrfmicro/nrfmicro_11_flipped.dts +++ b/app/module/boards/joric/nrfmicro/nrfmicro_nrf52840_flipped.dts @@ -6,6 +6,7 @@ /dts-v1/; #include + #include "arduino_pro_micro_pins_flipped.dtsi" #include "nrfmicro-flipped-pinctrl.dtsi" @@ -25,13 +26,10 @@ gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>; }; }; +}; - // Node name must match original "EXT_POWER" label to preserve user settings. - EXT_POWER { - compatible = "zmk,ext-power-generic"; - control-gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>; - init-delay-ms = <50>; - }; +®1 { + regulator-initial-mode = ; }; &gpiote { diff --git a/app/module/boards/joric/nrfmicro/nrfmicro_nrf52840_flipped_1_1_0_defconfig b/app/module/boards/joric/nrfmicro/nrfmicro_nrf52840_flipped_1_1_0_defconfig new file mode 100644 index 00000000..5e669b34 --- /dev/null +++ b/app/module/boards/joric/nrfmicro/nrfmicro_nrf52840_flipped_1_1_0_defconfig @@ -0,0 +1,12 @@ +# SPDX-License-Identifier: MIT + +# Enable MPU +CONFIG_ARM_MPU=y + +CONFIG_PINCTRL=y + +# enable GPIO +CONFIG_GPIO=y + +CONFIG_USE_DT_CODE_PARTITION=y +CONFIG_BUILD_OUTPUT_UF2=y diff --git a/app/boards/arm/nrfmicro/pinmux.c b/app/module/boards/joric/nrfmicro/pinmux.c similarity index 100% rename from app/boards/arm/nrfmicro/pinmux.c rename to app/module/boards/joric/nrfmicro/pinmux.c diff --git a/app/boards/arm/s40nc/pre_dt_board.cmake b/app/module/boards/joric/nrfmicro/pre_dt_board.cmake similarity index 100% rename from app/boards/arm/s40nc/pre_dt_board.cmake rename to app/module/boards/joric/nrfmicro/pre_dt_board.cmake diff --git a/app/boards/arm/bluemicro840/Kconfig b/app/module/boards/jpconstantineau/bluemicro840/Kconfig similarity index 77% rename from app/boards/arm/bluemicro840/Kconfig rename to app/module/boards/jpconstantineau/bluemicro840/Kconfig index ca060885..470b5559 100644 --- a/app/boards/arm/bluemicro840/Kconfig +++ b/app/module/boards/jpconstantineau/bluemicro840/Kconfig @@ -4,5 +4,5 @@ config BOARD_ENABLE_DCDC bool "Enable DCDC mode" select SOC_DCDC_NRF52X default y - depends on BOARD_BLUEMICRO840_V1 + depends on BOARD_BLUEMICRO840 diff --git a/app/module/boards/jpconstantineau/bluemicro840/Kconfig.bluemicro840 b/app/module/boards/jpconstantineau/bluemicro840/Kconfig.bluemicro840 new file mode 100644 index 00000000..fd2a9143 --- /dev/null +++ b/app/module/boards/jpconstantineau/bluemicro840/Kconfig.bluemicro840 @@ -0,0 +1,5 @@ +# Copyright (c) 2026 Pete Johanson, Derek Schmell +# SPDX-License-Identifier: Apache-2.0 + +config BOARD_BLUEMICRO840 + select SOC_NRF52840_QIAA diff --git a/app/boards/arm/bluemicro840/Kconfig.defconfig b/app/module/boards/jpconstantineau/bluemicro840/Kconfig.defconfig similarity index 69% rename from app/boards/arm/bluemicro840/Kconfig.defconfig rename to app/module/boards/jpconstantineau/bluemicro840/Kconfig.defconfig index ff61ec92..81573146 100644 --- a/app/boards/arm/bluemicro840/Kconfig.defconfig +++ b/app/module/boards/jpconstantineau/bluemicro840/Kconfig.defconfig @@ -3,10 +3,7 @@ # Copyright (c) 2020 Pete Johanson, Derek Schmell # SPDX-License-Identifier: MIT -if BOARD_BLUEMICRO840_V1 - -config BOARD - default "bluemicro840_v1" +if BOARD_BLUEMICRO840 if USB_DEVICE_STACK @@ -18,4 +15,4 @@ endif # USB_DEVICE_STACK config BT_CTLR default BT -endif # BOARD_BLUEMICRO840_V1 +endif # BOARD_BLUEMICRO840 diff --git a/app/boards/arm/bluemicro840/arduino_pro_micro_pins.dtsi b/app/module/boards/jpconstantineau/bluemicro840/arduino_pro_micro_pins.dtsi similarity index 100% rename from app/boards/arm/bluemicro840/arduino_pro_micro_pins.dtsi rename to app/module/boards/jpconstantineau/bluemicro840/arduino_pro_micro_pins.dtsi diff --git a/app/boards/arm/bluemicro840/bluemicro840_v1-pinctrl.dtsi b/app/module/boards/jpconstantineau/bluemicro840/bluemicro840-pinctrl.dtsi similarity index 100% rename from app/boards/arm/bluemicro840/bluemicro840_v1-pinctrl.dtsi rename to app/module/boards/jpconstantineau/bluemicro840/bluemicro840-pinctrl.dtsi diff --git a/app/boards/arm/bluemicro840/bluemicro840_v1.dts b/app/module/boards/jpconstantineau/bluemicro840/bluemicro840.dts similarity index 81% rename from app/boards/arm/bluemicro840/bluemicro840_v1.dts rename to app/module/boards/jpconstantineau/bluemicro840/bluemicro840.dts index 84d3ebae..fe32d952 100644 --- a/app/boards/arm/bluemicro840/bluemicro840_v1.dts +++ b/app/module/boards/jpconstantineau/bluemicro840/bluemicro840.dts @@ -6,8 +6,9 @@ /dts-v1/; #include + #include "arduino_pro_micro_pins.dtsi" -#include "bluemicro840_v1-pinctrl.dtsi" +#include "bluemicro840-pinctrl.dtsi" / { model = "BlueMicro840_V1"; @@ -17,7 +18,6 @@ zephyr,code-partition = &code_partition; zephyr,sram = &sram0; zephyr,flash = &flash0; - zmk,battery = &vbatt; }; leds { @@ -26,21 +26,6 @@ gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>; }; }; - - // Node name must match original "EXT_POWER" label to preserve user settings. - EXT_POWER { - compatible = "zmk,ext-power-generic"; - init-delay-ms = <20>; - control-gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>; - }; - - vbatt: vbatt { - compatible = "zmk,battery-voltage-divider"; - io-channels = <&adc 7>; - output-ohms = <2000000>; - full-ohms = <(2000000 + 806000)>; - }; - }; &adc { diff --git a/app/boards/arm/bt60/bt60_v1.yaml b/app/module/boards/jpconstantineau/bluemicro840/bluemicro840.yaml similarity index 75% rename from app/boards/arm/bt60/bt60_v1.yaml rename to app/module/boards/jpconstantineau/bluemicro840/bluemicro840.yaml index 41fd7e40..c36eee0c 100644 --- a/app/boards/arm/bt60/bt60_v1.yaml +++ b/app/module/boards/jpconstantineau/bluemicro840/bluemicro840.yaml @@ -1,5 +1,5 @@ -identifier: bt60_v1 -name: BT60 V1 Soldered +identifier: bluemicro840 +name: BlueMicro840_V1 type: mcu arch: arm toolchain: diff --git a/app/module/boards/jpconstantineau/bluemicro840/bluemicro840_defconfig b/app/module/boards/jpconstantineau/bluemicro840/bluemicro840_defconfig new file mode 100644 index 00000000..5b140088 --- /dev/null +++ b/app/module/boards/jpconstantineau/bluemicro840/bluemicro840_defconfig @@ -0,0 +1,13 @@ +# SPDX-License-Identifier: MIT + +# Enable MPU +CONFIG_ARM_MPU=y + +CONFIG_PINCTRL=y + +# enable GPIO +CONFIG_GPIO=y + +CONFIG_USE_DT_CODE_PARTITION=y +CONFIG_BUILD_OUTPUT_UF2=y + diff --git a/app/module/boards/jpconstantineau/bluemicro840/board.cmake b/app/module/boards/jpconstantineau/bluemicro840/board.cmake new file mode 100644 index 00000000..73fa64a9 --- /dev/null +++ b/app/module/boards/jpconstantineau/bluemicro840/board.cmake @@ -0,0 +1,5 @@ +# SPDX-License-Identifier: MIT + +board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset") +include(${ZEPHYR_BASE}/boards/common/uf2.board.cmake) +include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake) diff --git a/app/module/boards/jpconstantineau/bluemicro840/board.yml b/app/module/boards/jpconstantineau/bluemicro840/board.yml new file mode 100644 index 00000000..0a9ebdd5 --- /dev/null +++ b/app/module/boards/jpconstantineau/bluemicro840/board.yml @@ -0,0 +1,5 @@ +board: + name: bluemicro840 + vendor: jpconstantineau + socs: + - name: nrf52840 diff --git a/app/module/boards/jpconstantineau/bluemicro840/pre_dt_board.cmake b/app/module/boards/jpconstantineau/bluemicro840/pre_dt_board.cmake new file mode 100644 index 00000000..b0c27aa5 --- /dev/null +++ b/app/module/boards/jpconstantineau/bluemicro840/pre_dt_board.cmake @@ -0,0 +1,9 @@ +# +# Copyright (c) 2026 The ZMK Contributors +# SPDX-License-Identifier: MIT +# + +# Suppresses duplicate unit-address warning at build time for power, clock, acl and flash-controller +# https://docs.zephyrproject.org/latest/build/dts/intro-input-output.html + +list(APPEND EXTRA_DTC_FLAGS "-Wno-unique_unit_address_if_enabled") diff --git a/app/boards/arm/nrfmicro/CMakeLists.txt b/app/module/boards/keycapsss/puchi_ble/CMakeLists.txt similarity index 100% rename from app/boards/arm/nrfmicro/CMakeLists.txt rename to app/module/boards/keycapsss/puchi_ble/CMakeLists.txt diff --git a/app/boards/arm/puchi_ble/Kconfig b/app/module/boards/keycapsss/puchi_ble/Kconfig similarity index 100% rename from app/boards/arm/puchi_ble/Kconfig rename to app/module/boards/keycapsss/puchi_ble/Kconfig diff --git a/app/module/boards/keycapsss/puchi_ble/Kconfig.defconfig b/app/module/boards/keycapsss/puchi_ble/Kconfig.defconfig new file mode 100644 index 00000000..ee8bc573 --- /dev/null +++ b/app/module/boards/keycapsss/puchi_ble/Kconfig.defconfig @@ -0,0 +1,16 @@ +# Copyright (c) 2026 The ZMK Contributors +# SPDX-License-Identifier: MIT + +if BOARD_PUCHI_BLE + +config BOARD + default "puchi_ble" + +if USB_DEVICE_STACK + +config USB_NRFX + default y + +endif # USB_DEVICE_STACK + +endif # BOARD_PUCHI_BLE diff --git a/app/module/boards/keycapsss/puchi_ble/Kconfig.puchi_ble b/app/module/boards/keycapsss/puchi_ble/Kconfig.puchi_ble new file mode 100644 index 00000000..4cd8b05b --- /dev/null +++ b/app/module/boards/keycapsss/puchi_ble/Kconfig.puchi_ble @@ -0,0 +1,10 @@ +# Puchi-BLE board configuration + +# Copyright (c) 2026 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config BOARD_PUCHI_BLE + select SOC_NRF52840_QIAA + imply RETAINED_MEM + imply RETENTION + imply RETENTION_BOOT_MODE diff --git a/app/boards/arm/puchi_ble/arduino_pro_micro_pins.dtsi b/app/module/boards/keycapsss/puchi_ble/arduino_pro_micro_pins.dtsi similarity index 100% rename from app/boards/arm/puchi_ble/arduino_pro_micro_pins.dtsi rename to app/module/boards/keycapsss/puchi_ble/arduino_pro_micro_pins.dtsi diff --git a/app/boards/arm/puchi_ble/board.cmake b/app/module/boards/keycapsss/puchi_ble/board.cmake similarity index 100% rename from app/boards/arm/puchi_ble/board.cmake rename to app/module/boards/keycapsss/puchi_ble/board.cmake diff --git a/app/module/boards/keycapsss/puchi_ble/board.yml b/app/module/boards/keycapsss/puchi_ble/board.yml new file mode 100644 index 00000000..d192a306 --- /dev/null +++ b/app/module/boards/keycapsss/puchi_ble/board.yml @@ -0,0 +1,5 @@ +board: + name: puchi_ble + vendor: keycapsss + socs: + - name: nrf52840 diff --git a/app/boards/arm/puchi_ble/pinmux.c b/app/module/boards/keycapsss/puchi_ble/pinmux.c similarity index 95% rename from app/boards/arm/puchi_ble/pinmux.c rename to app/module/boards/keycapsss/puchi_ble/pinmux.c index 8475cfb1..42689383 100644 --- a/app/boards/arm/puchi_ble/pinmux.c +++ b/app/module/boards/keycapsss/puchi_ble/pinmux.c @@ -12,7 +12,7 @@ #include static int pinmux_puchi_ble_init(void) { -#if CONFIG_BOARD_PUCHI_BLE_v1 +#if CONFIG_BOARD_PUCHI_BLE const struct device *p0 = DEVICE_DT_GET(DT_NODELABEL(gpio0)); #if CONFIG_BOARD_PUCHI_BLE_CHARGER gpio_pin_configure(p0, 5, GPIO_OUTPUT); diff --git a/app/module/boards/keycapsss/puchi_ble/pre_dt_board.cmake b/app/module/boards/keycapsss/puchi_ble/pre_dt_board.cmake new file mode 100644 index 00000000..b0c27aa5 --- /dev/null +++ b/app/module/boards/keycapsss/puchi_ble/pre_dt_board.cmake @@ -0,0 +1,9 @@ +# +# Copyright (c) 2026 The ZMK Contributors +# SPDX-License-Identifier: MIT +# + +# Suppresses duplicate unit-address warning at build time for power, clock, acl and flash-controller +# https://docs.zephyrproject.org/latest/build/dts/intro-input-output.html + +list(APPEND EXTRA_DTC_FLAGS "-Wno-unique_unit_address_if_enabled") diff --git a/app/boards/arm/puchi_ble/puchi_ble_v1-pinctrl.dtsi b/app/module/boards/keycapsss/puchi_ble/puchi_ble-pinctrl.dtsi similarity index 100% rename from app/boards/arm/puchi_ble/puchi_ble_v1-pinctrl.dtsi rename to app/module/boards/keycapsss/puchi_ble/puchi_ble-pinctrl.dtsi diff --git a/app/boards/arm/puchi_ble/puchi_ble_v1.dts b/app/module/boards/keycapsss/puchi_ble/puchi_ble.dts similarity index 96% rename from app/boards/arm/puchi_ble/puchi_ble_v1.dts rename to app/module/boards/keycapsss/puchi_ble/puchi_ble.dts index 9f3194e0..8195f568 100644 --- a/app/boards/arm/puchi_ble/puchi_ble_v1.dts +++ b/app/module/boards/keycapsss/puchi_ble/puchi_ble.dts @@ -6,8 +6,10 @@ /dts-v1/; #include +#include + #include "arduino_pro_micro_pins.dtsi" -#include "puchi_ble_v1-pinctrl.dtsi" +#include "puchi_ble-pinctrl.dtsi" / { model = "puchi_ble"; diff --git a/app/boards/arm/mikoto/mikoto_520.yaml b/app/module/boards/keycapsss/puchi_ble/puchi_ble.yaml similarity index 78% rename from app/boards/arm/mikoto/mikoto_520.yaml rename to app/module/boards/keycapsss/puchi_ble/puchi_ble.yaml index 8d9f49ae..19d1b122 100644 --- a/app/boards/arm/mikoto/mikoto_520.yaml +++ b/app/module/boards/keycapsss/puchi_ble/puchi_ble.yaml @@ -1,5 +1,5 @@ -identifier: mikoto_520 -name: mikoto_520 +identifier: puchi_ble +name: puchi_ble type: mcu arch: arm toolchain: diff --git a/app/boards/arm/puchi_ble/puchi_ble_v1.zmk.yml b/app/module/boards/keycapsss/puchi_ble/puchi_ble.zmk.yml similarity index 92% rename from app/boards/arm/puchi_ble/puchi_ble_v1.zmk.yml rename to app/module/boards/keycapsss/puchi_ble/puchi_ble.zmk.yml index f3114008..18f6463c 100644 --- a/app/boards/arm/puchi_ble/puchi_ble_v1.zmk.yml +++ b/app/module/boards/keycapsss/puchi_ble/puchi_ble.zmk.yml @@ -1,5 +1,5 @@ file_format: "1" -id: puchi_ble_v1 +id: puchi_ble name: Puchi-BLE V1 type: board arch: arm diff --git a/app/module/boards/keycapsss/puchi_ble/puchi_ble_defconfig b/app/module/boards/keycapsss/puchi_ble/puchi_ble_defconfig new file mode 100644 index 00000000..5d50cb25 --- /dev/null +++ b/app/module/boards/keycapsss/puchi_ble/puchi_ble_defconfig @@ -0,0 +1,15 @@ +# Copyright (c) 2026 The ZMK Contributors +# SPDX-License-Identifier: MIT + +# Enable MPU +CONFIG_ARM_MPU=y + +# enable GPIO +CONFIG_GPIO=y + +# Use pinctrl +CONFIG_PINCTRL=y + +CONFIG_USE_DT_CODE_PARTITION=y +CONFIG_BUILD_OUTPUT_UF2=y + diff --git a/app/boards/arm/nrf52840_m2/Kconfig b/app/module/boards/makerdiary/nrf52840_m2/Kconfig similarity index 100% rename from app/boards/arm/nrf52840_m2/Kconfig rename to app/module/boards/makerdiary/nrf52840_m2/Kconfig diff --git a/app/boards/arm/nrf52840_m2/Kconfig.defconfig b/app/module/boards/makerdiary/nrf52840_m2/Kconfig.defconfig similarity index 85% rename from app/boards/arm/nrf52840_m2/Kconfig.defconfig rename to app/module/boards/makerdiary/nrf52840_m2/Kconfig.defconfig index a5227fc0..a7851c3b 100644 --- a/app/boards/arm/nrf52840_m2/Kconfig.defconfig +++ b/app/module/boards/makerdiary/nrf52840_m2/Kconfig.defconfig @@ -3,9 +3,6 @@ if BOARD_NRF52840_M2 -config BOARD - default "nrf52480_m2" - if USB_DEVICE_STACK config USB_NRFX diff --git a/app/module/boards/makerdiary/nrf52840_m2/Kconfig.nrf52840_m2 b/app/module/boards/makerdiary/nrf52840_m2/Kconfig.nrf52840_m2 new file mode 100644 index 00000000..d4eb4c30 --- /dev/null +++ b/app/module/boards/makerdiary/nrf52840_m2/Kconfig.nrf52840_m2 @@ -0,0 +1,5 @@ +# Copyright (c) 2026 The ZMK Contributors +# SPDX-License-Identifier: Apache-2.0 + +config BOARD_NRF52840_M2 + select SOC_NRF52840_QIAA diff --git a/app/module/boards/makerdiary/nrf52840_m2/board.cmake b/app/module/boards/makerdiary/nrf52840_m2/board.cmake new file mode 100644 index 00000000..0acfeb73 --- /dev/null +++ b/app/module/boards/makerdiary/nrf52840_m2/board.cmake @@ -0,0 +1,7 @@ +# Copyright (c) 2026 The ZMK Contributors +# SPDX-License-Identifier: MIT + +board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset") + +include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake) +include(${ZEPHYR_BASE}/boards/common/blackmagicprobe.board.cmake) diff --git a/app/module/boards/makerdiary/nrf52840_m2/board.yml b/app/module/boards/makerdiary/nrf52840_m2/board.yml new file mode 100644 index 00000000..a1675e24 --- /dev/null +++ b/app/module/boards/makerdiary/nrf52840_m2/board.yml @@ -0,0 +1,5 @@ +board: + name: nrf52840_m2 + vendor: makerdiary + socs: + - name: nrf52840 diff --git a/app/boards/arm/nrf52840_m2/nrf52840_m2.dts b/app/module/boards/makerdiary/nrf52840_m2/nrf52840_m2.dts similarity index 89% rename from app/boards/arm/nrf52840_m2/nrf52840_m2.dts rename to app/module/boards/makerdiary/nrf52840_m2/nrf52840_m2.dts index 39569f0b..821fcd2a 100644 --- a/app/boards/arm/nrf52840_m2/nrf52840_m2.dts +++ b/app/module/boards/makerdiary/nrf52840_m2/nrf52840_m2.dts @@ -15,7 +15,6 @@ zephyr,code-partition = &code_partition; zephyr,sram = &sram0; zephyr,flash = &flash0; - zmk,battery = &vbatt; }; leds { @@ -30,14 +29,6 @@ gpios = <&gpio0 31 GPIO_ACTIVE_HIGH>; }; }; - - vbatt: vbatt { - compatible = "zmk,battery-voltage-divider"; - io-channels = <&adc 0>; - output-ohms = <1000000>; - full-ohms = <(1000000 + 1000000)>; - }; - }; &adc { diff --git a/app/boards/arm/bt60/bt60_v1_hs.yaml b/app/module/boards/makerdiary/nrf52840_m2/nrf52840_m2.yaml similarity index 70% rename from app/boards/arm/bt60/bt60_v1_hs.yaml rename to app/module/boards/makerdiary/nrf52840_m2/nrf52840_m2.yaml index 5a73753b..0a999bbf 100644 --- a/app/boards/arm/bt60/bt60_v1_hs.yaml +++ b/app/module/boards/makerdiary/nrf52840_m2/nrf52840_m2.yaml @@ -1,5 +1,5 @@ -identifier: bt60_v1_hs -name: BT60 V1 Hotswap +identifier: nrf52840_m2 +name: Makerdiary nRF52840 M.2 module type: mcu arch: arm toolchain: diff --git a/app/module/boards/makerdiary/nrf52840_m2/nrf52840_m2_defconfig b/app/module/boards/makerdiary/nrf52840_m2/nrf52840_m2_defconfig new file mode 100644 index 00000000..c7dc6fcf --- /dev/null +++ b/app/module/boards/makerdiary/nrf52840_m2/nrf52840_m2_defconfig @@ -0,0 +1,12 @@ +# Copyright (c) 2026 The ZMK Contributors +# SPDX-License-Identifier: MIT + +# Enable MPU +CONFIG_ARM_MPU=y + +# enable GPIO +CONFIG_GPIO=y + +CONFIG_USE_DT_CODE_PARTITION=y +CONFIG_BUILD_OUTPUT_UF2=y + diff --git a/app/module/boards/makerdiary/nrf52840_m2/pre_dt_board.cmake b/app/module/boards/makerdiary/nrf52840_m2/pre_dt_board.cmake new file mode 100644 index 00000000..b0c27aa5 --- /dev/null +++ b/app/module/boards/makerdiary/nrf52840_m2/pre_dt_board.cmake @@ -0,0 +1,9 @@ +# +# Copyright (c) 2026 The ZMK Contributors +# SPDX-License-Identifier: MIT +# + +# Suppresses duplicate unit-address warning at build time for power, clock, acl and flash-controller +# https://docs.zephyrproject.org/latest/build/dts/intro-input-output.html + +list(APPEND EXTRA_DTC_FLAGS "-Wno-unique_unit_address_if_enabled") diff --git a/app/boards/arm/pillbug/Kconfig b/app/module/boards/mechwild/pillbug/Kconfig similarity index 100% rename from app/boards/arm/pillbug/Kconfig rename to app/module/boards/mechwild/pillbug/Kconfig diff --git a/app/boards/arm/pillbug/Kconfig.defconfig b/app/module/boards/mechwild/pillbug/Kconfig.defconfig similarity index 86% rename from app/boards/arm/pillbug/Kconfig.defconfig rename to app/module/boards/mechwild/pillbug/Kconfig.defconfig index 48427ed3..e29ed678 100644 --- a/app/boards/arm/pillbug/Kconfig.defconfig +++ b/app/module/boards/mechwild/pillbug/Kconfig.defconfig @@ -3,9 +3,6 @@ if BOARD_PILLBUG -config BOARD - default "PillBug" - if USB_DEVICE_STACK config USB_NRFX diff --git a/app/module/boards/mechwild/pillbug/Kconfig.pillbug b/app/module/boards/mechwild/pillbug/Kconfig.pillbug new file mode 100644 index 00000000..d8967944 --- /dev/null +++ b/app/module/boards/mechwild/pillbug/Kconfig.pillbug @@ -0,0 +1,8 @@ +# Copyright (c) 2026 The ZMK Contributors +# SPDX-License-Identifier: Apache-2.0 + +config BOARD_PILLBUG + select SOC_NRF52840_QIAA + imply RETAINED_MEM + imply RETENTION + imply RETENTION_BOOT_MODE diff --git a/app/boards/arm/pillbug/blackpill_pins.dtsi b/app/module/boards/mechwild/pillbug/blackpill_pins.dtsi similarity index 100% rename from app/boards/arm/pillbug/blackpill_pins.dtsi rename to app/module/boards/mechwild/pillbug/blackpill_pins.dtsi diff --git a/app/module/boards/mechwild/pillbug/board.cmake b/app/module/boards/mechwild/pillbug/board.cmake new file mode 100644 index 00000000..d9d4ed92 --- /dev/null +++ b/app/module/boards/mechwild/pillbug/board.cmake @@ -0,0 +1,7 @@ +# SPDX-License-Identifier: MIT + +set(OPENOCD_NRF5_SUBFAMILY nrf52) +board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset") +include(${ZEPHYR_BASE}/boards/common/uf2.board.cmake) +include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake) +include(${ZEPHYR_BASE}/boards/common/openocd-nrf5.board.cmake) diff --git a/app/module/boards/mechwild/pillbug/board.yml b/app/module/boards/mechwild/pillbug/board.yml new file mode 100644 index 00000000..abd15044 --- /dev/null +++ b/app/module/boards/mechwild/pillbug/board.yml @@ -0,0 +1,5 @@ +board: + name: pillbug + vendor: mechwild + socs: + - name: nrf52840 diff --git a/app/module/boards/mechwild/pillbug/pillbug-pinctrl.dtsi b/app/module/boards/mechwild/pillbug/pillbug-pinctrl.dtsi new file mode 100644 index 00000000..609c4a72 --- /dev/null +++ b/app/module/boards/mechwild/pillbug/pillbug-pinctrl.dtsi @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2026 The ZMK Contributors + * SPDX-License-Identifier: MIT + */ + +&pinctrl { + uart0_default: uart0_default { + group1 { + psels = ; + bias-pull-up; + }; + group2 { + psels = ; + }; + }; + + uart0_sleep: uart0_sleep { + group1 { + psels = , + ; + low-power-enable; + }; + }; + + i2c0_default: i2c0_default { + group1 { + psels = , + ; + }; + }; + + i2c0_sleep: i2c0_sleep { + group1 { + psels = , + ; + low-power-enable; + }; + }; + + spi1_default: spi1_default { + group1 { + psels = , + , + ; + }; + }; + + spi1_sleep: spi1_sleep { + group1 { + psels = , + , + ; + low-power-enable; + }; + }; +}; diff --git a/app/boards/arm/pillbug/pillbug.dts b/app/module/boards/mechwild/pillbug/pillbug.dts similarity index 82% rename from app/boards/arm/pillbug/pillbug.dts rename to app/module/boards/mechwild/pillbug/pillbug.dts index cf4f62fc..b24f05df 100644 --- a/app/boards/arm/pillbug/pillbug.dts +++ b/app/module/boards/mechwild/pillbug/pillbug.dts @@ -7,6 +7,7 @@ /dts-v1/; #include + #include "pillbug-pinctrl.dtsi" #include "blackpill_pins.dtsi" @@ -18,7 +19,6 @@ zephyr,code-partition = &code_partition; zephyr,sram = &sram0; zephyr,flash = &flash0; - zmk,battery = &vbatt; }; leds { @@ -27,20 +27,6 @@ gpios = <&gpio0 20 GPIO_ACTIVE_LOW>; }; }; - - // Node name must match original "EXT_POWER" label to preserve user settings. - EXT_POWER { - compatible = "zmk,ext-power-generic"; - control-gpios = <&gpio1 7 GPIO_ACTIVE_LOW>; - init-delay-ms = <50>; - }; - - vbatt: vbatt { - compatible = "zmk,battery-voltage-divider"; - io-channels = <&adc 2>; - output-ohms = <2000000>; - full-ohms = <(2000000 + 820000)>; - }; }; &adc { @@ -86,7 +72,6 @@ zephyr_udc0: &usbd { status = "okay"; }; - &flash0 { /* * For more information, see: diff --git a/app/boards/arm/pillbug/pillbug.yaml b/app/module/boards/mechwild/pillbug/pillbug.yaml similarity index 100% rename from app/boards/arm/pillbug/pillbug.yaml rename to app/module/boards/mechwild/pillbug/pillbug.yaml diff --git a/app/module/boards/mechwild/pillbug/pillbug_defconfig b/app/module/boards/mechwild/pillbug/pillbug_defconfig new file mode 100644 index 00000000..8332d62b --- /dev/null +++ b/app/module/boards/mechwild/pillbug/pillbug_defconfig @@ -0,0 +1,14 @@ +# Copyright (c) 2026 The ZMK Contributors +# SPDX-License-Identifier: MIT + +# Enable MPU +CONFIG_ARM_MPU=y + +# Use pinctrl +CONFIG_PINCTRL=y + +# enable GPIO +CONFIG_GPIO=y + +CONFIG_USE_DT_CODE_PARTITION=y +CONFIG_BUILD_OUTPUT_UF2=y diff --git a/app/module/boards/mechwild/pillbug/pre_dt_board.cmake b/app/module/boards/mechwild/pillbug/pre_dt_board.cmake new file mode 100644 index 00000000..05b0efe5 --- /dev/null +++ b/app/module/boards/mechwild/pillbug/pre_dt_board.cmake @@ -0,0 +1,9 @@ +# +# Copyright (c) 2024 The ZMK Contributors +# SPDX-License-Identifier: MIT +# + +# Suppresses duplicate unit-address warning at build time for power, clock, acl and flash-controller +# https://docs.zephyrproject.org/latest/build/dts/intro-input-output.html + +list(APPEND EXTRA_DTC_FLAGS "-Wno-unique_unit_address_if_enabled") \ No newline at end of file diff --git a/app/module/boards/nicekeyboards/nice_nano/Kconfig.nice_nano b/app/module/boards/nicekeyboards/nice_nano/Kconfig.nice_nano new file mode 100644 index 00000000..01a9329c --- /dev/null +++ b/app/module/boards/nicekeyboards/nice_nano/Kconfig.nice_nano @@ -0,0 +1,5 @@ +# Copyright (c) 2026 The ZMK Contributors +# SPDX-License-Identifier: Apache-2.0 + +config BOARD_NICE_NANO + select SOC_NRF52840_QIAA diff --git a/app/boards/arm/nice_nano/arduino_pro_micro_pins.dtsi b/app/module/boards/nicekeyboards/nice_nano/arduino_pro_micro_pins.dtsi similarity index 100% rename from app/boards/arm/nice_nano/arduino_pro_micro_pins.dtsi rename to app/module/boards/nicekeyboards/nice_nano/arduino_pro_micro_pins.dtsi diff --git a/app/module/boards/nicekeyboards/nice_nano/board.cmake b/app/module/boards/nicekeyboards/nice_nano/board.cmake new file mode 100644 index 00000000..73fa64a9 --- /dev/null +++ b/app/module/boards/nicekeyboards/nice_nano/board.cmake @@ -0,0 +1,5 @@ +# SPDX-License-Identifier: MIT + +board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset") +include(${ZEPHYR_BASE}/boards/common/uf2.board.cmake) +include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake) diff --git a/app/module/boards/nicekeyboards/nice_nano/board.yml b/app/module/boards/nicekeyboards/nice_nano/board.yml new file mode 100644 index 00000000..89171957 --- /dev/null +++ b/app/module/boards/nicekeyboards/nice_nano/board.yml @@ -0,0 +1,11 @@ +board: + name: nice_nano + vendor: nicekeyboards + socs: + - name: nrf52840 + revision: + format: major.minor.patch + default: 2.0.0 + revisions: + - name: 1.0.0 + - name: 2.0.0 diff --git a/app/boards/arm/nice_nano/nice_nano-pinctrl.dtsi b/app/module/boards/nicekeyboards/nice_nano/nice_nano-pinctrl.dtsi similarity index 100% rename from app/boards/arm/nice_nano/nice_nano-pinctrl.dtsi rename to app/module/boards/nicekeyboards/nice_nano/nice_nano-pinctrl.dtsi diff --git a/app/boards/arm/nice_nano/nice_nano.dtsi b/app/module/boards/nicekeyboards/nice_nano/nice_nano.dts similarity index 96% rename from app/boards/arm/nice_nano/nice_nano.dtsi rename to app/module/boards/nicekeyboards/nice_nano/nice_nano.dts index 839845c8..2788ceae 100644 --- a/app/boards/arm/nice_nano/nice_nano.dtsi +++ b/app/module/boards/nicekeyboards/nice_nano/nice_nano.dts @@ -4,10 +4,13 @@ * SPDX-License-Identifier: MIT */ +/dts-v1/; + #include #include "nice_nano-pinctrl.dtsi" #include "arduino_pro_micro_pins.dtsi" + / { model = "nice!nano"; compatible = "nice,nano"; @@ -26,6 +29,10 @@ }; }; +®1 { + regulator-initial-mode = ; +}; + &adc { status = "okay"; }; diff --git a/app/boards/arm/nice_nano/nice_nano.yaml b/app/module/boards/nicekeyboards/nice_nano/nice_nano.yaml similarity index 100% rename from app/boards/arm/nice_nano/nice_nano.yaml rename to app/module/boards/nicekeyboards/nice_nano/nice_nano.yaml diff --git a/app/module/boards/nicekeyboards/nice_nano/nice_nano_1_0_0_defconfig b/app/module/boards/nicekeyboards/nice_nano/nice_nano_1_0_0_defconfig new file mode 100644 index 00000000..0779d359 --- /dev/null +++ b/app/module/boards/nicekeyboards/nice_nano/nice_nano_1_0_0_defconfig @@ -0,0 +1,13 @@ +# SPDX-License-Identifier: MIT + +# Enable MPU +CONFIG_ARM_MPU=y + +# enable GPIO +CONFIG_GPIO=y + +# Use pinctrl +CONFIG_PINCTRL=y + +CONFIG_USE_DT_CODE_PARTITION=y +CONFIG_BUILD_OUTPUT_UF2=y diff --git a/app/module/boards/nicekeyboards/nice_nano/nice_nano_2_0_0_defconfig b/app/module/boards/nicekeyboards/nice_nano/nice_nano_2_0_0_defconfig new file mode 100644 index 00000000..73d6e98a --- /dev/null +++ b/app/module/boards/nicekeyboards/nice_nano/nice_nano_2_0_0_defconfig @@ -0,0 +1,13 @@ +# SPDX-License-Identifier: MIT + +# Enable MPU +CONFIG_ARM_MPU=y + +# Use pinctrl +CONFIG_PINCTRL=y + +# enable GPIO +CONFIG_GPIO=y + +CONFIG_USE_DT_CODE_PARTITION=y +CONFIG_BUILD_OUTPUT_UF2=y diff --git a/app/module/boards/nicekeyboards/nice_nano/pre_dt_board.cmake b/app/module/boards/nicekeyboards/nice_nano/pre_dt_board.cmake new file mode 100644 index 00000000..b0c27aa5 --- /dev/null +++ b/app/module/boards/nicekeyboards/nice_nano/pre_dt_board.cmake @@ -0,0 +1,9 @@ +# +# Copyright (c) 2026 The ZMK Contributors +# SPDX-License-Identifier: MIT +# + +# Suppresses duplicate unit-address warning at build time for power, clock, acl and flash-controller +# https://docs.zephyrproject.org/latest/build/dts/intro-input-output.html + +list(APPEND EXTRA_DTC_FLAGS "-Wno-unique_unit_address_if_enabled") diff --git a/app/module/boards/qmk/proton_c/Kconfig.proton_c b/app/module/boards/qmk/proton_c/Kconfig.proton_c new file mode 100644 index 00000000..ba5edaf8 --- /dev/null +++ b/app/module/boards/qmk/proton_c/Kconfig.proton_c @@ -0,0 +1,5 @@ +# Copyright (c) 2020 Pete Johanson +# SPDX-License-Identifier: Apache-2.0 + +config BOARD_PROTON_C + select SOC_STM32F303XC diff --git a/app/boards/arm/proton_c/arduino_pro_micro_pins.dtsi b/app/module/boards/qmk/proton_c/arduino_pro_micro_pins.dtsi similarity index 100% rename from app/boards/arm/proton_c/arduino_pro_micro_pins.dtsi rename to app/module/boards/qmk/proton_c/arduino_pro_micro_pins.dtsi diff --git a/app/boards/arm/proton_c/board.cmake b/app/module/boards/qmk/proton_c/board.cmake similarity index 100% rename from app/boards/arm/proton_c/board.cmake rename to app/module/boards/qmk/proton_c/board.cmake diff --git a/app/module/boards/qmk/proton_c/board.yml b/app/module/boards/qmk/proton_c/board.yml new file mode 100644 index 00000000..54ecb64b --- /dev/null +++ b/app/module/boards/qmk/proton_c/board.yml @@ -0,0 +1,5 @@ +board: + name: proton_c + vendor: qmk + socs: + - name: stm32f303xc diff --git a/app/boards/arm/proton_c/proton_c.dts b/app/module/boards/qmk/proton_c/proton_c.dts similarity index 100% rename from app/boards/arm/proton_c/proton_c.dts rename to app/module/boards/qmk/proton_c/proton_c.dts diff --git a/app/boards/arm/proton_c/proton_c.yaml b/app/module/boards/qmk/proton_c/proton_c.yaml similarity index 100% rename from app/boards/arm/proton_c/proton_c.yaml rename to app/module/boards/qmk/proton_c/proton_c.yaml diff --git a/app/boards/arm/proton_c/proton_c.zmk.yml b/app/module/boards/qmk/proton_c/proton_c.zmk.yml similarity index 100% rename from app/boards/arm/proton_c/proton_c.zmk.yml rename to app/module/boards/qmk/proton_c/proton_c.zmk.yml diff --git a/app/boards/arm/proton_c/proton_c_defconfig b/app/module/boards/qmk/proton_c/proton_c_defconfig similarity index 77% rename from app/boards/arm/proton_c/proton_c_defconfig rename to app/module/boards/qmk/proton_c/proton_c_defconfig index c552bf15..83dd1ee9 100644 --- a/app/boards/arm/proton_c/proton_c_defconfig +++ b/app/module/boards/qmk/proton_c/proton_c_defconfig @@ -1,7 +1,5 @@ # SPDX-License-Identifier: MIT -CONFIG_SOC_SERIES_STM32F3X=y -CONFIG_SOC_STM32F303XC=y # 72MHz system clock CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=72000000 @@ -16,5 +14,3 @@ CONFIG_GPIO=y # clock configuration CONFIG_CLOCK_CONTROL=y - -CONFIG_ZMK_USB=y \ No newline at end of file diff --git a/app/boards/arm/puchi_ble/CMakeLists.txt b/app/module/boards/zhiayang/mikoto/CMakeLists.txt similarity index 100% rename from app/boards/arm/puchi_ble/CMakeLists.txt rename to app/module/boards/zhiayang/mikoto/CMakeLists.txt diff --git a/app/boards/arm/mikoto/Kconfig b/app/module/boards/zhiayang/mikoto/Kconfig similarity index 69% rename from app/boards/arm/mikoto/Kconfig rename to app/module/boards/zhiayang/mikoto/Kconfig index fab2218c..0313f68b 100644 --- a/app/boards/arm/mikoto/Kconfig +++ b/app/module/boards/zhiayang/mikoto/Kconfig @@ -1,18 +1,6 @@ -config BOARD_ENABLE_DCDC - bool "Enable DCDC mode" - select SOC_DCDC_NRF52X - default y - depends on (BOARD_MIKOTO_520) - -config BOARD_ENABLE_DCDC_HV - bool "High voltage DCDC converter" - select SOC_DCDC_NRF52X_HV - default y - depends on (BOARD_MIKOTO_520) - choice BOARD_MIKOTO_CHARGER_CURRENT prompt "Charge current to supply to attached batteries" - depends on (BOARD_MIKOTO_520) + depends on (BOARD_MIKOTO) config BOARD_MIKOTO_CHARGER_CURRENT_40MA bool "40mA charge current, for battery capacity 40mAh or higher" @@ -32,4 +20,4 @@ config BOARD_MIKOTO_CHARGER_CURRENT_350MA config BOARD_MIKOTO_CHARGER_CURRENT_NONE bool "Disable charge current" -endchoice \ No newline at end of file +endchoice diff --git a/app/boards/arm/mikoto/Kconfig.defconfig b/app/module/boards/zhiayang/mikoto/Kconfig.defconfig similarity index 73% rename from app/boards/arm/mikoto/Kconfig.defconfig rename to app/module/boards/zhiayang/mikoto/Kconfig.defconfig index 5702c6de..730cc005 100644 --- a/app/boards/arm/mikoto/Kconfig.defconfig +++ b/app/module/boards/zhiayang/mikoto/Kconfig.defconfig @@ -3,10 +3,7 @@ # Copyright (c) 2020 The ZMK Contributors # SPDX-License-Identifier: MIT -if BOARD_MIKOTO_520 - -config BOARD - default "mikoto" +if BOARD_MIKOTO if USB @@ -18,11 +15,8 @@ config USB_DEVICE_STACK endif # USB -config BT_CTLR - default BT - choice BOARD_MIKOTO_CHARGER_CURRENT default BOARD_MIKOTO_CHARGER_CURRENT_100MA endchoice -endif # BOARD_MIKOTO_520 +endif # BOARD_MIKOTO diff --git a/app/module/boards/zhiayang/mikoto/Kconfig.mikoto b/app/module/boards/zhiayang/mikoto/Kconfig.mikoto new file mode 100644 index 00000000..2190c382 --- /dev/null +++ b/app/module/boards/zhiayang/mikoto/Kconfig.mikoto @@ -0,0 +1,5 @@ +# Copyright (c) 2026 The ZMK Contributors +# SPDX-License-Identifier: Apache-2.0 + +config BOARD_MIKOTO + select SOC_NRF52840_QIAA diff --git a/app/boards/arm/mikoto/arduino_pro_micro_pins.dtsi b/app/module/boards/zhiayang/mikoto/arduino_pro_micro_pins_v5.dtsi similarity index 100% rename from app/boards/arm/mikoto/arduino_pro_micro_pins.dtsi rename to app/module/boards/zhiayang/mikoto/arduino_pro_micro_pins_v5.dtsi diff --git a/app/module/boards/zhiayang/mikoto/arduino_pro_micro_pins_v6.dtsi b/app/module/boards/zhiayang/mikoto/arduino_pro_micro_pins_v6.dtsi new file mode 100644 index 00000000..79d8b155 --- /dev/null +++ b/app/module/boards/zhiayang/mikoto/arduino_pro_micro_pins_v6.dtsi @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + + +/ { + pro_micro: connector { + compatible = "arduino-pro-micro"; + #gpio-cells = <2>; + gpio-map-mask = <0xffffffff 0xffffffc0>; + gpio-map-pass-thru = <0 0x3f>; + gpio-map + = <0 0 &gpio0 4 0> /* D0 */ + , <1 0 &gpio0 8 0> /* D1 */ + , <2 0 &gpio0 17 0> /* D2 */ + , <3 0 &gpio0 20 0> /* D3 */ + , <4 0 &gpio0 22 0> /* D4/A6 */ + , <5 0 &gpio0 24 0> /* D5 */ + , <6 0 &gpio1 8 0> /* D6/A7 */ + , <7 0 &gpio1 2 0> /* D7 */ + , <8 0 &gpio1 4 0> /* D8/A8 */ + , <9 0 &gpio1 6 0> /* D9/A9 */ + , <10 0 &gpio0 9 0> /* D10/A10 */ + , <16 0 &gpio0 10 0> /* D16 */ + , <14 0 &gpio1 13 0> /* D14 */ + , <15 0 &gpio0 2 0> /* D15 */ + , <18 0 &gpio0 29 0> /* D18/A0 */ + , <19 0 &gpio0 31 0> /* D19/A1 */ + , <20 0 &gpio0 25 0> /* D20/A2 */ + , <21 0 &gpio0 11 0> /* D21/A3 */ + ; + }; + + pro_micro_a: connector_a { + compatible = "arduino-pro-micro"; + #gpio-cells = <2>; + gpio-map-mask = <0xffffffff 0xffffffc0>; + gpio-map-pass-thru = <0 0x3f>; + gpio-map + = <0 0 &gpio0 29 0> /* D18/A0 */ + , <1 0 &gpio0 31 0> /* D19/A1 */ + , <2 0 &gpio0 25 0> /* D20/A2 */ + , <3 0 &gpio0 11 0> /* D21/A3 */ + , <6 0 &gpio0 22 0> /* D4/A6 */ + , <7 0 &gpio1 8 0> /* D6/A7 */ + , <8 0 &gpio1 4 0> /* D8/A8 */ + , <9 0 &gpio1 6 0> /* D9/A9 */ + , <10 0 &gpio0 9 0> /* D10/A10 */ + ; + }; +}; + + +pro_micro_d: &pro_micro {}; +pro_micro_i2c: &i2c0 {}; +pro_micro_spi: &spi0 {}; +pro_micro_serial: &uart0 {}; diff --git a/app/module/boards/zhiayang/mikoto/board.cmake b/app/module/boards/zhiayang/mikoto/board.cmake new file mode 100644 index 00000000..73fa64a9 --- /dev/null +++ b/app/module/boards/zhiayang/mikoto/board.cmake @@ -0,0 +1,5 @@ +# SPDX-License-Identifier: MIT + +board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset") +include(${ZEPHYR_BASE}/boards/common/uf2.board.cmake) +include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake) diff --git a/app/module/boards/zhiayang/mikoto/board.yml b/app/module/boards/zhiayang/mikoto/board.yml new file mode 100644 index 00000000..d1f71557 --- /dev/null +++ b/app/module/boards/zhiayang/mikoto/board.yml @@ -0,0 +1,14 @@ +board: + name: mikoto + vendor: zhiayang + revision: + format: major.minor.patch + default: 5.20.0 + exact: false + revisions: + - name: 5.20.0 + - name: 6.1.0 + - name: 6.3.0 + - name: 7.2.0 + socs: + - name: nrf52840 diff --git a/app/boards/arm/mikoto/mikoto_520-pinctrl.dtsi b/app/module/boards/zhiayang/mikoto/mikoto-pinctrl.dtsi similarity index 88% rename from app/boards/arm/mikoto/mikoto_520-pinctrl.dtsi rename to app/module/boards/zhiayang/mikoto/mikoto-pinctrl.dtsi index 8cd1e0af..1c85c203 100644 --- a/app/boards/arm/mikoto/mikoto_520-pinctrl.dtsi +++ b/app/module/boards/zhiayang/mikoto/mikoto-pinctrl.dtsi @@ -17,7 +17,7 @@ uart0_sleep: uart0_sleep { group1 { psels = , - ; + ; low-power-enable; }; }; @@ -25,14 +25,14 @@ i2c0_default: i2c0_default { group1 { psels = , - ; + ; }; }; i2c0_sleep: i2c0_sleep { group1 { psels = , - ; + ; low-power-enable; }; }; diff --git a/app/boards/arm/mikoto/mikoto_520.dts b/app/module/boards/zhiayang/mikoto/mikoto.dts similarity index 79% rename from app/boards/arm/mikoto/mikoto_520.dts rename to app/module/boards/zhiayang/mikoto/mikoto.dts index 3ea48cd9..e0ce24aa 100644 --- a/app/boards/arm/mikoto/mikoto_520.dts +++ b/app/module/boards/zhiayang/mikoto/mikoto.dts @@ -6,8 +6,7 @@ /dts-v1/; #include -#include "arduino_pro_micro_pins.dtsi" -#include "mikoto_520-pinctrl.dtsi" +#include / { model = "mikoto"; @@ -17,7 +16,6 @@ zephyr,code-partition = &code_partition; zephyr,sram = &sram0; zephyr,flash = &flash0; - zmk,battery = &vbatt; }; leds { @@ -26,20 +24,10 @@ gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>; }; }; +}; - // Node name must match original "EXT_POWER" label to preserve user settings. - EXT_POWER { - compatible = "zmk,ext-power-generic"; - control-gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>; - init-delay-ms = <50>; - }; - - vbatt: vbatt { - compatible = "zmk,battery-voltage-divider"; - io-channels = <&adc 1>; - output-ohms = <10000000>; - full-ohms = <(10000000 + 4000000)>; - }; +®1 { + regulator-initial-mode = ; }; &adc { diff --git a/app/module/boards/zhiayang/mikoto/mikoto.yaml b/app/module/boards/zhiayang/mikoto/mikoto.yaml new file mode 100644 index 00000000..7410471e --- /dev/null +++ b/app/module/boards/zhiayang/mikoto/mikoto.yaml @@ -0,0 +1,15 @@ +identifier: mikoto +name: mikoto +type: mcu +arch: arm +toolchain: + - zephyr + - gnuarmemb + - xtools +supported: + - adc + - usb_device + - ble + - ieee802154 + - pwm + - watchdog diff --git a/app/boards/adafruit_qt_py_rp2040.overlay b/app/module/boards/zhiayang/mikoto/mikoto_5_20_0.overlay similarity index 54% rename from app/boards/adafruit_qt_py_rp2040.overlay rename to app/module/boards/zhiayang/mikoto/mikoto_5_20_0.overlay index b5d2cdb2..f9e744ea 100644 --- a/app/boards/adafruit_qt_py_rp2040.overlay +++ b/app/module/boards/zhiayang/mikoto/mikoto_5_20_0.overlay @@ -4,4 +4,5 @@ * SPDX-License-Identifier: MIT */ -&xiao_serial { status = "disabled"; }; +#include "mikoto-pinctrl.dtsi" +#include "arduino_pro_micro_pins_v5.dtsi" diff --git a/app/boards/01space_rp2040_042lcd.overlay b/app/module/boards/zhiayang/mikoto/mikoto_6_1_0.overlay similarity index 54% rename from app/boards/01space_rp2040_042lcd.overlay rename to app/module/boards/zhiayang/mikoto/mikoto_6_1_0.overlay index b5d2cdb2..80466fd2 100644 --- a/app/boards/01space_rp2040_042lcd.overlay +++ b/app/module/boards/zhiayang/mikoto/mikoto_6_1_0.overlay @@ -4,4 +4,5 @@ * SPDX-License-Identifier: MIT */ -&xiao_serial { status = "disabled"; }; +#include "mikoto-pinctrl.dtsi" +#include "arduino_pro_micro_pins_v6.dtsi" diff --git a/app/module/boards/zhiayang/mikoto/mikoto_7_2_0.conf b/app/module/boards/zhiayang/mikoto/mikoto_7_2_0.conf new file mode 100644 index 00000000..8bf92886 --- /dev/null +++ b/app/module/boards/zhiayang/mikoto/mikoto_7_2_0.conf @@ -0,0 +1,2 @@ +CONFIG_I2C=y +CONFIG_ZMK_MAX17048=y diff --git a/app/module/boards/zhiayang/mikoto/mikoto_7_2_0.overlay b/app/module/boards/zhiayang/mikoto/mikoto_7_2_0.overlay new file mode 100644 index 00000000..30c05510 --- /dev/null +++ b/app/module/boards/zhiayang/mikoto/mikoto_7_2_0.overlay @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2023 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include "mikoto-pinctrl.dtsi" +#include "arduino_pro_micro_pins_v6.dtsi" + +&pinctrl { + i2c1_default: i2c1_default { + group1 { + psels = , + ; + bias-pull-up; + }; + }; + + i2c1_sleep: i2c1_sleep { + group1 { + psels = , + ; + low-power-enable; + bias-pull-up; + }; + }; +}; + +&i2c1 { + status = "okay"; + compatible = "nordic,nrf-twi"; + pinctrl-0 = <&i2c1_default>; + pinctrl-1 = <&i2c1_sleep>; + pinctrl-names = "default", "sleep"; + + builtin_fuel_gauge: max17048@36 { + compatible = "zmk,maxim-max17048"; + status = "okay"; + reg = <0x36>; + }; +}; + +/ { + chosen { + zmk,battery = &builtin_fuel_gauge; + }; +}; diff --git a/app/module/boards/zhiayang/mikoto/mikoto_defconfig b/app/module/boards/zhiayang/mikoto/mikoto_defconfig new file mode 100644 index 00000000..17ef2da4 --- /dev/null +++ b/app/module/boards/zhiayang/mikoto/mikoto_defconfig @@ -0,0 +1,12 @@ +# SPDX-License-Identifier: MIT + +# Enable MPU +CONFIG_ARM_MPU=y +CONFIG_PINCTRL=y + +# enable GPIO +CONFIG_GPIO=y + +CONFIG_USE_DT_CODE_PARTITION=y +CONFIG_BUILD_OUTPUT_UF2=y + diff --git a/app/boards/arm/mikoto/pinmux.c b/app/module/boards/zhiayang/mikoto/pinmux.c similarity index 98% rename from app/boards/arm/mikoto/pinmux.c rename to app/module/boards/zhiayang/mikoto/pinmux.c index c34c2dc8..a3901424 100644 --- a/app/boards/arm/mikoto/pinmux.c +++ b/app/module/boards/zhiayang/mikoto/pinmux.c @@ -13,7 +13,7 @@ static int pinmux_mikoto_init(void) { -#if CONFIG_BOARD_MIKOTO_520 +#if CONFIG_BOARD_MIKOTO const struct device *p0 = DEVICE_DT_GET(DT_NODELABEL(gpio0)); const struct device *p1 = DEVICE_DT_GET(DT_NODELABEL(gpio1)); #if CONFIG_BOARD_MIKOTO_CHARGER_CURRENT_40MA diff --git a/app/module/boards/zhiayang/mikoto/pre_dt_board.cmake b/app/module/boards/zhiayang/mikoto/pre_dt_board.cmake new file mode 100644 index 00000000..d2d49226 --- /dev/null +++ b/app/module/boards/zhiayang/mikoto/pre_dt_board.cmake @@ -0,0 +1,8 @@ +# Copyright (c) 2026 The ZMK Contributors +# SPDX-License-Identifier: MIT +# + +# Suppresses duplicate unit-address warning at build time for power, clock, acl and flash-controller +# https://docs.zephyrproject.org/latest/build/dts/intro-input-output.html + +list(APPEND EXTRA_DTC_FLAGS "-Wno-unique_unit_address_if_enabled") diff --git a/app/module/drivers/CMakeLists.txt b/app/module/drivers/CMakeLists.txt index 5281c3dc..a3a15c65 100644 --- a/app/module/drivers/CMakeLists.txt +++ b/app/module/drivers/CMakeLists.txt @@ -5,3 +5,4 @@ add_subdirectory_ifdef(CONFIG_GPIO gpio) add_subdirectory_ifdef(CONFIG_KSCAN kscan) add_subdirectory_ifdef(CONFIG_SENSOR sensor) add_subdirectory_ifdef(CONFIG_DISPLAY display) +add_subdirectory_ifdef(CONFIG_INPUT input) diff --git a/app/module/drivers/Kconfig b/app/module/drivers/Kconfig index c57ed334..db3f49a5 100644 --- a/app/module/drivers/Kconfig +++ b/app/module/drivers/Kconfig @@ -5,3 +5,4 @@ rsource "gpio/Kconfig" rsource "kscan/Kconfig" rsource "sensor/Kconfig" rsource "display/Kconfig" +rsource "input/Kconfig" diff --git a/app/module/drivers/display/il0323.c b/app/module/drivers/display/il0323.c index c9d72fc5..3eeb26fd 100644 --- a/app/module/drivers/display/il0323.c +++ b/app/module/drivers/display/il0323.c @@ -371,14 +371,14 @@ static int il0323_init(const struct device *dev) { return il0323_controller_init(dev); } -static struct il0323_cfg il0323_config = { +static const struct il0323_cfg il0323_config = { .spi = SPI_DT_SPEC_INST_GET(0, SPI_OP_MODE_MASTER | SPI_WORD_SET(8), 0), .reset = GPIO_DT_SPEC_INST_GET(0, reset_gpios), .busy = GPIO_DT_SPEC_INST_GET(0, busy_gpios), .dc = GPIO_DT_SPEC_INST_GET(0, dc_gpios), }; -static struct display_driver_api il0323_driver_api = { +static const struct display_driver_api il0323_driver_api = { .blanking_on = il0323_blanking_on, .blanking_off = il0323_blanking_off, .write = il0323_write, diff --git a/app/module/drivers/gpio/gpio_595.c b/app/module/drivers/gpio/gpio_595.c index 3d385844..e8c89e47 100644 --- a/app/module/drivers/gpio/gpio_595.c +++ b/app/module/drivers/gpio/gpio_595.c @@ -89,26 +89,6 @@ static int setup_pin_dir(const struct device *dev, uint32_t pin, int flags) { return 0; } -static int reg_595_pin_config(const struct device *dev, gpio_pin_t pin, gpio_flags_t flags) { - int ret; - - /* Can't do SPI bus operations from an ISR */ - if (k_is_in_isr()) { - return -EWOULDBLOCK; - } - - if ((flags & GPIO_OPEN_DRAIN) != 0U) { - return -ENOTSUP; - }; - - ret = setup_pin_dir(dev, pin, flags); - if (ret) { - LOG_ERR("595: error setting pin direction (%d)", ret); - } - - return ret; -} - static int reg_595_port_get_raw(const struct device *dev, uint32_t *value) { return -ENOTSUP; } static int reg_595_port_set_masked_raw(const struct device *dev, uint32_t mask, uint32_t value) { @@ -161,6 +141,32 @@ static int reg_595_port_toggle_bits(const struct device *dev, uint32_t mask) { return ret; } +static int reg_595_pin_config(const struct device *dev, gpio_pin_t pin, gpio_flags_t flags) { + int ret; + + /* Can't do SPI bus operations from an ISR */ + if (k_is_in_isr()) { + return -EWOULDBLOCK; + } + + if ((flags & GPIO_OPEN_DRAIN) != 0U) { + return -ENOTSUP; + }; + + ret = setup_pin_dir(dev, pin, flags); + if (ret) { + LOG_ERR("595: error setting pin direction (%d)", ret); + } + + if ((flags & GPIO_OUTPUT_INIT_LOW) != 0) { + return reg_595_port_clear_bits_raw(dev, BIT(pin)); + } else if ((flags & GPIO_OUTPUT_INIT_HIGH) != 0) { + return reg_595_port_set_bits_raw(dev, BIT(pin)); + } + + return ret; +} + static const struct gpio_driver_api api_table = { .pin_configure = reg_595_pin_config, .port_get_raw = reg_595_port_get_raw, @@ -196,7 +202,7 @@ static int reg_595_init(const struct device *dev) { GPIO_PORT_PIN_MASK_FROM_NGPIOS(DT_INST_PROP(inst, ngpios)) #define REG_595_INIT(n) \ - static struct reg_595_config reg_595_##n##_config = { \ + static const struct reg_595_config reg_595_##n##_config = { \ .common = \ { \ .port_pin_mask = GPIO_PORT_PIN_MASK_FROM_DT_INST(n), \ diff --git a/app/module/drivers/gpio/gpio_max7318.c b/app/module/drivers/gpio/gpio_max7318.c index 1842ce7b..a0e1b39a 100644 --- a/app/module/drivers/gpio/gpio_max7318.c +++ b/app/module/drivers/gpio/gpio_max7318.c @@ -322,7 +322,7 @@ static int max7318_init(const struct device *dev) { GPIO_PORT_PIN_MASK_FROM_NGPIOS(DT_INST_PROP(inst, ngpios)) #define MAX7318_INIT(inst) \ - static struct max7318_config max7318_##inst##_config = { \ + static const struct max7318_config max7318_##inst##_config = { \ .common = {.port_pin_mask = GPIO_PORT_PIN_MASK_FROM_DT_INST(inst)}, \ .i2c_bus = I2C_DT_SPEC_INST_GET(inst)}; \ \ diff --git a/app/module/drivers/input/CMakeLists.txt b/app/module/drivers/input/CMakeLists.txt new file mode 100644 index 00000000..f8f5b231 --- /dev/null +++ b/app/module/drivers/input/CMakeLists.txt @@ -0,0 +1,6 @@ +# Copyright (c) 2020-2023 The ZMK Contributors +# SPDX-License-Identifier: MIT + +zephyr_library_amend() + +zephyr_library_sources_ifdef(CONFIG_ZMK_INPUT_MOCK input_mock.c) diff --git a/app/module/drivers/input/Kconfig b/app/module/drivers/input/Kconfig new file mode 100644 index 00000000..248805d1 --- /dev/null +++ b/app/module/drivers/input/Kconfig @@ -0,0 +1,9 @@ + +if INPUT + +config ZMK_INPUT_MOCK + bool "Input Mock" + default y + depends on DT_HAS_ZMK_INPUT_MOCK_ENABLED + +endif \ No newline at end of file diff --git a/app/module/drivers/input/input_mock.c b/app/module/drivers/input/input_mock.c new file mode 100644 index 00000000..23282cd0 --- /dev/null +++ b/app/module/drivers/input/input_mock.c @@ -0,0 +1,89 @@ +/* + * Copyright (c) 2024 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#define DT_DRV_COMPAT zmk_input_mock + +#include +#include +#include +#include +#include + +LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); + +struct input_mock_config { + uint16_t startup_delay; + uint16_t event_period; + bool exit_after; + const uint32_t *events; + size_t events_len; +}; + +struct input_mock_data { + size_t event_index; + struct k_work_delayable work; + const struct device *dev; +}; + +static void input_mock_work_cb(struct k_work *work) { + struct k_work_delayable *dwork = CONTAINER_OF(work, struct k_work_delayable, work); + struct input_mock_data *data = CONTAINER_OF(dwork, struct input_mock_data, work); + + const struct device *dev = data->dev; + + const struct input_mock_config *cfg = dev->config; + + data->event_index++; + + size_t base_idx = data->event_index * 4; + + if (base_idx >= cfg->events_len) { + if (cfg->exit_after) { + exit(0); + } else { + return; + } + } + + bool sync = cfg->events[base_idx + 3]; + input_report(dev, cfg->events[base_idx], cfg->events[base_idx + 1], cfg->events[base_idx + 2], + sync, K_NO_WAIT); + + if (sync) { + k_work_schedule(&data->work, K_MSEC(cfg->event_period)); + } else { + k_work_schedule(&data->work, K_NO_WAIT); + } +} + +int input_mock_init(const struct device *dev) { + struct input_mock_data *drv_data = dev->data; + const struct input_mock_config *drv_cfg = dev->config; + + drv_data->dev = dev; + drv_data->event_index = -1; + + k_work_init_delayable(&drv_data->work, input_mock_work_cb); + + k_work_schedule(&drv_data->work, K_MSEC(drv_cfg->startup_delay)); + + return 0; +} + +#define INPUT_MOCK_INST(n) \ + static struct input_mock_data input_mock_data_##n = {}; \ + static const uint32_t mock_data_##n[] = DT_INST_PROP(n, events); \ + static const struct input_mock_config input_mock_cfg_##n = { \ + .events = mock_data_##n, \ + .events_len = DT_INST_PROP_LEN(n, events), \ + .startup_delay = DT_INST_PROP(n, event_startup_delay), \ + .event_period = DT_INST_PROP(n, event_period), \ + .exit_after = DT_INST_PROP(n, exit_after), \ + }; \ + DEVICE_DT_INST_DEFINE(n, input_mock_init, NULL, &input_mock_data_##n, &input_mock_cfg_##n, \ + POST_KERNEL, CONFIG_INPUT_INIT_PRIORITY, NULL); + +DT_INST_FOREACH_STATUS_OKAY(INPUT_MOCK_INST) diff --git a/app/module/drivers/kscan/Kconfig b/app/module/drivers/kscan/Kconfig index 88848dff..5ec00063 100644 --- a/app/module/drivers/kscan/Kconfig +++ b/app/module/drivers/kscan/Kconfig @@ -61,7 +61,7 @@ config ZMK_KSCAN_MATRIX_WAIT_BEFORE_INPUTS config ZMK_KSCAN_MATRIX_WAIT_BETWEEN_OUTPUTS int "Ticks to wait between each output when scanning" - default 1 if SOC_RP2040 + default 1 if SOC_RP2040 || SOC_SERIES_RP2350 default 0 help When iterating over each output to drive it active, read inputs, then set diff --git a/app/module/drivers/kscan/kscan_composite.c b/app/module/drivers/kscan/kscan_composite.c index a064903a..18d957ec 100644 --- a/app/module/drivers/kscan/kscan_composite.c +++ b/app/module/drivers/kscan/kscan_composite.c @@ -25,7 +25,7 @@ struct kscan_composite_child_config { #define CHILD_CONFIG(inst) \ {.child = DEVICE_DT_GET(DT_PHANDLE(inst, kscan)), \ .row_offset = DT_PROP(inst, row_offset), \ - .column_offset = DT_PROP(inst, column_offset)}, + .column_offset = DT_PROP_OR(inst, col_offset, DT_PROP(inst, column_offset))}, struct kscan_composite_config { const struct kscan_composite_child_config *children; @@ -44,6 +44,13 @@ static int kscan_composite_enable_callback(const struct device *dev) { for (int i = 0; i < cfg->children_len; i++) { const struct kscan_composite_child_config *child_cfg = &cfg->children[i]; +#if IS_ENABLED(CONFIG_PM_DEVICE_RUNTIME) || IS_ENABLED(CONFIG_PM_DEVICE) + if (pm_device_wakeup_is_enabled(dev) && pm_device_wakeup_is_capable(child_cfg->child) && + !pm_device_wakeup_enable(child_cfg->child, true)) { + LOG_ERR("Failed to enable wakeup for %s", child_cfg->child->name); + } +#endif // IS_ENABLED(CONFIG_PM_DEVICE_RUNTIME) || IS_ENABLED(CONFIG_PM_DEVICE) + #if IS_ENABLED(CONFIG_PM_DEVICE_RUNTIME) if (!pm_device_runtime_is_enabled(dev) && pm_device_runtime_is_enabled(child_cfg->child)) { pm_device_runtime_get(child_cfg->child); @@ -62,6 +69,14 @@ static int kscan_composite_disable_callback(const struct device *dev) { for (int i = 0; i < cfg->children_len; i++) { const struct kscan_composite_child_config *child_cfg = &cfg->children[i]; +#if IS_ENABLED(CONFIG_PM_DEVICE_RUNTIME) || IS_ENABLED(CONFIG_PM_DEVICE) + if (pm_device_wakeup_is_capable(child_cfg->child) && + pm_device_wakeup_is_enabled(child_cfg->child) && + !pm_device_wakeup_enable(child_cfg->child, false)) { + LOG_ERR("Failed to disable wakeup for %s", child_cfg->child->name); + } +#endif // IS_ENABLED(CONFIG_PM_DEVICE_RUNTIME) || IS_ENABLED(CONFIG_PM_DEVICE) + kscan_disable_callback(child_cfg->child); #if IS_ENABLED(CONFIG_PM_DEVICE_RUNTIME) diff --git a/app/module/drivers/kscan/kscan_gpio_charlieplex.c b/app/module/drivers/kscan/kscan_gpio_charlieplex.c index f48a6a2f..d0b0ae49 100644 --- a/app/module/drivers/kscan/kscan_gpio_charlieplex.c +++ b/app/module/drivers/kscan/kscan_gpio_charlieplex.c @@ -168,6 +168,8 @@ static int kscan_charlieplex_set_all_outputs(const struct device *dev, const int return 0; } +#if IS_ENABLED(CONFIG_PM_DEVICE) + static int kscan_charlieplex_disconnect_all(const struct device *dev) { const struct kscan_charlieplex_config *config = dev->config; @@ -183,6 +185,8 @@ static int kscan_charlieplex_disconnect_all(const struct device *dev) { return 0; } +#endif + static int kscan_charlieplex_interrupt_configure(const struct device *dev, const gpio_flags_t flags) { const struct kscan_charlieplex_config *config = dev->config; @@ -445,7 +449,7 @@ static const struct kscan_driver_api kscan_charlieplex_api = { .charlieplex_state = kscan_charlieplex_state_##n, \ }; \ \ - static struct kscan_charlieplex_config kscan_charlieplex_config_##n = { \ + static const struct kscan_charlieplex_config kscan_charlieplex_config_##n = { \ .cells = KSCAN_GPIO_LIST(kscan_charlieplex_cells_##n), \ .debounce_config = \ { \ diff --git a/app/module/drivers/kscan/kscan_gpio_direct.c b/app/module/drivers/kscan/kscan_gpio_direct.c index 245e78b5..45fc8634 100644 --- a/app/module/drivers/kscan/kscan_gpio_direct.c +++ b/app/module/drivers/kscan/kscan_gpio_direct.c @@ -397,7 +397,7 @@ static const struct kscan_driver_api kscan_direct_api = { .pin_state = kscan_direct_state_##n, \ COND_INTERRUPTS((.irqs = kscan_direct_irqs_##n, ))}; \ \ - static struct kscan_direct_config kscan_direct_config_##n = { \ + static const struct kscan_direct_config kscan_direct_config_##n = { \ .debounce_config = \ { \ .debounce_press_ms = INST_DEBOUNCE_PRESS_MS(n), \ diff --git a/app/module/drivers/kscan/kscan_gpio_matrix.c b/app/module/drivers/kscan/kscan_gpio_matrix.c index e0c76395..d68f1593 100644 --- a/app/module/drivers/kscan/kscan_gpio_matrix.c +++ b/app/module/drivers/kscan/kscan_gpio_matrix.c @@ -515,7 +515,7 @@ static const struct kscan_driver_api kscan_matrix_api = { .matrix_state = kscan_matrix_state_##n, \ COND_INTERRUPTS((.irqs = kscan_matrix_irqs_##n, ))}; \ \ - static struct kscan_matrix_config kscan_matrix_config_##n = { \ + static const struct kscan_matrix_config kscan_matrix_config_##n = { \ .rows = ARRAY_SIZE(kscan_matrix_rows_##n), \ .cols = ARRAY_SIZE(kscan_matrix_cols_##n), \ .outputs = \ diff --git a/app/module/drivers/kscan/kscan_mock.c b/app/module/drivers/kscan/kscan_mock.c index 1ffb937e..f4c9dced 100644 --- a/app/module/drivers/kscan/kscan_mock.c +++ b/app/module/drivers/kscan/kscan_mock.c @@ -65,6 +65,12 @@ static int kscan_mock_configure(const struct device *dev, kscan_callback_t callb struct k_work_delayable *d_work = k_work_delayable_from_work(work); \ struct kscan_mock_data *data = CONTAINER_OF(d_work, struct kscan_mock_data, work); \ const struct kscan_mock_config_##n *cfg = data->dev->config; \ + if (data->event_index >= DT_INST_PROP_LEN(n, events)) { \ + if (cfg->exit_after) \ + exit(0); \ + else \ + return; \ + } \ uint32_t ev = cfg->events[data->event_index]; \ LOG_DBG("ev %u row %d column %d state %d\n", ev, ZMK_MOCK_ROW(ev), ZMK_MOCK_COL(ev), \ ZMK_MOCK_IS_PRESS(ev)); \ diff --git a/app/module/drivers/sensor/CMakeLists.txt b/app/module/drivers/sensor/CMakeLists.txt index cd1a1c45..370fe15a 100644 --- a/app/module/drivers/sensor/CMakeLists.txt +++ b/app/module/drivers/sensor/CMakeLists.txt @@ -4,3 +4,5 @@ add_subdirectory_ifdef(CONFIG_ZMK_BATTERY battery) add_subdirectory_ifdef(CONFIG_EC11 ec11) add_subdirectory_ifdef(CONFIG_ZMK_MAX17048 max17048) + +add_subdirectory_ifdef(CONFIG_ZMK_SENSOR_ENCODER_MOCK encoder_mock) diff --git a/app/module/drivers/sensor/Kconfig b/app/module/drivers/sensor/Kconfig index ad570c58..c5f4a721 100644 --- a/app/module/drivers/sensor/Kconfig +++ b/app/module/drivers/sensor/Kconfig @@ -7,4 +7,6 @@ rsource "battery/Kconfig" rsource "ec11/Kconfig" rsource "max17048/Kconfig" +rsource "encoder_mock/Kconfig" + endif # SENSOR diff --git a/app/module/drivers/sensor/ec11/Kconfig b/app/module/drivers/sensor/ec11/Kconfig index 5da32728..7c10eaa9 100644 --- a/app/module/drivers/sensor/ec11/Kconfig +++ b/app/module/drivers/sensor/ec11/Kconfig @@ -11,7 +11,7 @@ menuconfig EC11 if EC11 -choice +choice EC11_TRIGGER_MODE prompt "Trigger mode" default EC11_TRIGGER_NONE help diff --git a/app/module/drivers/sensor/ec11/ec11.c b/app/module/drivers/sensor/ec11/ec11.c index ee8b41e7..3702d6e1 100644 --- a/app/module/drivers/sensor/ec11/ec11.c +++ b/app/module/drivers/sensor/ec11/ec11.c @@ -148,8 +148,8 @@ int ec11_init(const struct device *dev) { } #define EC11_INST(n) \ - struct ec11_data ec11_data_##n; \ - const struct ec11_config ec11_cfg_##n = { \ + static struct ec11_data ec11_data_##n; \ + static const struct ec11_config ec11_cfg_##n = { \ .a = GPIO_DT_SPEC_INST_GET(n, a_gpios), \ .b = GPIO_DT_SPEC_INST_GET(n, b_gpios), \ .resolution = DT_INST_PROP_OR(n, resolution, 1), \ diff --git a/app/module/drivers/sensor/ec11/ec11.h b/app/module/drivers/sensor/ec11/ec11.h index 4e2e5d26..d99ef606 100644 --- a/app/module/drivers/sensor/ec11/ec11.h +++ b/app/module/drivers/sensor/ec11/ec11.h @@ -33,7 +33,7 @@ struct ec11_data { const struct sensor_trigger *trigger; #if defined(CONFIG_EC11_TRIGGER_OWN_THREAD) - K_THREAD_STACK_MEMBER(thread_stack, CONFIG_EC11_THREAD_STACK_SIZE); + K_KERNEL_STACK_MEMBER(thread_stack, CONFIG_EC11_THREAD_STACK_SIZE); struct k_sem gpio_sem; struct k_thread thread; #elif defined(CONFIG_EC11_TRIGGER_GLOBAL_THREAD) diff --git a/app/module/drivers/sensor/encoder_mock/CMakeLists.txt b/app/module/drivers/sensor/encoder_mock/CMakeLists.txt new file mode 100644 index 00000000..8271067e --- /dev/null +++ b/app/module/drivers/sensor/encoder_mock/CMakeLists.txt @@ -0,0 +1,8 @@ +# Copyright (c) 2024 The ZMK Contributors +# SPDX-License-Identifier: MIT + +zephyr_include_directories(.) + +zephyr_library() + +zephyr_library_sources(encoder_mock.c) \ No newline at end of file diff --git a/app/module/drivers/sensor/encoder_mock/Kconfig b/app/module/drivers/sensor/encoder_mock/Kconfig new file mode 100644 index 00000000..9b9dd00a --- /dev/null +++ b/app/module/drivers/sensor/encoder_mock/Kconfig @@ -0,0 +1,7 @@ +# Copyright (c) 2024 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config ZMK_SENSOR_ENCODER_MOCK + bool "Mock Encoder Sensor" + default y + depends on DT_HAS_ZMK_SENSOR_ENCODER_MOCK_ENABLED diff --git a/app/module/drivers/sensor/encoder_mock/encoder_mock.c b/app/module/drivers/sensor/encoder_mock/encoder_mock.c new file mode 100644 index 00000000..283ee916 --- /dev/null +++ b/app/module/drivers/sensor/encoder_mock/encoder_mock.c @@ -0,0 +1,114 @@ +/* + * Copyright (c) 2024 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#define DT_DRV_COMPAT zmk_sensor_encoder_mock + +#include +#include +#include +#include +#include + +LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); + +struct enc_mock_config { + uint16_t startup_delay; + uint16_t event_period; + bool exit_after; + const int16_t *events; + size_t events_len; +}; + +struct enc_mock_data { + const struct sensor_trigger *trigger; + sensor_trigger_handler_t handler; + + size_t event_index; + struct k_work_delayable work; + const struct device *dev; +}; + +static void enc_mock_work_cb(struct k_work *work) { + struct k_work_delayable *dwork = CONTAINER_OF(work, struct k_work_delayable, work); + struct enc_mock_data *data = CONTAINER_OF(dwork, struct enc_mock_data, work); + + const struct device *dev = data->dev; + + data->handler(dev, data->trigger); +} + +static int enc_mock_trigger_set(const struct device *dev, const struct sensor_trigger *trig, + sensor_trigger_handler_t handler) { + struct enc_mock_data *drv_data = dev->data; + const struct enc_mock_config *drv_cfg = dev->config; + + drv_data->trigger = trig; + drv_data->handler = handler; + + int ret = k_work_schedule(&drv_data->work, K_MSEC(drv_cfg->startup_delay)); + if (ret < 0) { + LOG_WRN("Failed to schedule next mock sensor event %d", ret); + return ret; + } + + return 0; +} + +static int enc_mock_sample_fetch(const struct device *dev, enum sensor_channel chan) { + struct enc_mock_data *drv_data = dev->data; + const struct enc_mock_config *drv_cfg = dev->config; + + drv_data->event_index++; + + if (drv_data->event_index < drv_cfg->events_len - 1) { + k_work_schedule(&drv_data->work, K_MSEC(drv_cfg->event_period)); + } else if (drv_cfg->exit_after) { + exit(0); + } + return 0; +} + +static int enc_mock_channel_get(const struct device *dev, enum sensor_channel chan, + struct sensor_value *val) { + struct enc_mock_data *drv_data = dev->data; + const struct enc_mock_config *drv_cfg = dev->config; + + val->val1 = drv_cfg->events[drv_data->event_index]; + + return 0; +} + +static const struct sensor_driver_api enc_mock_driver_api = { + .trigger_set = enc_mock_trigger_set, + .sample_fetch = enc_mock_sample_fetch, + .channel_get = enc_mock_channel_get, +}; + +int enc_mock_init(const struct device *dev) { + struct enc_mock_data *drv_data = dev->data; + + drv_data->dev = dev; + drv_data->event_index = -1; + + k_work_init_delayable(&drv_data->work, enc_mock_work_cb); + + return 0; +} + +#define ENC_MOCK_INST(n) \ + struct enc_mock_data enc_mock_data_##n = {}; \ + const int16_t mock_data_##n[] = DT_INST_PROP(n, events); \ + const struct enc_mock_config enc_mock_cfg_##n = { \ + .events = mock_data_##n, \ + .events_len = DT_INST_PROP_LEN(n, events), \ + .startup_delay = DT_INST_PROP(n, event_startup_delay), \ + .event_period = DT_INST_PROP(n, event_period), \ + .exit_after = DT_INST_PROP(n, exit_after), \ + }; \ + DEVICE_DT_INST_DEFINE(n, enc_mock_init, NULL, &enc_mock_data_##n, &enc_mock_cfg_##n, \ + POST_KERNEL, CONFIG_SENSOR_INIT_PRIORITY, &enc_mock_driver_api); + +DT_INST_FOREACH_STATUS_OKAY(ENC_MOCK_INST) diff --git a/app/module/drivers/sensor/max17048/max17048.c b/app/module/drivers/sensor/max17048/max17048.c index 43b30af1..43d877c4 100644 --- a/app/module/drivers/sensor/max17048/max17048.c +++ b/app/module/drivers/sensor/max17048/max17048.c @@ -205,8 +205,8 @@ static const struct sensor_driver_api max17048_api_table = {.sample_fetch = max1 .channel_get = max17048_channel_get}; #define MAX17048_INIT(inst) \ - static struct max17048_config max17048_##inst##_config = {.i2c_bus = \ - I2C_DT_SPEC_INST_GET(inst)}; \ + static const struct max17048_config max17048_##inst##_config = { \ + .i2c_bus = I2C_DT_SPEC_INST_GET(inst)}; \ \ static struct max17048_drv_data max17048_##inst##_drvdata = { \ .raw_state_of_charge = 0, \ diff --git a/app/module/dts/bindings/input/zmk,input-mock.yaml b/app/module/dts/bindings/input/zmk,input-mock.yaml new file mode 100644 index 00000000..a7efe425 --- /dev/null +++ b/app/module/dts/bindings/input/zmk,input-mock.yaml @@ -0,0 +1,21 @@ +# Copyright (c) 2024 The ZMK Contributors +# SPDX-License-Identifier: MIT + +description: | + Allows defining a mock input driver that simulates periodic input events. + +compatible: "zmk,input-mock" + +properties: + event-startup-delay: + type: int + default: 0 + description: Milliseconds to delay before starting generating the events + event-period: + type: int + description: Milliseconds between each generated event + events: + type: array + description: List of tuples of (type, code, value, sync) + exit-after: + type: boolean diff --git a/app/module/dts/bindings/sensor/zmk,sensor-encoder-mock.yaml b/app/module/dts/bindings/sensor/zmk,sensor-encoder-mock.yaml new file mode 100644 index 00000000..74ff1f5b --- /dev/null +++ b/app/module/dts/bindings/sensor/zmk,sensor-encoder-mock.yaml @@ -0,0 +1,21 @@ +# Copyright (c) 2024 The ZMK Contributors +# SPDX-License-Identifier: MIT + +description: | + Allows defining a mock sensor driver that simulates periodic encoder rotation events. + +compatible: "zmk,sensor-encoder-mock" + +properties: + event-startup-delay: + type: int + default: 0 + description: Milliseconds to delay before starting generating the events + event-period: + type: int + description: Milliseconds between each generated event + events: + type: array + description: List of angle events to generate + exit-after: + type: boolean diff --git a/app/module/dts/bindings/test-behaviors/zmk,behavior_add_layer.yaml b/app/module/dts/bindings/test-behaviors/zmk,behavior_add_layer.yaml new file mode 100644 index 00000000..f07ef608 --- /dev/null +++ b/app/module/dts/bindings/test-behaviors/zmk,behavior_add_layer.yaml @@ -0,0 +1,8 @@ +# Copyright (c) 2025 The ZMK Contributors +# SPDX-License-Identifier: MIT + +description: Layer Adder Behavior + +compatible: "zmk,behavior-add-layer" + +include: zero_param.yaml diff --git a/app/module/dts/bindings/test-behaviors/zmk,behavior_move_layer.yaml b/app/module/dts/bindings/test-behaviors/zmk,behavior_move_layer.yaml new file mode 100644 index 00000000..b23448d6 --- /dev/null +++ b/app/module/dts/bindings/test-behaviors/zmk,behavior_move_layer.yaml @@ -0,0 +1,8 @@ +# Copyright (c) 2025 The ZMK Contributors +# SPDX-License-Identifier: MIT + +description: Layer Mover Behavior + +compatible: "zmk,behavior-move-layer" + +include: two_param.yaml diff --git a/app/module/dts/bindings/test-behaviors/zmk,behavior_remove_layer.yaml b/app/module/dts/bindings/test-behaviors/zmk,behavior_remove_layer.yaml new file mode 100644 index 00000000..cdc20a8a --- /dev/null +++ b/app/module/dts/bindings/test-behaviors/zmk,behavior_remove_layer.yaml @@ -0,0 +1,8 @@ +# Copyright (c) 2025 The ZMK Contributors +# SPDX-License-Identifier: MIT + +description: Layer Remover Behavior + +compatible: "zmk,behavior-remove-layer" + +include: one_param.yaml diff --git a/app/module/dts/bindings/test-behaviors/zmk,behavior_set_layer_binding_at_idx.yaml b/app/module/dts/bindings/test-behaviors/zmk,behavior_set_layer_binding_at_idx.yaml new file mode 100644 index 00000000..078587d4 --- /dev/null +++ b/app/module/dts/bindings/test-behaviors/zmk,behavior_set_layer_binding_at_idx.yaml @@ -0,0 +1,13 @@ +# Copyright (c) 2025 The ZMK Contributors +# SPDX-License-Identifier: MIT + +description: Layer Binding Setter Behavior + +compatible: "zmk,behavior-set-layer-binding-at-idx" + +include: two_param.yaml + +properties: + bindings: + type: phandle-array + required: true diff --git a/app/module/test-behaviors/CMakeLists.txt b/app/module/test-behaviors/CMakeLists.txt new file mode 100644 index 00000000..b228f581 --- /dev/null +++ b/app/module/test-behaviors/CMakeLists.txt @@ -0,0 +1,6 @@ +if (((NOT CONFIG_ZMK_SPLIT) OR CONFIG_ZMK_SPLIT_ROLE_CENTRAL) AND CONFIG_ZMK_TEST_BEHAVIORS) + target_sources(app PRIVATE behavior_add_layer.c) + target_sources(app PRIVATE behavior_move_layer.c) + target_sources(app PRIVATE behavior_remove_layer.c) + target_sources(app PRIVATE behavior_set_layer_binding_at_idx.c) +endif() diff --git a/app/module/test-behaviors/Kconfig b/app/module/test-behaviors/Kconfig new file mode 100644 index 00000000..6a9458db --- /dev/null +++ b/app/module/test-behaviors/Kconfig @@ -0,0 +1,2 @@ +config ZMK_TEST_BEHAVIORS + bool "Include behaviors used for testing purposes" \ No newline at end of file diff --git a/app/module/test-behaviors/behavior_add_layer.c b/app/module/test-behaviors/behavior_add_layer.c new file mode 100644 index 00000000..47927cb7 --- /dev/null +++ b/app/module/test-behaviors/behavior_add_layer.c @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2025 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#define DT_DRV_COMPAT zmk_behavior_add_layer + +#include +#include +#include + +#include +#include + +LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); + +#if (IS_ENABLED(CONFIG_ZMK_KEYMAP_LAYER_REORDERING)) && (DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT)) + +static int on_add_layer_binding_pressed(struct zmk_behavior_binding *binding, + struct zmk_behavior_binding_event event) { + int new_layer = zmk_keymap_add_layer(); + if (new_layer >= 0) { + LOG_DBG("Added layer %d", new_layer); + return 0; + } + switch (new_layer) { + case -ENOSPC: + LOG_ERR("No more layers can be added. Out of memory."); + return -ENOSPC; + default: + LOG_ERR("Unknown error adding layer: %d", new_layer); + return new_layer; + } +} + +static int on_add_layer_binding_released(struct zmk_behavior_binding *binding, + struct zmk_behavior_binding_event event) { + return 0; +} + +static const struct behavior_driver_api behavior_add_layer_driver_api = { + .binding_pressed = on_add_layer_binding_pressed, + .binding_released = on_add_layer_binding_released}; + +BEHAVIOR_DT_INST_DEFINE(0, NULL, NULL, NULL, NULL, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, + &behavior_add_layer_driver_api); + +#endif // IS_ENABLED(CONFIG_ZMK_KEYMAP_LAYER_REORDERING) AND + // DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) \ No newline at end of file diff --git a/app/module/test-behaviors/behavior_move_layer.c b/app/module/test-behaviors/behavior_move_layer.c new file mode 100644 index 00000000..74551629 --- /dev/null +++ b/app/module/test-behaviors/behavior_move_layer.c @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2025 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#define DT_DRV_COMPAT zmk_behavior_move_layer + +#include +#include +#include + +#include +#include + +LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); + +#if (IS_ENABLED(CONFIG_ZMK_KEYMAP_LAYER_REORDERING)) && (DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT)) + +static int on_move_layer_binding_pressed(struct zmk_behavior_binding *binding, + struct zmk_behavior_binding_event event) { + int result = zmk_keymap_move_layer(binding->param1, binding->param2); + + if (result < 0) { + LOG_ERR("Failed to move layer from index %d to index %d (err: %d)", binding->param1, + binding->param2, result); + return result; + } + + LOG_DBG("Moved layer from index %d to index %d", binding->param1, binding->param2); + return 0; +} + +static int on_move_layer_binding_released(struct zmk_behavior_binding *binding, + struct zmk_behavior_binding_event event) { + return 0; +} + +static const struct behavior_driver_api behavior_move_layer_driver_api = { + .binding_pressed = on_move_layer_binding_pressed, + .binding_released = on_move_layer_binding_released}; + +BEHAVIOR_DT_INST_DEFINE(0, NULL, NULL, NULL, NULL, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, + &behavior_move_layer_driver_api); + +#endif // IS_ENABLED(CONFIG_ZMK_KEYMAP_LAYER_REORDERING) AND + // DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) \ No newline at end of file diff --git a/app/module/test-behaviors/behavior_remove_layer.c b/app/module/test-behaviors/behavior_remove_layer.c new file mode 100644 index 00000000..58c7fafd --- /dev/null +++ b/app/module/test-behaviors/behavior_remove_layer.c @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2025 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#define DT_DRV_COMPAT zmk_behavior_remove_layer + +#include +#include +#include + +#include +#include + +LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); + +#if (IS_ENABLED(CONFIG_ZMK_KEYMAP_LAYER_REORDERING)) && (DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT)) + +static int on_remove_layer_binding_pressed(struct zmk_behavior_binding *binding, + struct zmk_behavior_binding_event event) { + int result = zmk_keymap_remove_layer(binding->param1); + if (result >= 0) { + LOG_DBG("Removed layer at index %d", binding->param1); + return 0; + } + switch (result) { + case -EINVAL: + LOG_ERR("Layer at index %d not found", binding->param1); + return -EINVAL; + default: + LOG_DBG("Unknown error removing layer at index %d: %d", binding->param1, result); + return result; + } +} + +static int on_remove_layer_binding_released(struct zmk_behavior_binding *binding, + struct zmk_behavior_binding_event event) { + return 0; +} + +static const struct behavior_driver_api behavior_remove_layer_driver_api = { + .binding_pressed = on_remove_layer_binding_pressed, + .binding_released = on_remove_layer_binding_released}; + +BEHAVIOR_DT_INST_DEFINE(0, NULL, NULL, NULL, NULL, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, + &behavior_remove_layer_driver_api); +#endif // IS_ENABLED(CONFIG_ZMK_KEYMAP_LAYER_REORDERING) AND + // DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) \ No newline at end of file diff --git a/app/module/test-behaviors/behavior_set_layer_binding_at_idx.c b/app/module/test-behaviors/behavior_set_layer_binding_at_idx.c new file mode 100644 index 00000000..49bf0dd3 --- /dev/null +++ b/app/module/test-behaviors/behavior_set_layer_binding_at_idx.c @@ -0,0 +1,100 @@ +/* + * Copyright (c) 2025 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#define DT_DRV_COMPAT zmk_behavior_set_layer_binding_at_idx + +#include +#include +#include + +#include +#include + +LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); + +#if DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) + +struct behavior_set_layer_binding_at_idx_config { + size_t bindings_len; + struct zmk_behavior_binding *bindings; +}; + +struct behavior_set_layer_binding_at_idx_data { + size_t current_idx; +}; + +static int on_set_layer_binding_at_idx_binding_pressed(struct zmk_behavior_binding *binding, + struct zmk_behavior_binding_event event) { + const struct device *dev = zmk_behavior_get_binding(binding->behavior_dev); + const struct behavior_set_layer_binding_at_idx_config *cfg = dev->config; + struct behavior_set_layer_binding_at_idx_data *data = dev->data; + + if (cfg->bindings_len == 0) { + LOG_ERR("No bindings configured"); + return -EINVAL; + } + + struct zmk_behavior_binding *binding_to_set = &cfg->bindings[data->current_idx]; + + int result = + zmk_keymap_set_layer_binding_at_idx(binding->param1, binding->param2, *binding_to_set); + + if (result < 0) { + LOG_ERR("Failed to set binding at layer %d, index %d (err: %d)", binding->param1, + binding->param2, result); + return result; + } + + LOG_DBG("Set binding at layer %d, index %d to binding %zu/%zu", binding->param1, + binding->param2, data->current_idx + 1, cfg->bindings_len); + + // Move to next binding, wrap around if at end + data->current_idx = (data->current_idx + 1) % cfg->bindings_len; + + return 0; +} + +static int on_set_layer_binding_at_idx_binding_released(struct zmk_behavior_binding *binding, + struct zmk_behavior_binding_event event) { + return 0; +} + +static const struct behavior_driver_api behavior_set_layer_binding_at_idx_driver_api = { + .binding_pressed = on_set_layer_binding_at_idx_binding_pressed, + .binding_released = on_set_layer_binding_at_idx_binding_released}; + +static int behavior_set_layer_binding_at_idx_init(const struct device *dev) { + struct behavior_set_layer_binding_at_idx_data *data = dev->data; + data->current_idx = 0; + return 0; +}; + +#define _TRANSFORM_ENTRY(idx, node) ZMK_KEYMAP_EXTRACT_BINDING(idx, node) + +#define TRANSFORMED_BINDINGS(node) \ + {LISTIFY(DT_INST_PROP_LEN(node, bindings), _TRANSFORM_ENTRY, (, ), DT_DRV_INST(node))} + +#define SET_LAYER_BINDING_AT_IDX_INST(n) \ + static struct behavior_set_layer_binding_at_idx_data \ + behavior_set_layer_binding_at_idx_data_##n = {}; \ + \ + static const struct zmk_behavior_binding \ + behavior_set_layer_binding_at_idx_config_##n##_bindings[DT_INST_PROP_LEN(n, bindings)] = \ + TRANSFORMED_BINDINGS(n); \ + static const struct behavior_set_layer_binding_at_idx_config \ + behavior_set_layer_binding_at_idx_config_##n = { \ + .bindings_len = DT_INST_PROP_LEN(n, bindings), \ + .bindings = behavior_set_layer_binding_at_idx_config_##n##_bindings}; \ + \ + BEHAVIOR_DT_INST_DEFINE(n, behavior_set_layer_binding_at_idx_init, NULL, \ + &behavior_set_layer_binding_at_idx_data_##n, \ + &behavior_set_layer_binding_at_idx_config_##n, POST_KERNEL, \ + CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, \ + &behavior_set_layer_binding_at_idx_driver_api); + +DT_INST_FOREACH_STATUS_OKAY(SET_LAYER_BINDING_AT_IDX_INST) + +#endif // DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) diff --git a/app/module/zephyr/module.yml b/app/module/zephyr/module.yml index 219b2cfd..70de6620 100644 --- a/app/module/zephyr/module.yml +++ b/app/module/zephyr/module.yml @@ -3,3 +3,4 @@ build: kconfig: Kconfig settings: dts_root: . + board_root: . diff --git a/app/run-ble-test.sh b/app/run-ble-test.sh index 226bd385..f8e70537 100755 --- a/app/run-ble-test.sh +++ b/app/run-ble-test.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2023 The ZMK Contributors # SPDX-License-Identifier: MIT @@ -58,7 +58,25 @@ fi testcase="$path" echo "Running $testcase:" -west build -d build/$testcase -b nrf52_bsim -- -DZMK_CONFIG="$(pwd)/$testcase" > /dev/null 2>&1 +shopt -s nullglob +for file in $(pwd)/$testcase/peripheral*.overlay ; do + pn=$(basename -s .overlay ${file}) + west build -d build/${testcase%%/}_${pn}/ -b nrf52_bsim//zmk_test_mock -- -DZMK_CONFIG="$(pwd)/$testcase" -DEXTRA_DTC_OVERLAY_FILE="${file}" > /dev/null 2>&1 + + if [ $? -gt 0 ]; then + echo "FAILED: $testcase peripheral ${pn} did not build" | tee -a ./build/tests/pass-fail.log + exit 1 + fi +done +shopt -u nullglob + +extra_cmake_args="" +if ls $(pwd)/$testcase/peripheral*.overlay >/dev/null 2>&1; then + echo "Found peripheral overlays, building the test as a split central" + extra_cmake_args="-DCONFIG_ZMK_SPLIT_ROLE_CENTRAL=y" +fi + +west build -d build/$testcase -b nrf52_bsim//zmk_test_mock -- -DZMK_CONFIG="$(pwd)/$testcase" ${extra_cmake_args} > /dev/null 2>&1 if [ $? -gt 0 ]; then echo "FAILED: $testcase did not build" | tee -a ./build/tests/pass-fail.log exit 1 @@ -71,25 +89,35 @@ else fi exe_name=${testcase//\//_} +# Remove trailing underscores +exe_name=${exe_name%%_} start_dir=$(pwd) cp build/$testcase/zephyr/zmk.exe "${BSIM_OUT_PATH}/bin/${exe_name}" + +shopt -s nullglob +for file in $(pwd)/$testcase/peripheral*.overlay ; do + pn=$(basename -s .overlay ${file}) + cp ./build/${testcase%%/}_${pn}/zephyr/zmk.exe "${BSIM_OUT_PATH}/bin/${exe_name}_${pn}.exe" +done +shopt -u nullglob + pushd "${BSIM_OUT_PATH}/bin" > /dev/null 2>&1 if [ -e "${start_dir}/build/$testcase/output.log" ]; then rm "${start_dir}/build/$testcase/output.log" fi -central_counts=$(wc -l ${start_dir}/${testcase}/centrals.txt | cut -d' ' -f1) +sibling_counts=$(wc -l ${start_dir}/${testcase}/siblings.txt | cut -d' ' -f1) ./${exe_name} -d=0 -s=${exe_name} | tee -a "${start_dir}/build/$testcase/output.log" > "${output_dev}" & ./bs_device_handbrake -s=${exe_name} -d=1 -r=10 > "${output_dev}" & -cat "${start_dir}/${testcase}/centrals.txt" | +cat "${start_dir}/${testcase}/siblings.txt" | while IFS= read -r line do ${line} -s=${exe_name} | tee -a "${start_dir}/build/$testcase/output.log" > "${output_dev}" & done -./bs_2G4_phy_v1 -s=${exe_name} -D=$(( 2 + central_counts )) -sim_length=50e6 > "${output_dev}" 2>&1 +./bs_2G4_phy_v1 -s=${exe_name} -D=$(( 2 + sibling_counts )) -sim_length=50e6 > "${output_dev}" 2>&1 popd > /dev/null 2>&1 diff --git a/app/run-test.sh b/app/run-test.sh index b0b6f73b..aa84ed69 100755 --- a/app/run-test.sh +++ b/app/run-test.sh @@ -3,6 +3,14 @@ # Copyright (c) 2020 The ZMK Contributors # SPDX-License-Identifier: MIT +## +# Optional environment variables, paths can be absolute or relative to $(pwd): +# ZMK_SRC_DIR: Path to zmk/app (default is ./) +# ZMK_BUILD_DIR: Path to build directory (default is $ZMK_SRC_DIR/build) +# ZMK_EXTRA_MODULES: Path to at most one module (in addition to any in west.yml) +# ZMK_TESTS_AUTO_ACCEPT: Replace snapshot files with new key events +# J: Number of parallel jobs (default is 4) + if [ -z "$1" ]; then echo "Usage: ./run-test.sh " exit 1 @@ -10,45 +18,68 @@ fi path="$1" if [ $path = "all" ]; then - path="tests" + path="${ZMK_SRC_DIR-.}/tests" fi -testcases=$(find $path -name native_posix_64.keymap -exec dirname \{\} \;) +ZMK_BUILD_DIR=${ZMK_BUILD_DIR:-${ZMK_SRC_DIR:-.}/build} +mkdir -p ${ZMK_BUILD_DIR}/tests + +testcases=$(find $path -name native_sim.keymap -exec dirname \{\} \;) num_cases=$(echo "$testcases" | wc -l) if [ $num_cases -gt 1 ] || [ "$testcases" != "$path" ]; then - echo "" > ./build/tests/pass-fail.log - echo "$testcases" | xargs -L 1 -P ${J:-4} ./run-test.sh + echo "" >${ZMK_BUILD_DIR}/tests/pass-fail.log + echo "$testcases" | xargs -L 1 -P ${J:-4} ${0} err=$? - sort -k2 ./build/tests/pass-fail.log + sort -k2 ${ZMK_BUILD_DIR}/tests/pass-fail.log exit $err fi -testcase="$path" +testcase=$(realpath $path | sed -n -e "s|.*/tests/||p") echo "Running $testcase:" -west build -d build/$testcase -b native_posix_64 -- -DCONFIG_ASSERT=y -DZMK_CONFIG="$(pwd)/$testcase" > /dev/null 2>&1 -if [ $? -gt 0 ]; then - echo "FAILED: $testcase did not build" | tee -a ./build/tests/pass-fail.log +build_cmd="west build ${ZMK_SRC_DIR:+-s $ZMK_SRC_DIR} -d ${ZMK_BUILD_DIR}/tests/$testcase \ + -b native_sim//zmk_test_mock -p -- -DCONFIG_ASSERT=y -DZMK_CONFIG="$(realpath $path)" \ + ${ZMK_EXTRA_MODULES:+-DZMK_EXTRA_MODULES="$(realpath ${ZMK_EXTRA_MODULES})"}" + +# Add extra cmake arguments from file if it exists +if [ -f "$path/extra-cmake-args" ]; then + extra_args=$(cat "$path/extra-cmake-args" | tr '\n' ' ') + build_cmd="$build_cmd $extra_args" +fi + +build_log_tmp="${ZMK_BUILD_DIR}/tmp/$testcase/build.log" +build_log="${ZMK_BUILD_DIR}/tests/$testcase/build.log" +mkdir -p $(dirname $build_log_tmp) +$build_cmd >"$build_log_tmp" 2>&1 +build_exit_code=$? +mv "$build_log_tmp" "$build_log" +rmdir -p $(dirname $build_log_tmp) 2>/dev/null || true + +if [ $build_exit_code -gt 0 ]; then + echo "FAILED: $testcase did not build (see ${build_log})" | tee -a ${ZMK_BUILD_DIR}/tests/pass-fail.log exit 1 fi -./build/$testcase/zephyr/zmk.exe | sed -e "s/.*> //" | tee build/$testcase/keycode_events_full.log | sed -n -f $testcase/events.patterns > build/$testcase/keycode_events.log -diff -auZ $testcase/keycode_events.snapshot build/$testcase/keycode_events.log +${ZMK_BUILD_DIR}/tests/$testcase/zephyr/zmk.exe | + sed -e "s/.*> //" | + tee ${ZMK_BUILD_DIR}/tests/$testcase/keycode_events_full.log | + sed -n -f $path/events.patterns >${ZMK_BUILD_DIR}/tests/$testcase/keycode_events.log + +diff -auZ $path/keycode_events.snapshot ${ZMK_BUILD_DIR}/tests/$testcase/keycode_events.log if [ $? -gt 0 ]; then - if [ -f $testcase/pending ]; then - echo "PENDING: $testcase" | tee -a ./build/tests/pass-fail.log + if [ -f $path/pending ]; then + echo "PENDING: $testcase" | tee -a ${ZMK_BUILD_DIR}/tests/pass-fail.log exit 0 fi - if [ -n "${ZMK_TESTS_AUTO_ACCEPT}" ]; then echo "Auto-accepting failure for $testcase" - cp build/$testcase/keycode_events.log $testcase/keycode_events.snapshot + cp ${ZMK_BUILD_DIR}/tests/$testcase/keycode_events.log $path/keycode_events.snapshot else - echo "FAILED: $testcase" | tee -a ./build/tests/pass-fail.log + echo "FAILED: $testcase" | tee -a ${ZMK_BUILD_DIR}/tests/pass-fail.log exit 1 fi fi -echo "PASS: $testcase" | tee -a ./build/tests/pass-fail.log +echo "PASS: $testcase" | tee -a ${ZMK_BUILD_DIR}/tests/pass-fail.log exit 0 diff --git a/app/snippets/nrf52833-nosd/nrf52833-nosd.overlay b/app/snippets/nrf52833-nosd/nrf52833-nosd.overlay new file mode 100644 index 00000000..8eb41693 --- /dev/null +++ b/app/snippets/nrf52833-nosd/nrf52833-nosd.overlay @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2024 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +/delete-node/ &sd_partition; +/delete-node/ &code_partition; + +&flash0 { + partitions { + sd_partition: partition@0 { + reg = <0x0 DT_SIZE_K(4)>; + }; + code_partition: partition@1000 { + reg = ; + }; + /* + * 32KB storage partition at 0x6c000 is unchanged + */ + }; +}; diff --git a/app/snippets/nrf52833-nosd/snippet.yml b/app/snippets/nrf52833-nosd/snippet.yml new file mode 100644 index 00000000..f20ace16 --- /dev/null +++ b/app/snippets/nrf52833-nosd/snippet.yml @@ -0,0 +1,6 @@ +# Copyright (c) 2024 The ZMK Contributors +# SPDX-License-Identifier: MIT + +name: nrf52833-nosd +append: + EXTRA_DTC_OVERLAY_FILE: nrf52833-nosd.overlay diff --git a/app/snippets/nrf52840-nosd/nrf52840-nosd.overlay b/app/snippets/nrf52840-nosd/nrf52840-nosd.overlay new file mode 100644 index 00000000..ec339e8f --- /dev/null +++ b/app/snippets/nrf52840-nosd/nrf52840-nosd.overlay @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2024 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +/delete-node/ &sd_partition; +/delete-node/ &code_partition; +/delete-node/ &storage_partition; + +&flash0 { + partitions { + sd_partition: partition@0 { + reg = <0x0 DT_SIZE_K(4)>; + }; + + code_partition: partition@1000 { + reg = ; + }; + + /* + * The flash starting at 0x000d4000 and ending at + * 0x000f3fff is reserved for use by the application. + */ + + /* + * Storage partition will be used by FCB/LittleFS/NVS + * if enabled. + */ + storage_partition: partition@d4000 { + reg = ; + }; + }; +}; diff --git a/app/snippets/nrf52840-nosd/snippet.yml b/app/snippets/nrf52840-nosd/snippet.yml new file mode 100644 index 00000000..620e3227 --- /dev/null +++ b/app/snippets/nrf52840-nosd/snippet.yml @@ -0,0 +1,6 @@ +# Copyright (c) 2024 The ZMK Contributors +# SPDX-License-Identifier: MIT + +name: nrf52840-nosd +append: + EXTRA_DTC_OVERLAY_FILE: nrf52840-nosd.overlay diff --git a/app/src/activity.c b/app/src/activity.c index 454e91e5..f4dc3562 100644 --- a/app/src/activity.c +++ b/app/src/activity.c @@ -26,6 +26,10 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include #endif +#if IS_ENABLED(CONFIG_ZMK_POINTING) +#include +#endif + bool is_usb_power_present(void) { #if IS_ENABLED(CONFIG_USB_DEVICE_STACK) return zmk_usb_is_powered(); @@ -59,12 +63,14 @@ int set_state(enum zmk_activity_state state) { enum zmk_activity_state zmk_activity_get_state(void) { return activity_state; } -int activity_event_listener(const zmk_event_t *eh) { +static int note_activity(void) { activity_last_uptime = k_uptime_get(); return set_state(ZMK_ACTIVITY_ACTIVE); } +static int activity_event_listener(const zmk_event_t *eh) { return note_activity(); } + void activity_work_handler(struct k_work *work) { int32_t current = k_uptime_get(); int32_t inactive_time = current - activity_last_uptime; @@ -104,4 +110,18 @@ ZMK_LISTENER(activity, activity_event_listener); ZMK_SUBSCRIPTION(activity, zmk_position_state_changed); ZMK_SUBSCRIPTION(activity, zmk_sensor_event); +#if IS_ENABLED(CONFIG_ZMK_POINTING) + +static void note_activity_work_cb(struct k_work *_work) { note_activity(); } + +K_WORK_DEFINE(note_activity_work, note_activity_work_cb); + +static void activity_input_listener(struct input_event *ev, void *user_data) { + k_work_submit(¬e_activity_work); +} + +INPUT_CALLBACK_DEFINE(NULL, activity_input_listener, NULL); + +#endif + SYS_INIT(activity_init, APPLICATION, CONFIG_APPLICATION_INIT_PRIORITY); diff --git a/app/src/battery.c b/app/src/battery.c index ae79d5f7..811baf8e 100644 --- a/app/src/battery.c +++ b/app/src/battery.c @@ -93,7 +93,18 @@ static int zmk_battery_update(const struct device *battery) { if (last_state_of_charge != state_of_charge.val1) { last_state_of_charge = state_of_charge.val1; + + rc = raise_zmk_battery_state_changed( + (struct zmk_battery_state_changed){.state_of_charge = last_state_of_charge}); + + if (rc != 0) { + LOG_ERR("Failed to raise battery state changed event: %d", rc); + return rc; + } + } + #if IS_ENABLED(CONFIG_BT_BAS) + if (bt_bas_get_battery_level() != last_state_of_charge) { LOG_DBG("Setting BAS GATT battery level to %d.", last_state_of_charge); rc = bt_bas_set_battery_level(last_state_of_charge); @@ -102,10 +113,8 @@ static int zmk_battery_update(const struct device *battery) { LOG_WRN("Failed to set BAS GATT battery level (err %d)", rc); return rc; } -#endif - rc = raise_zmk_battery_state_changed( - (struct zmk_battery_state_changed){.state_of_charge = last_state_of_charge}); } +#endif return rc; } diff --git a/app/src/behavior.c b/app/src/behavior.c index e69cdf88..c7899d62 100644 --- a/app/src/behavior.c +++ b/app/src/behavior.c @@ -17,11 +17,17 @@ #endif +#if IS_ENABLED(CONFIG_ZMK_SPLIT) && IS_ENABLED(CONFIG_ZMK_SPLIT_ROLE_CENTRAL) +#include +#endif + #include #include #include #include +#include + #include LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); @@ -35,13 +41,13 @@ const struct device *z_impl_behavior_get_binding(const char *name) { } STRUCT_SECTION_FOREACH(zmk_behavior_ref, item) { - if (z_device_is_ready(item->device) && item->device->name == name) { + if (device_is_ready(item->device) && item->device->name == name) { return item->device; } } STRUCT_SECTION_FOREACH(zmk_behavior_ref, item) { - if (z_device_is_ready(item->device) && strcmp(item->device->name, name) == 0) { + if (device_is_ready(item->device) && strcmp(item->device->name, name) == 0) { return item->device; } } @@ -49,6 +55,66 @@ const struct device *z_impl_behavior_get_binding(const char *name) { return NULL; } +static int invoke_locally(struct zmk_behavior_binding *binding, + struct zmk_behavior_binding_event event, bool pressed) { + if (pressed) { + return behavior_keymap_binding_pressed(binding, event); + } else { + return behavior_keymap_binding_released(binding, event); + } +} + +int zmk_behavior_invoke_binding(const struct zmk_behavior_binding *src_binding, + struct zmk_behavior_binding_event event, bool pressed) { + // We want to make a copy of this, since it may be converted from + // relative to absolute before being invoked + struct zmk_behavior_binding binding = *src_binding; + + const struct device *behavior = zmk_behavior_get_binding(binding.behavior_dev); + + if (!behavior) { + LOG_WRN("No behavior assigned to %d on layer %d", event.position, event.layer); + return 1; + } + + int err = behavior_keymap_binding_convert_central_state_dependent_params(&binding, event); + if (err) { + LOG_ERR("Failed to convert relative to absolute behavior binding (err %d)", err); + return err; + } + + enum behavior_locality locality = BEHAVIOR_LOCALITY_CENTRAL; + err = behavior_get_locality(behavior, &locality); + if (err) { + LOG_ERR("Failed to get behavior locality %d", err); + return err; + } + + switch (locality) { + case BEHAVIOR_LOCALITY_CENTRAL: + return invoke_locally(&binding, event, pressed); + case BEHAVIOR_LOCALITY_EVENT_SOURCE: +#if IS_ENABLED(CONFIG_ZMK_SPLIT) && IS_ENABLED(CONFIG_ZMK_SPLIT_ROLE_CENTRAL) + if (event.source == ZMK_POSITION_STATE_CHANGE_SOURCE_LOCAL) { + return invoke_locally(&binding, event, pressed); + } else { + return zmk_split_central_invoke_behavior(event.source, &binding, event, pressed); + } +#else + return invoke_locally(&binding, event, pressed); +#endif + case BEHAVIOR_LOCALITY_GLOBAL: +#if IS_ENABLED(CONFIG_ZMK_SPLIT) && IS_ENABLED(CONFIG_ZMK_SPLIT_ROLE_CENTRAL) + for (int i = 0; i < ZMK_SPLIT_CENTRAL_PERIPHERAL_COUNT; i++) { + zmk_split_central_invoke_behavior(i, &binding, event, pressed); + } +#endif + return invoke_locally(&binding, event, pressed); + } + + return -ENOTSUP; +} + #if IS_ENABLED(CONFIG_ZMK_BEHAVIOR_METADATA) int zmk_behavior_get_empty_param_metadata(const struct device *dev, @@ -201,7 +267,7 @@ zmk_behavior_local_id_t zmk_behavior_get_local_id(const char *name) { } STRUCT_SECTION_FOREACH(zmk_behavior_local_id_map, item) { - if (z_device_is_ready(item->device) && strcmp(item->device->name, name) == 0) { + if (device_is_ready(item->device) && strcmp(item->device->name, name) == 0) { return item->local_id; } } @@ -211,7 +277,7 @@ zmk_behavior_local_id_t zmk_behavior_get_local_id(const char *name) { const char *zmk_behavior_find_behavior_name_from_local_id(zmk_behavior_local_id_t local_id) { STRUCT_SECTION_FOREACH(zmk_behavior_local_id_map, item) { - if (z_device_is_ready(item->device) && item->local_id == local_id) { + if (device_is_ready(item->device) && item->local_id == local_id) { return item->device->name; } } diff --git a/app/src/behavior_queue.c b/app/src/behavior_queue.c index 1511e755..82c58ca8 100644 --- a/app/src/behavior_queue.c +++ b/app/src/behavior_queue.c @@ -5,6 +5,7 @@ */ #include +#include #include #include @@ -14,6 +15,9 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); struct q_item { uint32_t position; +#if IS_ENABLED(CONFIG_ZMK_SPLIT) + uint8_t source; +#endif struct zmk_behavior_binding binding; bool press : 1; uint32_t wait : 31; @@ -32,12 +36,16 @@ static void behavior_queue_process_next(struct k_work *work) { item.binding.param2); struct zmk_behavior_binding_event event = {.position = item.position, - .timestamp = k_uptime_get()}; + .timestamp = k_uptime_get(), +#if IS_ENABLED(CONFIG_ZMK_SPLIT) + .source = item.source +#endif + }; if (item.press) { - behavior_keymap_binding_pressed(&item.binding, event); + zmk_behavior_invoke_binding(&item.binding, event, true); } else { - behavior_keymap_binding_released(&item.binding, event); + zmk_behavior_invoke_binding(&item.binding, event, false); } LOG_DBG("Processing next queued behavior in %dms", item.wait); @@ -49,9 +57,17 @@ static void behavior_queue_process_next(struct k_work *work) { } } -int zmk_behavior_queue_add(uint32_t position, const struct zmk_behavior_binding binding, bool press, - uint32_t wait) { - struct q_item item = {.press = press, .binding = binding, .wait = wait}; +int zmk_behavior_queue_add(const struct zmk_behavior_binding_event *event, + const struct zmk_behavior_binding binding, bool press, uint32_t wait) { + struct q_item item = { + .press = press, + .binding = binding, + .wait = wait, + .position = event->position, +#if IS_ENABLED(CONFIG_ZMK_SPLIT) + .source = event->source, +#endif + }; const int ret = k_msgq_put(&zmk_behavior_queue_msgq, &item, K_NO_WAIT); if (ret < 0) { diff --git a/app/src/behaviors/behavior_backlight.c b/app/src/behaviors/behavior_backlight.c index 45edd4c9..30f91474 100644 --- a/app/src/behaviors/behavior_backlight.c +++ b/app/src/behaviors/behavior_backlight.c @@ -94,8 +94,6 @@ static const struct behavior_parameter_metadata metadata = { #endif // IS_ENABLED(CONFIG_ZMK_BEHAVIOR_METADATA) -static int behavior_backlight_init(const struct device *dev) { return 0; } - static int on_keymap_binding_convert_central_state_dependent_params(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event) { @@ -170,7 +168,7 @@ static const struct behavior_driver_api behavior_backlight_driver_api = { #endif }; -BEHAVIOR_DT_INST_DEFINE(0, behavior_backlight_init, NULL, NULL, NULL, POST_KERNEL, - CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_backlight_driver_api); +BEHAVIOR_DT_INST_DEFINE(0, NULL, NULL, NULL, NULL, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, + &behavior_backlight_driver_api); #endif /* DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) */ diff --git a/app/src/behaviors/behavior_bt.c b/app/src/behaviors/behavior_bt.c index f439e49b..5b15abff 100644 --- a/app/src/behaviors/behavior_bt.c +++ b/app/src/behaviors/behavior_bt.c @@ -112,8 +112,6 @@ static int on_keymap_binding_pressed(struct zmk_behavior_binding *binding, return -ENOTSUP; } -static int behavior_bt_init(const struct device *dev) { return 0; }; - static int on_keymap_binding_released(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event) { return ZMK_BEHAVIOR_OPAQUE; @@ -127,7 +125,7 @@ static const struct behavior_driver_api behavior_bt_driver_api = { #endif // IS_ENABLED(CONFIG_ZMK_BEHAVIOR_METADATA) }; -BEHAVIOR_DT_INST_DEFINE(0, behavior_bt_init, NULL, NULL, NULL, POST_KERNEL, - CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_bt_driver_api); +BEHAVIOR_DT_INST_DEFINE(0, NULL, NULL, NULL, NULL, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, + &behavior_bt_driver_api); #endif /* DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) */ diff --git a/app/src/behaviors/behavior_caps_word.c b/app/src/behaviors/behavior_caps_word.c index bf74a4b3..2f64f4d7 100644 --- a/app/src/behaviors/behavior_caps_word.c +++ b/app/src/behaviors/behavior_caps_word.c @@ -32,7 +32,6 @@ struct caps_word_continue_item { struct behavior_caps_word_config { zmk_mod_flags_t mods; - uint8_t index; uint8_t continuations_count; struct caps_word_continue_item continuations[]; }; @@ -85,7 +84,8 @@ static int caps_word_keycode_state_changed_listener(const zmk_event_t *eh); ZMK_LISTENER(behavior_caps_word, caps_word_keycode_state_changed_listener); ZMK_SUBSCRIPTION(behavior_caps_word, zmk_keycode_state_changed); -static const struct device *devs[DT_NUM_INST_STATUS_OKAY(DT_DRV_COMPAT)]; +#define GET_DEV(inst) DEVICE_DT_INST_GET(inst), +static const struct device *devs[] = {DT_INST_FOREACH_STATUS_OKAY(GET_DEV)}; static bool caps_word_is_caps_includelist(const struct behavior_caps_word_config *config, uint16_t usage_page, uint8_t usage_id, @@ -133,11 +133,8 @@ static int caps_word_keycode_state_changed_listener(const zmk_event_t *eh) { return ZMK_EV_EVENT_BUBBLE; } - for (int i = 0; i < DT_NUM_INST_STATUS_OKAY(DT_DRV_COMPAT); i++) { + for (int i = 0; i < ARRAY_SIZE(devs); i++) { const struct device *dev = devs[i]; - if (dev == NULL) { - continue; - } struct behavior_caps_word_data *data = dev->data; if (!data->active) { @@ -160,31 +157,21 @@ static int caps_word_keycode_state_changed_listener(const zmk_event_t *eh) { return ZMK_EV_EVENT_BUBBLE; } -static int behavior_caps_word_init(const struct device *dev) { - const struct behavior_caps_word_config *config = dev->config; - devs[config->index] = dev; - return 0; -} - #define CAPS_WORD_LABEL(i, _n) DT_INST_LABEL(i) #define PARSE_BREAK(i) \ - { \ - .page = ZMK_HID_USAGE_PAGE(i), .id = ZMK_HID_USAGE_ID(i), \ - .implicit_modifiers = SELECT_MODS(i) \ - } + {.page = ZMK_HID_USAGE_PAGE(i), .id = ZMK_HID_USAGE_ID(i), .implicit_modifiers = SELECT_MODS(i)} #define BREAK_ITEM(i, n) PARSE_BREAK(DT_INST_PROP_BY_IDX(n, continue_list, i)) #define KP_INST(n) \ static struct behavior_caps_word_data behavior_caps_word_data_##n = {.active = false}; \ - static struct behavior_caps_word_config behavior_caps_word_config_##n = { \ - .index = n, \ + static const struct behavior_caps_word_config behavior_caps_word_config_##n = { \ .mods = DT_INST_PROP_OR(n, mods, MOD_LSFT), \ .continuations = {LISTIFY(DT_INST_PROP_LEN(n, continue_list), BREAK_ITEM, (, ), n)}, \ .continuations_count = DT_INST_PROP_LEN(n, continue_list), \ }; \ - BEHAVIOR_DT_INST_DEFINE(n, behavior_caps_word_init, NULL, &behavior_caps_word_data_##n, \ + BEHAVIOR_DT_INST_DEFINE(n, NULL, NULL, &behavior_caps_word_data_##n, \ &behavior_caps_word_config_##n, POST_KERNEL, \ CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_caps_word_driver_api); diff --git a/app/src/behaviors/behavior_ext_power.c b/app/src/behaviors/behavior_ext_power.c index b2aff3c8..6995d946 100644 --- a/app/src/behaviors/behavior_ext_power.c +++ b/app/src/behaviors/behavior_ext_power.c @@ -64,8 +64,6 @@ static int on_keymap_binding_released(struct zmk_behavior_binding *binding, return ZMK_BEHAVIOR_OPAQUE; } -static int behavior_ext_power_init(const struct device *dev) { return 0; }; - static const struct behavior_driver_api behavior_ext_power_driver_api = { .binding_convert_central_state_dependent_params = on_keymap_binding_convert_central_state_dependent_params, @@ -74,7 +72,7 @@ static const struct behavior_driver_api behavior_ext_power_driver_api = { .locality = BEHAVIOR_LOCALITY_GLOBAL, }; -BEHAVIOR_DT_INST_DEFINE(0, behavior_ext_power_init, NULL, NULL, NULL, POST_KERNEL, - CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_ext_power_driver_api); +BEHAVIOR_DT_INST_DEFINE(0, NULL, NULL, NULL, NULL, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, + &behavior_ext_power_driver_api); #endif /* DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) */ diff --git a/app/src/behaviors/behavior_hold_tap.c b/app/src/behaviors/behavior_hold_tap.c index c45ee803..3df3bc86 100644 --- a/app/src/behaviors/behavior_hold_tap.c +++ b/app/src/behaviors/behavior_hold_tap.c @@ -18,7 +18,6 @@ #include #include #include -#include LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); @@ -77,6 +76,9 @@ struct behavior_hold_tap_data { // this data is specific for each hold-tap struct active_hold_tap { int32_t position; +#if IS_ENABLED(CONFIG_ZMK_SPLIT) + uint8_t source; +#endif uint32_t param_hold; uint32_t param_tap; int64_t timestamp; @@ -250,19 +252,22 @@ static struct active_hold_tap *find_hold_tap(uint32_t position) { return NULL; } -static struct active_hold_tap *store_hold_tap(uint32_t position, uint32_t param_hold, - uint32_t param_tap, int64_t timestamp, +static struct active_hold_tap *store_hold_tap(struct zmk_behavior_binding_event *event, + uint32_t param_hold, uint32_t param_tap, const struct behavior_hold_tap_config *config) { for (int i = 0; i < ZMK_BHV_HOLD_TAP_MAX_HELD; i++) { if (active_hold_taps[i].position != ZMK_BHV_HOLD_TAP_POSITION_NOT_USED) { continue; } - active_hold_taps[i].position = position; + active_hold_taps[i].position = event->position; +#if IS_ENABLED(CONFIG_ZMK_SPLIT) + active_hold_taps[i].source = event->source; +#endif active_hold_taps[i].status = STATUS_UNDECIDED; active_hold_taps[i].config = config; active_hold_taps[i].param_hold = param_hold; active_hold_taps[i].param_tap = param_tap; - active_hold_taps[i].timestamp = timestamp; + active_hold_taps[i].timestamp = event->timestamp; active_hold_taps[i].position_of_first_other_key_pressed = -1; return &active_hold_taps[i]; } @@ -400,45 +405,57 @@ static int press_hold_binding(struct active_hold_tap *hold_tap) { struct zmk_behavior_binding_event event = { .position = hold_tap->position, .timestamp = hold_tap->timestamp, +#if IS_ENABLED(CONFIG_ZMK_SPLIT) + .source = hold_tap->source, +#endif }; struct zmk_behavior_binding binding = {.behavior_dev = hold_tap->config->hold_behavior_dev, .param1 = hold_tap->param_hold}; - return behavior_keymap_binding_pressed(&binding, event); + return zmk_behavior_invoke_binding(&binding, event, true); } static int press_tap_binding(struct active_hold_tap *hold_tap) { struct zmk_behavior_binding_event event = { .position = hold_tap->position, .timestamp = hold_tap->timestamp, +#if IS_ENABLED(CONFIG_ZMK_SPLIT) + .source = hold_tap->source, +#endif }; struct zmk_behavior_binding binding = {.behavior_dev = hold_tap->config->tap_behavior_dev, .param1 = hold_tap->param_tap}; store_last_hold_tapped(hold_tap); - return behavior_keymap_binding_pressed(&binding, event); + return zmk_behavior_invoke_binding(&binding, event, true); } static int release_hold_binding(struct active_hold_tap *hold_tap) { struct zmk_behavior_binding_event event = { .position = hold_tap->position, .timestamp = hold_tap->timestamp, +#if IS_ENABLED(CONFIG_ZMK_SPLIT) + .source = hold_tap->source, +#endif }; struct zmk_behavior_binding binding = {.behavior_dev = hold_tap->config->hold_behavior_dev, .param1 = hold_tap->param_hold}; - return behavior_keymap_binding_released(&binding, event); + return zmk_behavior_invoke_binding(&binding, event, false); } static int release_tap_binding(struct active_hold_tap *hold_tap) { struct zmk_behavior_binding_event event = { .position = hold_tap->position, .timestamp = hold_tap->timestamp, +#if IS_ENABLED(CONFIG_ZMK_SPLIT) + .source = hold_tap->source, +#endif }; struct zmk_behavior_binding binding = {.behavior_dev = hold_tap->config->tap_behavior_dev, .param1 = hold_tap->param_tap}; - return behavior_keymap_binding_released(&binding, event); + return zmk_behavior_invoke_binding(&binding, event, false); } static int press_binding(struct active_hold_tap *hold_tap) { @@ -598,7 +615,8 @@ static int on_hold_tap_binding_pressed(struct zmk_behavior_binding *binding, } struct active_hold_tap *hold_tap = - store_hold_tap(event.position, binding->param1, binding->param2, event.timestamp, cfg); + store_hold_tap(&event, binding->param1, binding->param2, cfg); + if (hold_tap == NULL) { LOG_ERR("unable to store hold-tap info, did you press more than %d hold-taps?", ZMK_BHV_HOLD_TAP_MAX_HELD); diff --git a/app/src/behaviors/behavior_input_two_axis.c b/app/src/behaviors/behavior_input_two_axis.c new file mode 100644 index 00000000..40e82a8e --- /dev/null +++ b/app/src/behaviors/behavior_input_two_axis.c @@ -0,0 +1,304 @@ +/* + * Copyright (c) 2024 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#define DT_DRV_COMPAT zmk_behavior_input_two_axis + +#include +#include +#include +#include +#include // CLAMP + +#include +#include + +#if IS_ENABLED(CONFIG_ZMK_POINTING_SMOOTH_SCROLLING) +#include +#endif // IS_ENABLED(CONFIG_ZMK_POINTING_SMOOTH_SCROLLING) + +LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); + +struct vector2d { + float x; + float y; +}; + +struct movement_state_1d { + float remainder; + int16_t speed; + int64_t start_time; +}; + +struct movement_state_2d { + struct movement_state_1d x; + struct movement_state_1d y; +}; + +struct behavior_input_two_axis_data { + struct k_work_delayable tick_work; + const struct device *dev; + + struct movement_state_2d state; +}; + +struct behavior_input_two_axis_config { + int16_t x_code; + int16_t y_code; + uint16_t delay_ms; + uint16_t time_to_max_speed_ms; + uint8_t trigger_period_ms; + // acceleration exponent 0: uniform speed + // acceleration exponent 1: uniform acceleration + // acceleration exponent 2: uniform jerk + uint8_t acceleration_exponent; +}; + +#if CONFIG_MINIMAL_LIBC +static float powf(float base, float exponent) { + // poor man's power implementation rounds the exponent down to the nearest integer. + float power = 1.0f; + for (; exponent >= 1.0f; exponent--) { + power = power * base; + } + return power; +} +#else +#include +#endif + +static int64_t ticks_since_start(int64_t start, int64_t now, int64_t delay) { + if (start == 0) { + return 0; + } + int64_t move_duration = now - (start + delay); + // start can be in the future if there's a delay + if (move_duration < 0) { + move_duration = 0; + } + return move_duration; +} + +#if IS_ENABLED(CONFIG_ZMK_POINTING_SMOOTH_SCROLLING) + +static uint8_t get_acceleration_exponent(const struct behavior_input_two_axis_config *config, + uint16_t code) { + switch (code) { + case INPUT_REL_WHEEL: + return (zmk_pointing_resolution_multipliers_get_current_profile().wheel > 0) + ? 0 + : config->acceleration_exponent; + case INPUT_REL_HWHEEL: + return (zmk_pointing_resolution_multipliers_get_current_profile().hor_wheel > 0) + ? 0 + : config->acceleration_exponent; + default: + return config->acceleration_exponent; + } +} + +#else + +static inline uint8_t get_acceleration_exponent(const struct behavior_input_two_axis_config *config, + uint16_t code) { + return config->acceleration_exponent; +} + +#endif // IS_ENABLED(CONFIG_ZMK_POINTING_SMOOTH_SCROLLING) + +static float speed(const struct behavior_input_two_axis_config *config, uint16_t code, + float max_speed, int64_t duration_ticks) { + uint8_t accel_exp = get_acceleration_exponent(config, code); + + if ((1000 * duration_ticks / CONFIG_SYS_CLOCK_TICKS_PER_SEC) > config->time_to_max_speed_ms || + config->time_to_max_speed_ms == 0 || accel_exp == 0) { + return max_speed; + } + + // Calculate the speed based on MouseKeysAccel + // See https://en.wikipedia.org/wiki/Mouse_keys + if (duration_ticks == 0) { + return 0; + } + + float time_fraction = (float)(1000 * duration_ticks / CONFIG_SYS_CLOCK_TICKS_PER_SEC) / + config->time_to_max_speed_ms; + return max_speed * powf(time_fraction, accel_exp); +} + +static void track_remainder(float *move, float *remainder) { + float new_move = *move + *remainder; + *remainder = new_move - (int)new_move; + *move = (int)new_move; +} + +static float update_movement_1d(const struct behavior_input_two_axis_config *config, uint16_t code, + struct movement_state_1d *state, int64_t now) { + float move = 0; + if (state->speed == 0) { + state->remainder = 0; + return move; + } + + int64_t move_duration = ticks_since_start(state->start_time, now, config->delay_ms); + LOG_DBG("Calculated speed: %f", (double)speed(config, code, state->speed, move_duration)); + move = + (move_duration > 0) + ? (speed(config, code, state->speed, move_duration) * config->trigger_period_ms / 1000) + : 0; + + track_remainder(&(move), &(state->remainder)); + + return move; +} +static struct vector2d update_movement_2d(const struct behavior_input_two_axis_config *config, + struct movement_state_2d *state, int64_t now) { + struct vector2d move = {0}; + + move = (struct vector2d){ + .x = update_movement_1d(config, config->x_code, &state->x, now), + .y = update_movement_1d(config, config->y_code, &state->y, now), + }; + + return move; +} + +static bool is_non_zero_1d_movement(int16_t speed) { return speed != 0; } + +static bool is_non_zero_2d_movement(struct movement_state_2d *state) { + return is_non_zero_1d_movement(state->x.speed) || is_non_zero_1d_movement(state->y.speed); +} + +static bool should_be_working(struct behavior_input_two_axis_data *data) { + return is_non_zero_2d_movement(&data->state); +} + +static void tick_work_cb(struct k_work *work) { + struct k_work_delayable *d_work = k_work_delayable_from_work(work); + struct behavior_input_two_axis_data *data = + CONTAINER_OF(d_work, struct behavior_input_two_axis_data, tick_work); + const struct device *dev = data->dev; + const struct behavior_input_two_axis_config *cfg = dev->config; + + uint64_t timestamp = k_uptime_ticks(); + + // LOG_INF("x start: %llu, y start: %llu, current timestamp: %llu", data->state.x.start_time, + // data->state.y.start_time, timestamp); + + struct vector2d move = update_movement_2d(cfg, &data->state, timestamp); + + int ret = 0; + bool have_x = is_non_zero_1d_movement(move.x); + bool have_y = is_non_zero_1d_movement(move.y); + if (have_x) { + ret = input_report_rel(dev, cfg->x_code, (int16_t)CLAMP(move.x, INT16_MIN, INT16_MAX), + !have_y, K_NO_WAIT); + } + if (have_y) { + ret = input_report_rel(dev, cfg->y_code, (int16_t)CLAMP(move.y, INT16_MIN, INT16_MAX), true, + K_NO_WAIT); + } + + if (should_be_working(data)) { + k_work_schedule(&data->tick_work, K_MSEC(cfg->trigger_period_ms)); + } +} + +static void set_start_times_for_activity_1d(struct movement_state_1d *state) { + if (state->speed != 0 && state->start_time == 0) { + state->start_time = k_uptime_ticks(); + } else if (state->speed == 0) { + state->start_time = 0; + } +} +static void set_start_times_for_activity(struct movement_state_2d *state) { + set_start_times_for_activity_1d(&state->x); + set_start_times_for_activity_1d(&state->y); +} + +static void update_work_scheduling(const struct device *dev) { + struct behavior_input_two_axis_data *data = dev->data; + const struct behavior_input_two_axis_config *cfg = dev->config; + + set_start_times_for_activity(&data->state); + + if (should_be_working(data)) { + k_work_schedule(&data->tick_work, K_MSEC(cfg->trigger_period_ms)); + } else { + k_work_cancel_delayable(&data->tick_work); + data->state.y.remainder = 0; + data->state.x.remainder = 0; + } +} + +int behavior_input_two_axis_adjust_speed(const struct device *dev, int16_t dx, int16_t dy) { + struct behavior_input_two_axis_data *data = dev->data; + + LOG_DBG("Adjusting: %d %d", dx, dy); + data->state.x.speed += dx; + data->state.y.speed += dy; + + LOG_DBG("After: %d %d", data->state.x.speed, data->state.y.speed); + + update_work_scheduling(dev); + + return 0; +} + +static int behavior_input_two_axis_init(const struct device *dev) { + struct behavior_input_two_axis_data *data = dev->data; + + data->dev = dev; + k_work_init_delayable(&data->tick_work, tick_work_cb); + + return 0; +}; + +static int on_keymap_binding_pressed(struct zmk_behavior_binding *binding, + struct zmk_behavior_binding_event event) { + + const struct device *behavior_dev = zmk_behavior_get_binding(binding->behavior_dev); + + LOG_DBG("position %d keycode 0x%02X", event.position, binding->param1); + + int16_t x = MOVE_X_DECODE(binding->param1); + int16_t y = MOVE_Y_DECODE(binding->param1); + + behavior_input_two_axis_adjust_speed(behavior_dev, x, y); + return 0; +} + +static int on_keymap_binding_released(struct zmk_behavior_binding *binding, + struct zmk_behavior_binding_event event) { + const struct device *behavior_dev = zmk_behavior_get_binding(binding->behavior_dev); + + LOG_DBG("position %d keycode 0x%02X", event.position, binding->param1); + + int16_t x = MOVE_X_DECODE(binding->param1); + int16_t y = MOVE_Y_DECODE(binding->param1); + + behavior_input_two_axis_adjust_speed(behavior_dev, -x, -y); + return 0; +} + +static const struct behavior_driver_api behavior_input_two_axis_driver_api = { + .binding_pressed = on_keymap_binding_pressed, .binding_released = on_keymap_binding_released}; + +#define ITA_INST(n) \ + static struct behavior_input_two_axis_data behavior_input_two_axis_data_##n = {}; \ + static struct behavior_input_two_axis_config behavior_input_two_axis_config_##n = { \ + .x_code = DT_INST_PROP(n, x_input_code), \ + .y_code = DT_INST_PROP(n, y_input_code), \ + .trigger_period_ms = DT_INST_PROP(n, trigger_period_ms), \ + .delay_ms = DT_INST_PROP_OR(n, delay_ms, 0), \ + .time_to_max_speed_ms = DT_INST_PROP(n, time_to_max_speed_ms), \ + .acceleration_exponent = DT_INST_PROP_OR(n, acceleration_exponent, 1), \ + }; \ + BEHAVIOR_DT_INST_DEFINE( \ + n, behavior_input_two_axis_init, NULL, &behavior_input_two_axis_data_##n, \ + &behavior_input_two_axis_config_##n, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, \ + &behavior_input_two_axis_driver_api); + +DT_INST_FOREACH_STATUS_OKAY(ITA_INST) diff --git a/app/src/behaviors/behavior_key_press.c b/app/src/behaviors/behavior_key_press.c index b090401e..b2a23900 100644 --- a/app/src/behaviors/behavior_key_press.c +++ b/app/src/behaviors/behavior_key_press.c @@ -37,8 +37,6 @@ static const struct behavior_parameter_metadata metadata = { #endif -static int behavior_key_press_init(const struct device *dev) { return 0; }; - static int on_keymap_binding_pressed(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event) { LOG_DBG("position %d keycode 0x%02X", event.position, binding->param1); @@ -60,7 +58,7 @@ static const struct behavior_driver_api behavior_key_press_driver_api = { }; #define KP_INST(n) \ - BEHAVIOR_DT_INST_DEFINE(n, behavior_key_press_init, NULL, NULL, NULL, POST_KERNEL, \ + BEHAVIOR_DT_INST_DEFINE(n, NULL, NULL, NULL, NULL, POST_KERNEL, \ CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_key_press_driver_api); DT_INST_FOREACH_STATUS_OKAY(KP_INST) diff --git a/app/src/behaviors/behavior_key_repeat.c b/app/src/behaviors/behavior_key_repeat.c index 21343ae8..853f00f3 100644 --- a/app/src/behaviors/behavior_key_repeat.c +++ b/app/src/behaviors/behavior_key_repeat.c @@ -77,7 +77,8 @@ static int key_repeat_keycode_state_changed_listener(const zmk_event_t *eh); ZMK_LISTENER(behavior_key_repeat, key_repeat_keycode_state_changed_listener); ZMK_SUBSCRIPTION(behavior_key_repeat, zmk_keycode_state_changed); -static const struct device *devs[DT_NUM_INST_STATUS_OKAY(DT_DRV_COMPAT)]; +#define GET_DEV(inst) DEVICE_DT_INST_GET(inst), +static const struct device *devs[] = {DT_INST_FOREACH_STATUS_OKAY(GET_DEV)}; static int key_repeat_keycode_state_changed_listener(const zmk_event_t *eh) { struct zmk_keycode_state_changed *ev = as_zmk_keycode_state_changed(eh); @@ -85,11 +86,8 @@ static int key_repeat_keycode_state_changed_listener(const zmk_event_t *eh) { return ZMK_EV_EVENT_BUBBLE; } - for (int i = 0; i < DT_NUM_INST_STATUS_OKAY(DT_DRV_COMPAT); i++) { + for (int i = 0; i < ARRAY_SIZE(devs); i++) { const struct device *dev = devs[i]; - if (dev == NULL) { - continue; - } struct behavior_key_repeat_data *data = dev->data; const struct behavior_key_repeat_config *config = dev->config; @@ -106,20 +104,13 @@ static int key_repeat_keycode_state_changed_listener(const zmk_event_t *eh) { return ZMK_EV_EVENT_BUBBLE; } -static int behavior_key_repeat_init(const struct device *dev) { - const struct behavior_key_repeat_config *config = dev->config; - devs[config->index] = dev; - return 0; -} - #define KR_INST(n) \ static struct behavior_key_repeat_data behavior_key_repeat_data_##n = {}; \ static struct behavior_key_repeat_config behavior_key_repeat_config_##n = { \ - .index = n, \ .usage_pages = DT_INST_PROP(n, usage_pages), \ .usage_pages_count = DT_INST_PROP_LEN(n, usage_pages), \ }; \ - BEHAVIOR_DT_INST_DEFINE(n, behavior_key_repeat_init, NULL, &behavior_key_repeat_data_##n, \ + BEHAVIOR_DT_INST_DEFINE(n, NULL, NULL, &behavior_key_repeat_data_##n, \ &behavior_key_repeat_config_##n, POST_KERNEL, \ CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_key_repeat_driver_api); diff --git a/app/src/behaviors/behavior_key_toggle.c b/app/src/behaviors/behavior_key_toggle.c index 72f2570b..ae06b14f 100644 --- a/app/src/behaviors/behavior_key_toggle.c +++ b/app/src/behaviors/behavior_key_toggle.c @@ -17,18 +17,39 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); -static int behavior_key_toggle_init(const struct device *dev) { return 0; } +enum toggle_mode { + ON, + OFF, + FLIP, +}; + +struct behavior_key_toggle_config { + enum toggle_mode toggle_mode; +}; static int on_keymap_binding_pressed(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event) { LOG_DBG("position %d keycode 0x%02X", event.position, binding->param1); - bool pressed = zmk_hid_is_pressed(binding->param1); - return raise_zmk_keycode_state_changed_from_encoded(binding->param1, !pressed, event.timestamp); + const struct behavior_key_toggle_config *cfg = + zmk_behavior_get_binding(binding->behavior_dev)->config; + switch (cfg->toggle_mode) { + case ON: + return raise_zmk_keycode_state_changed_from_encoded(binding->param1, true, event.timestamp); + case OFF: + return raise_zmk_keycode_state_changed_from_encoded(binding->param1, false, + event.timestamp); + case FLIP: + bool pressed = zmk_hid_is_pressed(binding->param1); + return raise_zmk_keycode_state_changed_from_encoded(binding->param1, !pressed, + event.timestamp); + default: + return -ENOTSUP; + }; } static int on_keymap_binding_released(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event) { - return 0; + return ZMK_BEHAVIOR_OPAQUE; } #if IS_ENABLED(CONFIG_ZMK_BEHAVIOR_METADATA) @@ -61,7 +82,10 @@ static const struct behavior_driver_api behavior_key_toggle_driver_api = { }; #define KT_INST(n) \ - BEHAVIOR_DT_INST_DEFINE(n, behavior_key_toggle_init, NULL, NULL, NULL, POST_KERNEL, \ + static const struct behavior_key_toggle_config behavior_key_toggle_config_##n = { \ + .toggle_mode = DT_ENUM_IDX(DT_DRV_INST(n), toggle_mode), \ + }; \ + BEHAVIOR_DT_INST_DEFINE(n, NULL, NULL, NULL, &behavior_key_toggle_config_##n, POST_KERNEL, \ CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_key_toggle_driver_api); DT_INST_FOREACH_STATUS_OKAY(KT_INST) diff --git a/app/src/behaviors/behavior_macro.c b/app/src/behaviors/behavior_macro.c index b535ed8b..3e4d1732 100644 --- a/app/src/behaviors/behavior_macro.c +++ b/app/src/behaviors/behavior_macro.c @@ -129,7 +129,9 @@ static int behavior_macro_init(const struct device *dev) { LOG_DBG("Release will resume at %d", state->release_state.start_index); break; } else { - // Ignore regular invokable bindings + // Mostly ignore regular invokable bindings, except they will consume macro parameters + state->release_state.param1_source = PARAM_SOURCE_BINDING; + state->release_state.param2_source = PARAM_SOURCE_BINDING; } } @@ -158,7 +160,8 @@ static void replace_params(struct behavior_macro_trigger_state *state, state->param2_source = PARAM_SOURCE_BINDING; } -static void queue_macro(uint32_t position, const struct zmk_behavior_binding bindings[], +static void queue_macro(struct zmk_behavior_binding_event *event, + const struct zmk_behavior_binding bindings[], struct behavior_macro_trigger_state state, const struct zmk_behavior_binding *macro_binding) { LOG_DBG("Iterating macro bindings - starting: %d, count: %d", state.start_index, state.count); @@ -169,14 +172,14 @@ static void queue_macro(uint32_t position, const struct zmk_behavior_binding bin switch (state.mode) { case MACRO_MODE_TAP: - zmk_behavior_queue_add(position, binding, true, state.tap_ms); - zmk_behavior_queue_add(position, binding, false, state.wait_ms); + zmk_behavior_queue_add(event, binding, true, state.tap_ms); + zmk_behavior_queue_add(event, binding, false, state.wait_ms); break; case MACRO_MODE_PRESS: - zmk_behavior_queue_add(position, binding, true, state.wait_ms); + zmk_behavior_queue_add(event, binding, true, state.wait_ms); break; case MACRO_MODE_RELEASE: - zmk_behavior_queue_add(position, binding, false, state.wait_ms); + zmk_behavior_queue_add(event, binding, false, state.wait_ms); break; default: LOG_ERR("Unknown macro mode: %d", state.mode); @@ -197,7 +200,7 @@ static int on_macro_binding_pressed(struct zmk_behavior_binding *binding, .start_index = 0, .count = state->press_bindings_count}; - queue_macro(event.position, cfg->bindings, trigger_state, binding); + queue_macro(&event, cfg->bindings, trigger_state, binding); return ZMK_BEHAVIOR_OPAQUE; } @@ -208,7 +211,7 @@ static int on_macro_binding_released(struct zmk_behavior_binding *binding, const struct behavior_macro_config *cfg = dev->config; struct behavior_macro_state *state = dev->data; - queue_macro(event.position, cfg->bindings, state->release_state, binding); + queue_macro(&event, cfg->bindings, state->release_state, binding); return ZMK_BEHAVIOR_OPAQUE; } diff --git a/app/src/behaviors/behavior_mod_morph.c b/app/src/behaviors/behavior_mod_morph.c index 303f96a7..f532f970 100644 --- a/app/src/behaviors/behavior_mod_morph.c +++ b/app/src/behaviors/behavior_mod_morph.c @@ -51,7 +51,7 @@ static int on_mod_morph_binding_pressed(struct zmk_behavior_binding *binding, } else { data->pressed_binding = (struct zmk_behavior_binding *)&cfg->normal_binding; } - return behavior_keymap_binding_pressed(data->pressed_binding, event); + return zmk_behavior_invoke_binding(data->pressed_binding, event, true); } static int on_mod_morph_binding_released(struct zmk_behavior_binding *binding, @@ -67,7 +67,7 @@ static int on_mod_morph_binding_released(struct zmk_behavior_binding *binding, struct zmk_behavior_binding *pressed_binding = data->pressed_binding; data->pressed_binding = NULL; int err; - err = behavior_keymap_binding_released(pressed_binding, event); + err = zmk_behavior_invoke_binding(pressed_binding, event, false); zmk_hid_masked_modifiers_clear(); return err; } @@ -80,8 +80,6 @@ static const struct behavior_driver_api behavior_mod_morph_driver_api = { #endif // IS_ENABLED(CONFIG_ZMK_BEHAVIOR_METADATA) }; -static int behavior_mod_morph_init(const struct device *dev) { return 0; } - #define _TRANSFORM_ENTRY(idx, node) \ { \ .behavior_dev = DEVICE_DT_NAME(DT_INST_PHANDLE_BY_IDX(node, bindings, idx)), \ @@ -100,7 +98,7 @@ static int behavior_mod_morph_init(const struct device *dev) { return 0; } (DT_INST_PROP(n, mods) & ~DT_INST_PROP(n, keep_mods))), \ }; \ static struct behavior_mod_morph_data behavior_mod_morph_data_##n = {}; \ - BEHAVIOR_DT_INST_DEFINE(n, behavior_mod_morph_init, NULL, &behavior_mod_morph_data_##n, \ + BEHAVIOR_DT_INST_DEFINE(n, NULL, NULL, &behavior_mod_morph_data_##n, \ &behavior_mod_morph_config_##n, POST_KERNEL, \ CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_mod_morph_driver_api); diff --git a/app/src/behaviors/behavior_momentary_layer.c b/app/src/behaviors/behavior_momentary_layer.c index b781a953..61575d91 100644 --- a/app/src/behaviors/behavior_momentary_layer.c +++ b/app/src/behaviors/behavior_momentary_layer.c @@ -15,6 +15,8 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); +#if DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) + #if IS_ENABLED(CONFIG_ZMK_BEHAVIOR_METADATA) static const struct behavior_parameter_value_metadata param_values[] = { @@ -36,21 +38,22 @@ static const struct behavior_parameter_metadata metadata = { #endif -struct behavior_mo_config {}; -struct behavior_mo_data {}; - -static int behavior_mo_init(const struct device *dev) { return 0; }; +struct behavior_mo_config { + bool locking; +}; static int mo_keymap_binding_pressed(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event) { LOG_DBG("position %d layer %d", event.position, binding->param1); - return zmk_keymap_layer_activate(binding->param1); + const struct behavior_mo_config *cfg = zmk_behavior_get_binding(binding->behavior_dev)->config; + return zmk_keymap_layer_activate(binding->param1, cfg->locking); } static int mo_keymap_binding_released(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event) { LOG_DBG("position %d layer %d", event.position, binding->param1); - return zmk_keymap_layer_deactivate(binding->param1); + const struct behavior_mo_config *cfg = zmk_behavior_get_binding(binding->behavior_dev)->config; + return zmk_keymap_layer_deactivate(binding->param1, cfg->locking); } static const struct behavior_driver_api behavior_mo_driver_api = { @@ -61,9 +64,13 @@ static const struct behavior_driver_api behavior_mo_driver_api = { #endif // IS_ENABLED(CONFIG_ZMK_BEHAVIOR_METADATA) }; -static const struct behavior_mo_config behavior_mo_config = {}; +#define MO_INST(n) \ + static const struct behavior_mo_config behavior_mo_config_##n = { \ + .locking = DT_INST_PROP_OR(n, locking, false), \ + }; \ + BEHAVIOR_DT_INST_DEFINE(n, NULL, NULL, NULL, &behavior_mo_config_##n, POST_KERNEL, \ + CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_mo_driver_api); -static struct behavior_mo_data behavior_mo_data; +DT_INST_FOREACH_STATUS_OKAY(MO_INST) -BEHAVIOR_DT_INST_DEFINE(0, behavior_mo_init, NULL, &behavior_mo_data, &behavior_mo_config, - POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_mo_driver_api); +#endif /* DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) */ \ No newline at end of file diff --git a/app/src/behaviors/behavior_mouse_key_press.c b/app/src/behaviors/behavior_mouse_key_press.c index 9064a1aa..e62fca36 100644 --- a/app/src/behaviors/behavior_mouse_key_press.c +++ b/app/src/behaviors/behavior_mouse_key_press.c @@ -11,35 +11,72 @@ #include #include -#include -#include +#include +#include +#include LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #if DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) -static int behavior_mouse_key_press_init(const struct device *dev) { return 0; }; +#if IS_ENABLED(CONFIG_ZMK_BEHAVIOR_METADATA) + +static const struct behavior_parameter_value_metadata param_values[] = { + {.display_name = "MB1", .type = BEHAVIOR_PARAMETER_VALUE_TYPE_VALUE, .value = MB1}, + {.display_name = "MB2", .type = BEHAVIOR_PARAMETER_VALUE_TYPE_VALUE, .value = MB2}, + {.display_name = "MB3", .type = BEHAVIOR_PARAMETER_VALUE_TYPE_VALUE, .value = MB3}, + {.display_name = "MB4", .type = BEHAVIOR_PARAMETER_VALUE_TYPE_VALUE, .value = MB4}, + {.display_name = "MB5", .type = BEHAVIOR_PARAMETER_VALUE_TYPE_VALUE, .value = MB5}}; + +static const struct behavior_parameter_metadata_set param_metadata_set[] = {{ + .param1_values = param_values, + .param1_values_len = ARRAY_SIZE(param_values), +}}; + +static const struct behavior_parameter_metadata metadata = { + .sets_len = ARRAY_SIZE(param_metadata_set), + .sets = param_metadata_set, +}; + +#endif + +static void process_key_state(const struct device *dev, int32_t val, bool pressed) { + for (int i = 0; i < ZMK_HID_MOUSE_NUM_BUTTONS; i++) { + if (val & BIT(i)) { + WRITE_BIT(val, i, 0); + input_report_key(dev, INPUT_BTN_0 + i, pressed ? 1 : 0, val == 0, K_FOREVER); + } + } +} static int on_keymap_binding_pressed(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event) { LOG_DBG("position %d keycode 0x%02X", event.position, binding->param1); - return raise_zmk_mouse_button_state_changed_from_encoded(binding->param1, true, - event.timestamp); + process_key_state(zmk_behavior_get_binding(binding->behavior_dev), binding->param1, true); + + return 0; } static int on_keymap_binding_released(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event) { LOG_DBG("position %d keycode 0x%02X", event.position, binding->param1); - return raise_zmk_mouse_button_state_changed_from_encoded(binding->param1, false, - event.timestamp); + + process_key_state(zmk_behavior_get_binding(binding->behavior_dev), binding->param1, false); + + return 0; } static const struct behavior_driver_api behavior_mouse_key_press_driver_api = { - .binding_pressed = on_keymap_binding_pressed, .binding_released = on_keymap_binding_released}; + .binding_pressed = on_keymap_binding_pressed, + .binding_released = on_keymap_binding_released, +#if IS_ENABLED(CONFIG_ZMK_BEHAVIOR_METADATA) + .parameter_metadata = &metadata, +#endif // IS_ENABLED(CONFIG_ZMK_BEHAVIOR_METADATA) +}; #define MKP_INST(n) \ - BEHAVIOR_DT_INST_DEFINE(n, behavior_mouse_key_press_init, NULL, NULL, NULL, POST_KERNEL, \ + BEHAVIOR_DT_INST_DEFINE(n, NULL, NULL, NULL, NULL, POST_KERNEL, \ CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, \ &behavior_mouse_key_press_driver_api); diff --git a/app/src/behaviors/behavior_none.c b/app/src/behaviors/behavior_none.c index b1dc4ad3..30429c94 100644 --- a/app/src/behaviors/behavior_none.c +++ b/app/src/behaviors/behavior_none.c @@ -16,8 +16,6 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #if DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) -static int behavior_none_init(const struct device *dev) { return 0; }; - static int on_keymap_binding_pressed(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event) { return ZMK_BEHAVIOR_OPAQUE; @@ -36,7 +34,7 @@ static const struct behavior_driver_api behavior_none_driver_api = { #endif // IS_ENABLED(CONFIG_ZMK_BEHAVIOR_METADATA) }; -BEHAVIOR_DT_INST_DEFINE(0, behavior_none_init, NULL, NULL, NULL, POST_KERNEL, - CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_none_driver_api); +BEHAVIOR_DT_INST_DEFINE(0, NULL, NULL, NULL, NULL, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, + &behavior_none_driver_api); #endif /* DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) */ diff --git a/app/src/behaviors/behavior_outputs.c b/app/src/behaviors/behavior_outputs.c index ffa57d16..e6b51d0c 100644 --- a/app/src/behaviors/behavior_outputs.c +++ b/app/src/behaviors/behavior_outputs.c @@ -42,6 +42,11 @@ static const struct behavior_parameter_value_metadata std_values[] = { .type = BEHAVIOR_PARAMETER_VALUE_TYPE_VALUE, }, #endif // IS_ENABLED(CONFIG_ZMK_BLE) + { + .value = OUT_NONE, + .display_name = "No Output", + .type = BEHAVIOR_PARAMETER_VALUE_TYPE_VALUE, + }, }; static const struct behavior_parameter_metadata_set std_set = { @@ -60,11 +65,13 @@ static int on_keymap_binding_pressed(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event) { switch (binding->param1) { case OUT_TOG: - return zmk_endpoints_toggle_transport(); + return zmk_endpoint_toggle_preferred_transport(); case OUT_USB: - return zmk_endpoints_select_transport(ZMK_TRANSPORT_USB); + return zmk_endpoint_set_preferred_transport(ZMK_TRANSPORT_USB); case OUT_BLE: - return zmk_endpoints_select_transport(ZMK_TRANSPORT_BLE); + return zmk_endpoint_set_preferred_transport(ZMK_TRANSPORT_BLE); + case OUT_NONE: + return zmk_endpoint_set_preferred_transport(ZMK_TRANSPORT_NONE); default: LOG_ERR("Unknown output command: %d", binding->param1); } @@ -72,8 +79,6 @@ static int on_keymap_binding_pressed(struct zmk_behavior_binding *binding, return -ENOTSUP; } -static int behavior_out_init(const struct device *dev) { return 0; } - static const struct behavior_driver_api behavior_outputs_driver_api = { .binding_pressed = on_keymap_binding_pressed, #if IS_ENABLED(CONFIG_ZMK_BEHAVIOR_METADATA) @@ -81,7 +86,7 @@ static const struct behavior_driver_api behavior_outputs_driver_api = { #endif // IS_ENABLED(CONFIG_ZMK_BEHAVIOR_METADATA) }; -BEHAVIOR_DT_INST_DEFINE(0, behavior_out_init, NULL, NULL, NULL, POST_KERNEL, - CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_outputs_driver_api); +BEHAVIOR_DT_INST_DEFINE(0, NULL, NULL, NULL, NULL, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, + &behavior_outputs_driver_api); #endif /* DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) */ diff --git a/app/src/behaviors/behavior_reset.c b/app/src/behaviors/behavior_reset.c index 554132f4..67f33aae 100644 --- a/app/src/behaviors/behavior_reset.c +++ b/app/src/behaviors/behavior_reset.c @@ -14,24 +14,42 @@ #include +#if IS_ENABLED(CONFIG_RETENTION_BOOT_MODE) + +#include + +#endif /* IS_ENABLED(CONFIG_RETENTION_BOOT_MODE) */ + LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #if DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) struct behavior_reset_config { +#if IS_ENABLED(CONFIG_RETENTION_BOOT_MODE) + enum BOOT_MODE_TYPES boot_mode; +#else int type; +#endif /* IS_ENABLED(CONFIG_RETENTION_BOOT_MODE) */ }; -static int behavior_reset_init(const struct device *dev) { return 0; }; - static int on_keymap_binding_pressed(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event) { const struct device *dev = zmk_behavior_get_binding(binding->behavior_dev); const struct behavior_reset_config *cfg = dev->config; - // TODO: Correct magic code for going into DFU? +#if IS_ENABLED(CONFIG_RETENTION_BOOT_MODE) + int ret = bootmode_set(cfg->boot_mode); + if (ret < 0) { + LOG_ERR("Failed to set the bootloader mode (%d)", ret); + return ZMK_BEHAVIOR_OPAQUE; + } + + sys_reboot(SYS_REBOOT_WARM); +#else // See // https://github.com/adafruit/Adafruit_nRF52_Bootloader/blob/d6b28e66053eea467166f44875e3c7ec741cb471/src/main.c#L107 sys_reboot(cfg->type); +#endif /* IS_ENABLED(CONFIG_RETENTION_BOOT_MODE) */ + return ZMK_BEHAVIOR_OPAQUE; } @@ -45,10 +63,13 @@ static const struct behavior_driver_api behavior_reset_driver_api = { #define RST_INST(n) \ static const struct behavior_reset_config behavior_reset_config_##n = { \ - .type = DT_INST_PROP(n, type)}; \ - BEHAVIOR_DT_INST_DEFINE(n, behavior_reset_init, NULL, NULL, &behavior_reset_config_##n, \ - POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, \ - &behavior_reset_driver_api); + COND_CODE_1( \ + IS_ENABLED(CONFIG_RETENTION_BOOT_MODE), \ + (DT_INST_PROP(n, bootloader) ? BOOT_MODE_TYPE_BOOTLOADER : BOOT_MODE_TYPE_NORMAL), \ + (.type = DT_INST_PROP(n, type))), \ + }; \ + BEHAVIOR_DT_INST_DEFINE(n, NULL, NULL, NULL, &behavior_reset_config_##n, POST_KERNEL, \ + CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_reset_driver_api); DT_INST_FOREACH_STATUS_OKAY(RST_INST) diff --git a/app/src/behaviors/behavior_rgb_underglow.c b/app/src/behaviors/behavior_rgb_underglow.c index c37e5217..80cd5182 100644 --- a/app/src/behaviors/behavior_rgb_underglow.c +++ b/app/src/behaviors/behavior_rgb_underglow.c @@ -131,8 +131,6 @@ static const struct behavior_parameter_metadata metadata = { #endif // IS_ENABLED(CONFIG_ZMK_BEHAVIOR_METADATA) -static int behavior_rgb_underglow_init(const struct device *dev) { return 0; } - static int on_keymap_binding_convert_central_state_dependent_params(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event) { @@ -265,7 +263,7 @@ static const struct behavior_driver_api behavior_rgb_underglow_driver_api = { #endif }; -BEHAVIOR_DT_INST_DEFINE(0, behavior_rgb_underglow_init, NULL, NULL, NULL, POST_KERNEL, - CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_rgb_underglow_driver_api); +BEHAVIOR_DT_INST_DEFINE(0, NULL, NULL, NULL, NULL, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, + &behavior_rgb_underglow_driver_api); #endif /* DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) */ diff --git a/app/src/behaviors/behavior_sensor_rotate.c b/app/src/behaviors/behavior_sensor_rotate.c index 94bac506..4a59c5df 100644 --- a/app/src/behaviors/behavior_sensor_rotate.c +++ b/app/src/behaviors/behavior_sensor_rotate.c @@ -16,8 +16,6 @@ static const struct behavior_driver_api behavior_sensor_rotate_driver_api = { .sensor_binding_accept_data = zmk_behavior_sensor_rotate_common_accept_data, .sensor_binding_process = zmk_behavior_sensor_rotate_common_process}; -static int behavior_sensor_rotate_init(const struct device *dev) { return 0; }; - #define _TRANSFORM_ENTRY(idx, node) \ { \ .behavior_dev = DEVICE_DT_NAME(DT_INST_PHANDLE_BY_IDX(node, bindings, idx)), \ @@ -35,9 +33,8 @@ static int behavior_sensor_rotate_init(const struct device *dev) { return 0; }; .override_params = false, \ }; \ static struct behavior_sensor_rotate_data behavior_sensor_rotate_data_##n = {}; \ - BEHAVIOR_DT_INST_DEFINE(n, behavior_sensor_rotate_init, NULL, \ - &behavior_sensor_rotate_data_##n, &behavior_sensor_rotate_config_##n, \ - POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, \ - &behavior_sensor_rotate_driver_api); + BEHAVIOR_DT_INST_DEFINE( \ + n, NULL, NULL, &behavior_sensor_rotate_data_##n, &behavior_sensor_rotate_config_##n, \ + POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_sensor_rotate_driver_api); DT_INST_FOREACH_STATUS_OKAY(SENSOR_ROTATE_INST) diff --git a/app/src/behaviors/behavior_sensor_rotate_common.c b/app/src/behaviors/behavior_sensor_rotate_common.c index 94bf40c1..72461286 100644 --- a/app/src/behaviors/behavior_sensor_rotate_common.c +++ b/app/src/behaviors/behavior_sensor_rotate_common.c @@ -6,6 +6,7 @@ #include #include +#include #include "behavior_sensor_rotate_common.h" @@ -33,7 +34,7 @@ int zmk_behavior_sensor_rotate_common_accept_data( remainder.val1 += value.val1; remainder.val2 += value.val2; - if (remainder.val2 >= 1000000 || remainder.val2 <= 1000000) { + if (abs(remainder.val2) >= 1000000) { remainder.val1 += remainder.val2 / 1000000; remainder.val2 %= 1000000; } @@ -89,9 +90,14 @@ int zmk_behavior_sensor_rotate_common_process(struct zmk_behavior_binding *bindi LOG_DBG("Sensor binding: %s", binding->behavior_dev); +#if IS_ENABLED(CONFIG_ZMK_SPLIT) + // set this value so that it always triggers on central, can be handled more properly later + event.source = ZMK_POSITION_STATE_CHANGE_SOURCE_LOCAL; +#endif + for (int i = 0; i < triggers; i++) { - zmk_behavior_queue_add(event.position, triggered_binding, true, cfg->tap_ms); - zmk_behavior_queue_add(event.position, triggered_binding, false, 0); + zmk_behavior_queue_add(&event, triggered_binding, true, cfg->tap_ms); + zmk_behavior_queue_add(&event, triggered_binding, false, 0); } return ZMK_BEHAVIOR_OPAQUE; diff --git a/app/src/behaviors/behavior_sensor_rotate_var.c b/app/src/behaviors/behavior_sensor_rotate_var.c index 65a9ce34..b096c46a 100644 --- a/app/src/behaviors/behavior_sensor_rotate_var.c +++ b/app/src/behaviors/behavior_sensor_rotate_var.c @@ -16,8 +16,6 @@ static const struct behavior_driver_api behavior_sensor_rotate_var_driver_api = .sensor_binding_accept_data = zmk_behavior_sensor_rotate_common_accept_data, .sensor_binding_process = zmk_behavior_sensor_rotate_common_process}; -static int behavior_sensor_rotate_var_init(const struct device *dev) { return 0; }; - #define SENSOR_ROTATE_VAR_INST(n) \ static struct behavior_sensor_rotate_config behavior_sensor_rotate_var_config_##n = { \ .cw_binding = {.behavior_dev = DEVICE_DT_NAME(DT_INST_PHANDLE_BY_IDX(n, bindings, 0))}, \ @@ -26,9 +24,9 @@ static int behavior_sensor_rotate_var_init(const struct device *dev) { return 0; .override_params = true, \ }; \ static struct behavior_sensor_rotate_data behavior_sensor_rotate_var_data_##n = {}; \ - BEHAVIOR_DT_INST_DEFINE( \ - n, behavior_sensor_rotate_var_init, NULL, &behavior_sensor_rotate_var_data_##n, \ - &behavior_sensor_rotate_var_config_##n, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, \ - &behavior_sensor_rotate_var_driver_api); + BEHAVIOR_DT_INST_DEFINE(n, NULL, NULL, &behavior_sensor_rotate_var_data_##n, \ + &behavior_sensor_rotate_var_config_##n, POST_KERNEL, \ + CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, \ + &behavior_sensor_rotate_var_driver_api); DT_INST_FOREACH_STATUS_OKAY(SENSOR_ROTATE_VAR_INST) diff --git a/app/src/behaviors/behavior_soft_off.c b/app/src/behaviors/behavior_soft_off.c index fcffd09a..1f9b1aaf 100644 --- a/app/src/behaviors/behavior_soft_off.c +++ b/app/src/behaviors/behavior_soft_off.c @@ -27,8 +27,6 @@ struct behavior_soft_off_data { #define IS_SPLIT_PERIPHERAL \ (IS_ENABLED(CONFIG_ZMK_SPLIT) && !IS_ENABLED(CONFIG_ZMK_SPLIT_ROLE_CENTRAL)) -static int behavior_soft_off_init(const struct device *dev) { return 0; }; - static int on_keymap_binding_pressed(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event) { const struct device *dev = zmk_behavior_get_binding(binding->behavior_dev); @@ -86,8 +84,7 @@ static const struct behavior_driver_api behavior_soft_off_driver_api = { DT_INST_PROP_OR(n, split_peripheral_off_on_press, false), \ }; \ static struct behavior_soft_off_data bso_data_##n = {}; \ - BEHAVIOR_DT_INST_DEFINE(n, behavior_soft_off_init, NULL, &bso_data_##n, &bso_config_##n, \ - POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, \ - &behavior_soft_off_driver_api); + BEHAVIOR_DT_INST_DEFINE(n, NULL, NULL, &bso_data_##n, &bso_config_##n, POST_KERNEL, \ + CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_soft_off_driver_api); DT_INST_FOREACH_STATUS_OKAY(BSO_INST) diff --git a/app/src/behaviors/behavior_sticky_key.c b/app/src/behaviors/behavior_sticky_key.c index 61c86fb7..babdeb7d 100644 --- a/app/src/behaviors/behavior_sticky_key.c +++ b/app/src/behaviors/behavior_sticky_key.c @@ -40,8 +40,10 @@ struct behavior_sticky_key_config { struct active_sticky_key { uint32_t position; +#if IS_ENABLED(CONFIG_ZMK_SPLIT) + uint8_t source; +#endif uint32_t param1; - uint32_t param2; const struct behavior_sticky_key_config *config; // timer data. bool timer_started; @@ -55,8 +57,8 @@ struct active_sticky_key { struct active_sticky_key active_sticky_keys[ZMK_BHV_STICKY_KEY_MAX_HELD] = {}; -static struct active_sticky_key *store_sticky_key(uint32_t position, uint32_t param1, - uint32_t param2, +static struct active_sticky_key *store_sticky_key(struct zmk_behavior_binding_event *event, + uint32_t param1, const struct behavior_sticky_key_config *config) { for (int i = 0; i < ZMK_BHV_STICKY_KEY_MAX_HELD; i++) { struct active_sticky_key *const sticky_key = &active_sticky_keys[i]; @@ -64,9 +66,11 @@ static struct active_sticky_key *store_sticky_key(uint32_t position, uint32_t pa sticky_key->timer_cancelled) { continue; } - sticky_key->position = position; + sticky_key->position = event->position; +#if IS_ENABLED(CONFIG_ZMK_SPLIT) + sticky_key->source = event->source; +#endif sticky_key->param1 = param1; - sticky_key->param2 = param2; sticky_key->config = config; sticky_key->release_at = 0; sticky_key->timer_cancelled = false; @@ -79,12 +83,18 @@ static struct active_sticky_key *store_sticky_key(uint32_t position, uint32_t pa } static void clear_sticky_key(struct active_sticky_key *sticky_key) { + LOG_DBG("clearing sticky key at position %d, param %d", sticky_key->position, + sticky_key->param1); sticky_key->position = ZMK_BHV_STICKY_KEY_POSITION_FREE; } -static struct active_sticky_key *find_sticky_key(uint32_t position) { +static struct active_sticky_key * +find_sticky_key(uint32_t position, struct zmk_behavior_binding behavior, uint32_t binding_param) { for (int i = 0; i < ZMK_BHV_STICKY_KEY_MAX_HELD; i++) { - if (active_sticky_keys[i].position == position && !active_sticky_keys[i].timer_cancelled) { + if (active_sticky_keys[i].position == position && + active_sticky_keys[i].config->behavior.behavior_dev == behavior.behavior_dev && + active_sticky_keys[i].param1 == binding_param && + !active_sticky_keys[i].timer_cancelled) { return &active_sticky_keys[i]; } } @@ -96,13 +106,15 @@ static inline int press_sticky_key_behavior(struct active_sticky_key *sticky_key struct zmk_behavior_binding binding = { .behavior_dev = sticky_key->config->behavior.behavior_dev, .param1 = sticky_key->param1, - .param2 = sticky_key->param2, }; struct zmk_behavior_binding_event event = { .position = sticky_key->position, .timestamp = timestamp, +#if IS_ENABLED(CONFIG_ZMK_SPLIT) + .source = sticky_key->source, +#endif }; - return behavior_keymap_binding_pressed(&binding, event); + return zmk_behavior_invoke_binding(&binding, event, true); } static inline int release_sticky_key_behavior(struct active_sticky_key *sticky_key, @@ -110,15 +122,17 @@ static inline int release_sticky_key_behavior(struct active_sticky_key *sticky_k struct zmk_behavior_binding binding = { .behavior_dev = sticky_key->config->behavior.behavior_dev, .param1 = sticky_key->param1, - .param2 = sticky_key->param2, }; struct zmk_behavior_binding_event event = { .position = sticky_key->position, .timestamp = timestamp, +#if IS_ENABLED(CONFIG_ZMK_SPLIT) + .source = sticky_key->source, +#endif }; clear_sticky_key(sticky_key); - return behavior_keymap_binding_released(&binding, event); + return zmk_behavior_invoke_binding(&binding, event, false); } static inline void on_sticky_key_timeout(struct active_sticky_key *sticky_key) { @@ -144,12 +158,13 @@ static int on_sticky_key_binding_pressed(struct zmk_behavior_binding *binding, const struct device *dev = zmk_behavior_get_binding(binding->behavior_dev); const struct behavior_sticky_key_config *cfg = dev->config; struct active_sticky_key *sticky_key; - sticky_key = find_sticky_key(event.position); + sticky_key = find_sticky_key(event.position, cfg->behavior, binding->param1); if (sticky_key != NULL) { + LOG_DBG("found same sticky key pressed at position %d, release it first", event.position); stop_timer(sticky_key); release_sticky_key_behavior(sticky_key, event.timestamp); } - sticky_key = store_sticky_key(event.position, binding->param1, binding->param2, cfg); + sticky_key = store_sticky_key(&event, binding->param1, cfg); if (sticky_key == NULL) { LOG_ERR("unable to store sticky key, did you press more than %d sticky_key?", ZMK_BHV_STICKY_KEY_MAX_HELD); @@ -166,7 +181,10 @@ static int on_sticky_key_binding_pressed(struct zmk_behavior_binding *binding, static int on_sticky_key_binding_released(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event) { - struct active_sticky_key *sticky_key = find_sticky_key(event.position); + const struct device *dev = zmk_behavior_get_binding(binding->behavior_dev); + const struct behavior_sticky_key_config *cfg = dev->config; + struct active_sticky_key *sticky_key = + find_sticky_key(event.position, cfg->behavior, binding->param1); if (sticky_key == NULL) { LOG_ERR("ACTIVE STICKY KEY CLEARED TOO EARLY"); return ZMK_BEHAVIOR_OPAQUE; @@ -366,9 +384,6 @@ static int behavior_sticky_key_init(const struct device *dev) { return 0; } -struct behavior_sticky_key_data {}; -static struct behavior_sticky_key_data behavior_sticky_key_data; - #define KP_INST(n) \ static const struct behavior_sticky_key_config behavior_sticky_key_config_##n = { \ .behavior = ZMK_KEYMAP_EXTRACT_BINDING(0, DT_DRV_INST(n)), \ @@ -377,7 +392,7 @@ static struct behavior_sticky_key_data behavior_sticky_key_data; .lazy = DT_INST_PROP(n, lazy), \ .ignore_modifiers = DT_INST_PROP(n, ignore_modifiers), \ }; \ - BEHAVIOR_DT_INST_DEFINE(n, behavior_sticky_key_init, NULL, &behavior_sticky_key_data, \ + BEHAVIOR_DT_INST_DEFINE(n, behavior_sticky_key_init, NULL, NULL, \ &behavior_sticky_key_config_##n, POST_KERNEL, \ CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_sticky_key_driver_api); diff --git a/app/src/behaviors/behavior_studio_unlock.c b/app/src/behaviors/behavior_studio_unlock.c index 95f2b40d..66bb1f6f 100644 --- a/app/src/behaviors/behavior_studio_unlock.c +++ b/app/src/behaviors/behavior_studio_unlock.c @@ -17,8 +17,6 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #if DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) -static int behavior_studio_unlock_init(const struct device *dev) { return 0; }; - static int on_keymap_binding_pressed(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event) { zmk_studio_core_unlock(); @@ -39,7 +37,7 @@ static const struct behavior_driver_api behavior_studio_unlock_driver_api = { #endif // IS_ENABLED(CONFIG_ZMK_BEHAVIOR_METADATA) }; -BEHAVIOR_DT_INST_DEFINE(0, behavior_studio_unlock_init, NULL, NULL, NULL, POST_KERNEL, - CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_studio_unlock_driver_api); +BEHAVIOR_DT_INST_DEFINE(0, NULL, NULL, NULL, NULL, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, + &behavior_studio_unlock_driver_api); #endif /* DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) */ diff --git a/app/src/behaviors/behavior_tap_dance.c b/app/src/behaviors/behavior_tap_dance.c index ce57b70f..bbc301f1 100644 --- a/app/src/behaviors/behavior_tap_dance.c +++ b/app/src/behaviors/behavior_tap_dance.c @@ -21,7 +21,7 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #if DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) -#define ZMK_BHV_TAP_DANCE_MAX_HELD 10 +#define ZMK_BHV_TAP_DANCE_MAX_HELD CONFIG_ZMK_BEHAVIOR_TAP_DANCE_MAX_HELD #define ZMK_BHV_TAP_DANCE_POSITION_FREE UINT32_MAX @@ -35,6 +35,9 @@ struct active_tap_dance { // Tap Dance Data int counter; uint32_t position; +#if IS_ENABLED(CONFIG_ZMK_SPLIT) + uint8_t source; +#endif uint32_t param1; uint32_t param2; bool is_pressed; @@ -59,13 +62,17 @@ static struct active_tap_dance *find_tap_dance(uint32_t position) { return NULL; } -static int new_tap_dance(uint32_t position, const struct behavior_tap_dance_config *config, +static int new_tap_dance(struct zmk_behavior_binding_event *event, + const struct behavior_tap_dance_config *config, struct active_tap_dance **tap_dance) { for (int i = 0; i < ZMK_BHV_TAP_DANCE_MAX_HELD; i++) { struct active_tap_dance *const ref_dance = &active_tap_dances[i]; if (ref_dance->position == ZMK_BHV_TAP_DANCE_POSITION_FREE) { ref_dance->counter = 0; - ref_dance->position = position; + ref_dance->position = event->position; +#if IS_ENABLED(CONFIG_ZMK_SPLIT) + ref_dance->source = event->source; +#endif ref_dance->config = config; ref_dance->release_at = 0; ref_dance->is_pressed = true; @@ -108,8 +115,11 @@ static inline int press_tap_dance_behavior(struct active_tap_dance *tap_dance, i struct zmk_behavior_binding_event event = { .position = tap_dance->position, .timestamp = timestamp, +#if IS_ENABLED(CONFIG_ZMK_SPLIT) + .source = tap_dance->source, +#endif }; - return behavior_keymap_binding_pressed(&binding, event); + return zmk_behavior_invoke_binding(&binding, event, true); } static inline int release_tap_dance_behavior(struct active_tap_dance *tap_dance, @@ -118,9 +128,12 @@ static inline int release_tap_dance_behavior(struct active_tap_dance *tap_dance, struct zmk_behavior_binding_event event = { .position = tap_dance->position, .timestamp = timestamp, +#if IS_ENABLED(CONFIG_ZMK_SPLIT) + .source = tap_dance->source, +#endif }; clear_tap_dance(tap_dance); - return behavior_keymap_binding_released(&binding, event); + return zmk_behavior_invoke_binding(&binding, event, false); } static int on_tap_dance_binding_pressed(struct zmk_behavior_binding *binding, @@ -130,7 +143,7 @@ static int on_tap_dance_binding_pressed(struct zmk_behavior_binding *binding, struct active_tap_dance *tap_dance; tap_dance = find_tap_dance(event.position); if (tap_dance == NULL) { - if (new_tap_dance(event.position, cfg, &tap_dance) == -ENOMEM) { + if (new_tap_dance(&event, cfg, &tap_dance) == -ENOMEM) { LOG_ERR("Unable to create new tap dance. Insufficient space in active_tap_dances[]."); return ZMK_BEHAVIOR_OPAQUE; } @@ -245,7 +258,7 @@ static int behavior_tap_dance_init(const struct device *dev) { #define _TRANSFORM_ENTRY(idx, node) ZMK_KEYMAP_EXTRACT_BINDING(idx, node) #define TRANSFORMED_BINDINGS(node) \ - { LISTIFY(DT_INST_PROP_LEN(node, bindings), _TRANSFORM_ENTRY, (, ), DT_DRV_INST(node)) } + {LISTIFY(DT_INST_PROP_LEN(node, bindings), _TRANSFORM_ENTRY, (, ), DT_DRV_INST(node))} #define KP_INST(n) \ static struct zmk_behavior_binding \ @@ -261,4 +274,4 @@ static int behavior_tap_dance_init(const struct device *dev) { DT_INST_FOREACH_STATUS_OKAY(KP_INST) -#endif \ No newline at end of file +#endif diff --git a/app/src/behaviors/behavior_to_layer.c b/app/src/behaviors/behavior_to_layer.c index f739ec8d..61a96965 100644 --- a/app/src/behaviors/behavior_to_layer.c +++ b/app/src/behaviors/behavior_to_layer.c @@ -17,12 +17,15 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #if DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) -static int behavior_to_init(const struct device *dev) { return 0; }; +struct behavior_to_config { + bool locking; +}; static int to_keymap_binding_pressed(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event) { LOG_DBG("position %d layer %d", event.position, binding->param1); - zmk_keymap_layer_to(binding->param1); + const struct behavior_to_config *cfg = zmk_behavior_get_binding(binding->behavior_dev)->config; + zmk_keymap_layer_to(binding->param1, cfg->locking); return ZMK_BEHAVIOR_OPAQUE; } @@ -61,7 +64,13 @@ static const struct behavior_driver_api behavior_to_driver_api = { #endif // IS_ENABLED(CONFIG_ZMK_BEHAVIOR_METADATA) }; -BEHAVIOR_DT_INST_DEFINE(0, behavior_to_init, NULL, NULL, NULL, POST_KERNEL, - CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_to_driver_api); +#define TO_INST(n) \ + static const struct behavior_to_config behavior_to_config_##n = { \ + .locking = DT_INST_PROP_OR(n, locking, false), \ + }; \ + BEHAVIOR_DT_INST_DEFINE(n, NULL, NULL, NULL, &behavior_to_config_##n, POST_KERNEL, \ + CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_to_driver_api); + +DT_INST_FOREACH_STATUS_OKAY(TO_INST) #endif /* DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) */ diff --git a/app/src/behaviors/behavior_toggle_layer.c b/app/src/behaviors/behavior_toggle_layer.c index ea46c79f..755b5832 100644 --- a/app/src/behaviors/behavior_toggle_layer.c +++ b/app/src/behaviors/behavior_toggle_layer.c @@ -17,15 +17,32 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #if DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) -struct behavior_tog_config {}; -struct behavior_tog_data {}; +enum toggle_mode { + ON, + OFF, + FLIP, +}; -static int behavior_tog_init(const struct device *dev) { return 0; }; +struct behavior_tog_config { + enum toggle_mode toggle_mode; + bool locking; +}; static int tog_keymap_binding_pressed(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event) { LOG_DBG("position %d layer %d", event.position, binding->param1); - return zmk_keymap_layer_toggle(binding->param1); + + const struct behavior_tog_config *cfg = zmk_behavior_get_binding(binding->behavior_dev)->config; + switch (cfg->toggle_mode) { + case ON: + return zmk_keymap_layer_activate(binding->param1, cfg->locking); + case OFF: + return zmk_keymap_layer_deactivate(binding->param1, cfg->locking); + case FLIP: + return zmk_keymap_layer_toggle(binding->param1, cfg->locking); + default: + return -ENOTSUP; + }; } static int tog_keymap_binding_released(struct zmk_behavior_binding *binding, @@ -63,11 +80,14 @@ static const struct behavior_driver_api behavior_tog_driver_api = { #endif // IS_ENABLED(CONFIG_ZMK_BEHAVIOR_METADATA) }; -static const struct behavior_tog_config behavior_tog_config = {}; +#define TG_INST(n) \ + static const struct behavior_tog_config behavior_tog_config_##n = { \ + .toggle_mode = DT_ENUM_IDX(DT_DRV_INST(n), toggle_mode), \ + .locking = DT_INST_PROP_OR(n, locking, false), \ + }; \ + BEHAVIOR_DT_INST_DEFINE(n, NULL, NULL, NULL, &behavior_tog_config_##n, POST_KERNEL, \ + CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_tog_driver_api); -static struct behavior_tog_data behavior_tog_data; - -BEHAVIOR_DT_INST_DEFINE(0, behavior_tog_init, NULL, &behavior_tog_data, &behavior_tog_config, - POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_tog_driver_api); +DT_INST_FOREACH_STATUS_OKAY(TG_INST) #endif /* DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) */ diff --git a/app/src/behaviors/behavior_transparent.c b/app/src/behaviors/behavior_transparent.c index 32357046..42a9d032 100644 --- a/app/src/behaviors/behavior_transparent.c +++ b/app/src/behaviors/behavior_transparent.c @@ -16,8 +16,6 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #if DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) -static int behavior_transparent_init(const struct device *dev) { return 0; }; - static int on_keymap_binding_pressed(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event) { return ZMK_BEHAVIOR_TRANSPARENT; @@ -36,7 +34,7 @@ static const struct behavior_driver_api behavior_transparent_driver_api = { #endif // IS_ENABLED(CONFIG_ZMK_BEHAVIOR_METADATA) }; -BEHAVIOR_DT_INST_DEFINE(0, behavior_transparent_init, NULL, NULL, NULL, POST_KERNEL, - CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_transparent_driver_api); +BEHAVIOR_DT_INST_DEFINE(0, NULL, NULL, NULL, NULL, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, + &behavior_transparent_driver_api); #endif /* DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) */ diff --git a/app/src/ble.c b/app/src/ble.c index 776730fe..51b172b9 100644 --- a/app/src/ble.c +++ b/app/src/ble.c @@ -56,8 +56,8 @@ enum advertising_type { #define CURR_ADV(adv) (adv << 4) #define ZMK_ADV_CONN_NAME \ - BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONNECTABLE | BT_LE_ADV_OPT_ONE_TIME, BT_GAP_ADV_FAST_INT_MIN_2, \ - BT_GAP_ADV_FAST_INT_MAX_2, NULL) + BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONN | BT_LE_ADV_OPT_USE_NAME | BT_LE_ADV_OPT_FORCE_NAME_IN_AD, \ + BT_GAP_ADV_FAST_INT_MIN_2, BT_GAP_ADV_FAST_INT_MAX_2, NULL) static struct zmk_ble_profile profiles[ZMK_BLE_PROFILE_COUNT]; static uint8_t active_profile; @@ -65,18 +65,19 @@ static uint8_t active_profile; #define DEVICE_NAME CONFIG_BT_DEVICE_NAME #define DEVICE_NAME_LEN (sizeof(DEVICE_NAME) - 1) -BUILD_ASSERT(DEVICE_NAME_LEN <= 16, "ERROR: BLE device name is too long. Max length: 16"); +BUILD_ASSERT( + DEVICE_NAME_LEN <= CONFIG_BT_DEVICE_NAME_MAX, + "ERROR: BLE device name is too long. Max length: " STRINGIFY(CONFIG_BT_DEVICE_NAME_MAX)); -static const struct bt_data zmk_ble_ad[] = { - BT_DATA(BT_DATA_NAME_COMPLETE, DEVICE_NAME, DEVICE_NAME_LEN), - BT_DATA_BYTES(BT_DATA_GAP_APPEARANCE, 0xC1, 0x03), +static struct bt_data zmk_ble_ad[] = { + BT_DATA_BYTES(BT_DATA_GAP_APPEARANCE, BT_BYTES_LIST_LE16(CONFIG_BT_DEVICE_APPEARANCE)), BT_DATA_BYTES(BT_DATA_FLAGS, (BT_LE_AD_GENERAL | BT_LE_AD_NO_BREDR)), - BT_DATA_BYTES(BT_DATA_UUID16_SOME, 0x12, 0x18, /* HID Service */ - 0x0f, 0x18 /* Battery Service */ + BT_DATA_BYTES(BT_DATA_UUID16_SOME, BT_UUID_16_ENCODE(BT_UUID_HIDS_VAL), /* HID Service */ + BT_UUID_16_ENCODE(BT_UUID_BAS_VAL) /* Battery Service */ ), }; -#if IS_ENABLED(CONFIG_ZMK_SPLIT_ROLE_CENTRAL) +#if IS_ENABLED(CONFIG_ZMK_SPLIT_BLE) && IS_ENABLED(CONFIG_ZMK_SPLIT_ROLE_CENTRAL) static bt_addr_le_t peripheral_addrs[ZMK_SPLIT_BLE_PERIPHERAL_COUNT]; @@ -93,8 +94,13 @@ static void raise_profile_changed_event_callback(struct k_work *work) { K_WORK_DEFINE(raise_profile_changed_event_work, raise_profile_changed_event_callback); -bool zmk_ble_active_profile_is_open(void) { - return !bt_addr_le_cmp(&profiles[active_profile].peer, BT_ADDR_LE_ANY); +bool zmk_ble_active_profile_is_open(void) { return zmk_ble_profile_is_open(active_profile); } + +bool zmk_ble_profile_is_open(uint8_t index) { + if (index >= ZMK_BLE_PROFILE_COUNT) { + return false; + } + return !bt_addr_le_cmp(&profiles[index].peer, BT_ADDR_LE_ANY); } void set_profile_address(uint8_t index, const bt_addr_le_t *addr) { @@ -113,9 +119,16 @@ void set_profile_address(uint8_t index, const bt_addr_le_t *addr) { } bool zmk_ble_active_profile_is_connected(void) { + return zmk_ble_profile_is_connected(active_profile); +} + +bool zmk_ble_profile_is_connected(uint8_t index) { + if (index >= ZMK_BLE_PROFILE_COUNT) { + return false; + } struct bt_conn *conn; struct bt_conn_info info; - bt_addr_le_t *addr = zmk_ble_active_profile_addr(); + bt_addr_le_t *addr = &profiles[index].peer; if (!bt_addr_le_cmp(addr, BT_ADDR_LE_ANY)) { return false; } else if ((conn = bt_conn_lookup_addr_le(BT_ID_DEFAULT, addr)) == NULL) { @@ -248,6 +261,13 @@ int zmk_ble_profile_index(const bt_addr_le_t *addr) { return -ENODEV; } +bt_addr_le_t *zmk_ble_profile_address(uint8_t index) { + if (index >= ZMK_BLE_PROFILE_COUNT) { + return (bt_addr_le_t *)(BT_ADDR_LE_NONE); + } + return &profiles[index].peer; +} + #if IS_ENABLED(CONFIG_SETTINGS) static void ble_save_profile_work(struct k_work *work) { settings_save_one("ble/active_profile", &active_profile, sizeof(active_profile)); @@ -335,7 +355,27 @@ struct bt_conn *zmk_ble_active_profile_conn(void) { char *zmk_ble_active_profile_name(void) { return profiles[active_profile].name; } -#if IS_ENABLED(CONFIG_ZMK_SPLIT_ROLE_CENTRAL) +int zmk_ble_set_device_name(char *name) { + // Copy new name to advertising parameters + int err = bt_set_name(name); + LOG_DBG("New device name: %s", name); + if (err) { + LOG_ERR("Failed to set new device name (err %d)", err); + return err; + } + if (advertising_status == ZMK_ADV_CONN) { + // Stop current advertising so it can restart with new name + err = bt_le_adv_stop(); + advertising_status = ZMK_ADV_NONE; + if (err) { + LOG_ERR("Failed to stop advertising (err %d)", err); + return err; + } + } + return update_advertising(); +} + +#if IS_ENABLED(CONFIG_ZMK_SPLIT_BLE) && IS_ENABLED(CONFIG_ZMK_SPLIT_ROLE_CENTRAL) int zmk_ble_put_peripheral_addr(const bt_addr_le_t *addr) { for (int i = 0; i < ZMK_SPLIT_BLE_PERIPHERAL_COUNT; i++) { @@ -359,10 +399,11 @@ int zmk_ble_put_peripheral_addr(const bt_addr_le_t *addr) { LOG_DBG("Storing peripheral %s in slot %d", addr_str, i); bt_addr_le_copy(&peripheral_addrs[i], addr); +#if IS_ENABLED(CONFIG_SETTINGS) char setting_name[32]; sprintf(setting_name, "ble/peripheral_addresses/%d", i); settings_save_one(setting_name, addr, sizeof(bt_addr_le_t)); - +#endif // IS_ENABLED(CONFIG_SETTINGS) return i; } } @@ -423,7 +464,7 @@ static int ble_profiles_handle_set(const char *name, size_t len, settings_read_c return err; } } -#if IS_ENABLED(CONFIG_ZMK_SPLIT_ROLE_CENTRAL) +#if IS_ENABLED(CONFIG_ZMK_SPLIT_BLE) && IS_ENABLED(CONFIG_ZMK_SPLIT_ROLE_CENTRAL) else if (settings_name_steq(name, "peripheral_addresses", &next) && next) { if (len != sizeof(bt_addr_le_t)) { return -EINVAL; @@ -659,7 +700,7 @@ static int zmk_ble_complete_startup(void) { char setting_name[15]; sprintf(setting_name, "ble/profiles/%d", i); - err = settings_delete(setting_name); + int err = settings_delete(setting_name); if (err) { LOG_ERR("Failed to delete setting: %d", err); } @@ -671,7 +712,7 @@ static int zmk_ble_complete_startup(void) { char setting_name[32]; sprintf(setting_name, "ble/peripheral_addresses/%d", i); - err = settings_delete(setting_name); + int err = settings_delete(setting_name); if (err) { LOG_ERR("Failed to delete setting: %d", err); } diff --git a/app/src/boot/CMakeLists.txt b/app/src/boot/CMakeLists.txt new file mode 100644 index 00000000..264c1aa7 --- /dev/null +++ b/app/src/boot/CMakeLists.txt @@ -0,0 +1,4 @@ + +target_sources_ifdef(CONFIG_ZMK_BOOTMODE_TO_MAGIC_VALUE_MAPPER app PRIVATE bootmode_to_magic_mapper.c) +target_sources_ifdef(CONFIG_ZMK_DBL_TAP_BOOTLOADER app PRIVATE dbl_tap_bootloader.c) +target_sources_ifdef(CONFIG_ZMK_BOOT_STM32_ENFORCE_NBOOT_SEL app PRIVATE stm32_enforce_nboot_sel.c) diff --git a/app/src/boot/Kconfig b/app/src/boot/Kconfig new file mode 100644 index 00000000..8cd550c2 --- /dev/null +++ b/app/src/boot/Kconfig @@ -0,0 +1,51 @@ + +config ZMK_DBL_TAP_BOOTLOADER + bool "Double Tap To Enter Bootloader" + depends on RETENTION_BOOT_MODE + +if ZMK_DBL_TAP_BOOTLOADER + +config ZMK_DBL_TAP_BOOTLOADER_TIMEOUT_MS + int "Double Tap Timeout (ms)" + +config ZMK_DBL_TAP_BOOTLOADER_INIT_PRIORITY + int "Double Tap Init Priority" + +endif + +config ZMK_BOOTMODE_TO_MAGIC_VALUE_MAPPER + bool "Magic Value Mapper" + default y + depends on DT_HAS_ZMK_BOOTMODE_TO_MAGIC_MAPPER_ENABLED + +if ZMK_BOOTMODE_TO_MAGIC_VALUE_MAPPER + +choice ZMK_BOOTMODE_MAGIC_VALUE_BOOTLOADER_TYPE + prompt "Magic Value Bootloader Type" + +config ZMK_BOOTMODE_MAGIC_VALUE_BOOTLOADER_TYPE_UNKNOWN + bool "Unknown" + +config ZMK_BOOTMODE_MAGIC_VALUE_BOOTLOADER_TYPE_TINYUF2 + bool "tinyuf2" + +config ZMK_BOOTMODE_MAGIC_VALUE_BOOTLOADER_TYPE_ADAFRUIT_BOSSA + bool "Adafruit BOSSA" + +config ZMK_BOOTMODE_MAGIC_VALUE_BOOTLOADER_TYPE_ADAFRUIT_NRF52 + bool "Adafruit nRF52" + +endchoice + +config ZMK_BOOTMODE_BOOTLOADER_MAGIC_VALUE + hex + +endif + +config ZMK_BOOT_STM32_ENFORCE_NBOOT_SEL + bool + default y + depends on FLASH && (SOC_STM32C071XX || SOC_STM32G0B1XX) + select FLASH_EX_OP_ENABLED + select FLASH_STM32_OPTION_BYTES + diff --git a/app/src/boot/Kconfig.defaults b/app/src/boot/Kconfig.defaults new file mode 100644 index 00000000..9fb22575 --- /dev/null +++ b/app/src/boot/Kconfig.defaults @@ -0,0 +1,28 @@ + +config ZMK_DBL_TAP_BOOTLOADER + default y if STM32_BOOTLOADER || RPI_PICO_ROM_BOOTLOADER + depends on RETENTION_BOOT_MODE + +if ZMK_DBL_TAP_BOOTLOADER + +config ZMK_DBL_TAP_BOOTLOADER_TIMEOUT_MS + default 500 + +config ZMK_DBL_TAP_BOOTLOADER_INIT_PRIORITY + default 20 + +endif + +if ZMK_BOOTMODE_TO_MAGIC_VALUE_MAPPER + +choice ZMK_BOOTMODE_MAGIC_VALUE_BOOTLOADER_TYPE + default ZMK_BOOTMODE_MAGIC_VALUE_BOOTLOADER_TYPE_ADAFRUIT_NRF52 if SOC_NRF52833 || SOC_NRF52840 + +endchoice + +config ZMK_BOOTMODE_BOOTLOADER_MAGIC_VALUE + default 0xf01669ef if ZMK_BOOTMODE_MAGIC_VALUE_BOOTLOADER_TYPE_TINYUF2 || ZMK_BOOTMODE_MAGIC_VALUE_BOOTLOADER_TYPE_ADAFRUIT_BOSSA || BOOTLOADER_BOSSA_ADAFRUIT_UF2 + default 0x57 if ZMK_BOOTMODE_MAGIC_VALUE_BOOTLOADER_TYPE_ADAFRUIT_NRF52 + +endif + diff --git a/app/src/boot/bootmode_to_magic_mapper.c b/app/src/boot/bootmode_to_magic_mapper.c new file mode 100644 index 00000000..f2b672bf --- /dev/null +++ b/app/src/boot/bootmode_to_magic_mapper.c @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2024 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#define DT_DRV_COMPAT zmk_bootmode_to_magic_mapper + +#include +#include +#include +#include + +static const struct device *magic_dev = DEVICE_DT_GET(DT_CHOSEN(zmk_magic_boot_mode)); +#define MAGIC_DEST_ONE_BYTE (DT_REG_SIZE(DT_CHOSEN(zmk_magic_boot_mode)) == 1) + +#if MAGIC_DEST_ONE_BYTE +typedef uint8_t magic_val_t; +#else +typedef uint32_t magic_val_t; +#endif + +static const magic_val_t bootloader_magic_value = CONFIG_ZMK_BOOTMODE_BOOTLOADER_MAGIC_VALUE; + +static ssize_t btmm_ram_size(const struct device *dev) { return (ssize_t)1; } + +static int btmm_ram_read(const struct device *dev, off_t offset, uint8_t *buffer, size_t size) { + if (size != 1) { + return -ENOTSUP; + } + + magic_val_t val; + int ret = retention_read(magic_dev, 0, (uint8_t *)&val, sizeof(val)); + if (ret < 0) { + return ret; + } + + *buffer = (val == bootloader_magic_value) ? BOOT_MODE_TYPE_BOOTLOADER : BOOT_MODE_TYPE_NORMAL; + + return 0; +} + +static int btmm_ram_write(const struct device *dev, off_t offset, const uint8_t *buffer, + size_t size) { + if (size != 1) { + return -ENOTSUP; + } + + magic_val_t val = (*buffer == BOOT_MODE_TYPE_BOOTLOADER) ? bootloader_magic_value : 0; + + return retention_write(magic_dev, 0, (uint8_t *)&val, sizeof(val)); +} + +static int btmm_ram_clear(const struct device *dev) { return retention_clear(magic_dev); } + +static const struct retained_mem_driver_api btmm_api = { + .size = btmm_ram_size, + .read = btmm_ram_read, + .write = btmm_ram_write, + .clear = btmm_ram_clear, +}; + +DEVICE_DT_INST_DEFINE(0, NULL, NULL, NULL, NULL, POST_KERNEL, 0, &btmm_api); diff --git a/app/src/boot/dbl_tap_bootloader.c b/app/src/boot/dbl_tap_bootloader.c new file mode 100644 index 00000000..254dc69d --- /dev/null +++ b/app/src/boot/dbl_tap_bootloader.c @@ -0,0 +1,16 @@ +#include +#include +#include +#include + +static int dbl_tap_boot_mode_init(void) { + bootmode_set(BOOT_MODE_TYPE_BOOTLOADER); + + k_busy_wait(CONFIG_ZMK_DBL_TAP_BOOTLOADER_TIMEOUT_MS * 1000); + + bootmode_clear(); + + return 0; +} + +SYS_INIT(dbl_tap_boot_mode_init, POST_KERNEL, CONFIG_ZMK_DBL_TAP_BOOTLOADER_INIT_PRIORITY); diff --git a/app/src/boot/stm32_enforce_nboot_sel.c b/app/src/boot/stm32_enforce_nboot_sel.c new file mode 100644 index 00000000..f7e79c12 --- /dev/null +++ b/app/src/boot/stm32_enforce_nboot_sel.c @@ -0,0 +1,46 @@ +#include +#include +#include +#include +#include +#include + +#include + +LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); + +const struct device *flash_dev = FIXED_PARTITION_DEVICE(storage_partition); + +static int stm32_enforce_nboot_sel_init(void) { + uint32_t opts = 0; + int ret = 0; + + if (!device_is_ready(flash_dev)) { + LOG_ERR("flash dev not ready"); + return 0; + } + + ret = flash_ex_op(flash_dev, FLASH_STM32_EX_OP_OPTB_READ, (uintptr_t)NULL, &opts); + + if (ret < 0) { + LOG_ERR("Failed to read option bytes with flash ext op (%d)\n", ret); + return ret; + } + + LOG_DBG("Current option bytes: %02X\n", opts); + + if (opts & FLASH_OPTR_nBOOT_SEL) { + WRITE_BIT(opts, FLASH_OPTR_nBOOT_SEL_Pos, false); + + LOG_DBG("Writing new option bytes %02X\n", opts); + ret = flash_ex_op(flash_dev, FLASH_STM32_EX_OP_OPTB_WRITE, opts, NULL); + if (ret < 0) { + LOG_ERR("Failed to write new option bytes (%d)", ret); + return ret; + } + } + + return 0; +} + +SYS_INIT(stm32_enforce_nboot_sel_init, APPLICATION, 10); diff --git a/app/src/combo.c b/app/src/combo.c index 3f78878f..7d869fa4 100644 --- a/app/src/combo.c +++ b/app/src/combo.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include @@ -26,53 +27,99 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #if DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) +#if CONFIG_ZMK_COMBO_MAX_KEYS_PER_COMBO > 0 + +#warning \ + "CONFIG_ZMK_COMBO_MAX_KEYS_PER_COMBO is deprecated, and is auto-calculated from the devicetree now." + +#endif + +#if CONFIG_ZMK_COMBO_MAX_COMBOS_PER_KEY > 0 + +#warning "CONFIG_ZMK_COMBO_MAX_COMBOS_PER_KEY is deprecated, and is auto-calculated." + +#endif + +#define COMBOS_KEYS_BYTE_ARRAY(node_id) \ + uint8_t _CONCAT(combo_prop_, node_id)[DT_PROP_LEN(node_id, key_positions)]; + +#define MAX_COMBO_KEYS sizeof(union {DT_INST_FOREACH_CHILD(0, COMBOS_KEYS_BYTE_ARRAY)}) + struct combo_cfg { - int32_t key_positions[CONFIG_ZMK_COMBO_MAX_KEYS_PER_COMBO]; - int32_t key_position_len; - struct zmk_behavior_binding behavior; + int32_t key_positions[MAX_COMBO_KEYS]; + int16_t key_position_len; + int16_t require_prior_idle_ms; int32_t timeout_ms; - int32_t require_prior_idle_ms; + uint32_t layer_mask; + struct zmk_behavior_binding behavior; // if slow release is set, the combo releases when the last key is released. // otherwise, the combo releases when the first key is released. bool slow_release; - // the virtual key position is a key position outside the range used by the keyboard. - // it is necessary so hold-taps can uniquely identify a behavior. - int32_t virtual_key_position; - int32_t layers_len; - int8_t layers[]; }; struct active_combo { - struct combo_cfg *combo; + uint16_t combo_idx; // key_positions_pressed is filled with key_positions when the combo is pressed. // The keys are removed from this array when they are released. // Once this array is empty, the behavior is released. - uint32_t key_positions_pressed_count; - struct zmk_position_state_changed_event - key_positions_pressed[CONFIG_ZMK_COMBO_MAX_KEYS_PER_COMBO]; + uint16_t key_positions_pressed_count; + struct zmk_position_state_changed_event key_positions_pressed[MAX_COMBO_KEYS]; }; -struct combo_candidate { - struct combo_cfg *combo; - // the time after which this behavior should be removed from candidates. - // by keeping track of when the candidate should be cleared there is no - // possibility of accidental releases. - int64_t timeout_at; -}; +#define PROP_BIT_AT_IDX(n, prop, idx) BIT(DT_PROP_BY_IDX(n, prop, idx)) -uint32_t pressed_keys_count = 0; +#define NODE_PROP_BITMASK(n, prop) \ + COND_CODE_1(DT_NODE_HAS_PROP(n, prop), \ + (DT_FOREACH_PROP_ELEM_SEP(n, prop, PROP_BIT_AT_IDX, (|))), (0)) + +#define GET_KEY_POSITION_MASK_PORTION(idx, n) ((NODE_PROP_BITMASK(n, key_positions) >> idx) & 0xFF) + +#define COMBO_INST(n, positions) \ + COND_CODE_1(IS_EQ(DT_PROP_LEN(n, key_positions), positions), \ + ( \ + { \ + .timeout_ms = DT_PROP(n, timeout_ms), \ + .require_prior_idle_ms = DT_PROP(n, require_prior_idle_ms), \ + .key_positions = DT_PROP(n, key_positions), \ + .key_position_len = DT_PROP_LEN(n, key_positions), \ + .behavior = ZMK_KEYMAP_EXTRACT_BINDING(0, n), \ + .slow_release = DT_PROP(n, slow_release), \ + .layer_mask = NODE_PROP_BITMASK(n, layers), \ + }, ), \ + ()) + +#define COMBO_CONFIGS_WITH_MATCHING_POSITIONS_LEN(positions, _ignore) \ + DT_INST_FOREACH_CHILD_VARGS(0, COMBO_INST, positions) + +// We do some magic here to generate the `combos` array by "key position length", looping +// by key position length and on each iteration, only include entries where the `key-positions` +// length matches. +// Doing so allows our bitmasks to be "shorted key positions list first" when searching for matches. +// `20` is chosen as a reasonable limit, since the theoretical maximum number of keys you might +// reasonably press simultaneously with 10 fingers is 20 keys, two keys per finger. +static const struct combo_cfg combos[] = { + LISTIFY(20, COMBO_CONFIGS_WITH_MATCHING_POSITIONS_LEN, (), 0)}; + +#define COMBO_ONE(n) +1 + +#define COMBO_CHILDREN_COUNT (0 DT_INST_FOREACH_CHILD(0, COMBO_ONE)) + +// We need at least 4 bytes to avoid alignment issues +#define BYTES_FOR_COMBOS_MASK DIV_ROUND_UP(COMBO_CHILDREN_COUNT, 32) + +uint8_t pressed_keys_count = 0; // set of keys pressed -struct zmk_position_state_changed_event pressed_keys[CONFIG_ZMK_COMBO_MAX_KEYS_PER_COMBO] = {}; +struct zmk_position_state_changed_event pressed_keys[MAX_COMBO_KEYS] = {}; // the set of candidate combos based on the currently pressed_keys -struct combo_candidate candidates[CONFIG_ZMK_COMBO_MAX_COMBOS_PER_KEY]; +uint32_t candidates[BYTES_FOR_COMBOS_MASK]; // the last candidate that was completely pressed -struct combo_cfg *fully_pressed_combo = NULL; +int16_t fully_pressed_combo = INT16_MAX; // a lookup dict that maps a key position to all combos on that position -struct combo_cfg *combo_lookup[ZMK_KEYMAP_LEN][CONFIG_ZMK_COMBO_MAX_COMBOS_PER_KEY] = {NULL}; +uint32_t combo_lookup[ZMK_KEYMAP_LEN][BYTES_FOR_COMBOS_MASK] = {}; // combos that have been activated and still have (some) keys pressed // this array is always contiguous from 0. -struct active_combo active_combos[CONFIG_ZMK_COMBO_MAX_PRESSED_COMBOS] = {NULL}; -int active_combo_count = 0; +struct active_combo active_combos[CONFIG_ZMK_COMBO_MAX_PRESSED_COMBOS] = {}; +uint8_t active_combo_count = 0; struct k_work_delayable timeout_task; int64_t timeout_task_timeout_at; @@ -90,124 +137,86 @@ static void store_last_tapped(int64_t timestamp) { // Store the combo key pointer in the combos array, one pointer for each key position // The combos are sorted shortest-first, then by virtual-key-position. -static int initialize_combo(struct combo_cfg *new_combo) { - for (int i = 0; i < new_combo->key_position_len; i++) { - int32_t position = new_combo->key_positions[i]; - if (position >= ZMK_KEYMAP_LEN) { - LOG_ERR("Unable to initialize combo, key position %d does not exist", position); - return -EINVAL; - } +static int initialize_combo(size_t index) { + const struct combo_cfg *new_combo = &combos[index]; - struct combo_cfg *insert_combo = new_combo; - bool set = false; - for (int j = 0; j < CONFIG_ZMK_COMBO_MAX_COMBOS_PER_KEY; j++) { - struct combo_cfg *combo_at_j = combo_lookup[position][j]; - if (combo_at_j == NULL) { - combo_lookup[position][j] = insert_combo; - set = true; - break; - } - if (combo_at_j->key_position_len < insert_combo->key_position_len || - (combo_at_j->key_position_len == insert_combo->key_position_len && - combo_at_j->virtual_key_position < insert_combo->virtual_key_position)) { - continue; - } - // put insert_combo in this spot, move all other combos up. - combo_lookup[position][j] = insert_combo; - insert_combo = combo_at_j; - } - if (!set) { - LOG_ERR("Too many combos for key position %d, CONFIG_ZMK_COMBO_MAX_COMBOS_PER_KEY %d.", - position, CONFIG_ZMK_COMBO_MAX_COMBOS_PER_KEY); - return -ENOMEM; - } + for (size_t kp = 0; kp < new_combo->key_position_len; kp++) { + sys_bitfield_set_bit((mem_addr_t)&combo_lookup[new_combo->key_positions[kp]], index); } + return 0; } -static bool combo_active_on_layer(struct combo_cfg *combo, uint8_t layer) { - if (combo->layers[0] == -1) { - // -1 in the first layer position is global layer scope +static bool combo_active_on_layer(const struct combo_cfg *combo, uint8_t layer) { + if (!combo->layer_mask) { return true; } - for (int j = 0; j < combo->layers_len; j++) { - if (combo->layers[j] == layer) { - return true; - } - } - return false; + + return combo->layer_mask & BIT(layer); } -static bool is_quick_tap(struct combo_cfg *combo, int64_t timestamp) { +static bool is_quick_tap(const struct combo_cfg *combo, int64_t timestamp) { return (last_tapped_timestamp + combo->require_prior_idle_ms) > timestamp; } static int setup_candidates_for_first_keypress(int32_t position, int64_t timestamp) { int number_of_combo_candidates = 0; uint8_t highest_active_layer = zmk_keymap_highest_layer_active(); - for (int i = 0; i < CONFIG_ZMK_COMBO_MAX_COMBOS_PER_KEY; i++) { - struct combo_cfg *combo = combo_lookup[position][i]; - if (combo == NULL) { - return number_of_combo_candidates; + + for (size_t i = 0; i < ARRAY_SIZE(combos); i++) { + if (sys_bitfield_test_bit((mem_addr_t)&combo_lookup[position], i)) { + const struct combo_cfg *combo = &combos[i]; + if (combo_active_on_layer(combo, highest_active_layer) && + !is_quick_tap(combo, timestamp)) { + sys_bitfield_set_bit((mem_addr_t)&candidates, i); + number_of_combo_candidates++; + } + // LOG_DBG("combo timeout %d %d %d", position, i, candidates[i].timeout_at); } - if (combo_active_on_layer(combo, highest_active_layer) && !is_quick_tap(combo, timestamp)) { - candidates[number_of_combo_candidates].combo = combo; - candidates[number_of_combo_candidates].timeout_at = timestamp + combo->timeout_ms; - number_of_combo_candidates++; - } - // LOG_DBG("combo timeout %d %d %d", position, i, candidates[i].timeout_at); } + return number_of_combo_candidates; } +static inline uint8_t zero_one_or_more_bits(uint32_t field) { + if (field == 0) { + return 0; + } + if ((field & (field - 1)) == 0) { + return 1; + } + return 2; +} + static int filter_candidates(int32_t position) { - // this code iterates over candidates and the lookup together to filter in O(n) - // assuming they are both sorted on key_position_len, virtual_key_position - int matches = 0, lookup_idx = 0, candidate_idx = 0; - while (lookup_idx < CONFIG_ZMK_COMBO_MAX_COMBOS_PER_KEY && - candidate_idx < CONFIG_ZMK_COMBO_MAX_COMBOS_PER_KEY) { - struct combo_cfg *candidate = candidates[candidate_idx].combo; - struct combo_cfg *lookup = combo_lookup[position][lookup_idx]; - if (candidate == NULL || lookup == NULL) { - break; - } - if (candidate->virtual_key_position == lookup->virtual_key_position) { - candidates[matches] = candidates[candidate_idx]; - matches++; - candidate_idx++; - lookup_idx++; - } else if (candidate->key_position_len > lookup->key_position_len) { - lookup_idx++; - } else if (candidate->key_position_len < lookup->key_position_len) { - candidate_idx++; - } else if (candidate->virtual_key_position > lookup->virtual_key_position) { - lookup_idx++; - } else if (candidate->virtual_key_position < lookup->virtual_key_position) { - candidate_idx++; + int matches = 0; + for (int i = 0; i < BYTES_FOR_COMBOS_MASK; i++) { + candidates[i] &= combo_lookup[position][i]; + if (matches < 2) { + matches += zero_one_or_more_bits(candidates[i]); } } - // clear unmatched candidates - for (int i = matches; i < CONFIG_ZMK_COMBO_MAX_COMBOS_PER_KEY; i++) { - candidates[i].combo = NULL; - } - // LOG_DBG("combo matches after filter %d", matches); + + LOG_DBG("combo matches after filter %d", matches); return matches; } static int64_t first_candidate_timeout() { + if (pressed_keys_count == 0) { + return LONG_MAX; + } + int64_t first_timeout = LONG_MAX; - for (int i = 0; i < CONFIG_ZMK_COMBO_MAX_COMBOS_PER_KEY; i++) { - if (candidates[i].combo == NULL) { - break; - } - if (candidates[i].timeout_at < first_timeout) { - first_timeout = candidates[i].timeout_at; + for (int i = 0; i < ARRAY_SIZE(combos); i++) { + if (sys_bitfield_test_bit((mem_addr_t)&candidates, i)) { + first_timeout = MIN(first_timeout, combos[i].timeout_ms); } } - return first_timeout; + + return pressed_keys[0].data.timestamp + first_timeout; } -static inline bool candidate_is_completely_pressed(struct combo_cfg *candidate) { +static inline bool candidate_is_completely_pressed(const struct combo_cfg *candidate) { // this code assumes set(pressed_keys) <= set(candidate->key_positions) // this invariant is enforced by filter_candidates // since events may have been reraised after clearing one or more slots at @@ -219,26 +228,17 @@ static inline bool candidate_is_completely_pressed(struct combo_cfg *candidate) static int cleanup(); static int filter_timed_out_candidates(int64_t timestamp) { - int remaining_candidates = 0; - for (int i = 0; i < CONFIG_ZMK_COMBO_MAX_COMBOS_PER_KEY; i++) { - struct combo_candidate *candidate = &candidates[i]; - if (candidate->combo == NULL) { - break; - } - if (candidate->timeout_at > timestamp) { - bool need_to_bubble_up = remaining_candidates != i; - if (need_to_bubble_up) { - // bubble up => reorder candidates so they're contiguous - candidates[remaining_candidates].combo = candidate->combo; - candidates[remaining_candidates].timeout_at = candidate->timeout_at; - // clear the previous location - candidates[i].combo = NULL; - candidates[i].timeout_at = 0; - } + __ASSERT(pressed_keys_count > 0, "Searching for a candidate timeout with no keys pressed"); - remaining_candidates++; - } else { - candidate->combo = NULL; + int remaining_candidates = 0; + for (int i = 0; i < ARRAY_SIZE(combos); i++) { + if (sys_bitfield_test_bit((mem_addr_t)&candidates, i)) { + + if (pressed_keys[0].data.timestamp + combos[i].timeout_ms > timestamp) { + remaining_candidates++; + } else { + sys_bitfield_clear_bit((mem_addr_t)&candidates, i); + } } } @@ -249,18 +249,8 @@ static int filter_timed_out_candidates(int64_t timestamp) { return remaining_candidates; } -static int clear_candidates() { - for (int i = 0; i < CONFIG_ZMK_COMBO_MAX_COMBOS_PER_KEY; i++) { - if (candidates[i].combo == NULL) { - return i; - } - candidates[i].combo = NULL; - } - return CONFIG_ZMK_COMBO_MAX_COMBOS_PER_KEY; -} - static int capture_pressed_key(const struct zmk_position_state_changed *ev) { - if (pressed_keys_count == CONFIG_ZMK_COMBO_MAX_COMBOS_PER_KEY) { + if (pressed_keys_count == MAX_COMBO_KEYS) { return ZMK_EV_EVENT_BUBBLE; } @@ -271,7 +261,7 @@ static int capture_pressed_key(const struct zmk_position_state_changed *ev) { const struct zmk_listener zmk_listener_combo; static int release_pressed_keys() { - uint32_t count = pressed_keys_count; + uint8_t count = pressed_keys_count; pressed_keys_count = 0; for (int i = 0; i < count; i++) { struct zmk_position_state_changed_event *ev = &pressed_keys[i]; @@ -288,29 +278,37 @@ static int release_pressed_keys() { return count; } -static inline int press_combo_behavior(struct combo_cfg *combo, int32_t timestamp) { +static inline int press_combo_behavior(int combo_idx, const struct combo_cfg *combo, + int32_t timestamp) { struct zmk_behavior_binding_event event = { - .position = combo->virtual_key_position, + .position = ZMK_VIRTUAL_KEY_POSITION_COMBO(combo_idx), .timestamp = timestamp, +#if IS_ENABLED(CONFIG_ZMK_SPLIT) + .source = ZMK_POSITION_STATE_CHANGE_SOURCE_LOCAL, +#endif }; last_combo_timestamp = timestamp; - return behavior_keymap_binding_pressed(&combo->behavior, event); + return zmk_behavior_invoke_binding(&combo->behavior, event, true); } -static inline int release_combo_behavior(struct combo_cfg *combo, int32_t timestamp) { +static inline int release_combo_behavior(int combo_idx, const struct combo_cfg *combo, + int32_t timestamp) { struct zmk_behavior_binding_event event = { - .position = combo->virtual_key_position, + .position = ZMK_VIRTUAL_KEY_POSITION_COMBO(combo_idx), .timestamp = timestamp, +#if IS_ENABLED(CONFIG_ZMK_SPLIT) + .source = ZMK_POSITION_STATE_CHANGE_SOURCE_LOCAL, +#endif }; - return behavior_keymap_binding_released(&combo->behavior, event); + return zmk_behavior_invoke_binding(&combo->behavior, event, false); } static void move_pressed_keys_to_active_combo(struct active_combo *active_combo) { - int combo_length = MIN(pressed_keys_count, active_combo->combo->key_position_len); + int combo_length = MIN(pressed_keys_count, combos[active_combo->combo_idx].key_position_len); for (int i = 0; i < combo_length; i++) { active_combo->key_positions_pressed[i] = pressed_keys[i]; } @@ -324,10 +322,10 @@ static void move_pressed_keys_to_active_combo(struct active_combo *active_combo) pressed_keys_count -= combo_length; } -static struct active_combo *store_active_combo(struct combo_cfg *combo) { +static struct active_combo *store_active_combo(int32_t combo_idx) { for (int i = 0; i < CONFIG_ZMK_COMBO_MAX_PRESSED_COMBOS; i++) { - if (active_combos[i].combo == NULL) { - active_combos[i].combo = combo; + if (active_combos[i].combo_idx == UINT16_MAX) { + active_combos[i].combo_idx = combo_idx; active_combo_count++; return &active_combos[i]; } @@ -338,15 +336,16 @@ static struct active_combo *store_active_combo(struct combo_cfg *combo) { return NULL; } -static void activate_combo(struct combo_cfg *combo) { - struct active_combo *active_combo = store_active_combo(combo); +static void activate_combo(int combo_idx) { + struct active_combo *active_combo = store_active_combo(combo_idx); if (active_combo == NULL) { // unable to store combo release_pressed_keys(); return; } move_pressed_keys_to_active_combo(active_combo); - press_combo_behavior(combo, active_combo->key_positions_pressed[0].data.timestamp); + press_combo_behavior(combo_idx, &combos[combo_idx], + active_combo->key_positions_pressed[0].data.timestamp); } static void deactivate_combo(int active_combo_index) { @@ -355,8 +354,8 @@ static void deactivate_combo(int active_combo_index) { memcpy(&active_combos[active_combo_index], &active_combos[active_combo_count], sizeof(struct active_combo)); } - active_combos[active_combo_count].combo = NULL; active_combos[active_combo_count] = (struct active_combo){0}; + active_combos[active_combo_count].combo_idx = UINT16_MAX; } /* returns true if a key was released. */ @@ -365,8 +364,8 @@ static bool release_combo_key(int32_t position, int64_t timestamp) { struct active_combo *active_combo = &active_combos[combo_idx]; bool key_released = false; - bool all_keys_pressed = - active_combo->key_positions_pressed_count == active_combo->combo->key_position_len; + bool all_keys_pressed = active_combo->key_positions_pressed_count == + combos[active_combo->combo_idx].key_position_len; bool all_keys_released = true; for (int i = 0; i < active_combo->key_positions_pressed_count; i++) { if (key_released) { @@ -381,9 +380,9 @@ static bool release_combo_key(int32_t position, int64_t timestamp) { if (key_released) { active_combo->key_positions_pressed_count--; - if ((active_combo->combo->slow_release && all_keys_released) || - (!active_combo->combo->slow_release && all_keys_pressed)) { - release_combo_behavior(active_combo->combo, timestamp); + const struct combo_cfg *c = &combos[active_combo->combo_idx]; + if ((c->slow_release && all_keys_released) || (!c->slow_release && all_keys_pressed)) { + release_combo_behavior(active_combo->combo_idx, c, timestamp); } if (all_keys_released) { deactivate_combo(combo_idx); @@ -396,10 +395,10 @@ static bool release_combo_key(int32_t position, int64_t timestamp) { static int cleanup() { k_work_cancel_delayable(&timeout_task); - clear_candidates(); - if (fully_pressed_combo != NULL) { + memset(candidates, 0, BYTES_FOR_COMBOS_MASK * sizeof(uint32_t)); + if (fully_pressed_combo != INT16_MAX) { activate_combo(fully_pressed_combo); - fully_pressed_combo = NULL; + fully_pressed_combo = INT16_MAX; } return release_pressed_keys(); } @@ -421,7 +420,7 @@ static void update_timeout_task() { static int position_state_down(const zmk_event_t *ev, struct zmk_position_state_changed *data) { int num_candidates; - if (candidates[0].combo == NULL) { + if (!pressed_keys_count) { num_candidates = setup_candidates_for_first_keypress(data->position, data->timestamp); if (num_candidates == 0) { return ZMK_EV_EVENT_BUBBLE; @@ -430,27 +429,31 @@ static int position_state_down(const zmk_event_t *ev, struct zmk_position_state_ filter_timed_out_candidates(data->timestamp); num_candidates = filter_candidates(data->position); } - update_timeout_task(); - struct combo_cfg *candidate_combo = candidates[0].combo; LOG_DBG("combo: capturing position event %d", data->position); int ret = capture_pressed_key(data); - switch (num_candidates) { - case 0: + update_timeout_task(); + + if (num_candidates) { + for (int i = 0; i < ARRAY_SIZE(combos); i++) { + if (sys_bitfield_test_bit((mem_addr_t)&candidates, i)) { + const struct combo_cfg *candidate_combo = &combos[i]; + if (candidate_is_completely_pressed(candidate_combo)) { + fully_pressed_combo = i; + if (num_candidates == 1) { + cleanup(); + } + } + + return ret; + } + } + } else { cleanup(); return ret; - case 1: - if (candidate_is_completely_pressed(candidate_combo)) { - fully_pressed_combo = candidate_combo; - cleanup(); - } - return ret; - default: - if (candidate_is_completely_pressed(candidate_combo)) { - fully_pressed_combo = candidate_combo; - } - return ret; } + + return -EINVAL; } static int position_state_up(const zmk_event_t *ev, struct zmk_position_state_changed *data) { @@ -475,8 +478,11 @@ static void combo_timeout_handler(struct k_work *item) { return; } if (filter_timed_out_candidates(timeout_task_timeout_at) == 0) { + LOG_DBG("CLEANUP!"); cleanup(); } + + LOG_DBG("ABOUT TO UPDATE IN TIMEOUT"); update_timeout_task(); } @@ -514,26 +520,16 @@ ZMK_LISTENER(combo, behavior_combo_listener); ZMK_SUBSCRIPTION(combo, zmk_position_state_changed); ZMK_SUBSCRIPTION(combo, zmk_keycode_state_changed); -#define COMBO_INST(n) \ - static struct combo_cfg combo_config_##n = { \ - .timeout_ms = DT_PROP(n, timeout_ms), \ - .require_prior_idle_ms = DT_PROP(n, require_prior_idle_ms), \ - .key_positions = DT_PROP(n, key_positions), \ - .key_position_len = DT_PROP_LEN(n, key_positions), \ - .behavior = ZMK_KEYMAP_EXTRACT_BINDING(0, n), \ - .virtual_key_position = ZMK_VIRTUAL_KEY_POSITION_COMBO(__COUNTER__), \ - .slow_release = DT_PROP(n, slow_release), \ - .layers = DT_PROP(n, layers), \ - .layers_len = DT_PROP_LEN(n, layers), \ - }; - -#define INITIALIZE_COMBO(n) initialize_combo(&combo_config_##n); - -DT_INST_FOREACH_CHILD(0, COMBO_INST) - static int combo_init(void) { + for (size_t i = 0; i < CONFIG_ZMK_COMBO_MAX_PRESSED_COMBOS; i++) { + active_combos[i].combo_idx = UINT16_MAX; + } + k_work_init_delayable(&timeout_task, combo_timeout_handler); - DT_INST_FOREACH_CHILD(0, INITIALIZE_COMBO); + LOG_WRN("Have %d combos!", ARRAY_SIZE(combos)); + for (int i = 0; i < ARRAY_SIZE(combos); i++) { + initialize_combo(i); + } return 0; } diff --git a/app/src/conditional_layer.c b/app/src/conditional_layer.c index 9ba02a5c..a65563ab 100644 --- a/app/src/conditional_layer.c +++ b/app/src/conditional_layer.c @@ -49,28 +49,31 @@ static const struct conditional_layer_cfg CONDITIONAL_LAYER_CFGS[] = { static const int32_t NUM_CONDITIONAL_LAYER_CFGS = sizeof(CONDITIONAL_LAYER_CFGS) / sizeof(*CONDITIONAL_LAYER_CFGS); -static void conditional_layer_activate(int8_t layer) { +// Ensures all layer updates are processed if one conditional layer activates another. +static bool conditional_layer_updates_needed; +// Tracks which layers have been locked by conditional layer activations. +static uint32_t layer_locked_by_conditional = 0; + +static void conditional_layer_activate(int8_t layer, bool locking) { // This may trigger another event that could, in turn, activate additional then-layers. However, // the process will eventually terminate (at worst, when every layer is active). - if (!zmk_keymap_layer_active(layer)) { + if (!zmk_keymap_layer_active(layer) || (locking && !zmk_keymap_layer_locked(layer))) { LOG_DBG("layer %d", layer); - zmk_keymap_layer_activate(layer); + zmk_keymap_layer_activate(layer, locking); } } -static void conditional_layer_deactivate(int8_t layer) { +static void conditional_layer_deactivate(int8_t layer, bool locking) { // This may deactivate a then-layer that's already active via another mechanism (e.g., a // momentary layer behavior). However, the same problem arises when multiple keys with the same // &mo binding are held and then one is released, so it's probably not an issue in practice. - if (zmk_keymap_layer_active(layer)) { + if (zmk_keymap_layer_active(layer) && (!zmk_keymap_layer_locked(layer) || locking)) { LOG_DBG("layer %d", layer); - zmk_keymap_layer_deactivate(layer); + zmk_keymap_layer_deactivate(layer, locking); } } static int layer_state_changed_listener(const zmk_event_t *ev) { - static bool conditional_layer_updates_needed; - conditional_layer_updates_needed = true; // Semaphore ensures we don't re-enter the loop in the middle of doing update, and @@ -84,7 +87,6 @@ static int layer_state_changed_listener(const zmk_event_t *ev) { int8_t max_then_layer = -1; uint32_t then_layers = 0; uint32_t then_layer_state = 0; - conditional_layer_updates_needed = false; // On layer state changes, examines each conditional layer config to determine if then-layer @@ -92,23 +94,29 @@ static int layer_state_changed_listener(const zmk_event_t *ev) { for (int i = 0; i < NUM_CONDITIONAL_LAYER_CFGS; i++) { const struct conditional_layer_cfg *cfg = CONDITIONAL_LAYER_CFGS + i; zmk_keymap_layers_state_t mask = cfg->if_layers_state_mask; - then_layers |= BIT(cfg->then_layer); + WRITE_BIT(then_layers, cfg->then_layer, true); max_then_layer = MAX(max_then_layer, cfg->then_layer); // Activate then-layer if and only if all if-layers are already active. Note that we // reevaluate the current layer state for each config since activation of one layer can // also trigger activation of another. if ((zmk_keymap_layer_state() & mask) == mask) { - then_layer_state |= BIT(cfg->then_layer); + WRITE_BIT(then_layer_state, cfg->then_layer, true); + } + // Same as above, but for the lock status + if ((zmk_keymap_layer_locks() & mask) == mask) { + WRITE_BIT(layer_locked_by_conditional, cfg->then_layer, true); } } for (uint8_t layer = 0; layer <= max_then_layer; layer++) { if ((BIT(layer) & then_layers) != 0U) { + bool locking = (BIT(layer) & layer_locked_by_conditional) != 0U; if ((BIT(layer) & then_layer_state) != 0U) { - conditional_layer_activate(layer); + conditional_layer_activate(layer, locking); } else { - conditional_layer_deactivate(layer); + conditional_layer_deactivate(layer, locking); + WRITE_BIT(layer_locked_by_conditional, layer, false); } } } diff --git a/app/src/display/Kconfig b/app/src/display/Kconfig index 1cde0fe4..a6d1f593 100644 --- a/app/src/display/Kconfig +++ b/app/src/display/Kconfig @@ -5,7 +5,7 @@ menuconfig ZMK_DISPLAY bool "Enable ZMK Display" select DISPLAY select LVGL - select LV_CONF_MINIMAL + imply LV_CONF_MINIMAL if ZMK_DISPLAY @@ -13,6 +13,10 @@ config ZMK_DISPLAY_BLANK_ON_IDLE bool "Blank display on idle" default y if SSD1306 +config ZMK_DISPLAY_TICK_PERIOD_MS + int "Period (in ms) between display task execution" + default 10 + if LV_USE_THEME_MONO config ZMK_DISPLAY_INVERT @@ -25,11 +29,8 @@ choice LV_TXT_ENC endchoice -config LV_MEM_CUSTOM - default y - - config LV_Z_MEM_POOL_SIZE - default 4096 if ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN +config LV_Z_MEM_POOL_SIZE + default 4096 if ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN choice ZMK_DISPLAY_STATUS_SCREEN prompt "Default status screen for displays" @@ -37,7 +38,7 @@ choice ZMK_DISPLAY_STATUS_SCREEN config ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN bool "Built in status screen" select LV_OBJ_LABEL - imply LV_USE_THEME_MONO + imply LV_USE_THEME_MONO if LV_Z_BITS_PER_PIXEL=1 imply ZMK_WIDGET_LAYER_STATUS imply ZMK_WIDGET_BATTERY_STATUS imply ZMK_WIDGET_OUTPUT_STATUS @@ -63,7 +64,7 @@ if ZMK_DISPLAY_WORK_QUEUE_DEDICATED config ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE int "Stack size for dedicated UI thread/queue" - default 2048 + default 3072 config ZMK_DISPLAY_DEDICATED_THREAD_PRIORITY int "Thread priority for dedicated UI thread/queue" diff --git a/app/src/display/main.c b/app/src/display/main.c index e15e2de0..a86bfad5 100644 --- a/app/src/display/main.c +++ b/app/src/display/main.c @@ -13,6 +13,7 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include +#include #include #include "theme.h" @@ -22,6 +23,14 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include static const struct device *display = DEVICE_DT_GET(DT_CHOSEN(zephyr_display)); + +#if DT_HAS_CHOSEN(zmk_display_led) + +static const struct device *display_led = DEVICE_DT_GET(DT_PARENT(DT_CHOSEN(zmk_display_led))); +static const uint8_t display_led_idx = DT_NODE_CHILD_IDX(DT_CHOSEN(zmk_display_led)); + +#endif + static bool initialized = false; static lv_obj_t *screen; @@ -30,8 +39,6 @@ __attribute__((weak)) lv_obj_t *zmk_display_status_screen() { return NULL; } void display_tick_cb(struct k_work *work) { lv_task_handler(); } -#define TICK_MS 10 - K_WORK_DEFINE(display_tick_work, display_tick_cb); #if IS_ENABLED(CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED) @@ -55,15 +62,26 @@ void display_timer_cb() { k_work_submit_to_queue(zmk_display_work_q(), &display_ K_TIMER_DEFINE(display_timer, display_timer_cb, NULL); void unblank_display_cb(struct k_work *work) { +#if DT_HAS_CHOSEN(zmk_display_led) + led_on(display_led, display_led_idx); +#endif display_blanking_off(display); - k_timer_start(&display_timer, K_MSEC(TICK_MS), K_MSEC(TICK_MS)); +#if !IS_ENABLED(CONFIG_ARCH_POSIX) + k_timer_start(&display_timer, K_MSEC(CONFIG_ZMK_DISPLAY_TICK_PERIOD_MS), + K_MSEC(CONFIG_ZMK_DISPLAY_TICK_PERIOD_MS)); +#endif // !IS_ENABLED(CONFIG_ARCH_POSIX) } #if IS_ENABLED(CONFIG_ZMK_DISPLAY_BLANK_ON_IDLE) void blank_display_cb(struct k_work *work) { +#if !IS_ENABLED(CONFIG_ARCH_POSIX) k_timer_stop(&display_timer); +#endif // !IS_ENABLED(CONFIG_ARCH_POSIX) display_blanking_on(display); +#if DT_HAS_CHOSEN(zmk_display_led) + led_off(display_led, display_led_idx); +#endif } K_WORK_DEFINE(blank_display_work, blank_display_cb); K_WORK_DEFINE(unblank_display_work, unblank_display_cb); @@ -92,10 +110,10 @@ static void initialize_theme() { #if IS_ENABLED(CONFIG_LV_USE_THEME_MONO) lv_disp_t *disp = lv_disp_get_default(); lv_theme_t *theme = - lv_theme_mono_init(disp, IS_ENABLED(CONFIG_ZMK_DISPLAY_INVERT), CONFIG_LV_FONT_DEFAULT); - theme->font_small = CONFIG_ZMK_LV_FONT_DEFAULT_SMALL; + lv_theme_mono_init(disp, IS_ENABLED(CONFIG_ZMK_DISPLAY_INVERT), CONFIG_LV_FONT_DEFAULT, + CONFIG_ZMK_LV_FONT_DEFAULT_SMALL, CONFIG_LV_FONT_DEFAULT); - disp->theme = theme; + lv_display_set_theme(disp, theme); #endif // CONFIG_LV_USE_THEME_MONO } @@ -127,12 +145,21 @@ K_WORK_DEFINE(init_work, initialize_display); int zmk_display_init() { #if IS_ENABLED(CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED) + struct k_work_queue_config config = { +#if IS_ENABLED(CONFIG_THREAD_NAME) + .name = "display queue", +#endif + }; k_work_queue_start(&display_work_q, display_work_stack_area, K_THREAD_STACK_SIZEOF(display_work_stack_area), - CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_PRIORITY, NULL); + CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_PRIORITY, &config); #endif +#if IS_ENABLED(CONFIG_ARCH_POSIX) + initialize_display(NULL); +#else k_work_submit_to_queue(zmk_display_work_q(), &init_work); +#endif LOG_DBG(""); return 0; diff --git a/app/src/display/widgets/Kconfig b/app/src/display/widgets/Kconfig index 7ec20c1f..4c02983c 100644 --- a/app/src/display/widgets/Kconfig +++ b/app/src/display/widgets/Kconfig @@ -10,7 +10,7 @@ config ZMK_WIDGET_LAYER_STATUS config ZMK_WIDGET_BATTERY_STATUS bool "Widget for battery charge information, using small icons" - depends on BT + depends on ZMK_BATTERY_REPORTING select LV_USE_LABEL if ZMK_WIDGET_BATTERY_STATUS diff --git a/app/src/display/widgets/battery_status.c b/app/src/display/widgets/battery_status.c index bec6964b..22e73faf 100644 --- a/app/src/display/widgets/battery_status.c +++ b/app/src/display/widgets/battery_status.c @@ -65,7 +65,7 @@ void battery_status_update_cb(struct battery_status_state state) { static struct battery_status_state battery_status_get_state(const zmk_event_t *eh) { const struct zmk_battery_state_changed *ev = as_zmk_battery_state_changed(eh); - return (struct battery_status_state) { + return (struct battery_status_state){ .level = (ev != NULL) ? ev->state_of_charge : zmk_battery_state_of_charge(), #if IS_ENABLED(CONFIG_USB_DEVICE_STACK) .usb_present = zmk_usb_is_powered(), diff --git a/app/src/display/widgets/layer_status.c b/app/src/display/widgets/layer_status.c index 19e25d93..64cb7c3d 100644 --- a/app/src/display/widgets/layer_status.c +++ b/app/src/display/widgets/layer_status.c @@ -18,12 +18,12 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); static sys_slist_t widgets = SYS_SLIST_STATIC_INIT(&widgets); struct layer_status_state { - uint8_t index; + zmk_keymap_layer_index_t index; const char *label; }; static void set_layer_symbol(lv_obj_t *label, struct layer_status_state state) { - if (state.label == NULL) { + if (state.label == NULL || strlen(state.label) == 0) { char text[8] = {}; snprintf(text, sizeof(text), LV_SYMBOL_KEYBOARD " %i", state.index); @@ -44,8 +44,9 @@ static void layer_status_update_cb(struct layer_status_state state) { } static struct layer_status_state layer_status_get_state(const zmk_event_t *eh) { - uint8_t index = zmk_keymap_highest_layer_active(); - return (struct layer_status_state){.index = index, .label = zmk_keymap_layer_name(index)}; + zmk_keymap_layer_index_t index = zmk_keymap_highest_layer_active(); + return (struct layer_status_state){ + .index = index, .label = zmk_keymap_layer_name(zmk_keymap_layer_index_to_id(index))}; } ZMK_DISPLAY_WIDGET_LISTENER(widget_layer_status, struct layer_status_state, layer_status_update_cb, diff --git a/app/src/display/widgets/output_status.c b/app/src/display/widgets/output_status.c index 7b6f9486..189a7dc2 100644 --- a/app/src/display/widgets/output_status.c +++ b/app/src/display/widgets/output_status.c @@ -22,25 +22,43 @@ static sys_slist_t widgets = SYS_SLIST_STATIC_INIT(&widgets); struct output_status_state { struct zmk_endpoint_instance selected_endpoint; + enum zmk_transport preferred_transport; bool active_profile_connected; bool active_profile_bonded; }; static struct output_status_state get_state(const zmk_event_t *_eh) { - return (struct output_status_state){.selected_endpoint = zmk_endpoints_selected(), - .active_profile_connected = - zmk_ble_active_profile_is_connected(), - .active_profile_bonded = !zmk_ble_active_profile_is_open()}; - ; + return (struct output_status_state){ + .selected_endpoint = zmk_endpoint_get_selected(), + .preferred_transport = zmk_endpoint_get_preferred_transport(), + .active_profile_connected = zmk_ble_active_profile_is_connected(), + .active_profile_bonded = !zmk_ble_active_profile_is_open(), + }; } static void set_status_symbol(lv_obj_t *label, struct output_status_state state) { char text[20] = {}; - switch (state.selected_endpoint.transport) { + enum zmk_transport transport = state.selected_endpoint.transport; + bool connected = transport != ZMK_TRANSPORT_NONE; + + // If we aren't connected, show what we're *trying* to connect to. + if (!connected) { + transport = state.preferred_transport; + } + + switch (transport) { + case ZMK_TRANSPORT_NONE: + strcat(text, LV_SYMBOL_CLOSE); + break; + case ZMK_TRANSPORT_USB: strcat(text, LV_SYMBOL_USB); + if (!connected) { + strcat(text, " " LV_SYMBOL_CLOSE); + } break; + case ZMK_TRANSPORT_BLE: if (state.active_profile_bonded) { if (state.active_profile_connected) { diff --git a/app/src/endpoints.c b/app/src/endpoints.c index 65243853..17cdc5d7 100644 --- a/app/src/endpoints.c +++ b/app/src/endpoints.c @@ -15,26 +15,48 @@ #include #include #include +#include #include #include #include #include #include + LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); -#define DEFAULT_TRANSPORT \ - COND_CODE_1(IS_ENABLED(CONFIG_ZMK_BLE), (ZMK_TRANSPORT_BLE), (ZMK_TRANSPORT_USB)) +// Name of the subtree for endpoint-related settings +#define SETTING_SUBTREE "endpoints" + +// Key of the setting to store the preferred_transport value. +#define SETTING_PREFERRED_TRANSPORT_KEY "preferred2" +// Full name of the setting to store the preferred_transport value. +#define SETTING_PREFERRED_TRANSPORT SETTING_SUBTREE "/" SETTING_PREFERRED_TRANSPORT_KEY + +// Key of the deprecated setting which stored preferred_transport with an older type. +#define SETTING_PREFERRED_TRANSPORT_V1_KEY "preferred" +// Full name of the deprecated setting which stored preferred_transport with an older type. +#define SETTING_PREFERRED_TRANSPORT_V1 SETTING_SUBTREE "/" SETTING_PREFERRED_TRANSPORT_V1_KEY + +#if IS_ENABLED(CONFIG_ZMK_USB) +#define DEFAULT_TRANSPORT ZMK_TRANSPORT_USB +#elif IS_ENABLED(CONFIG_ZMK_BLE) +#define DEFAULT_TRANSPORT ZMK_TRANSPORT_BLE +#else +#define DEFAULT_TRANSPORT ZMK_TRANSPORT_NONE +#endif static struct zmk_endpoint_instance current_instance = {}; -static enum zmk_transport preferred_transport = - ZMK_TRANSPORT_USB; /* Used if multiple endpoints are ready */ + +// Transport to use if multiple endpoints are ready +static enum zmk_transport preferred_transport = DEFAULT_TRANSPORT; static void update_current_endpoint(void); #if IS_ENABLED(CONFIG_SETTINGS) static void endpoints_save_preferred_work(struct k_work *work) { - settings_save_one("endpoints/preferred", &preferred_transport, sizeof(preferred_transport)); + settings_save_one(SETTING_PREFERRED_TRANSPORT, &preferred_transport, + sizeof(preferred_transport)); } static struct k_work_delayable endpoints_save_work; @@ -54,6 +76,7 @@ bool zmk_endpoint_instance_eq(struct zmk_endpoint_instance a, struct zmk_endpoin } switch (a.transport) { + case ZMK_TRANSPORT_NONE: case ZMK_TRANSPORT_USB: return true; @@ -67,6 +90,9 @@ bool zmk_endpoint_instance_eq(struct zmk_endpoint_instance a, struct zmk_endpoin int zmk_endpoint_instance_to_str(struct zmk_endpoint_instance endpoint, char *str, size_t len) { switch (endpoint.transport) { + case ZMK_TRANSPORT_NONE: + return snprintf(str, len, "None"); + case ZMK_TRANSPORT_USB: return snprintf(str, len, "USB"); @@ -78,11 +104,15 @@ int zmk_endpoint_instance_to_str(struct zmk_endpoint_instance endpoint, char *st } } -#define INSTANCE_INDEX_OFFSET_USB 0 -#define INSTANCE_INDEX_OFFSET_BLE ZMK_ENDPOINT_USB_COUNT +#define INSTANCE_INDEX_OFFSET_NONE 0 +#define INSTANCE_INDEX_OFFSET_USB (INSTANCE_INDEX_OFFSET_NONE + ZMK_ENDPOINT_NONE_COUNT) +#define INSTANCE_INDEX_OFFSET_BLE (INSTANCE_INDEX_OFFSET_USB + ZMK_ENDPOINT_USB_COUNT) int zmk_endpoint_instance_to_index(struct zmk_endpoint_instance endpoint) { switch (endpoint.transport) { + case ZMK_TRANSPORT_NONE: + return INSTANCE_INDEX_OFFSET_NONE; + case ZMK_TRANSPORT_USB: return INSTANCE_INDEX_OFFSET_USB; @@ -94,7 +124,7 @@ int zmk_endpoint_instance_to_index(struct zmk_endpoint_instance endpoint) { return 0; } -int zmk_endpoints_select_transport(enum zmk_transport transport) { +int zmk_endpoint_set_preferred_transport(enum zmk_transport transport) { LOG_DBG("Selected endpoint transport %d", transport); if (preferred_transport == transport) { @@ -110,18 +140,44 @@ int zmk_endpoints_select_transport(enum zmk_transport transport) { return 0; } -int zmk_endpoints_toggle_transport(void) { +enum zmk_transport zmk_endpoint_get_preferred_transport(void) { return preferred_transport; } + +int zmk_endpoint_toggle_preferred_transport(void) { enum zmk_transport new_transport = (preferred_transport == ZMK_TRANSPORT_USB) ? ZMK_TRANSPORT_BLE : ZMK_TRANSPORT_USB; - return zmk_endpoints_select_transport(new_transport); + return zmk_endpoint_set_preferred_transport(new_transport); } -struct zmk_endpoint_instance zmk_endpoints_selected(void) { - return current_instance; +static struct zmk_endpoint_instance get_instance_from_transport(enum zmk_transport transport) { + struct zmk_endpoint_instance instance = {.transport = transport}; + switch (instance.transport) { + case ZMK_TRANSPORT_BLE: +#if IS_ENABLED(CONFIG_ZMK_BLE) + instance.ble.profile_index = zmk_ble_active_profile_index(); +#endif // IS_ENABLED(CONFIG_ZMK_BLE) + break; + + default: + // No extra data for this transport. + break; + } + + return instance; } +struct zmk_endpoint_instance zmk_endpoint_get_preferred(void) { + return get_instance_from_transport(preferred_transport); +} + +struct zmk_endpoint_instance zmk_endpoint_get_selected(void) { return current_instance; } + +bool zmk_endpoint_is_connected(void) { return current_instance.transport != ZMK_TRANSPORT_NONE; } + static int send_keyboard_report(void) { switch (current_instance.transport) { + case ZMK_TRANSPORT_NONE: + return 0; + case ZMK_TRANSPORT_USB: { #if IS_ENABLED(CONFIG_ZMK_USB) int err = zmk_usb_hid_send_keyboard_report(); @@ -156,6 +212,9 @@ static int send_keyboard_report(void) { static int send_consumer_report(void) { switch (current_instance.transport) { + case ZMK_TRANSPORT_NONE: + return 0; + case ZMK_TRANSPORT_USB: { #if IS_ENABLED(CONFIG_ZMK_USB) int err = zmk_usb_hid_send_consumer_report(); @@ -188,8 +247,7 @@ static int send_consumer_report(void) { return -ENOTSUP; } -int zmk_endpoints_send_report(uint16_t usage_page) { - +int zmk_endpoint_send_report(uint16_t usage_page) { LOG_DBG("usage page 0x%02X", usage_page); switch (usage_page) { case HID_USAGE_KEY: @@ -203,9 +261,12 @@ int zmk_endpoints_send_report(uint16_t usage_page) { return -ENOTSUP; } -#if IS_ENABLED(CONFIG_ZMK_MOUSE) -int zmk_endpoints_send_mouse_report() { +#if IS_ENABLED(CONFIG_ZMK_POINTING) +int zmk_endpoint_send_mouse_report() { switch (current_instance.transport) { + case ZMK_TRANSPORT_NONE: + return 0; + case ZMK_TRANSPORT_USB: { #if IS_ENABLED(CONFIG_ZMK_USB) int err = zmk_usb_hid_send_mouse_report(); @@ -237,33 +298,110 @@ int zmk_endpoints_send_mouse_report() { LOG_ERR("Unhandled endpoint transport %d", current_instance.transport); return -ENOTSUP; } -#endif // IS_ENABLED(CONFIG_ZMK_MOUSE) +#endif // IS_ENABLED(CONFIG_ZMK_POINTING) #if IS_ENABLED(CONFIG_SETTINGS) -static int endpoints_handle_set(const char *name, size_t len, settings_read_cb read_cb, - void *cb_arg) { - LOG_DBG("Setting endpoint value %s", name); +// Type for the deprecated SETTING_PREFERRED_TRANSPORT_V1 setting. To maintain backwards +// compatibility when ZMK_TRANSPORT_NONE was inserted into the beginning of enum zmk_transport, the +// setting was moved to SETTING_PREFERRED_TRANSPORT. If the deprecated setting exists, it must be +// upgraded to the new type and setting name. +enum transport_v1 { + TRANSPORT_V1_USB = 0, + TRANSPORT_V1_BLE = 1, +}; - if (settings_name_steq(name, "preferred", NULL)) { - if (len != sizeof(enum zmk_transport)) { - LOG_ERR("Invalid endpoint size (got %d expected %d)", len, sizeof(enum zmk_transport)); - return -EINVAL; - } +static enum zmk_transport upgrade_transport_v1(enum transport_v1 value) { + switch (value) { + case TRANSPORT_V1_USB: + return ZMK_TRANSPORT_USB; - int err = read_cb(cb_arg, &preferred_transport, sizeof(enum zmk_transport)); - if (err <= 0) { - LOG_ERR("Failed to read preferred endpoint from settings (err %d)", err); - return err; - } + case TRANSPORT_V1_BLE: + return ZMK_TRANSPORT_BLE; + }; - update_current_endpoint(); + LOG_ERR("Invalid transport_v1 value: %d", value); + return ZMK_TRANSPORT_USB; +} + +/** + * Loads the deprecated SETTING_PREFERRED_TRANSPORT_V1 setting and upgrades it to the new type, + * storing the value in SETTING_PREFERRED_TRANSPORT and deleting the original setting. + */ +static int endpoint_settings_load_preferred_v1(size_t len, settings_read_cb read_cb, void *cb_arg) { + enum transport_v1 value; + + if (len != sizeof(value)) { + LOG_ERR("Invalid zmk_transport size (got %zu expected %zu)", len, sizeof(value)); + return -EINVAL; + } + + ssize_t len_read = read_cb(cb_arg, &value, sizeof(value)); + if (len_read < 0) { + LOG_ERR("Failed to read preferred endpoint v1 from settings (err %d)", len_read); + return len_read; + } + + preferred_transport = upgrade_transport_v1(value); + + int err = settings_delete(SETTING_PREFERRED_TRANSPORT_V1); + if (err != 0) { + LOG_ERR("Failed to delete preferred endpoint v1 setting (err %d)", err); + return err; + } + + err = settings_save_one(SETTING_PREFERRED_TRANSPORT, &preferred_transport, + sizeof(preferred_transport)); + if (err == 0) { + LOG_INF("Upgraded preferred endpoint setting"); + } else { + LOG_ERR("Failed to save upgraded endpoint value (err %d)", err); + } + + return err; +} + +/** + * Loads the SETTING_PREFERRED_TRANSPORT setting. + */ +static int endpoint_settings_load_preferred_v2(size_t len, settings_read_cb read_cb, void *cb_arg) { + if (len != sizeof(preferred_transport)) { + LOG_ERR("Invalid zmk_transport size (got %zu expected %zu)", len, + sizeof(preferred_transport)); + return -EINVAL; + } + + ssize_t len_read = read_cb(cb_arg, &preferred_transport, sizeof(preferred_transport)); + if (len_read < 0) { + LOG_ERR("Failed to read preferred endpoint from settings (err %d)", len_read); + return len_read; } return 0; } -SETTINGS_STATIC_HANDLER_DEFINE(endpoints, "endpoints", NULL, endpoints_handle_set, NULL, NULL); +static int endpoint_settings_set(const char *name, size_t len, settings_read_cb read_cb, + void *cb_arg) { + LOG_DBG("Setting endpoint value %s", name); + + if (settings_name_steq(name, SETTING_PREFERRED_TRANSPORT_KEY, NULL)) { + return endpoint_settings_load_preferred_v2(len, read_cb, cb_arg); + } + + if (settings_name_steq(name, SETTING_PREFERRED_TRANSPORT_V1_KEY, NULL)) { + return endpoint_settings_load_preferred_v1(len, read_cb, cb_arg); + } + + return 0; +} + +static int endpoint_settings_commit(void) { + update_current_endpoint(); + return 0; +} + +SETTINGS_STATIC_HANDLER_DEFINE(endpoints, SETTING_SUBTREE, NULL, endpoint_settings_set, + endpoint_settings_commit, NULL); #endif /* IS_ENABLED(CONFIG_SETTINGS) */ @@ -284,41 +422,40 @@ static bool is_ble_ready(void) { } static enum zmk_transport get_selected_transport(void) { - if (is_ble_ready()) { + switch (preferred_transport) { + case ZMK_TRANSPORT_NONE: + LOG_DBG("No endpoint transport selected"); + return ZMK_TRANSPORT_NONE; + + case ZMK_TRANSPORT_USB: if (is_usb_ready()) { - LOG_DBG("Both endpoint transports are ready. Using %d", preferred_transport); - return preferred_transport; + LOG_DBG("USB is preferred and ready"); + return ZMK_TRANSPORT_USB; } + if (is_ble_ready()) { + LOG_DBG("USB is not ready. Falling back to BLE"); + return ZMK_TRANSPORT_BLE; + } + break; - LOG_DBG("Only BLE is ready."); - return ZMK_TRANSPORT_BLE; + case ZMK_TRANSPORT_BLE: + if (is_ble_ready()) { + LOG_DBG("BLE is preferred and ready"); + return ZMK_TRANSPORT_BLE; + } + if (is_usb_ready()) { + LOG_DBG("BLE is not ready. Falling back to USB"); + return ZMK_TRANSPORT_USB; + } + break; } - if (is_usb_ready()) { - LOG_DBG("Only USB is ready."); - return ZMK_TRANSPORT_USB; - } - - LOG_DBG("No endpoint transports are ready."); - return DEFAULT_TRANSPORT; + LOG_DBG("Preferred endpoint transport is %d but no transports are ready", preferred_transport); + return ZMK_TRANSPORT_NONE; } static struct zmk_endpoint_instance get_selected_instance(void) { - struct zmk_endpoint_instance instance = {.transport = get_selected_transport()}; - - switch (instance.transport) { -#if IS_ENABLED(CONFIG_ZMK_BLE) - case ZMK_TRANSPORT_BLE: - instance.ble.profile_index = zmk_ble_active_profile_index(); - break; -#endif // IS_ENABLED(CONFIG_ZMK_BLE) - - default: - // No extra data for this transport. - break; - } - - return instance; + return get_instance_from_transport(get_selected_transport()); } static int zmk_endpoints_init(void) { @@ -331,15 +468,15 @@ static int zmk_endpoints_init(void) { return 0; } -void zmk_endpoints_clear_current(void) { +void zmk_endpoint_clear_reports(void) { zmk_hid_keyboard_clear(); zmk_hid_consumer_clear(); -#if IS_ENABLED(CONFIG_ZMK_MOUSE) +#if IS_ENABLED(CONFIG_ZMK_POINTING) zmk_hid_mouse_clear(); -#endif // IS_ENABLED(CONFIG_ZMK_MOUSE) +#endif // IS_ENABLED(CONFIG_ZMK_POINTING) - zmk_endpoints_send_report(HID_USAGE_KEY); - zmk_endpoints_send_report(HID_USAGE_CONSUMER); + zmk_endpoint_send_report(HID_USAGE_KEY); + zmk_endpoint_send_report(HID_USAGE_CONSUMER); } static void update_current_endpoint(void) { @@ -347,7 +484,7 @@ static void update_current_endpoint(void) { if (!zmk_endpoint_instance_eq(new_instance, current_instance)) { // Cancel all current keypresses so keys don't stay held on the old endpoint. - zmk_endpoints_clear_current(); + zmk_endpoint_clear_reports(); current_instance = new_instance; diff --git a/app/src/ext_power_generic.c b/app/src/ext_power_generic.c index 17b3ba64..3975e038 100644 --- a/app/src/ext_power_generic.c +++ b/app/src/ext_power_generic.c @@ -22,7 +22,8 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); struct ext_power_generic_config { - const struct gpio_dt_spec control; + const struct gpio_dt_spec *control; + const size_t control_gpios_count; const uint16_t init_delay_ms; }; @@ -59,9 +60,12 @@ static int ext_power_generic_enable(const struct device *dev) { struct ext_power_generic_data *data = dev->data; const struct ext_power_generic_config *config = dev->config; - if (gpio_pin_set_dt(&config->control, 1)) { - LOG_WRN("Failed to set ext-power control pin"); - return -EIO; + for (int i = 0; i < config->control_gpios_count; i++) { + const struct gpio_dt_spec *gpio = &config->control[i]; + if (gpio_pin_set_dt(gpio, 1)) { + LOG_WRN("Failed to set ext-power control pin %d", i); + return -EIO; + } } data->status = true; return ext_power_save_state(); @@ -71,10 +75,12 @@ static int ext_power_generic_disable(const struct device *dev) { struct ext_power_generic_data *data = dev->data; const struct ext_power_generic_config *config = dev->config; - if (gpio_pin_set_dt(&config->control, 0)) { - LOG_WRN("Failed to set ext-power control pin"); - LOG_WRN("Failed to clear ext-power control pin"); - return -EIO; + for (int i = 0; i < config->control_gpios_count; i++) { + const struct gpio_dt_spec *gpio = &config->control[i]; + if (gpio_pin_set_dt(gpio, 0)) { + LOG_WRN("Failed to clear ext-power control pin %d", i); + return -EIO; + } } data->status = false; return ext_power_save_state(); @@ -144,9 +150,12 @@ SETTINGS_STATIC_HANDLER_DEFINE(ext_power, "ext_power/state", NULL, ext_power_set static int ext_power_generic_init(const struct device *dev) { const struct ext_power_generic_config *config = dev->config; - if (gpio_pin_configure_dt(&config->control, GPIO_OUTPUT_INACTIVE)) { - LOG_ERR("Failed to configure ext-power control pin"); - return -EIO; + for (int i = 0; i < config->control_gpios_count; i++) { + const struct gpio_dt_spec *gpio = &config->control[i]; + if (gpio_pin_configure_dt(gpio, GPIO_OUTPUT_INACTIVE)) { + LOG_ERR("Failed to configure ext-power control pin %d", i); + return -EIO; + } } #if IS_ENABLED(CONFIG_SETTINGS) @@ -178,8 +187,12 @@ static int ext_power_generic_pm_action(const struct device *dev, enum pm_device_ } #endif /* CONFIG_PM_DEVICE */ +static const struct gpio_dt_spec ext_power_control_gpios[DT_INST_PROP_LEN(0, control_gpios)] = { + DT_INST_FOREACH_PROP_ELEM_SEP(0, control_gpios, GPIO_DT_SPEC_GET_BY_IDX, (, ))}; + static const struct ext_power_generic_config config = { - .control = GPIO_DT_SPEC_INST_GET(0, control_gpios), + .control = ext_power_control_gpios, + .control_gpios_count = DT_INST_PROP_LEN(0, control_gpios), .init_delay_ms = DT_INST_PROP_OR(0, init_delay_ms, 0)}; static struct ext_power_generic_data data = { diff --git a/app/src/hid.c b/app/src/hid.c index 24572ad3..d8700c3f 100644 --- a/app/src/hid.c +++ b/app/src/hid.c @@ -25,12 +25,13 @@ static uint8_t keys_held = 0; #endif /* IS_ENABLED(CONFIG_ZMK_USB_BOOT) */ -#if IS_ENABLED(CONFIG_ZMK_MOUSE) +#if IS_ENABLED(CONFIG_ZMK_POINTING) -static struct zmk_hid_mouse_report mouse_report = {.report_id = ZMK_HID_REPORT_ID_MOUSE, - .body = {.buttons = 0}}; +static struct zmk_hid_mouse_report mouse_report = { + .report_id = ZMK_HID_REPORT_ID_MOUSE, + .body = {.buttons = 0, .d_x = 0, .d_y = 0, .d_scroll_y = 0, .d_scroll_x = 0}}; -#endif // IS_ENABLED(CONFIG_ZMK_MOUSE) +#endif // IS_ENABLED(CONFIG_ZMK_POINTING) // Keep track of how often a modifier was pressed. // Only release the modifier if the count is 0. @@ -370,7 +371,7 @@ bool zmk_hid_is_pressed(uint32_t usage) { return false; } -#if IS_ENABLED(CONFIG_ZMK_MOUSE) +#if IS_ENABLED(CONFIG_ZMK_POINTING) // Keep track of how often a button was pressed. // Only release the button if the count is 0. @@ -431,22 +432,48 @@ int zmk_hid_mouse_buttons_release(zmk_mouse_button_flags_t buttons) { } return 0; } -void zmk_hid_mouse_clear(void) { memset(&mouse_report.body, 0, sizeof(mouse_report.body)); } -#endif // IS_ENABLED(CONFIG_ZMK_MOUSE) - -struct zmk_hid_keyboard_report *zmk_hid_get_keyboard_report(void) { - return &keyboard_report; +void zmk_hid_mouse_movement_set(int16_t hwheel, int16_t wheel) { + mouse_report.body.d_x = hwheel; + mouse_report.body.d_y = wheel; + LOG_DBG("Mouse movement set to %d/%d", mouse_report.body.d_x, mouse_report.body.d_y); } -struct zmk_hid_consumer_report *zmk_hid_get_consumer_report(void) { - return &consumer_report; +void zmk_hid_mouse_movement_update(int16_t hwheel, int16_t wheel) { + mouse_report.body.d_x += hwheel; + mouse_report.body.d_y += wheel; + LOG_DBG("Mouse movement updated to %d/%d", mouse_report.body.d_x, mouse_report.body.d_y); } -#if IS_ENABLED(CONFIG_ZMK_MOUSE) +void zmk_hid_mouse_scroll_set(int16_t hwheel, int16_t wheel) { + mouse_report.body.d_scroll_x = hwheel; + mouse_report.body.d_scroll_y = wheel; -struct zmk_hid_mouse_report *zmk_hid_get_mouse_report(void) { - return &mouse_report; + LOG_DBG("Mouse scroll set to %d/%d", mouse_report.body.d_scroll_x, + mouse_report.body.d_scroll_y); } -#endif // IS_ENABLED(CONFIG_ZMK_MOUSE) +void zmk_hid_mouse_scroll_update(int16_t hwheel, int16_t wheel) { + mouse_report.body.d_scroll_x += hwheel; + mouse_report.body.d_scroll_y += wheel; + + LOG_DBG("Mouse scroll updated to X: %d/%d", mouse_report.body.d_scroll_x, + mouse_report.body.d_scroll_y); +} + +void zmk_hid_mouse_clear(void) { + LOG_DBG("Mouse report cleared"); + memset(&mouse_report.body, 0, sizeof(mouse_report.body)); +} + +#endif // IS_ENABLED(CONFIG_ZMK_POINTING) + +struct zmk_hid_keyboard_report *zmk_hid_get_keyboard_report(void) { return &keyboard_report; } + +struct zmk_hid_consumer_report *zmk_hid_get_consumer_report(void) { return &consumer_report; } + +#if IS_ENABLED(CONFIG_ZMK_POINTING) + +struct zmk_hid_mouse_report *zmk_hid_get_mouse_report(void) { return &mouse_report; } + +#endif // IS_ENABLED(CONFIG_ZMK_POINTING) diff --git a/app/src/hid_indicators.c b/app/src/hid_indicators.c index a2220b1b..23149cca 100644 --- a/app/src/hid_indicators.c +++ b/app/src/hid_indicators.c @@ -12,14 +12,14 @@ #include #include #include -#include +#include LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); static zmk_hid_indicators_t hid_indicators[ZMK_ENDPOINT_COUNT]; zmk_hid_indicators_t zmk_hid_indicators_get_current_profile(void) { - return zmk_hid_indicators_get_profile(zmk_endpoints_selected()); + return zmk_hid_indicators_get_profile(zmk_endpoint_get_selected()); } zmk_hid_indicators_t zmk_hid_indicators_get_profile(struct zmk_endpoint_instance endpoint) { @@ -32,8 +32,8 @@ static void raise_led_changed_event(struct k_work *_work) { raise_zmk_hid_indicators_changed((struct zmk_hid_indicators_changed){.indicators = indicators}); -#if IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) && IS_ENABLED(CONFIG_ZMK_SPLIT_BLE) - zmk_split_bt_update_hid_indicator(indicators); +#if IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) && IS_ENABLED(CONFIG_ZMK_SPLIT) + zmk_split_central_update_hid_indicator(indicators); #endif } diff --git a/app/src/hid_listener.c b/app/src/hid_listener.c index 2d17a395..cd463d8e 100644 --- a/app/src/hid_listener.c +++ b/app/src/hid_listener.c @@ -28,7 +28,7 @@ static int hid_listener_keycode_pressed(const struct zmk_keycode_state_changed * LOG_DBG("Unable to pre-release keycode (%d)", err); return err; } - err = zmk_endpoints_send_report(ev->usage_page); + err = zmk_endpoint_send_report(ev->usage_page); if (err < 0) { LOG_ERR("Failed to send key report for pre-releasing keycode (%d)", err); } @@ -45,14 +45,14 @@ static int hid_listener_keycode_pressed(const struct zmk_keycode_state_changed * implicit_mods_changed = zmk_hid_implicit_modifiers_press(ev->implicit_modifiers); if (ev->usage_page != HID_USAGE_KEY && (explicit_mods_changed > 0 || implicit_mods_changed > 0)) { - err = zmk_endpoints_send_report(HID_USAGE_KEY); + err = zmk_endpoint_send_report(HID_USAGE_KEY); if (err < 0) { LOG_ERR("Failed to send key report for changed mofifiers for consumer page event (%d)", err); } } - return zmk_endpoints_send_report(ev->usage_page); + return zmk_endpoint_send_report(ev->usage_page); } static int hid_listener_keycode_released(const struct zmk_keycode_state_changed *ev) { @@ -70,7 +70,7 @@ static int hid_listener_keycode_released(const struct zmk_keycode_state_changed // send report of normal key release early to fix the issue // of some programs recognizing the implicit_mod release before the actual key release - err = zmk_endpoints_send_report(ev->usage_page); + err = zmk_endpoint_send_report(ev->usage_page); if (err < 0) { LOG_ERR("Failed to send key report for the released keycode (%d)", err); } @@ -87,13 +87,13 @@ static int hid_listener_keycode_released(const struct zmk_keycode_state_changed if (ev->usage_page != HID_USAGE_KEY && (explicit_mods_changed > 0 || implicit_mods_changed > 0)) { - err = zmk_endpoints_send_report(HID_USAGE_KEY); + err = zmk_endpoint_send_report(HID_USAGE_KEY); if (err < 0) { LOG_ERR("Failed to send key report for changed mofifiers for consumer page event (%d)", err); } } - return zmk_endpoints_send_report(ev->usage_page); + return zmk_endpoint_send_report(ev->usage_page); } int hid_listener(const zmk_event_t *eh) { diff --git a/app/src/hog.c b/app/src/hog.c index 82fafc29..c7d9b861 100644 --- a/app/src/hog.c +++ b/app/src/hog.c @@ -18,6 +18,9 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include #include #include +#if IS_ENABLED(CONFIG_ZMK_POINTING_SMOOTH_SCROLLING) +#include +#endif // IS_ENABLED(CONFIG_ZMK_POINTING_SMOOTH_SCROLLING) #if IS_ENABLED(CONFIG_ZMK_HID_INDICATORS) #include #endif // IS_ENABLED(CONFIG_ZMK_HID_INDICATORS) @@ -69,14 +72,23 @@ static struct hids_report consumer_input = { .type = HIDS_INPUT, }; -#if IS_ENABLED(CONFIG_ZMK_MOUSE) +#if IS_ENABLED(CONFIG_ZMK_POINTING) static struct hids_report mouse_input = { .id = ZMK_HID_REPORT_ID_MOUSE, .type = HIDS_INPUT, }; -#endif // IS_ENABLED(CONFIG_ZMK_MOUSE) +#if IS_ENABLED(CONFIG_ZMK_POINTING_SMOOTH_SCROLLING) + +static struct hids_report mouse_feature = { + .id = ZMK_HID_REPORT_ID_MOUSE, + .type = HIDS_FEATURE, +}; + +#endif // IS_ENABLED(CONFIG_ZMK_POINTING_SMOOTH_SCROLLING) + +#endif // IS_ENABLED(CONFIG_ZMK_POINTING) static bool host_requests_notification = false; static uint8_t ctrl_point; @@ -143,14 +155,72 @@ static ssize_t read_hids_consumer_input_report(struct bt_conn *conn, sizeof(struct zmk_hid_consumer_report_body)); } -#if IS_ENABLED(CONFIG_ZMK_MOUSE) +#if IS_ENABLED(CONFIG_ZMK_POINTING) + static ssize_t read_hids_mouse_input_report(struct bt_conn *conn, const struct bt_gatt_attr *attr, void *buf, uint16_t len, uint16_t offset) { struct zmk_hid_mouse_report_body *report_body = &zmk_hid_get_mouse_report()->body; return bt_gatt_attr_read(conn, attr, buf, len, offset, report_body, sizeof(struct zmk_hid_mouse_report_body)); } -#endif // IS_ENABLED(CONFIG_ZMK_MOUSE) + +#if IS_ENABLED(CONFIG_ZMK_POINTING_SMOOTH_SCROLLING) + +static ssize_t read_hids_mouse_feature_report(struct bt_conn *conn, const struct bt_gatt_attr *attr, + void *buf, uint16_t len, uint16_t offset) { + + int profile = zmk_ble_profile_index(bt_conn_get_dst(conn)); + if (profile < 0) { + LOG_DBG(" BT_ATT_ERR_UNLIKELY"); + return BT_GATT_ERR(BT_ATT_ERR_UNLIKELY); + } + + struct zmk_endpoint_instance endpoint = { + .transport = ZMK_TRANSPORT_BLE, + .ble = {.profile_index = profile}, + }; + + struct zmk_pointing_resolution_multipliers mult = + zmk_pointing_resolution_multipliers_get_profile(endpoint); + + struct zmk_hid_mouse_resolution_feature_report_body report = { + .wheel_res = mult.wheel, + .hwheel_res = mult.hor_wheel, + }; + + return bt_gatt_attr_read(conn, attr, buf, len, offset, &report, + sizeof(struct zmk_hid_mouse_resolution_feature_report_body)); +} + +static ssize_t write_hids_mouse_feature_report(struct bt_conn *conn, + const struct bt_gatt_attr *attr, const void *buf, + uint16_t len, uint16_t offset, uint8_t flags) { + if (offset != 0) { + return BT_GATT_ERR(BT_ATT_ERR_INVALID_OFFSET); + } + if (len != sizeof(struct zmk_hid_mouse_resolution_feature_report_body)) { + return BT_GATT_ERR(BT_ATT_ERR_INVALID_ATTRIBUTE_LEN); + } + + struct zmk_hid_mouse_resolution_feature_report_body *report = + (struct zmk_hid_mouse_resolution_feature_report_body *)buf; + int profile = zmk_ble_profile_index(bt_conn_get_dst(conn)); + if (profile < 0) { + return BT_GATT_ERR(BT_ATT_ERR_UNLIKELY); + } + + struct zmk_endpoint_instance endpoint = {.transport = ZMK_TRANSPORT_BLE, + .ble = { + .profile_index = profile, + }}; + zmk_pointing_resolution_multipliers_process_report(report, endpoint); + + return len; +} + +#endif // IS_ENABLED(CONFIG_ZMK_POINTING_SMOOTH_SCROLLING) + +#endif // IS_ENABLED(CONFIG_ZMK_POINTING) // static ssize_t write_proto_mode(struct bt_conn *conn, // const struct bt_gatt_attr *attr, @@ -200,13 +270,23 @@ BT_GATT_SERVICE_DEFINE( BT_GATT_DESCRIPTOR(BT_UUID_HIDS_REPORT_REF, BT_GATT_PERM_READ_ENCRYPT, read_hids_report_ref, NULL, &consumer_input), -#if IS_ENABLED(CONFIG_ZMK_MOUSE) +#if IS_ENABLED(CONFIG_ZMK_POINTING) BT_GATT_CHARACTERISTIC(BT_UUID_HIDS_REPORT, BT_GATT_CHRC_READ | BT_GATT_CHRC_NOTIFY, BT_GATT_PERM_READ_ENCRYPT, read_hids_mouse_input_report, NULL, NULL), BT_GATT_CCC(input_ccc_changed, BT_GATT_PERM_READ_ENCRYPT | BT_GATT_PERM_WRITE_ENCRYPT), BT_GATT_DESCRIPTOR(BT_UUID_HIDS_REPORT_REF, BT_GATT_PERM_READ_ENCRYPT, read_hids_report_ref, NULL, &mouse_input), -#endif // IS_ENABLED(CONFIG_ZMK_MOUSE) + +#if IS_ENABLED(CONFIG_ZMK_POINTING_SMOOTH_SCROLLING) + BT_GATT_CHARACTERISTIC(BT_UUID_HIDS_REPORT, + BT_GATT_CHRC_READ | BT_GATT_CHRC_WRITE | BT_GATT_CHRC_WRITE_WITHOUT_RESP, + BT_GATT_PERM_READ_ENCRYPT | BT_GATT_PERM_WRITE_ENCRYPT, + read_hids_mouse_feature_report, write_hids_mouse_feature_report, NULL), + BT_GATT_DESCRIPTOR(BT_UUID_HIDS_REPORT_REF, BT_GATT_PERM_READ_ENCRYPT, read_hids_report_ref, + NULL, &mouse_feature), +#endif // IS_ENABLED(CONFIG_ZMK_POINTING_SMOOTH_SCROLLING) + +#endif // IS_ENABLED(CONFIG_ZMK_POINTING) #if IS_ENABLED(CONFIG_ZMK_HID_INDICATORS) BT_GATT_CHARACTERISTIC(BT_UUID_HIDS_REPORT, @@ -328,7 +408,7 @@ int zmk_hog_send_consumer_report(struct zmk_hid_consumer_report_body *report) { return 0; }; -#if IS_ENABLED(CONFIG_ZMK_MOUSE) +#if IS_ENABLED(CONFIG_ZMK_POINTING) K_MSGQ_DEFINE(zmk_hog_mouse_msgq, sizeof(struct zmk_hid_mouse_report_body), CONFIG_ZMK_BLE_MOUSE_REPORT_QUEUE_SIZE, 4); @@ -380,8 +460,7 @@ int zmk_hog_send_mouse_report(struct zmk_hid_mouse_report_body *report) { return 0; }; - -#endif // IS_ENABLED(CONFIG_ZMK_MOUSE) +#endif // IS_ENABLED(CONFIG_ZMK_POINTING) static int zmk_hog_init(void) { static const struct k_work_queue_config queue_config = {.name = "HID Over GATT Send Work"}; diff --git a/app/src/indicators/CMakeLists.txt b/app/src/indicators/CMakeLists.txt new file mode 100644 index 00000000..5c8fff74 --- /dev/null +++ b/app/src/indicators/CMakeLists.txt @@ -0,0 +1,4 @@ +# Copyright (c) 2025 The ZMK Contributors +# SPDX-License-Identifier: MIT + +target_sources_ifdef(CONFIG_ZMK_INDICATOR_LEDS app PRIVATE indicator_leds.c) diff --git a/app/src/indicators/Kconfig b/app/src/indicators/Kconfig new file mode 100644 index 00000000..2ae999bb --- /dev/null +++ b/app/src/indicators/Kconfig @@ -0,0 +1,4 @@ +# Copyright (c) 2026 The ZMK Contributors +# SPDX-License-Identifier: MIT + +rsource "Kconfig.indicator_leds" diff --git a/app/src/indicators/Kconfig.indicator_leds b/app/src/indicators/Kconfig.indicator_leds new file mode 100644 index 00000000..5e4f663c --- /dev/null +++ b/app/src/indicators/Kconfig.indicator_leds @@ -0,0 +1,19 @@ +# Copyright (c) 2025 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config ZMK_INDICATOR_LEDS + bool + default y + depends on DT_HAS_ZMK_INDICATOR_LEDS_ENABLED + select LED + select ZMK_HID_INDICATORS + +if ZMK_INDICATOR_LEDS + +config ZMK_INDICATOR_LEDS_INIT_PRIORITY + int "ZMK indicator LED initialization priority" + default 91 + help + System initialization priority for ZMK indicator LEDs. + +endif # ZMK_INDICATOR_LEDS diff --git a/app/src/indicators/indicator_leds.c b/app/src/indicators/indicator_leds.c new file mode 100644 index 00000000..9fdff077 --- /dev/null +++ b/app/src/indicators/indicator_leds.c @@ -0,0 +1,226 @@ +/* + * Copyright (c) 2025 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#define DT_DRV_COMPAT zmk_indicator_leds + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); + +struct indicator_led_child_config { + size_t leds_len; + const struct led_dt_spec *leds; + + zmk_hid_indicators_t indicator; + uint8_t active_brightness; + uint8_t inactive_brightness; + uint8_t disconnected_brightness; + bool on_while_idle; +}; + +struct indicator_led_config { + size_t indicators_len; + const struct indicator_led_child_config *indicators; +}; + +struct indicator_led_data { + enum zmk_activity_state activity_state; + zmk_hid_indicators_t indicators; + bool usb_powered; + bool pm_suspended; + bool endpoint_connected; +}; + +static bool is_led_disabled(const struct indicator_led_child_config *config, + const struct indicator_led_data *data) { + // LEDs should always be off if the device is suspended. + if (data->pm_suspended) { + return true; + } + + // If the keyboard is powered, LEDs don't need to be disabled to save power. + if (data->usb_powered) { + return false; + } + + switch (data->activity_state) { + case ZMK_ACTIVITY_ACTIVE: + return false; + + case ZMK_ACTIVITY_IDLE: + return !config->on_while_idle; + + case ZMK_ACTIVITY_SLEEP: + return true; + } + + LOG_ERR("Unhandled activity state %d", data->activity_state); + return false; +} + +static uint8_t get_brightness(const struct indicator_led_child_config *config, + const struct indicator_led_data *data) { + if (is_led_disabled(config, data)) { + return 0; + } + + if (!data->endpoint_connected) { + return config->disconnected_brightness; + } + + const bool active = data->indicators & config->indicator; + return active ? config->active_brightness : config->inactive_brightness; +} + +static int update_indicator(const struct indicator_led_child_config *config, + const struct indicator_led_data *data) { + const uint8_t value = get_brightness(config, data); + + for (int i = 0; i < config->leds_len; i++) { + const struct led_dt_spec *spec = &config->leds[i]; + const int err = led_set_brightness_dt(spec, value); + if (err) { + LOG_ERR("Failed to set %s %u to %u%%: %d", spec->dev->name, spec->index, value, err); + return err; + } + + LOG_DBG("Set %s %u to %u%%", spec->dev->name, spec->index, value); + } + + return 0; +} + +static int update_device(const struct device *dev) { + const struct indicator_led_config *config = dev->config; + struct indicator_led_data *data = dev->data; + + data->activity_state = zmk_activity_get_state(); + data->indicators = zmk_hid_indicators_get_current_profile(); + data->usb_powered = zmk_usb_is_powered(); + data->endpoint_connected = zmk_endpoint_is_connected(); + + for (int i = 0; i < config->indicators_len; i++) { + const int err = update_indicator(&config->indicators[i], data); + if (err) { + return err; + } + } + + return 0; +} + +#define INST_DEV(n) DEVICE_DT_GET(DT_DRV_INST(n)), +static const struct device *all_instances[] = {DT_INST_FOREACH_STATUS_OKAY(INST_DEV)}; + +static void update_all_indicators(struct k_work *work) { + LOG_DBG("Updating indicator LEDs"); + + for (int i = 0; i < ARRAY_SIZE(all_instances); i++) { + if (device_is_ready(all_instances[i])) { + update_device(all_instances[i]); + } + } +} + +// We may get multiple events at the same time (e.g. endpoint changed will +// also trigger HID indicators changed), but we only need to update the LEDs +// once per batch of events, so defer the updates with a work item. +static K_WORK_DEFINE(update_all_indicators_work, update_all_indicators); + +static int indicator_led_event_listener(const zmk_event_t *eh) { + k_work_submit(&update_all_indicators_work); + return ZMK_EV_EVENT_BUBBLE; +} + +static int indicator_led_init(const struct device *dev) { return update_device(dev); } + +ZMK_LISTENER(indicator_led, indicator_led_event_listener); +ZMK_SUBSCRIPTION(indicator_led, zmk_activity_state_changed); +ZMK_SUBSCRIPTION(indicator_led, zmk_hid_indicators_changed); +ZMK_SUBSCRIPTION(indicator_led, zmk_usb_conn_state_changed); +ZMK_SUBSCRIPTION(indicator_led, zmk_endpoint_changed); + +#if IS_ENABLED(CONFIG_PM_DEVICE) + +static int indicator_led_init_pm_action(const struct device *dev, enum pm_device_action action) { + struct indicator_led_data *data = dev->data; + + switch (action) { + case PM_DEVICE_ACTION_SUSPEND: + data->pm_suspended = true; + return update_device(dev); + + case PM_DEVICE_ACTION_RESUME: + data->pm_suspended = false; + return update_device(dev); + + default: + return -ENOTSUP; + } +} + +#endif // IS_ENABLED(CONFIG_PM_DEVICE) + +#define LED_DT_SPEC_GET_BY_IDX(node_id, prop, idx) \ + LED_DT_SPEC_GET(DT_PHANDLE_BY_IDX(node_id, prop, idx)) + +#define CHILD_LEDS_ARRAY(inst) DT_CAT(indicator_led_dt_spec_, inst) + +#define DEFINE_CHILD_LEDS(inst) \ + static const struct led_dt_spec CHILD_LEDS_ARRAY(inst)[] = { \ + DT_FOREACH_PROP_ELEM_SEP(inst, leds, LED_DT_SPEC_GET_BY_IDX, (, )), \ + }; + +#define CHILD_CONFIG(inst) \ + { \ + .leds_len = ARRAY_SIZE(CHILD_LEDS_ARRAY(inst)), \ + .leds = CHILD_LEDS_ARRAY(inst), \ + .indicator = DT_PROP(inst, indicator), \ + .active_brightness = DT_PROP_OR(inst, active_brightness, 100), \ + .inactive_brightness = DT_PROP_OR(inst, inactive_brightness, 0), \ + .disconnected_brightness = DT_PROP_OR(inst, disconnected_brightness, 0), \ + .on_while_idle = DT_PROP_OR(inst, on_while_idle, false), \ + }, + +#define INDICATOR_LED_DEVICE(n) \ + DT_INST_FOREACH_CHILD(n, DEFINE_CHILD_LEDS) \ + \ + static const struct indicator_led_child_config indicator_led_children_##n[] = { \ + DT_INST_FOREACH_CHILD(n, CHILD_CONFIG)}; \ + \ + static const struct indicator_led_config indicator_led_config_##n = { \ + .indicators_len = ARRAY_SIZE(indicator_led_children_##n), \ + .indicators = indicator_led_children_##n, \ + }; \ + \ + static struct indicator_led_data indicator_led_data_##n = { \ + .activity_state = ZMK_ACTIVITY_ACTIVE, \ + .indicators = 0, \ + .usb_powered = true, \ + .pm_suspended = false, \ + }; \ + \ + PM_DEVICE_DT_INST_DEFINE(n, indicator_led_init_pm_action); \ + \ + DEVICE_DT_INST_DEFINE(n, &indicator_led_init, PM_DEVICE_DT_INST_GET(n), \ + &indicator_led_data_##n, &indicator_led_config_##n, POST_KERNEL, \ + CONFIG_ZMK_INDICATOR_LEDS_INIT_PRIORITY, NULL); + +DT_INST_FOREACH_STATUS_OKAY(INDICATOR_LED_DEVICE); diff --git a/app/src/keymap.c b/app/src/keymap.c index dabe338d..547d6612 100644 --- a/app/src/keymap.c +++ b/app/src/keymap.c @@ -7,27 +7,23 @@ #include #include #include -#include #include LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include #include #include +#include #include #include #include -#include -#if ZMK_BLE_IS_CENTRAL -#include -#endif - #include #include #include #include +static zmk_keymap_layers_state_t _zmk_keymap_layer_locks = 0; static zmk_keymap_layers_state_t _zmk_keymap_layer_state = 0; static zmk_keymap_layer_id_t _zmk_keymap_layer_default = 0; @@ -40,11 +36,9 @@ static zmk_keymap_layer_id_t _zmk_keymap_layer_default = 0; #endif #define TRANSFORMED_LAYER(node) \ - { \ - COND_CODE_1( \ - DT_NODE_HAS_PROP(node, bindings), \ - (LISTIFY(DT_PROP_LEN(node, bindings), ZMK_KEYMAP_EXTRACT_BINDING, (, ), node)), ()) \ - } + {COND_CODE_1(DT_NODE_HAS_PROP(node, bindings), \ + (LISTIFY(DT_PROP_LEN(node, bindings), ZMK_KEYMAP_EXTRACT_BINDING, (, ), node)), \ + ())} #if ZMK_KEYMAP_HAS_SENSORS #define _TRANSFORM_SENSOR_ENTRY(idx, layer) \ @@ -79,27 +73,26 @@ static uint8_t keymap_layer_orders[ZMK_KEYMAP_LAYERS_LEN]; #endif // IS_ENABLED(CONFIG_ZMK_KEYMAP_LAYER_REORDERING) -#define KEYMAP_VAR(_name, _opts) \ +#define KEYMAP_VAR(_name, _opts, no_init) \ static _opts struct zmk_behavior_binding _name[ZMK_KEYMAP_LAYERS_LEN][ZMK_KEYMAP_LEN] = { \ - COND_CODE_1(IS_ENABLED(CONFIG_ZMK_STUDIO), \ - (DT_INST_FOREACH_CHILD_SEP(0, TRANSFORMED_LAYER, (, ))), \ - (DT_INST_FOREACH_CHILD_STATUS_OKAY_SEP(0, TRANSFORMED_LAYER, (, ))))}; + COND_CODE_0(no_init, (ZMK_KEYMAP_LAYERS_FOREACH_SEP(TRANSFORMED_LAYER, (, ))), (0))}; -KEYMAP_VAR(zmk_keymap, ) +KEYMAP_VAR(zmk_keymap, COND_CODE_1(IS_ENABLED(CONFIG_ZMK_KEYMAP_SETTINGS_STORAGE), (), (const)), + IS_ENABLED(CONFIG_ZMK_STUDIO)) #if IS_ENABLED(CONFIG_ZMK_KEYMAP_SETTINGS_STORAGE) -KEYMAP_VAR(zmk_stock_keymap, const) +KEYMAP_VAR(zmk_stock_keymap, const, 0) static char zmk_keymap_layer_names[ZMK_KEYMAP_LAYERS_LEN][CONFIG_ZMK_KEYMAP_LAYER_NAME_MAX_LEN] = { - DT_INST_FOREACH_CHILD_SEP(0, LAYER_NAME, (, ))}; + ZMK_KEYMAP_LAYERS_FOREACH_SEP(LAYER_NAME, (, ))}; static uint32_t changed_layer_names = 0; #else static const char *zmk_keymap_layer_names[ZMK_KEYMAP_LAYERS_LEN] = { - DT_INST_FOREACH_CHILD_SEP(0, LAYER_NAME, (, ))}; + ZMK_KEYMAP_LAYERS_FOREACH_SEP(LAYER_NAME, (, ))}; #endif @@ -138,7 +131,7 @@ uint8_t map_layer_id_to_index(zmk_keymap_layer_id_t layer_id) { #endif // IS_ENABLED(CONFIG_ZMK_KEYMAP_LAYER_REORDERING) -static inline int set_layer_state(zmk_keymap_layer_id_t layer_id, bool state) { +static inline int set_layer_state(zmk_keymap_layer_id_t layer_id, bool state, bool locking) { int ret = 0; if (layer_id >= ZMK_KEYMAP_LAYERS_LEN) { return -EINVAL; @@ -149,12 +142,22 @@ static inline int set_layer_state(zmk_keymap_layer_id_t layer_id, bool state) { return 0; } + // Non-forcing disables should not change a locked active layer + if (!locking && !state && (_zmk_keymap_layer_locks & BIT(layer_id))) { + return ret; + } + zmk_keymap_layers_state_t old_state = _zmk_keymap_layer_state; + zmk_keymap_layers_state_t old_locks = _zmk_keymap_layer_locks; WRITE_BIT(_zmk_keymap_layer_state, layer_id, state); + if (locking) { + WRITE_BIT(_zmk_keymap_layer_locks, layer_id, state); + } // Don't send state changes unless there was an actual change - if (old_state != _zmk_keymap_layer_state) { - LOG_DBG("layer_changed: layer %d state %d", layer_id, state); - ret = raise_layer_state_changed(layer_id, state); + if (old_state != _zmk_keymap_layer_state || old_locks != _zmk_keymap_layer_locks) { + LOG_DBG("layer_changed: layer %d state %d locked %d", layer_id, state, locking); + + ret = raise_layer_state_changed(layer_id, state, locking); if (ret < 0) { LOG_WRN("Failed to raise layer state changed (%d)", ret); } @@ -173,6 +176,8 @@ zmk_keymap_layer_id_t zmk_keymap_layer_default(void) { return _zmk_keymap_layer_ zmk_keymap_layers_state_t zmk_keymap_layer_state(void) { return _zmk_keymap_layer_state; } +zmk_keymap_layers_state_t zmk_keymap_layer_locks(void) { return _zmk_keymap_layer_locks; } + bool zmk_keymap_layer_active_with_state(zmk_keymap_layer_id_t layer, zmk_keymap_layers_state_t state_to_test) { // The default layer is assumed to be ALWAYS ACTIVE so we include an || here to ensure nobody @@ -184,35 +189,48 @@ bool zmk_keymap_layer_active(zmk_keymap_layer_id_t layer) { return zmk_keymap_layer_active_with_state(layer, _zmk_keymap_layer_state); }; -zmk_keymap_layer_id_t zmk_keymap_highest_layer_active(void) { - for (uint8_t layer = ZMK_KEYMAP_LAYERS_LEN - 1; layer > 0; layer--) { - if (zmk_keymap_layer_active(layer)) { - return layer; - } - } - return zmk_keymap_layer_default(); +bool zmk_keymap_layer_locked(zmk_keymap_layer_id_t layer) { + return zmk_keymap_layer_active_with_state(layer, _zmk_keymap_layer_locks); } -int zmk_keymap_layer_activate(zmk_keymap_layer_id_t layer) { return set_layer_state(layer, true); }; +zmk_keymap_layer_index_t zmk_keymap_highest_layer_active(void) { + for (int layer_idx = ZMK_KEYMAP_LAYERS_LEN - 1; + layer_idx >= LAYER_ID_TO_INDEX(_zmk_keymap_layer_default); layer_idx--) { + zmk_keymap_layer_id_t layer_id = LAYER_INDEX_TO_ID(layer_idx); -int zmk_keymap_layer_deactivate(zmk_keymap_layer_id_t layer) { - return set_layer_state(layer, false); -}; - -int zmk_keymap_layer_toggle(zmk_keymap_layer_id_t layer) { - if (zmk_keymap_layer_active(layer)) { - return zmk_keymap_layer_deactivate(layer); + if (layer_id == ZMK_KEYMAP_LAYER_ID_INVAL) { + continue; + } + if (zmk_keymap_layer_active(layer_id)) { + return LAYER_ID_TO_INDEX(layer_id); + } } - return zmk_keymap_layer_activate(layer); + return LAYER_ID_TO_INDEX(zmk_keymap_layer_default()); +} + +int zmk_keymap_layer_activate(zmk_keymap_layer_id_t layer, bool locking) { + return set_layer_state(layer, true, locking); }; -int zmk_keymap_layer_to(zmk_keymap_layer_id_t layer) { +int zmk_keymap_layer_deactivate(zmk_keymap_layer_id_t layer, bool locking) { + return set_layer_state(layer, false, locking); +}; + +int zmk_keymap_layer_toggle(zmk_keymap_layer_id_t layer, bool locking) { + if (zmk_keymap_layer_active(layer) && (!locking || zmk_keymap_layer_locked(layer))) { + return zmk_keymap_layer_deactivate(layer, locking); + } + + return zmk_keymap_layer_activate(layer, locking); +}; + +int zmk_keymap_layer_to(zmk_keymap_layer_id_t layer, bool locking) { for (int i = ZMK_KEYMAP_LAYERS_LEN - 1; i >= 0; i--) { - zmk_keymap_layer_deactivate(i); + zmk_keymap_layer_deactivate(i, locking); } - zmk_keymap_layer_activate(layer); + zmk_keymap_layer_activate(layer, locking); return 0; } @@ -224,14 +242,33 @@ const char *zmk_keymap_layer_name(zmk_keymap_layer_id_t layer_id) { } const struct zmk_behavior_binding * -zmk_keymap_get_layer_binding_at_idx(zmk_keymap_layer_id_t layer_id, uint8_t binding_idx) { +zmk_keymap_get_layer_binding_at_idx(zmk_keymap_layer_id_t layer_id, uint16_t binding_idx) { if (binding_idx >= ZMK_KEYMAP_LEN) { return NULL; } ASSERT_LAYER_VAL(layer_id, NULL) - return &zmk_keymap[layer_id][binding_idx]; + const uint32_t *pos_map; + int ret = zmk_physical_layouts_get_selected_to_stock_position_map(&pos_map); + if (ret < 0) { + LOG_WRN("Failed to get the position map, can't find the right binding to return (%d)", ret); + return NULL; + } + + if (binding_idx >= ret) { + LOG_WRN("Can't return binding for unmapped binding index %d", binding_idx); + return NULL; + } + + uint32_t mapped_idx = pos_map[binding_idx]; + + if (mapped_idx >= ZMK_KEYMAP_LEN) { + LOG_WRN("Binding index %d mapped to an invalid key position %d", binding_idx, mapped_idx); + return NULL; + } + + return &zmk_keymap[layer_id][mapped_idx]; } #if IS_ENABLED(CONFIG_ZMK_KEYMAP_SETTINGS_STORAGE) @@ -240,9 +277,7 @@ zmk_keymap_get_layer_binding_at_idx(zmk_keymap_layer_id_t layer_id, uint8_t bind static uint8_t zmk_keymap_layer_pending_changes[ZMK_KEYMAP_LAYERS_LEN][PENDING_ARRAY_SIZE]; -#endif // IS_ENABLED(CONFIG_ZMK_KEYMAP_SETTINGS_STORAGE) - -int zmk_keymap_set_layer_binding_at_idx(zmk_keymap_layer_id_t layer_id, uint8_t binding_idx, +int zmk_keymap_set_layer_binding_at_idx(zmk_keymap_layer_id_t layer_id, uint16_t binding_idx, struct zmk_behavior_binding binding) { if (binding_idx >= ZMK_KEYMAP_LEN) { return -EINVAL; @@ -250,18 +285,49 @@ int zmk_keymap_set_layer_binding_at_idx(zmk_keymap_layer_id_t layer_id, uint8_t ASSERT_LAYER_VAL(layer_id, -EINVAL) -#if IS_ENABLED(CONFIG_ZMK_KEYMAP_SETTINGS_STORAGE) + const uint32_t *pos_map; + int ret = zmk_physical_layouts_get_selected_to_stock_position_map(&pos_map); + if (ret < 0) { + LOG_WRN("Failed to get the mapping to determine where to set the binding (%d)", ret); + return ret; + } + + if (binding_idx >= ret) { + LOG_WRN("Unable to set binding at index %d which isn't mapped", binding_idx); + return -EINVAL; + } + + uint32_t storage_binding_idx = pos_map[binding_idx]; + + if (storage_binding_idx >= ZMK_KEYMAP_LEN) { + LOG_WRN("Can't set layer binding at unmapped/invalid index %d", binding_idx); + return -EINVAL; + } + + if (memcmp(&zmk_keymap[layer_id][storage_binding_idx], &binding, sizeof(binding)) == 0) { + LOG_DBG("Not setting, no change to layer %d at index %d (%d)", layer_id, binding_idx, + storage_binding_idx); + return 0; + } + uint8_t *pending = zmk_keymap_layer_pending_changes[layer_id]; - WRITE_BIT(pending[binding_idx / 8], binding_idx % 8, 1); -#endif // IS_ENABLED(CONFIG_ZMK_KEYMAP_SETTINGS_STORAGE) + WRITE_BIT(pending[storage_binding_idx / 8], storage_binding_idx % 8, 1); // TODO: Need a mutex to protect access to the keymap data? - memcpy(&zmk_keymap[layer_id][binding_idx], &binding, sizeof(binding)); + memcpy(&zmk_keymap[layer_id][storage_binding_idx], &binding, sizeof(binding)); return 0; } +#else + +int zmk_keymap_set_layer_binding_at_idx(zmk_keymap_layer_id_t layer_id, uint16_t binding_idx, + struct zmk_behavior_binding binding) { + return -ENOTSUP; +} + +#endif // IS_ENABLED(CONFIG_ZMK_KEYMAP_SETTINGS_STORAGE) #if IS_ENABLED(CONFIG_ZMK_KEYMAP_LAYER_REORDERING) #if IS_ENABLED(CONFIG_ZMK_KEYMAP_SETTINGS_STORAGE) @@ -429,15 +495,17 @@ int zmk_keymap_check_unsaved_changes(void) { #define LAYER_NAME_SETTINGS_KEY "keymap/l_n/%d" #define LAYER_BINDING_SETTINGS_KEY "keymap/l/%d/%d" -static void save_bindings(void) { +static int save_bindings(void) { for (int l = 0; l < ZMK_KEYMAP_LAYERS_LEN; l++) { uint8_t *pending = zmk_keymap_layer_pending_changes[l]; for (int kp = 0; kp < ZMK_KEYMAP_LEN; kp++) { if (pending[kp / 8] & BIT(kp % 8)) { - LOG_DBG("Pending save for layer %d at key position %d", l, kp); - struct zmk_behavior_binding *binding = &zmk_keymap[l][kp]; + const struct zmk_behavior_binding *binding = &zmk_keymap[l][kp]; + LOG_DBG("Pending save for layer %d at key position %d: %s with %d, %d", l, kp, + binding->behavior_dev, binding->param1, binding->param2); + struct zmk_behavior_binding_setting binding_setting = { .behavior_local_id = zmk_behavior_get_local_id(binding->behavior_dev), .param1 = binding->param1, @@ -458,45 +526,64 @@ static void save_bindings(void) { char setting_name[20]; sprintf(setting_name, LAYER_BINDING_SETTINGS_KEY, l, kp); - settings_save_one(setting_name, &binding_setting, len); + int ret = settings_save_one(setting_name, &binding_setting, len); + if (ret < 0) { + LOG_ERR("Failed to save keymap binding at %d on layer %d (%d)", l, kp, ret); + return ret; + } + + WRITE_BIT(pending[kp / 8], kp % 8, 0); } } - - *pending = 0; } + + return 0; } #if IS_ENABLED(CONFIG_ZMK_KEYMAP_LAYER_REORDERING) -static void save_layer_orders(void) { - settings_save_one(LAYER_ORDER_SETTINGS_KEY, keymap_layer_orders, - ARRAY_SIZE(keymap_layer_orders)); +static int save_layer_orders(void) { + int ret = settings_save_one(LAYER_ORDER_SETTINGS_KEY, keymap_layer_orders, + ARRAY_SIZE(keymap_layer_orders)); + if (ret < 0) { + return ret; + } + memcpy(settings_layer_orders, keymap_layer_orders, ARRAY_SIZE(keymap_layer_orders)); + return 0; } #endif // IS_ENABLED(CONFIG_ZMK_KEYMAP_LAYER_REORDERING) -static void save_layer_names(void) { +static int save_layer_names(void) { for (int id = 0; id < ZMK_KEYMAP_LAYERS_LEN; id++) { if (changed_layer_names & BIT(id)) { char setting_name[14]; sprintf(setting_name, LAYER_NAME_SETTINGS_KEY, id); - settings_save_one(setting_name, zmk_keymap_layer_names[id], - strlen(zmk_keymap_layer_names[id])); + int ret = settings_save_one(setting_name, zmk_keymap_layer_names[id], + strlen(zmk_keymap_layer_names[id])); + if (ret < 0) { + return ret; + } } } changed_layer_names = 0; + return 0; } int zmk_keymap_save_changes(void) { - save_bindings(); + int ret = save_bindings(); + if (ret < 0) { + return ret; + } #if IS_ENABLED(CONFIG_ZMK_KEYMAP_LAYER_REORDERING) - save_layer_orders(); + ret = save_layer_orders(); + if (ret < 0) { + return ret; + } #endif // IS_ENABLED(CONFIG_ZMK_KEYMAP_LAYER_REORDERING) - save_layer_names(); - - return 0; + return save_layer_names(); } #if IS_ENABLED(CONFIG_ZMK_KEYMAP_LAYER_REORDERING) @@ -540,22 +627,58 @@ int zmk_keymap_discard_changes(void) { return ret; } +static int keymap_track_changed_bindings(const char *key, size_t len, settings_read_cb read_cb, + void *cb_arg, void *param) { + const char *next; + if (settings_name_steq(key, "l", &next) && next) { + uint8_t(*state)[ZMK_KEYMAP_LAYERS_LEN][PENDING_ARRAY_SIZE] = + (uint8_t(*)[ZMK_KEYMAP_LAYERS_LEN][PENDING_ARRAY_SIZE])param; + char *endptr; + uint8_t layer = strtoul(next, &endptr, 10); + if (*endptr != '/') { + LOG_WRN("Invalid layer number: %s with endptr %s", next, endptr); + return -EINVAL; + } + + uint8_t key_position = strtoul(endptr + 1, &endptr, 10); + + if (*endptr != '\0') { + LOG_WRN("Invalid key_position number: %s with endptr %s", next, endptr); + return -EINVAL; + } + + WRITE_BIT((*state)[layer][key_position / 8], key_position % 8, 1); + } + return 0; +} + int zmk_keymap_reset_settings(void) { settings_delete(LAYER_ORDER_SETTINGS_KEY); + + uint8_t zmk_keymap_layer_changes[ZMK_KEYMAP_LAYERS_LEN][PENDING_ARRAY_SIZE]; + + settings_load_subtree_direct("keymap", keymap_track_changed_bindings, + &zmk_keymap_layer_changes); + for (int l = 0; l < ZMK_KEYMAP_LAYERS_LEN; l++) { char layer_name_setting_name[14]; sprintf(layer_name_setting_name, LAYER_NAME_SETTINGS_KEY, l); settings_delete(layer_name_setting_name); + uint8_t *changes = zmk_keymap_layer_changes[l]; + for (int k = 0; k < ZMK_KEYMAP_LEN; k++) { if (memcmp(&zmk_keymap[l][k], &zmk_stock_keymap[l][k], sizeof(struct zmk_behavior_binding_setting)) == 0) { continue; } - char setting_name[20]; - sprintf(setting_name, LAYER_BINDING_SETTINGS_KEY, l, k); - settings_delete(setting_name); + if (changes[k / 8] & BIT(k % 8)) { + LOG_WRN("CLEAR %d on %d layer", k, l); + char setting_name[20]; + sprintf(setting_name, LAYER_BINDING_SETTINGS_KEY, l, k); + settings_delete(setting_name); + } } } @@ -576,76 +699,23 @@ int zmk_keymap_reset_settings(void) { return -ENOTSUP; } #endif // IS_ENABLED(CONFIG_ZMK_KEYMAP_SETTINGS_STORAGE) -int invoke_locally(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event, - bool pressed) { - if (pressed) { - return behavior_keymap_binding_pressed(binding, event); - } else { - return behavior_keymap_binding_released(binding, event); - } -} - int zmk_keymap_apply_position_state(uint8_t source, zmk_keymap_layer_id_t layer_id, uint32_t position, bool pressed, int64_t timestamp) { - // We want to make a copy of this, since it may be converted from - // relative to absolute before being invoked - - ASSERT_LAYER_VAL(layer_id, -EINVAL); - - struct zmk_behavior_binding binding = zmk_keymap[layer_id][position]; - const struct device *behavior; + const struct zmk_behavior_binding *binding = + zmk_keymap_get_layer_binding_at_idx(layer_id, position); struct zmk_behavior_binding_event event = { .layer = layer_id, .position = position, .timestamp = timestamp, +#if IS_ENABLED(CONFIG_ZMK_SPLIT) + .source = source, +#endif }; LOG_DBG("layer_id: %d position: %d, binding name: %s", layer_id, position, - binding.behavior_dev); + binding->behavior_dev); - behavior = zmk_behavior_get_binding(binding.behavior_dev); - - if (!behavior) { - LOG_WRN("No behavior assigned to %d on layer %d", position, layer_id); - return 1; - } - - int err = behavior_keymap_binding_convert_central_state_dependent_params(&binding, event); - if (err) { - LOG_ERR("Failed to convert relative to absolute behavior binding (err %d)", err); - return err; - } - - enum behavior_locality locality = BEHAVIOR_LOCALITY_CENTRAL; - err = behavior_get_locality(behavior, &locality); - if (err) { - LOG_ERR("Failed to get behavior locality %d", err); - return err; - } - - switch (locality) { - case BEHAVIOR_LOCALITY_CENTRAL: - return invoke_locally(&binding, event, pressed); - case BEHAVIOR_LOCALITY_EVENT_SOURCE: -#if ZMK_BLE_IS_CENTRAL - if (source == ZMK_POSITION_STATE_CHANGE_SOURCE_LOCAL) { - return invoke_locally(&binding, event, pressed); - } else { - return zmk_split_bt_invoke_behavior(source, &binding, event, pressed); - } -#else - return invoke_locally(&binding, event, pressed); -#endif - case BEHAVIOR_LOCALITY_GLOBAL: -#if ZMK_BLE_IS_CENTRAL - for (int i = 0; i < ZMK_SPLIT_BLE_PERIPHERAL_COUNT; i++) { - zmk_split_bt_invoke_behavior(i, &binding, event, pressed); - } -#endif - return invoke_locally(&binding, event, pressed); - } - - return -ENOTSUP; + return zmk_behavior_invoke_binding(binding, event, pressed); } int zmk_keymap_position_state_changed(uint8_t source, uint32_t position, bool pressed, @@ -789,12 +859,14 @@ static int keymap_handle_set(const char *name, size_t len, settings_read_cb read LOG_WRN("Found layer name for invalid layer ID %d", layer); } - int err = read_cb(cb_arg, zmk_keymap_layer_names[layer], + int ret = read_cb(cb_arg, zmk_keymap_layer_names[layer], MIN(len, CONFIG_ZMK_KEYMAP_LAYER_NAME_MAX_LEN - 1)); - if (err <= 0) { - LOG_ERR("Failed to handle keymap layer name from settings (err %d)", err); - return err; + if (ret <= 0) { + LOG_ERR("Failed to handle keymap layer name from settings (err %d)", ret); + return ret; } + + zmk_keymap_layer_names[layer][ret] = 0; } else if (settings_name_steq(name, "l", &next) && next) { char *endptr; uint8_t layer = strtoul(next, &endptr, 10); @@ -841,11 +913,12 @@ static int keymap_handle_set(const char *name, size_t len, settings_read_cb read binding_setting.behavior_local_id); } - zmk_keymap[layer][key_position] = (struct zmk_behavior_binding) { + zmk_keymap[layer][key_position] = (struct zmk_behavior_binding){ #if IS_ENABLED(CONFIG_ZMK_BEHAVIOR_LOCAL_IDS_IN_BINDINGS) .local_id = binding_setting.behavior_local_id, #endif - .behavior_dev = name, .param1 = binding_setting.param1, + .behavior_dev = name, + .param1 = binding_setting.param1, .param2 = binding_setting.param2, }; } @@ -900,6 +973,9 @@ int keymap_init(void) { #if IS_ENABLED(CONFIG_ZMK_KEYMAP_LAYER_REORDERING) load_stock_keymap_layer_ordering(); #endif +#if IS_ENABLED(CONFIG_ZMK_STUDIO) + reload_from_stock_keymap(); +#endif return 0; } diff --git a/app/src/kscan_sideband_behaviors.c b/app/src/kscan_sideband_behaviors.c index 602cae12..eab7f043 100644 --- a/app/src/kscan_sideband_behaviors.c +++ b/app/src/kscan_sideband_behaviors.c @@ -111,6 +111,9 @@ static int ksbb_enable(const struct device *dev) { pm_device_runtime_get(config->kscan); } #elif IS_ENABLED(CONFIG_PM_DEVICE) + if (pm_device_wakeup_is_capable(config->kscan)) { + pm_device_wakeup_enable(config->kscan, true); + } pm_device_action_run(config->kscan, PM_DEVICE_ACTION_RESUME); #endif // IS_ENABLED(CONFIG_PM_DEVICE) @@ -132,6 +135,10 @@ static int ksbb_disable(const struct device *dev) { pm_device_runtime_put(config->kscan); } #elif IS_ENABLED(CONFIG_PM_DEVICE) + if (pm_device_wakeup_is_capable(config->kscan) && !pm_device_wakeup_is_enabled(dev) && + pm_device_wakeup_is_enabled(config->kscan)) { + pm_device_wakeup_enable(config->kscan, false); + } pm_device_action_run(config->kscan, PM_DEVICE_ACTION_SUSPEND); #endif // IS_ENABLED(CONFIG_PM_DEVICE) @@ -161,16 +168,11 @@ static int ksbb_init(const struct device *dev) { return -ENODEV; } - if (config->auto_enable) { -#if !IS_ENABLED(CONFIG_PM_DEVICE) - kscan_config(config->kscan, &ksbb_inner_kscan_callback); - kscan_enable_callback(config->kscan); -#else - ksbb_pm_action(dev, PM_DEVICE_ACTION_RESUME); - } else { +#if IS_ENABLED(CONFIG_PM_DEVICE) + if (!config->auto_enable) { pm_device_init_suspended(dev); -#endif } +#endif return 0; } @@ -183,11 +185,22 @@ static const struct kscan_driver_api ksbb_api = { #define ENTRY(e) \ { \ - .row = DT_PROP(e, row), .column = DT_PROP(e, column), \ + .row = DT_PROP(e, row), \ + .column = DT_PROP(e, column), \ .binding = ZMK_KEYMAP_EXTRACT_BINDING(0, e), \ } #define KSBB_INST(n) \ + COND_CODE_1(DT_INST_PROP_OR(n, auto_enable, false), (static int ksbb_auto_enable_##n(void) { \ + const struct device *dev = DEVICE_DT_GET(DT_DRV_INST(n)); \ + COND_CODE_1(IS_ENABLED(CONFIG_PM_DEVICE), \ + (ksbb_pm_action(dev, PM_DEVICE_ACTION_RESUME);), \ + (const struct ksbb_config *config = dev->config; \ + kscan_config(config->kscan, &ksbb_inner_kscan_callback); \ + kscan_enable_callback(config->kscan);)) \ + return 0; \ + } SYS_INIT(ksbb_auto_enable_##n, APPLICATION, CONFIG_APPLICATION_INIT_PRIORITY);), \ + ()) \ static struct ksbb_entry entries_##n[] = { \ DT_INST_FOREACH_CHILD_STATUS_OKAY_SEP(n, ENTRY, (, ))}; \ const struct ksbb_config ksbb_config_##n = { \ diff --git a/app/src/main.c b/app/src/main.c index 60df1a45..0f77382a 100644 --- a/app/src/main.c +++ b/app/src/main.c @@ -12,7 +12,12 @@ #include LOG_MODULE_REGISTER(zmk, CONFIG_ZMK_LOG_LEVEL); +#if IS_ENABLED(CONFIG_ZMK_DISPLAY) + #include +#include + +#endif int main(void) { LOG_INF("Welcome to ZMK!\n"); @@ -24,6 +29,16 @@ int main(void) { #ifdef CONFIG_ZMK_DISPLAY zmk_display_init(); + +#if IS_ENABLED(CONFIG_ARCH_POSIX) + // Workaround for an SDL display issue: + // https://github.com/zephyrproject-rtos/zephyr/issues/71410 + while (1) { + lv_task_handler(); + k_sleep(K_MSEC(10)); + } +#endif + #endif /* CONFIG_ZMK_DISPLAY */ return 0; diff --git a/app/src/mouse.c b/app/src/mouse.c deleted file mode 100644 index c1b9ac02..00000000 --- a/app/src/mouse.c +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) 2021 The ZMK Contributors - * - * SPDX-License-Identifier: MIT - */ - -#include -#include - -LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); - -#include -#include -#include -#include - -static void listener_mouse_button_pressed(const struct zmk_mouse_button_state_changed *ev) { - LOG_DBG("buttons: 0x%02X", ev->buttons); - zmk_hid_mouse_buttons_press(ev->buttons); - zmk_endpoints_send_mouse_report(); -} - -static void listener_mouse_button_released(const struct zmk_mouse_button_state_changed *ev) { - LOG_DBG("buttons: 0x%02X", ev->buttons); - zmk_hid_mouse_buttons_release(ev->buttons); - zmk_endpoints_send_mouse_report(); -} - -int mouse_listener(const zmk_event_t *eh) { - const struct zmk_mouse_button_state_changed *mbt_ev = as_zmk_mouse_button_state_changed(eh); - if (mbt_ev) { - if (mbt_ev->state) { - listener_mouse_button_pressed(mbt_ev); - } else { - listener_mouse_button_released(mbt_ev); - } - return 0; - } - return 0; -} - -ZMK_LISTENER(mouse_listener, mouse_listener); -ZMK_SUBSCRIPTION(mouse_listener, zmk_mouse_button_state_changed); diff --git a/app/src/physical_layouts.c b/app/src/physical_layouts.c index 00cfa29e..ba21ae31 100644 --- a/app/src/physical_layouts.c +++ b/app/src/physical_layouts.c @@ -9,6 +9,7 @@ #include #include #include +#include #if IS_ENABLED(CONFIG_SETTINGS) #include @@ -18,13 +19,37 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); +#include #include #include #include +ZMK_EVENT_IMPL(zmk_physical_layout_selection_changed); + #define DT_DRV_COMPAT zmk_physical_layout -#if DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) +#define MATRIX_INPUT_SUPPORT \ + UTIL_AND(IS_ENABLED(CONFIG_INPUT), \ + UTIL_OR(DT_ANY_INST_HAS_PROP_STATUS_OKAY(input), DT_HAS_CHOSEN(zmk_matrix_input))) + +#if MATRIX_INPUT_SUPPORT + +static void zmk_physical_layout_input_event_cb(struct input_event *evt, void *user_data); + +#endif + +#define USE_PHY_LAYOUTS \ + (DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) && !DT_HAS_CHOSEN(zmk_matrix_transform)) + +BUILD_ASSERT( + !IS_ENABLED(CONFIG_ZMK_STUDIO) || USE_PHY_LAYOUTS, + "ISSUE FOUND: Keyboards require additional configuration to allow for firmware with ZMK " + "Studio enabled. You have attempted to build a keyboard lacking such configuration. Please see " + "https://zmk.dev/docs/features/studio#adding-zmk-studio-support-to-a-keyboard for " + "more information on how to resolve this error, or contact the maintainer of your keyboard's " + "firmware for assistance."); + +#if USE_PHY_LAYOUTS #define ZKPA_INIT(i, n) \ (const struct zmk_key_physical_attrs) { \ @@ -32,24 +57,42 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); .height = (int16_t)(int32_t)DT_INST_PHA_BY_IDX(n, keys, i, height), \ .x = (int16_t)(int32_t)DT_INST_PHA_BY_IDX(n, keys, i, x), \ .y = (int16_t)(int32_t)DT_INST_PHA_BY_IDX(n, keys, i, y), \ - .rx = (int16_t)(int32_t)DT_INST_PHA_BY_IDX(n, keys, i, rx), \ - .ry = (int16_t)(int32_t)DT_INST_PHA_BY_IDX(n, keys, i, ry), \ - .r = (int16_t)(int32_t)DT_INST_PHA_BY_IDX(n, keys, i, r), \ + COND_CODE_1(IS_ENABLED(CONFIG_ZMK_PHYSICAL_LAYOUT_KEY_ROTATION), \ + (.rx = (int16_t)(int32_t)DT_INST_PHA_BY_IDX(n, keys, i, rx), \ + .ry = (int16_t)(int32_t)DT_INST_PHA_BY_IDX(n, keys, i, ry), \ + .r = (int16_t)(int32_t)DT_INST_PHA_BY_IDX(n, keys, i, r), ), \ + ()) \ } +#define INPUT_FOR_INST(n) \ + DEVICE_DT_GET(COND_CODE_1(DT_INST_PROP_LEN(n, input), (DT_INST_PHANDLE(n, input)), \ + (DT_CHOSEN(zmk_matrix_input)))) + #define ZMK_LAYOUT_INST(n) \ - static const struct zmk_key_physical_attrs const _CONCAT( \ - _zmk_physical_layout_keys_, n)[DT_INST_PROP_LEN_OR(n, keys, 0)] = { \ + BUILD_ASSERT(!IS_ENABLED(CONFIG_ZMK_STUDIO) || DT_INST_NODE_HAS_PROP(n, keys), \ + "ZMK Studio requires physical layouts with key positions. See " \ + "https://zmk.dev/docs/hardware-integration/studio-setup"); \ + static const struct zmk_key_physical_attrs _CONCAT(_zmk_physical_layout_keys_, \ + n)[DT_INST_PROP_LEN_OR(n, keys, 0)] = { \ LISTIFY(DT_INST_PROP_LEN_OR(n, keys, 0), ZKPA_INIT, (, ), n)}; \ ZMK_MATRIX_TRANSFORM_EXTERN(DT_INST_PHANDLE(n, transform)); \ - static const struct zmk_physical_layout const _CONCAT(_zmk_physical_layout_, \ - DT_DRV_INST(n)) = { \ + static const struct zmk_physical_layout _CONCAT(_zmk_physical_layout_, DT_DRV_INST(n)) = { \ .display_name = DT_INST_PROP_OR(n, display_name, "Layout #" #n), \ .matrix_transform = ZMK_MATRIX_TRANSFORM_T_FOR_NODE(DT_INST_PHANDLE(n, transform)), \ .keys = _CONCAT(_zmk_physical_layout_keys_, n), \ .keys_len = DT_INST_PROP_LEN_OR(n, keys, 0), \ - .kscan = DEVICE_DT_GET(COND_CODE_1(DT_INST_PROP_LEN(n, kscan), \ - (DT_INST_PHANDLE(n, kscan)), (DT_CHOSEN(zmk_kscan))))}; + COND_CODE_1(UTIL_AND(MATRIX_INPUT_SUPPORT, DT_INST_PROP_LEN(n, input)), \ + (.input = INPUT_FOR_INST(n)), ()) \ + COND_CODE_1(UTIL_OR(DT_HAS_CHOSEN(zmk_kscan), DT_INST_PROP_LEN(n, kscan)), \ + (.kscan = DEVICE_DT_GET(COND_CODE_1(DT_INST_PROP_LEN(n, kscan), \ + (DT_INST_PHANDLE(n, kscan)), \ + (DT_CHOSEN(zmk_kscan))))), \ + ())}; \ + COND_CODE_1( \ + UTIL_AND(MATRIX_INPUT_SUPPORT, DT_INST_PROP_LEN(n, input)), \ + (INPUT_CALLBACK_DEFINE(INPUT_FOR_INST(n), zmk_physical_layout_input_event_cb, \ + (void *)&(_CONCAT(_zmk_physical_layout_, DT_DRV_INST(n))));), \ + ()) DT_INST_FOREACH_STATUS_OKAY(ZMK_LAYOUT_INST) @@ -81,7 +124,8 @@ DT_FOREACH_CHILD_SEP(DT_INST(0, POS_MAP_COMPAT), ZMK_POS_MAP_LEN_CHECK, (;)); #define ZMK_POS_MAP_ENTRY(node_id) \ { \ .layout = COND_CODE_1( \ - DT_HAS_COMPAT_STATUS_OKAY(DT_PHANDLE(node_id, physical_layout)), \ + UTIL_AND(DT_NODE_HAS_COMPAT(DT_PHANDLE(node_id, physical_layout), DT_DRV_COMPAT), \ + DT_NODE_HAS_STATUS(DT_PHANDLE(node_id, physical_layout), okay)), \ (&_CONCAT(_zmk_physical_layout_, DT_PHANDLE(node_id, physical_layout))), (NULL)), \ .positions = DT_PROP(node_id, positions), \ } @@ -98,6 +142,13 @@ static const struct zmk_physical_layout *const layouts[] = { #elif DT_HAS_CHOSEN(zmk_matrix_transform) +#if DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) + +#warning \ + "Ignoring the physical layouts and using the chosen matrix transform. Consider setting a chosen physical layout instead." + +#endif + ZMK_MATRIX_TRANSFORM_EXTERN(DT_CHOSEN(zmk_matrix_transform)); static const struct zmk_physical_layout _CONCAT(_zmk_physical_layout_, chosen) = { @@ -108,15 +159,32 @@ static const struct zmk_physical_layout _CONCAT(_zmk_physical_layout_, chosen) = static const struct zmk_physical_layout *const layouts[] = { &_CONCAT(_zmk_physical_layout_, chosen)}; -#elif DT_HAS_CHOSEN(zmk_kscan) +#elif UTIL_OR(DT_HAS_CHOSEN(zmk_kscan), DT_HAS_CHOSEN(zmk_matrix_input)) + +#if DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) + +#warning \ + "Ignoring the physical layouts and using the chosen kscan/matrix-input with a synthetic transform. Consider setting a chosen physical layout instead." + +#endif ZMK_MATRIX_TRANSFORM_DEFAULT_EXTERN(); static const struct zmk_physical_layout _CONCAT(_zmk_physical_layout_, chosen) = { .display_name = "Default", .matrix_transform = &zmk_matrix_transform_default, +#if DT_HAS_CHOSEN(zmk_matrix_input) + .input = DEVICE_DT_GET(DT_CHOSEN(zmk_matrix_input)), +#elif DT_HAS_CHOSEN(zmk_kscan) .kscan = DEVICE_DT_GET(DT_CHOSEN(zmk_kscan)), +#endif }; +#if DT_HAS_CHOSEN(zmk_matrix_input) +INPUT_CALLBACK_DEFINE(DEVICE_DT_GET(DT_CHOSEN(zmk_matrix_input)), + zmk_physical_layout_input_event_cb, + (void *)&(_CONCAT(_zmk_physical_layout_, chosen))); +#endif + static const struct zmk_physical_layout *const layouts[] = { &_CONCAT(_zmk_physical_layout_, chosen)}; @@ -139,11 +207,62 @@ struct zmk_kscan_event { uint32_t state; }; -static struct zmk_kscan_msg_processor { struct k_work work; } msg_processor; +static struct zmk_kscan_msg_processor { + struct k_work work; +} msg_processor; K_MSGQ_DEFINE(physical_layouts_kscan_msgq, sizeof(struct zmk_kscan_event), CONFIG_ZMK_KSCAN_EVENT_QUEUE_SIZE, 4); +#if MATRIX_INPUT_SUPPORT + +static struct zmk_kscan_event pending_input_event; + +static void zmk_physical_layout_input_event_cb(struct input_event *evt, void *user_data) { + const struct zmk_physical_layout *layout = (const struct zmk_physical_layout *)user_data; + if (layout != active) { + LOG_WRN("Ignoring input event from non-active layout"); + return; + } + + switch (evt->type) { + case INPUT_EV_ABS: + switch (evt->code) { + case INPUT_ABS_X: + pending_input_event.column = evt->value; + break; + case INPUT_ABS_Y: + pending_input_event.row = evt->value; + break; + default: + LOG_WRN("Unknown abs code"); + return; + } + break; + case INPUT_EV_KEY: + switch (evt->code) { + case INPUT_BTN_TOUCH: + pending_input_event.state = + (evt->value ? ZMK_KSCAN_EVENT_STATE_PRESSED : ZMK_KSCAN_EVENT_STATE_RELEASED); + break; + default: + LOG_WRN("Unknown key code"); + return; + } + break; + default: + LOG_WRN("Unknown type"); + return; + } + + if (evt->sync) { + k_msgq_put(&physical_layouts_kscan_msgq, &pending_input_event, K_NO_WAIT); + k_work_submit(&msg_processor.work); + } +} + +#endif + static void zmk_physical_layout_kscan_callback(const struct device *dev, uint32_t row, uint32_t column, bool pressed) { if (dev != active->kscan) { @@ -183,6 +302,35 @@ static void zmk_physical_layouts_kscan_process_msgq(struct k_work *item) { } } +static const struct zmk_physical_layout *get_default_layout(void) { + const struct zmk_physical_layout *initial; + +#if USE_PHY_LAYOUTS && DT_HAS_CHOSEN(zmk_physical_layout) + initial = &_CONCAT(_zmk_physical_layout_, DT_CHOSEN(zmk_physical_layout)); +#else + initial = layouts[0]; +#endif + + return initial; +} + +static int get_index_of_layout(const struct zmk_physical_layout *layout) { + for (int i = 0; i < ARRAY_SIZE(layouts); i++) { + if (layouts[i] == layout) { + return i; + } + } + + return -ENODEV; +} + +static uint32_t selected_to_stock_map[ZMK_KEYMAP_LEN]; + +int zmk_physical_layouts_get_selected_to_stock_position_map(uint32_t const **map) { + *map = selected_to_stock_map; + return ZMK_KEYMAP_LEN; +} + int zmk_physical_layouts_select_layout(const struct zmk_physical_layout *dest_layout) { if (!dest_layout) { return -ENODEV; @@ -203,6 +351,15 @@ int zmk_physical_layouts_select_layout(const struct zmk_physical_layout *dest_la } } + int new_idx = get_index_of_layout(dest_layout); + int stock_idx = get_index_of_layout(get_default_layout()); + int ret = zmk_physical_layouts_get_position_map(stock_idx, new_idx, ZMK_KEYMAP_LEN, + selected_to_stock_map); + if (ret < 0) { + LOG_ERR("Failed to refresh the selected to stock mapping (%d)", ret); + return ret; + } + active = dest_layout; if (active->kscan) { @@ -227,7 +384,14 @@ int zmk_physical_layouts_select(uint8_t index) { return -EINVAL; } - return zmk_physical_layouts_select_layout(layouts[index]); + int ret = zmk_physical_layouts_select_layout(layouts[index]); + + if (ret >= 0) { + raise_zmk_physical_layout_selection_changed( + (struct zmk_physical_layout_selection_changed){.selection = index}); + } + + return ret; } int zmk_physical_layouts_get_selected(void) { @@ -247,15 +411,7 @@ static int8_t saved_selected_index = -1; #endif int zmk_physical_layouts_select_initial(void) { - const struct zmk_physical_layout *initial; - -#if DT_HAS_CHOSEN(zmk_physical_layout) - initial = &_CONCAT(_zmk_physical_layout_, DT_CHOSEN(zmk_physical_layout)); -#else - initial = layouts[0]; -#endif - - int ret = zmk_physical_layouts_select_layout(initial); + int ret = zmk_physical_layouts_select_layout(get_default_layout()); return ret; } @@ -289,6 +445,14 @@ int zmk_physical_layouts_get_position_map(uint8_t source, uint8_t dest, size_t m return -EINVAL; } + if (source == dest) { + for (int i = 0; i < map_size; i++) { + map[i] = i; + } + + return 0; + } + const struct zmk_physical_layout *src_layout = layouts[source]; const struct zmk_physical_layout *dest_layout = layouts[dest]; int max_kp = dest_layout->keys_len; @@ -391,14 +555,18 @@ static int zmk_physical_layouts_init(void) { #if IS_ENABLED(CONFIG_PM_DEVICE) for (int l = 0; l < ARRAY_SIZE(layouts); l++) { const struct zmk_physical_layout *pl = layouts[l]; - if (pl->kscan) { - if (pm_device_wakeup_is_capable(pl->kscan)) { - pm_device_wakeup_enable(pl->kscan, true); - } + if (pl->kscan && pm_device_wakeup_is_capable(pl->kscan) && + !pm_device_wakeup_enable(pl->kscan, true)) { + LOG_WRN("Failed to wakeup enable %s", pl->kscan->name); } } #endif // IS_ENABLED(CONFIG_PM_DEVICE) + // Initialize a sane mapping + for (int i = 0; i < ZMK_KEYMAP_LEN; i++) { + selected_to_stock_map[i] = i; + } + return zmk_physical_layouts_select_initial(); } diff --git a/app/src/pm.c b/app/src/pm.c index 447eb351..eaae3b5c 100644 --- a/app/src/pm.c +++ b/app/src/pm.c @@ -23,7 +23,7 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #ifdef CONFIG_ZMK_PM_DEVICE_SUSPEND_RESUME TYPE_SECTION_START_EXTERN(const struct device *, pm_device_slots); -#if !defined(CONFIG_PM_DEVICE_RUNTIME_EXCLUSIVE) +#if defined(CONFIG_PM_DEVICE_SYSTEM_MANAGED) /* Number of devices successfully suspended. */ static size_t zmk_num_susp; @@ -42,8 +42,8 @@ int zmk_pm_suspend_devices(void) { * Ignore uninitialized devices, busy devices, wake up sources, and * devices with runtime PM enabled. */ - if (!device_is_ready(dev) || pm_device_is_busy(dev) || pm_device_state_is_locked(dev) || - pm_device_wakeup_is_enabled(dev) || pm_device_runtime_is_enabled(dev)) { + if (!device_is_ready(dev) || pm_device_is_busy(dev) || pm_device_wakeup_is_enabled(dev) || + pm_device_runtime_is_enabled(dev)) { continue; } @@ -93,7 +93,7 @@ int zmk_pm_soft_off(void) { const struct device *devs; #if !IS_ENABLED(CONFIG_ZMK_SPLIT) || IS_ENABLED(CONFIG_ZMK_SPLIT_ROLE_CENTRAL) - zmk_endpoints_clear_current(); + zmk_endpoint_clear_reports(); // Need to sleep to give any other threads a chance so submit endpoint data. k_sleep(K_MSEC(100)); #endif diff --git a/app/src/pointing/CMakeLists.txt b/app/src/pointing/CMakeLists.txt new file mode 100644 index 00000000..8609277d --- /dev/null +++ b/app/src/pointing/CMakeLists.txt @@ -0,0 +1,11 @@ +# Copyright (c) 2024 The ZMK Contributors +# SPDX-License-Identifier: MIT + +target_sources_ifdef(CONFIG_ZMK_INPUT_LISTENER app PRIVATE input_listener.c) +target_sources_ifdef(CONFIG_ZMK_INPUT_PROCESSOR_TRANSFORM app PRIVATE input_processor_transform.c) +target_sources_ifdef(CONFIG_ZMK_INPUT_PROCESSOR_SCALER app PRIVATE input_processor_scaler.c) +target_sources_ifdef(CONFIG_ZMK_INPUT_PROCESSOR_TEMP_LAYER app PRIVATE input_processor_temp_layer.c) +target_sources_ifdef(CONFIG_ZMK_INPUT_PROCESSOR_CODE_MAPPER app PRIVATE input_processor_code_mapper.c) +target_sources_ifdef(CONFIG_ZMK_INPUT_PROCESSOR_BEHAVIORS app PRIVATE input_processor_behaviors.c) +target_sources_ifdef(CONFIG_ZMK_POINTING_SMOOTH_SCROLLING app PRIVATE resolution_multipliers.c) +target_sources_ifdef(CONFIG_ZMK_INPUT_SPLIT app PRIVATE input_split.c) diff --git a/app/src/pointing/Kconfig b/app/src/pointing/Kconfig new file mode 100644 index 00000000..fc91f144 --- /dev/null +++ b/app/src/pointing/Kconfig @@ -0,0 +1,90 @@ +# Copyright (c) 2024 The ZMK Contributors +# SPDX-License-Identifier: MIT + +menu "Pointing Options" + +# Deprecated old config, kept for backwards compat +config ZMK_MOUSE + bool "(Deprecated) Mouse Support" + +config ZMK_POINTING + bool "Pointing Device Support" + default y if ZMK_MOUSE + select INPUT + select INPUT_THREAD_PRIORITY_OVERRIDE + +if ZMK_POINTING + +# Needed for anyone using gpio-keys for things like soft-off setup. +config INPUT_GPIO_KEYS + default n + +config INPUT_THREAD_STACK_SIZE + default 1024 if ZMK_SPLIT && !ZMK_SPLIT_ROLE_CENTRAL + +if !ZMK_SPLIT || ZMK_SPLIT_ROLE_CENTRAL + +config ZMK_POINTING_SMOOTH_SCROLLING + bool "Smooth Scrolling" + help + Enable smooth scrolling, with hosts that support HID Resolution Multipliers + +config ZMK_INPUT_LISTENER + bool "Input listener for processing input events in the system" + default y + depends on DT_HAS_ZMK_INPUT_LISTENER_ENABLED + + +config ZMK_INPUT_PROCESSOR_TEMP_LAYER + bool "Temporary Layer Input Processor" + default y + depends on DT_HAS_ZMK_INPUT_PROCESSOR_TEMP_LAYER_ENABLED + +config ZMK_INPUT_PROCESSOR_TEMP_LAYER_MAX_ACTION_EVENTS + int "Temporary Layer Input Processor Max Action Events" + default 4 + depends on ZMK_INPUT_PROCESSOR_TEMP_LAYER + +endif + +config ZMK_INPUT_PROCESSOR_TRANSFORM + bool "Transform Input Processor" + default y + depends on DT_HAS_ZMK_INPUT_PROCESSOR_TRANSFORM_ENABLED + +config ZMK_INPUT_PROCESSOR_SCALER + bool "Scaling Input Processor" + default y + depends on DT_HAS_ZMK_INPUT_PROCESSOR_SCALER_ENABLED + +config ZMK_INPUT_PROCESSOR_CODE_MAPPER + bool "Code Mapper Input Processor" + default y + depends on DT_HAS_ZMK_INPUT_PROCESSOR_CODE_MAPPER_ENABLED + +config ZMK_INPUT_PROCESSOR_BEHAVIORS + bool "Behaviors Input Processor" + default y + depends on DT_HAS_ZMK_INPUT_PROCESSOR_BEHAVIORS_ENABLED + +config ZMK_INPUT_SPLIT + bool "Split input support" + default y + depends on DT_HAS_ZMK_INPUT_SPLIT_ENABLED && ZMK_SPLIT + +if ZMK_INPUT_SPLIT + +config ZMK_INPUT_SPLIT_INIT_PRIORITY + int "Input Split initialization priority" + default INPUT_INIT_PRIORITY + + +config ZMK_INPUT_SPLIT_MAX_TRACKED_KEYS + int "Input Split max tracked keys to release on peripheral disconnect" + default 5 + +endif # ZMK_INPUT_SPLIT + +endif # ZMK_POINTING + +endmenu # Mouse Options diff --git a/app/src/pointing/input_listener.c b/app/src/pointing/input_listener.c new file mode 100644 index 00000000..cd18f791 --- /dev/null +++ b/app/src/pointing/input_listener.c @@ -0,0 +1,408 @@ +/* + * Copyright (c) 2024 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#define DT_DRV_COMPAT zmk_input_listener + +#include +#include +#include +#include +#include + +LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); + +#include + +#include +#include +#include + +#if IS_ENABLED(CONFIG_ZMK_POINTING_SMOOTH_SCROLLING) +#include +#endif // IS_ENABLED(CONFIG_ZMK_POINTING_SMOOTH_SCROLLING) + +#include +#include + +#define ONE_IF_DEV_OK(n) \ + COND_CODE_1(DT_NODE_HAS_STATUS(DT_INST_PHANDLE(n, device), okay), (1 +), (0 +)) + +#define VALID_LISTENER_COUNT (DT_INST_FOREACH_STATUS_OKAY(ONE_IF_DEV_OK) 0) + +#if VALID_LISTENER_COUNT > 0 + +enum input_listener_xy_data_mode { + INPUT_LISTENER_XY_DATA_MODE_NONE, + INPUT_LISTENER_XY_DATA_MODE_REL, + INPUT_LISTENER_XY_DATA_MODE_ABS, +}; + +struct input_listener_axis_data { + int16_t value; +}; + +struct input_listener_xy_data { + enum input_listener_xy_data_mode mode; + struct input_listener_axis_data x; + struct input_listener_axis_data y; +}; + +struct input_listener_config_entry { + size_t processors_len; + const struct zmk_input_processor_entry *processors; +}; + +struct input_listener_layer_override { + uint32_t layer_mask; + bool process_next; + struct input_listener_config_entry config; +}; + +struct input_processor_remainder_data { + int16_t x, y, wheel, h_wheel; +}; + +struct input_listener_processor_data { + size_t remainders_len; + struct input_processor_remainder_data *remainders; +}; + +struct input_listener_config { + uint8_t listener_index; + struct input_listener_config_entry base; + size_t layer_overrides_len; + struct input_listener_layer_override layer_overrides[]; +}; + +struct input_listener_data { + union { + struct { + struct input_listener_xy_data data; + struct input_listener_xy_data wheel_data; + + uint8_t button_set; + uint8_t button_clear; + } mouse; + }; + +#if IS_ENABLED(CONFIG_ZMK_POINTING_SMOOTH_SCROLLING) + int16_t wheel_remainder; + int16_t h_wheel_remainder; +#endif // IS_ENABLED(CONFIG_ZMK_POINTING_SMOOTH_SCROLLING) + + struct input_listener_processor_data base_processor_data; + struct input_listener_processor_data layer_override_data[]; +}; + +static void handle_rel_code(struct input_listener_data *data, struct input_event *evt) { + switch (evt->code) { + case INPUT_REL_X: + data->mouse.data.mode = INPUT_LISTENER_XY_DATA_MODE_REL; + data->mouse.data.x.value += evt->value; + break; + case INPUT_REL_Y: + data->mouse.data.mode = INPUT_LISTENER_XY_DATA_MODE_REL; + data->mouse.data.y.value += evt->value; + break; + case INPUT_REL_WHEEL: + data->mouse.wheel_data.mode = INPUT_LISTENER_XY_DATA_MODE_REL; + data->mouse.wheel_data.y.value += evt->value; + break; + case INPUT_REL_HWHEEL: + data->mouse.wheel_data.mode = INPUT_LISTENER_XY_DATA_MODE_REL; + data->mouse.wheel_data.x.value += evt->value; + break; + default: + break; + } +} + +static void handle_abs_code(const struct input_listener_config *config, + struct input_listener_data *data, struct input_event *evt) {} + +static void handle_key_code(const struct input_listener_config *config, + struct input_listener_data *data, struct input_event *evt) { + int8_t btn; + + switch (evt->code) { + case INPUT_BTN_TOUCH: + btn = 0; + if (evt->value > 0) { + WRITE_BIT(data->mouse.button_set, btn, 1); + } else { + WRITE_BIT(data->mouse.button_clear, btn, 1); + } + break; + case INPUT_BTN_0: + case INPUT_BTN_1: + case INPUT_BTN_2: + case INPUT_BTN_3: + case INPUT_BTN_4: + btn = evt->code - INPUT_BTN_0; + if (evt->value > 0) { + WRITE_BIT(data->mouse.button_set, btn, 1); + } else { + WRITE_BIT(data->mouse.button_clear, btn, 1); + } + break; + default: + break; + } +} + +static inline bool is_x_data(const struct input_event *evt) { + return evt->type == INPUT_EV_REL && evt->code == INPUT_REL_X; +} + +static inline bool is_y_data(const struct input_event *evt) { + return evt->type == INPUT_EV_REL && evt->code == INPUT_REL_Y; +} + +static int apply_config(uint8_t listener_index, const struct input_listener_config_entry *cfg, + struct input_listener_processor_data *processor_data, + struct input_listener_data *data, struct input_event *evt) { + size_t remainder_index = 0; + for (size_t p = 0; p < cfg->processors_len; p++) { + const struct zmk_input_processor_entry *proc_e = &cfg->processors[p]; + struct input_processor_remainder_data *remainders = NULL; + if (proc_e->track_remainders) { + remainders = &processor_data->remainders[remainder_index++]; + } + + int16_t *remainder = NULL; + if (remainders) { + if (evt->type == INPUT_EV_REL) { + switch (evt->code) { + case INPUT_REL_X: + remainder = &remainders->x; + break; + case INPUT_REL_Y: + remainder = &remainders->y; + break; + case INPUT_REL_WHEEL: + remainder = &remainders->wheel; + break; + case INPUT_REL_HWHEEL: + remainder = &remainders->h_wheel; + break; + } + } + } + + LOG_DBG("LISTENER INDEX: %d", listener_index); + struct zmk_input_processor_state state = {.input_device_index = listener_index, + .remainder = remainder}; + + int ret = zmk_input_processor_handle_event(proc_e->dev, evt, proc_e->param1, proc_e->param2, + &state); + switch (ret) { + case ZMK_INPUT_PROC_CONTINUE: + continue; + default: + return ret; + } + } + + return ZMK_INPUT_PROC_CONTINUE; +} + +static int filter_with_input_config(const struct input_listener_config *cfg, + struct input_listener_data *data, struct input_event *evt) { + if (!evt->dev) { + return -ENODEV; + } + + for (size_t oi = 0; oi < cfg->layer_overrides_len; oi++) { + const struct input_listener_layer_override *override = &cfg->layer_overrides[oi]; + struct input_listener_processor_data *override_data = &data->layer_override_data[oi]; + uint32_t mask = override->layer_mask; + uint8_t layer = 0; + while (mask != 0) { + if (mask & BIT(0) && zmk_keymap_layer_active(layer)) { + int ret = + apply_config(cfg->listener_index, &override->config, override_data, data, evt); + + if (ret < 0) { + return ret; + } + if (!override->process_next) { + return 0; + } + } + + layer++; + mask = mask >> 1; + } + } + + return apply_config(cfg->listener_index, &cfg->base, &data->base_processor_data, data, evt); +} + +static void clear_xy_data(struct input_listener_xy_data *data) { + data->x.value = data->y.value = 0; + data->mode = INPUT_LISTENER_XY_DATA_MODE_NONE; +} + +#if IS_ENABLED(CONFIG_ZMK_POINTING_SMOOTH_SCROLLING) +static void apply_resolution_scaling(struct input_listener_data *data, struct input_event *evt) { + int16_t *remainder; + uint8_t div; + + switch (evt->code) { + case INPUT_REL_WHEEL: + remainder = &data->wheel_remainder; + div = (16 - zmk_pointing_resolution_multipliers_get_current_profile().wheel); + break; + case INPUT_REL_HWHEEL: + remainder = &data->h_wheel_remainder; + div = (16 - zmk_pointing_resolution_multipliers_get_current_profile().hor_wheel); + break; + default: + return; + } + + int16_t val = evt->value + *remainder; + int16_t scaled = val / (int16_t)div; + *remainder = val - (scaled * (int16_t)div); + evt->value = val; +} +#endif // IS_ENABLED(CONFIG_ZMK_POINTING_SMOOTH_SCROLLING) + +static void input_handler(const struct input_listener_config *config, + struct input_listener_data *data, struct input_event *evt) { + // First, process to update the event data as needed. + int ret = filter_with_input_config(config, data, evt); + + if (ret < 0) { + LOG_ERR("Error applying input processors: %d", ret); + return; + } else if (ret == ZMK_INPUT_PROC_STOP) { + return; + } + +#if IS_ENABLED(CONFIG_ZMK_POINTING_SMOOTH_SCROLLING) + apply_resolution_scaling(data, evt); +#endif // IS_ENABLED(CONFIG_ZMK_POINTING_SMOOTH_SCROLLING) + + switch (evt->type) { + case INPUT_EV_REL: + handle_rel_code(data, evt); + break; + case INPUT_EV_ABS: + handle_abs_code(config, data, evt); + break; + case INPUT_EV_KEY: + handle_key_code(config, data, evt); + break; + } + + if (evt->sync) { + if (data->mouse.wheel_data.mode == INPUT_LISTENER_XY_DATA_MODE_REL) { + zmk_hid_mouse_scroll_set(data->mouse.wheel_data.x.value, + data->mouse.wheel_data.y.value); + } + + if (data->mouse.data.mode == INPUT_LISTENER_XY_DATA_MODE_REL) { + zmk_hid_mouse_movement_set(data->mouse.data.x.value, data->mouse.data.y.value); + } + + if (data->mouse.button_set != 0) { + for (int i = 0; i < ZMK_HID_MOUSE_NUM_BUTTONS; i++) { + if ((data->mouse.button_set & BIT(i)) != 0) { + zmk_hid_mouse_button_press(i); + } + } + } + + if (data->mouse.button_clear != 0) { + for (int i = 0; i < ZMK_HID_MOUSE_NUM_BUTTONS; i++) { + if ((data->mouse.button_clear & BIT(i)) != 0) { + zmk_hid_mouse_button_release(i); + } + } + } + + zmk_endpoint_send_mouse_report(); + zmk_hid_mouse_scroll_set(0, 0); + zmk_hid_mouse_movement_set(0, 0); + + clear_xy_data(&data->mouse.data); + clear_xy_data(&data->mouse.wheel_data); + + data->mouse.button_set = data->mouse.button_clear = 0; + } +} + +#endif // VALID_LISTENER_COUNT > 0 + +#define ONE_FOR_TRACKED(n, elem, idx) \ + +DT_PROP(DT_PHANDLE_BY_IDX(n, input_processors, idx), track_remainders) +#define PROCESSOR_REM_TRACKERS(n) (0 DT_FOREACH_PROP_ELEM(n, input_processors, ONE_FOR_TRACKED)) + +#define SCOPED_PROCESSOR(scope, n, id) \ + COND_CODE_1(DT_NODE_HAS_PROP(n, input_processors), \ + (static struct input_processor_remainder_data _CONCAT( \ + input_processor_remainders_##id, scope)[PROCESSOR_REM_TRACKERS(n)] = {};), \ + ()) \ + static const struct zmk_input_processor_entry _CONCAT( \ + processor_##id, scope)[DT_PROP_LEN_OR(n, input_processors, 0)] = \ + COND_CODE_1(DT_NODE_HAS_PROP(n, input_processors), \ + ({LISTIFY(DT_PROP_LEN(n, input_processors), ZMK_INPUT_PROCESSOR_ENTRY_AT_IDX, \ + (, ), n)}), \ + ({})); + +#define IL_EXTRACT_CONFIG(n, id, scope) \ + { \ + .processors_len = DT_PROP_LEN_OR(n, input_processors, 0), \ + .processors = _CONCAT(processor_##id, scope), \ + } + +#define IL_EXTRACT_DATA(n, id, scope) \ + {COND_CODE_1(DT_NODE_HAS_PROP(n, input_processors), \ + (.remainders_len = PROCESSOR_REM_TRACKERS(n), \ + .remainders = _CONCAT(input_processor_remainders_##id, scope), ), \ + ())} + +#define IL_ONE(...) +1 + +#define CHILD_CONFIG(node, parent) SCOPED_PROCESSOR(node, node, parent) + +#define OVERRIDE_LAYER_BIT(node, prop, idx) BIT(DT_PROP_BY_IDX(node, prop, idx)) + +#define IL_OVERRIDE(node, parent) \ + { \ + .layer_mask = DT_FOREACH_PROP_ELEM_SEP(node, layers, OVERRIDE_LAYER_BIT, (|)), \ + .process_next = DT_PROP_OR(node, process_next, false), \ + .config = IL_EXTRACT_CONFIG(node, parent, node), \ + } + +#define IL_OVERRIDE_DATA(node, parent) IL_EXTRACT_DATA(node, parent, node) + +#define IL_INST(n) \ + COND_CODE_1( \ + DT_NODE_HAS_STATUS(DT_INST_PHANDLE(n, device), okay), \ + (SCOPED_PROCESSOR(base, DT_DRV_INST(n), n); \ + DT_INST_FOREACH_CHILD_VARGS(n, CHILD_CONFIG, \ + n) static const struct input_listener_config config_##n = \ + { \ + .listener_index = n, \ + .base = IL_EXTRACT_CONFIG(DT_DRV_INST(n), n, base), \ + .layer_overrides_len = (0 DT_INST_FOREACH_CHILD(n, IL_ONE)), \ + .layer_overrides = {DT_INST_FOREACH_CHILD_SEP_VARGS(n, IL_OVERRIDE, (, ), n)}, \ + }; \ + static struct input_listener_data data_##n = \ + { \ + .base_processor_data = IL_EXTRACT_DATA(DT_DRV_INST(n), n, base), \ + .layer_override_data = {DT_INST_FOREACH_CHILD_SEP_VARGS(n, IL_OVERRIDE_DATA, \ + (, ), n)}, \ + }; \ + void input_handler_##n(struct input_event *evt, void *user_data) { \ + input_handler(&config_##n, &data_##n, evt); \ + } INPUT_CALLBACK_DEFINE(DEVICE_DT_GET(DT_INST_PHANDLE(n, device)), input_handler_##n, \ + NULL);), \ + ()) + +DT_INST_FOREACH_STATUS_OKAY(IL_INST) diff --git a/app/src/pointing/input_processor_behaviors.c b/app/src/pointing/input_processor_behaviors.c new file mode 100644 index 00000000..0c8d75cd --- /dev/null +++ b/app/src/pointing/input_processor_behaviors.c @@ -0,0 +1,92 @@ +/* + * Copyright (c) 2024 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#define DT_DRV_COMPAT zmk_input_processor_behaviors + +#include + +#include +#include +#include + +#include + +LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); + +#include +#include +#include + +struct ip_behaviors_config { + uint8_t index; + size_t size; + uint16_t type; + + const uint16_t *codes; + const struct zmk_behavior_binding *bindings; +}; + +static int ip_behaviors_handle_event(const struct device *dev, struct input_event *event, + uint32_t param1, uint32_t param2, + struct zmk_input_processor_state *state) { + const struct ip_behaviors_config *cfg = dev->config; + + if (event->type != cfg->type) { + return 0; + } + + for (size_t i = 0; i < cfg->size; i++) { + if (cfg->codes[i] == event->code) { + struct zmk_behavior_binding_event behavior_event = { + .position = ZMK_VIRTUAL_KEY_POSITION_BEHAVIOR_INPUT_PROCESSOR( + state->input_device_index, cfg->index), + .timestamp = k_uptime_get(), +#if IS_ENABLED(CONFIG_ZMK_SPLIT) + .source = ZMK_POSITION_STATE_CHANGE_SOURCE_LOCAL, +#endif + }; + + LOG_DBG("FOUND A MATCHING CODE, invoke %s for position %d with %d listeners", + cfg->bindings[i].behavior_dev, behavior_event.position, + ZMK_INPUT_LISTENERS_LEN); + int ret = zmk_behavior_invoke_binding(&cfg->bindings[i], behavior_event, event->value); + if (ret < 0) { + return ret; + } + + return ZMK_INPUT_PROC_STOP; + } + } + + return 0; +} + +static struct zmk_input_processor_driver_api ip_behaviors_driver_api = { + .handle_event = ip_behaviors_handle_event, +}; + +static int ip_behaviors_init(const struct device *dev) { return 0; } + +#define ENTRY(i, node) ZMK_KEYMAP_EXTRACT_BINDING(i, node) + +#define IP_BEHAVIORS_INST(n) \ + static const uint16_t ip_behaviors_codes_##n[] = DT_INST_PROP(n, codes); \ + static const struct zmk_behavior_binding ip_behaviors_bindings_##n[] = { \ + LISTIFY(DT_INST_PROP_LEN(n, bindings), ZMK_KEYMAP_EXTRACT_BINDING, (, ), DT_DRV_INST(n))}; \ + BUILD_ASSERT(ARRAY_SIZE(ip_behaviors_codes_##n) == ARRAY_SIZE(ip_behaviors_bindings_##n), \ + "codes and bindings need to be the same length"); \ + static const struct ip_behaviors_config ip_behaviors_config_##n = { \ + .index = n, \ + .type = DT_INST_PROP_OR(n, type, INPUT_EV_KEY), \ + .size = DT_INST_PROP_LEN(n, codes), \ + .codes = ip_behaviors_codes_##n, \ + .bindings = ip_behaviors_bindings_##n, \ + }; \ + DEVICE_DT_INST_DEFINE(n, &ip_behaviors_init, NULL, NULL, &ip_behaviors_config_##n, \ + POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, \ + &ip_behaviors_driver_api); + +DT_INST_FOREACH_STATUS_OKAY(IP_BEHAVIORS_INST) \ No newline at end of file diff --git a/app/src/pointing/input_processor_code_mapper.c b/app/src/pointing/input_processor_code_mapper.c new file mode 100644 index 00000000..b42d3478 --- /dev/null +++ b/app/src/pointing/input_processor_code_mapper.c @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2024 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#define DT_DRV_COMPAT zmk_input_processor_code_mapper + +#include +#include +#include + +#include + +LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); + +struct cm_config { + uint8_t type; + size_t mapping_size; + uint16_t mapping[]; +}; + +static int cm_handle_event(const struct device *dev, struct input_event *event, uint32_t param1, + uint32_t param2, struct zmk_input_processor_state *state) { + const struct cm_config *cfg = dev->config; + + if (event->type != cfg->type) { + return ZMK_INPUT_PROC_CONTINUE; + } + + for (int i = 0; i < cfg->mapping_size / 2; i++) { + if (cfg->mapping[i * 2] == event->code) { + uint16_t orig = event->code; + event->code = cfg->mapping[(i * 2) + 1]; + LOG_DBG("Remapped %d to %d", orig, event->code); + break; + } + } + + return ZMK_INPUT_PROC_CONTINUE; +} + +static struct zmk_input_processor_driver_api cm_driver_api = { + .handle_event = cm_handle_event, +}; + +#define TL_INST(n) \ + static const struct cm_config cm_config_##n = { \ + .type = DT_INST_PROP_OR(n, type, INPUT_EV_REL), \ + .mapping_size = DT_INST_PROP_LEN(n, map), \ + .mapping = DT_INST_PROP(n, map), \ + }; \ + BUILD_ASSERT(DT_INST_PROP_LEN(n, map) % 2 == 0, \ + "Must have an even number of mapping entries"); \ + DEVICE_DT_INST_DEFINE(n, NULL, NULL, NULL, &cm_config_##n, POST_KERNEL, \ + CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &cm_driver_api); + +DT_INST_FOREACH_STATUS_OKAY(TL_INST) \ No newline at end of file diff --git a/app/src/pointing/input_processor_scaler.c b/app/src/pointing/input_processor_scaler.c new file mode 100644 index 00000000..c7e08ecd --- /dev/null +++ b/app/src/pointing/input_processor_scaler.c @@ -0,0 +1,75 @@ +/* + * Copyright (c) 2024 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#define DT_DRV_COMPAT zmk_input_processor_scaler + +#include +#include +#include + +#include + +LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); + +struct scaler_config { + uint8_t type; + size_t codes_len; + uint16_t codes[]; +}; + +static int scale_val(struct input_event *event, uint32_t mul, uint32_t div, + struct zmk_input_processor_state *state) { + int16_t value_mul = event->value * (int16_t)mul; + + if (state && state->remainder) { + value_mul += *state->remainder; + } + + int16_t scaled = value_mul / (int16_t)div; + + if (state && state->remainder) { + *state->remainder = value_mul - (scaled * (int16_t)div); + } + + LOG_DBG("scaled %d with %d/%d to %d with remainder %d", event->value, mul, div, scaled, + (state && state->remainder) ? *state->remainder : 0); + + event->value = scaled; + + return 0; +} + +static int scaler_handle_event(const struct device *dev, struct input_event *event, uint32_t param1, + uint32_t param2, struct zmk_input_processor_state *state) { + const struct scaler_config *cfg = dev->config; + + if (event->type != cfg->type) { + return ZMK_INPUT_PROC_CONTINUE; + } + + for (int i = 0; i < cfg->codes_len; i++) { + if (cfg->codes[i] == event->code) { + return scale_val(event, param1, param2, state); + } + } + + return ZMK_INPUT_PROC_CONTINUE; +} + +static struct zmk_input_processor_driver_api scaler_driver_api = { + .handle_event = scaler_handle_event, +}; + +#define SCALER_INST(n) \ + static const struct scaler_config scaler_config_##n = { \ + .type = DT_INST_PROP_OR(n, type, INPUT_EV_REL), \ + .codes_len = DT_INST_PROP_LEN(n, codes), \ + .codes = DT_INST_PROP(n, codes), \ + }; \ + DEVICE_DT_INST_DEFINE(n, NULL, NULL, NULL, &scaler_config_##n, POST_KERNEL, \ + CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &scaler_driver_api); + +DT_INST_FOREACH_STATUS_OKAY(SCALER_INST) \ No newline at end of file diff --git a/app/src/pointing/input_processor_temp_layer.c b/app/src/pointing/input_processor_temp_layer.c new file mode 100644 index 00000000..45562312 --- /dev/null +++ b/app/src/pointing/input_processor_temp_layer.c @@ -0,0 +1,317 @@ +/* + * Copyright (c) 2024 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#define DT_DRV_COMPAT zmk_input_processor_temp_layer + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); + +/* Constants and Types */ +#define MAX_LAYERS ZMK_KEYMAP_LAYERS_LEN + +struct temp_layer_config { + int16_t require_prior_idle_ms; + const uint16_t *excluded_positions; + size_t num_positions; +}; + +struct temp_layer_state { + uint8_t toggle_layer; + bool is_active; + int64_t last_tapped_timestamp; +}; + +struct temp_layer_data { + const struct device *dev; + struct k_mutex lock; + struct temp_layer_state state; +}; + +/* Static Work Queue Items */ +static struct k_work_delayable layer_disable_works[MAX_LAYERS]; + +/* Position Search */ +static bool position_is_excluded(const struct temp_layer_config *config, uint32_t position) { + if (!config->excluded_positions || !config->num_positions) { + return false; + } + + const uint16_t *end = config->excluded_positions + config->num_positions; + for (const uint16_t *pos = config->excluded_positions; pos < end; pos++) { + if (*pos == position) { + return true; + } + } + + return false; +} + +/* Timing Check */ +static bool should_quick_tap(const struct temp_layer_config *config, int64_t last_tapped, + int64_t current_time) { + return (last_tapped + config->require_prior_idle_ms) > current_time; +} + +/* Layer State Management */ +static void update_layer_state(struct temp_layer_state *state, bool activate) { + if (state->is_active == activate) { + return; + } + + state->is_active = activate; + if (activate) { + zmk_keymap_layer_activate(state->toggle_layer, false); + LOG_DBG("Layer %d activated", state->toggle_layer); + } else { + zmk_keymap_layer_deactivate(state->toggle_layer, false); + LOG_DBG("Layer %d deactivated", state->toggle_layer); + } +} + +struct layer_state_action { + uint8_t layer; + bool activate; +}; + +K_MSGQ_DEFINE(temp_layer_action_msgq, sizeof(struct layer_state_action), + CONFIG_ZMK_INPUT_PROCESSOR_TEMP_LAYER_MAX_ACTION_EVENTS, 4); + +static void layer_action_work_cb(struct k_work *work) { + + const struct device *dev = DEVICE_DT_INST_GET(0); + struct temp_layer_data *data = (struct temp_layer_data *)dev->data; + + int ret = k_mutex_lock(&data->lock, K_FOREVER); + if (ret < 0) { + LOG_ERR("Error locking for updating %d", ret); + return; + } + + struct layer_state_action action; + + while (k_msgq_get(&temp_layer_action_msgq, &action, K_MSEC(10)) >= 0) { + if (!action.activate) { + if (zmk_keymap_layer_active(action.layer)) { + update_layer_state(&data->state, false); + } + } else { + update_layer_state(&data->state, true); + } + } + + k_mutex_unlock(&data->lock); +} + +static K_WORK_DEFINE(layer_action_work, layer_action_work_cb); + +/* Work Queue Callback */ +static void layer_disable_callback(struct k_work *work) { + struct k_work_delayable *d_work = k_work_delayable_from_work(work); + int layer_index = ARRAY_INDEX(layer_disable_works, d_work); + + struct layer_state_action action = {.layer = layer_index, .activate = false}; + + int ret = k_msgq_put(&temp_layer_action_msgq, &action, K_MSEC(10)); + k_work_submit(&layer_action_work); +} + +/* Event Handlers */ +static int handle_layer_state_changed(const struct device *dev, const zmk_event_t *eh) { + struct temp_layer_data *data = (struct temp_layer_data *)dev->data; + int ret = k_mutex_lock(&data->lock, K_FOREVER); + if (ret < 0) { + return ret; + } + if (!zmk_keymap_layer_active(zmk_keymap_layer_index_to_id(data->state.toggle_layer))) { + LOG_DBG("Deactivating layer that was activated by this processor"); + data->state.is_active = false; + k_work_cancel_delayable(&layer_disable_works[data->state.toggle_layer]); + } + ret = k_mutex_unlock(&data->lock); + if (ret < 0) { + return ret; + } + + return ZMK_EV_EVENT_BUBBLE; +} + +static int handle_position_state_changed(const struct device *dev, const zmk_event_t *eh) { + const struct zmk_position_state_changed *ev = as_zmk_position_state_changed(eh); + if (!ev->state) { + return ZMK_EV_EVENT_BUBBLE; + } + + struct temp_layer_data *data = (struct temp_layer_data *)dev->data; + int ret = k_mutex_lock(&data->lock, K_FOREVER); + if (ret < 0) { + return ret; + } + + const struct temp_layer_config *cfg = dev->config; + + if (data->state.is_active && cfg->excluded_positions && cfg->num_positions > 0) { + if (!position_is_excluded(cfg, ev->position)) { + LOG_DBG("Position not excluded, deactivating layer"); + update_layer_state(&data->state, false); + } + } + LOG_DBG("Position excluded, continuing"); + + k_mutex_unlock(&data->lock); + + return ZMK_EV_EVENT_BUBBLE; +} + +static int handle_keycode_state_changed(const struct device *dev, const zmk_event_t *eh) { + const struct zmk_keycode_state_changed *ev = as_zmk_keycode_state_changed(eh); + if (!ev->state) { + return ZMK_EV_EVENT_BUBBLE; + } + + struct temp_layer_data *data = (struct temp_layer_data *)dev->data; + + int ret = k_mutex_lock(&data->lock, K_FOREVER); + if (ret < 0) { + return ret; + } + + LOG_DBG("Setting last_tapped_timestamp to: %lld", ev->timestamp); + data->state.last_tapped_timestamp = ev->timestamp; + + ret = k_mutex_unlock(&data->lock); + if (ret < 0) { + return ret; + } + + return ZMK_EV_EVENT_BUBBLE; +} + +static int handle_state_changed_dispatcher(const struct device *dev, const zmk_event_t *eh) { + if (as_zmk_layer_state_changed(eh) != NULL) { + LOG_DBG("Dispatching handle_layer_state_changed"); + return handle_layer_state_changed(dev, eh); + } else if (as_zmk_position_state_changed(eh) != NULL) { + LOG_DBG("Dispatching handle_position_state_changed"); + return handle_position_state_changed(dev, eh); + } else if (as_zmk_keycode_state_changed(eh) != NULL) { + LOG_DBG("Dispatching handle_keycode_state_changed"); + return handle_keycode_state_changed(dev, eh); + } + + return ZMK_EV_EVENT_BUBBLE; +} + +#define DISPATCH_EVENT(inst) \ + { \ + int err = handle_state_changed_dispatcher(DEVICE_DT_INST_GET(inst), eh); \ + if (err < 0) { \ + return err; \ + } \ + } + +static int handle_event_dispatcher(const zmk_event_t *eh) { + DT_INST_FOREACH_STATUS_OKAY(DISPATCH_EVENT) + + return 0; +} + +/* Driver Implementation */ +static int temp_layer_handle_event(const struct device *dev, struct input_event *event, + uint32_t param1, uint32_t param2, + struct zmk_input_processor_state *state) { + if (param1 >= MAX_LAYERS) { + LOG_ERR("Invalid layer index: %d", param1); + return -EINVAL; + } + + struct temp_layer_data *data = (struct temp_layer_data *)dev->data; + + int ret = k_mutex_lock(&data->lock, K_FOREVER); + if (ret < 0) { + return ret; + } + + const struct temp_layer_config *cfg = dev->config; + + data->state.toggle_layer = param1; + + if (!data->state.is_active && + !should_quick_tap(cfg, data->state.last_tapped_timestamp, k_uptime_get())) { + struct layer_state_action action = {.layer = param1, .activate = true}; + + int ret = k_msgq_put(&temp_layer_action_msgq, &action, K_MSEC(10)); + if (ret < 0) { + LOG_ERR("Failed to enqueue action to enable layer %d (%d)", param1, ret); + } else { + k_work_submit(&layer_action_work); + } + } + + if (param2 > 0) { + k_work_reschedule(&layer_disable_works[param1], K_MSEC(param2)); + } + + k_mutex_unlock(&data->lock); + + return ZMK_INPUT_PROC_CONTINUE; +} + +static int temp_layer_init(const struct device *dev) { + struct temp_layer_data *data = (struct temp_layer_data *)dev->data; + k_mutex_init(&data->lock); + + for (int i = 0; i < MAX_LAYERS; i++) { + k_work_init_delayable(&layer_disable_works[i], layer_disable_callback); + } + + return 0; +} + +/* Driver API */ +static const struct zmk_input_processor_driver_api temp_layer_driver_api = { + .handle_event = temp_layer_handle_event, +}; + +/* Event Listeners Conditions */ +#define NEEDS_POSITION_HANDLERS(n, ...) DT_INST_PROP_HAS_IDX(n, excluded_positions, 0) +#define NEEDS_KEYCODE_HANDLERS(n, ...) (DT_INST_PROP_OR(n, require_prior_idle_ms, 0) > 0) + +/* Event Handlers Registration */ +ZMK_LISTENER(processor_temp_layer, handle_event_dispatcher); +ZMK_SUBSCRIPTION(processor_temp_layer, zmk_layer_state_changed); + +/* Individual Subscriptions */ +#if DT_INST_FOREACH_STATUS_OKAY_VARGS(NEEDS_POSITION_HANDLERS, ||) +ZMK_SUBSCRIPTION(processor_temp_layer, zmk_position_state_changed); +#endif + +#if DT_INST_FOREACH_STATUS_OKAY_VARGS(NEEDS_KEYCODE_HANDLERS, ||) +ZMK_SUBSCRIPTION(processor_temp_layer, zmk_keycode_state_changed); +#endif + +/* Device Instantiation */ +#define TEMP_LAYER_INST(n) \ + static struct temp_layer_data processor_temp_layer_data_##n = {}; \ + static const uint16_t excluded_positions_##n[] = DT_INST_PROP(n, excluded_positions); \ + static const struct temp_layer_config processor_temp_layer_config_##n = { \ + .require_prior_idle_ms = DT_INST_PROP_OR(n, require_prior_idle_ms, 0), \ + .excluded_positions = excluded_positions_##n, \ + .num_positions = DT_INST_PROP_LEN(n, excluded_positions), \ + }; \ + DEVICE_DT_INST_DEFINE(n, temp_layer_init, NULL, &processor_temp_layer_data_##n, \ + &processor_temp_layer_config_##n, POST_KERNEL, \ + CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &temp_layer_driver_api); + +DT_INST_FOREACH_STATUS_OKAY(TEMP_LAYER_INST) diff --git a/app/src/pointing/input_processor_transform.c b/app/src/pointing/input_processor_transform.c new file mode 100644 index 00000000..c214baee --- /dev/null +++ b/app/src/pointing/input_processor_transform.c @@ -0,0 +1,92 @@ +/* + * Copyright (c) 2024 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#define DT_DRV_COMPAT zmk_input_processor_transform + +#include +#include +#include + +#include + +#include + +LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); + +#include + +struct ipt_config { + size_t x_codes_size; + size_t y_codes_size; + uint8_t type; + + const uint16_t *x_codes; + const uint16_t *y_codes; +}; + +static int code_idx(uint16_t code, const uint16_t *list, size_t len) { + for (int i = 0; i < len; i++) { + if (list[i] == code) { + return i; + } + } + + return -ENODEV; +} + +static int ipt_handle_event(const struct device *dev, struct input_event *event, uint32_t param1, + uint32_t param2, struct zmk_input_processor_state *state) { + const struct ipt_config *cfg = dev->config; + + if (event->type != cfg->type) { + return ZMK_INPUT_PROC_CONTINUE; + } + + if (param1 & INPUT_TRANSFORM_XY_SWAP) { + int idx = code_idx(event->code, cfg->x_codes, cfg->x_codes_size); + if (idx >= 0) { + event->code = cfg->y_codes[idx]; + } else { + idx = code_idx(event->code, cfg->y_codes, cfg->y_codes_size); + + if (idx >= 0) { + event->code = cfg->x_codes[idx]; + } + } + } + + if ((param1 & INPUT_TRANSFORM_X_INVERT && + code_idx(event->code, cfg->x_codes, cfg->x_codes_size) >= 0) || + (param1 & INPUT_TRANSFORM_Y_INVERT && + code_idx(event->code, cfg->y_codes, cfg->y_codes_size) >= 0)) { + event->value = -event->value; + } + + return ZMK_INPUT_PROC_CONTINUE; +} + +static struct zmk_input_processor_driver_api ipt_driver_api = { + .handle_event = ipt_handle_event, +}; + +static int ipt_init(const struct device *dev) { return 0; } + +#define IPT_INST(n) \ + static const uint16_t ipt_x_codes_##n[] = DT_INST_PROP(n, x_codes); \ + static const uint16_t ipt_y_codes_##n[] = DT_INST_PROP(n, y_codes); \ + BUILD_ASSERT(ARRAY_SIZE(ipt_x_codes_##n) == ARRAY_SIZE(ipt_x_codes_##n), \ + "X and Y codes need to be the same size"); \ + static const struct ipt_config ipt_config_##n = { \ + .type = DT_INST_PROP_OR(n, type, INPUT_EV_REL), \ + .x_codes_size = DT_INST_PROP_LEN(n, x_codes), \ + .y_codes_size = DT_INST_PROP_LEN(n, y_codes), \ + .x_codes = ipt_x_codes_##n, \ + .y_codes = ipt_y_codes_##n, \ + }; \ + DEVICE_DT_INST_DEFINE(n, &ipt_init, NULL, NULL, &ipt_config_##n, POST_KERNEL, \ + CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &ipt_driver_api); + +DT_INST_FOREACH_STATUS_OKAY(IPT_INST) \ No newline at end of file diff --git a/app/src/pointing/input_split.c b/app/src/pointing/input_split.c new file mode 100644 index 00000000..6662111d --- /dev/null +++ b/app/src/pointing/input_split.c @@ -0,0 +1,143 @@ +/* + * Copyright (c) 2024 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#define DT_DRV_COMPAT zmk_input_split + +#include +#include +#include +#include + +#include + +LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); + +#if IS_ENABLED(CONFIG_ZMK_SPLIT_ROLE_CENTRAL) + +struct zis_entry { + uint8_t reg; + const struct device *dev; +}; + +#define ZIS_ENTRY(n) {.reg = DT_INST_REG_ADDR(n), .dev = DEVICE_DT_GET(DT_DRV_INST(n))}, + +static const struct zis_entry proxy_inputs[] = {DT_INST_FOREACH_STATUS_OKAY(ZIS_ENTRY)}; + +static uint16_t proxy_active_keys[DT_NUM_INST_STATUS_OKAY(DT_DRV_COMPAT)] + [CONFIG_ZMK_INPUT_SPLIT_MAX_TRACKED_KEYS]; + +static int replace_active_key(size_t input, uint16_t find, uint16_t replace) { + for (size_t k = 0; k < CONFIG_ZMK_INPUT_SPLIT_MAX_TRACKED_KEYS; k++) { + if (proxy_active_keys[input][k] == find) { + proxy_active_keys[input][k] = replace; + return 0; + } + } + + return -ENODEV; +} + +int zmk_input_split_report_peripheral_event(uint8_t reg, uint8_t type, uint16_t code, int32_t value, + bool sync) { + LOG_DBG("Got peripheral event for %d!", reg); + for (size_t i = 0; i < ARRAY_SIZE(proxy_inputs); i++) { + if (reg == proxy_inputs[i].reg) { + if (type == INPUT_EV_KEY) { + uint16_t find, replace; + + if (value) { + find = 0; + replace = code; + } else { + find = code; + replace = 0; + } + + int ret = replace_active_key(i, find, replace); + if (ret < 0) { + LOG_WRN("Failed to %s key %d", value ? "track pressed" : "untrack released", + ret); + } + } + return input_report(proxy_inputs[i].dev, type, code, value, sync, K_NO_WAIT); + } + } + + return -ENODEV; +} + +int zmk_input_split_peripheral_disconnected(uint8_t reg) { + for (size_t i = 0; i < ARRAY_SIZE(proxy_inputs); i++) { + if (reg == proxy_inputs[i].reg) { + uint16_t prev = 0; + for (size_t k = 0; k < CONFIG_ZMK_INPUT_SPLIT_MAX_TRACKED_KEYS; k++) { + if (proxy_active_keys[i][k] != 0) { + if (prev != 0) { + int ret = input_report(proxy_inputs[i].dev, INPUT_EV_KEY, prev, 0, false, + K_NO_WAIT); + if (ret < 0) { + LOG_WRN("Failed to report release event on disconnect (%d)", ret); + } + } + + prev = proxy_active_keys[i][k]; + proxy_active_keys[i][k] = 0; + } + } + + if (prev != 0) { + int ret = input_report(proxy_inputs[i].dev, INPUT_EV_KEY, prev, 0, true, K_NO_WAIT); + if (ret < 0) { + LOG_WRN("Failed to report release event on disconnect (%d)", ret); + } + } + } + } + + return -ENODEV; +} + +#define ZIS_INST(n) \ + DEVICE_DT_INST_DEFINE(n, NULL, NULL, NULL, NULL, POST_KERNEL, \ + CONFIG_ZMK_INPUT_SPLIT_INIT_PRIORITY, NULL); + +#else + +#include + +#define ZIS_INST(n) \ + static const struct zmk_input_processor_entry processors_##n[] = \ + COND_CODE_1(DT_INST_NODE_HAS_PROP(n, input_processors), \ + ({LISTIFY(DT_INST_PROP_LEN(n, input_processors), \ + ZMK_INPUT_PROCESSOR_ENTRY_AT_IDX, (, ), DT_DRV_INST(n))}), \ + ({})); \ + BUILD_ASSERT(DT_INST_NODE_HAS_PROP(n, device), \ + "Peripheral input splits need an `input` property set"); \ + void split_input_handler_##n(struct input_event *evt, void *user_data) { \ + for (size_t i = 0; i < ARRAY_SIZE(processors_##n); i++) { \ + int ret = zmk_input_processor_handle_event(processors_##n[i].dev, evt, \ + processors_##n[i].param1, \ + processors_##n[i].param2, NULL); \ + if (ret != ZMK_INPUT_PROC_CONTINUE) { \ + return; \ + } \ + } \ + struct zmk_split_transport_peripheral_event ev = { \ + .type = ZMK_SPLIT_TRANSPORT_PERIPHERAL_EVENT_TYPE_INPUT_EVENT, \ + .data = {.input_event = { \ + .reg = DT_INST_REG_ADDR(n), \ + .type = evt->type, \ + .code = evt->code, \ + .value = evt->value, \ + .sync = evt->sync, \ + }}}; \ + zmk_split_peripheral_report_event(&ev); \ + } \ + INPUT_CALLBACK_DEFINE(DEVICE_DT_GET(DT_INST_PHANDLE(n, device)), split_input_handler_##n, NULL); + +#endif + +DT_INST_FOREACH_STATUS_OKAY(ZIS_INST) diff --git a/app/src/pointing/resolution_multipliers.c b/app/src/pointing/resolution_multipliers.c new file mode 100644 index 00000000..fa798462 --- /dev/null +++ b/app/src/pointing/resolution_multipliers.c @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2024 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include +#include + +#include +#include +#include + +LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); + +static struct zmk_pointing_resolution_multipliers multipliers[ZMK_ENDPOINT_COUNT] = { + [0 ... ZMK_ENDPOINT_COUNT - 1] = + { + .wheel = 15, + .hor_wheel = 15, + }, +}; + +struct zmk_pointing_resolution_multipliers +zmk_pointing_resolution_multipliers_get_current_profile(void) { + return zmk_pointing_resolution_multipliers_get_profile(zmk_endpoint_get_selected()); +} + +struct zmk_pointing_resolution_multipliers +zmk_pointing_resolution_multipliers_get_profile(struct zmk_endpoint_instance endpoint) { + const int profile = zmk_endpoint_instance_to_index(endpoint); + return multipliers[profile]; +} + +void zmk_pointing_resolution_multipliers_set_profile(struct zmk_pointing_resolution_multipliers m, + struct zmk_endpoint_instance endpoint) { + int profile = zmk_endpoint_instance_to_index(endpoint); + + // This write is not happening on the main thread. To prevent potential data races, every + // operation involving hid_indicators must be atomic. Currently, each function either reads + // or writes only one entry at a time, so it is safe to do these operations without a lock. + multipliers[profile] = m; +} + +void zmk_pointing_resolution_multipliers_process_report( + struct zmk_hid_mouse_resolution_feature_report_body *report, + struct zmk_endpoint_instance endpoint) { + struct zmk_pointing_resolution_multipliers vals = { + .wheel = report->wheel_res, + .hor_wheel = report->hwheel_res, + }; + zmk_pointing_resolution_multipliers_set_profile(vals, endpoint); + + LOG_DBG("Update resolution multipliers: endpoint=%d, wheel=%d, hor_wheel=%d", + endpoint.transport, vals.wheel, vals.hor_wheel); +} diff --git a/app/src/sensors.c b/app/src/sensors.c index 4dcda44d..e1295de8 100644 --- a/app/src/sensors.c +++ b/app/src/sensors.c @@ -26,28 +26,22 @@ struct sensors_item_cfg { }; #define _SENSOR_ITEM(idx, node) \ - { \ - .dev = DEVICE_DT_GET_OR_NULL(node), \ - .trigger = {.type = SENSOR_TRIG_DATA_READY, .chan = SENSOR_CHAN_ROTATION}, \ - .config = &configs[idx], .sensor_index = idx \ - } + {.dev = DEVICE_DT_GET_OR_NULL(node), \ + .trigger = {.type = SENSOR_TRIG_DATA_READY, .chan = SENSOR_CHAN_ROTATION}, \ + .config = &configs[idx], \ + .sensor_index = idx} #define SENSOR_ITEM(idx, _i) _SENSOR_ITEM(idx, ZMK_KEYMAP_SENSORS_BY_IDX(idx)) #define PLUS_ONE(n) +1 #define ZMK_KEYMAP_SENSORS_CHILD_COUNT (0 DT_FOREACH_CHILD(ZMK_KEYMAP_SENSORS_NODE, PLUS_ONE)) #define SENSOR_CHILD_ITEM(node) \ - { \ - .triggers_per_rotation = \ - DT_PROP_OR(node, triggers_per_rotation, \ - DT_PROP_OR(ZMK_KEYMAP_SENSORS_NODE, triggers_per_rotation, \ - CONFIG_ZMK_KEYMAP_SENSORS_DEFAULT_TRIGGERS_PER_ROTATION)) \ - } + {.triggers_per_rotation = \ + DT_PROP_OR(node, triggers_per_rotation, \ + DT_PROP_OR(ZMK_KEYMAP_SENSORS_NODE, triggers_per_rotation, \ + CONFIG_ZMK_KEYMAP_SENSORS_DEFAULT_TRIGGERS_PER_ROTATION))} #define SENSOR_CHILD_DEFAULTS(idx, arg) \ - { \ - .triggers_per_rotation = \ - DT_PROP_OR(ZMK_KEYMAP_SENSORS_NODE, triggers_per_rotation, \ - CONFIG_ZMK_KEYMAP_SENSORS_DEFAULT_TRIGGERS_PER_ROTATION) \ - } + {.triggers_per_rotation = DT_PROP_OR(ZMK_KEYMAP_SENSORS_NODE, triggers_per_rotation, \ + CONFIG_ZMK_KEYMAP_SENSORS_DEFAULT_TRIGGERS_PER_ROTATION)} static struct zmk_sensor_config configs[] = { #if ZMK_KEYMAP_SENSORS_CHILD_COUNT > 0 @@ -79,7 +73,7 @@ static void trigger_sensor_data_for_position(uint32_t sensor_index) { return; } - struct sensor_value value; + struct sensor_value value = {0}; err = sensor_channel_get(item->dev, item->trigger.chan, &value); if (err) { diff --git a/app/src/split/CMakeLists.txt b/app/src/split/CMakeLists.txt index 27abb82a..20c73089 100644 --- a/app/src/split/CMakeLists.txt +++ b/app/src/split/CMakeLists.txt @@ -3,4 +3,16 @@ if (CONFIG_ZMK_SPLIT_BLE) add_subdirectory(bluetooth) +endif() + +if (CONFIG_ZMK_SPLIT_WIRED) + add_subdirectory(wired) +endif() + +if (CONFIG_ZMK_SPLIT_ROLE_CENTRAL) + target_sources(app PRIVATE central.c) + zephyr_linker_sources(SECTIONS ../../include/linker/zmk-split-transport-central.ld) +else() + target_sources(app PRIVATE peripheral.c) + zephyr_linker_sources(SECTIONS ../../include/linker/zmk-split-transport-peripheral.ld) endif() \ No newline at end of file diff --git a/app/src/split/Kconfig b/app/src/split/Kconfig index ce90037b..00ce0840 100644 --- a/app/src/split/Kconfig +++ b/app/src/split/Kconfig @@ -9,16 +9,20 @@ if ZMK_SPLIT config ZMK_SPLIT_ROLE_CENTRAL bool "Split central device" -choice ZMK_SPLIT_TRANSPORT - prompt "Split transport" - config ZMK_SPLIT_BLE - bool "BLE" + bool "BLE Split" + default y depends on ZMK_BLE select BT_USER_PHY_UPDATE select BT_AUTO_PHY_UPDATE -endchoice +config ZMK_SPLIT_WIRED + bool "Wired Split" + default y + depends on DT_HAS_ZMK_WIRED_SPLIT_ENABLED + select SERIAL + select RING_BUFFER + select CRC config ZMK_SPLIT_PERIPHERAL_HID_INDICATORS bool "Peripheral HID Indicators" @@ -26,7 +30,7 @@ config ZMK_SPLIT_PERIPHERAL_HID_INDICATORS help Enable propagating the HID (LED) Indicator state to the split peripheral(s). -#ZMK_SPLIT -endif +endif # ZMK_SPLIT rsource "bluetooth/Kconfig" +rsource "wired/Kconfig" diff --git a/app/src/split/Kconfig.defaults b/app/src/split/Kconfig.defaults new file mode 100644 index 00000000..f3827b01 --- /dev/null +++ b/app/src/split/Kconfig.defaults @@ -0,0 +1,6 @@ +# Copyright (c) 2024 The ZMK Contributors +# SPDX-License-Identifier: MIT + +rsource "bluetooth/Kconfig.defaults" +rsource "wired/Kconfig.defaults" + diff --git a/app/src/split/bluetooth/CMakeLists.txt b/app/src/split/bluetooth/CMakeLists.txt index 6e0ad617..f4e12a9d 100644 --- a/app/src/split/bluetooth/CMakeLists.txt +++ b/app/src/split/bluetooth/CMakeLists.txt @@ -2,7 +2,6 @@ # SPDX-License-Identifier: MIT if (NOT CONFIG_ZMK_SPLIT_ROLE_CENTRAL) - target_sources(app PRIVATE split_listener.c) target_sources(app PRIVATE service.c) target_sources(app PRIVATE peripheral.c) endif() diff --git a/app/src/split/bluetooth/Kconfig b/app/src/split/bluetooth/Kconfig index 7f362fde..ca0b261f 100644 --- a/app/src/split/bluetooth/Kconfig +++ b/app/src/split/bluetooth/Kconfig @@ -5,7 +5,12 @@ if ZMK_SPLIT && ZMK_SPLIT_BLE menu "BLE Transport" -# Added for backwards compatibility. New shields/board should set `ZMK_SPLIT_ROLE_CENTRAL` only. +config ZMK_SPLIT_BLE_PRIORITY + int "BLE transport priority" + help + Lower number priorities transports are favored over higher numbers. + +# Added for backwards compatibility. New shields / board should set `ZMK_SPLIT_ROLE_CENTRAL` only. config ZMK_SPLIT_BLE_ROLE_CENTRAL bool select ZMK_SPLIT_ROLE_CENTRAL @@ -17,14 +22,13 @@ config ZMK_SPLIT_ROLE_CENTRAL select BT_SCAN_WITH_IDENTITY # Bump this value needed for concurrent GATT discovery of splits -config BT_L2CAP_TX_BUF_COUNT - default 5 if ZMK_SPLIT_ROLE_CENTRAL +config BT_ATT_TX_COUNT + default 10 if ZMK_SPLIT_ROLE_CENTRAL if ZMK_SPLIT_ROLE_CENTRAL config ZMK_SPLIT_BLE_CENTRAL_PERIPHERALS int "Number of peripherals that will connect to the central." - default 1 menuconfig ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_FETCHING bool "Fetch Peripheral Battery Level Info" @@ -96,39 +100,8 @@ config BT_MAX_CONN config BT_GAP_AUTO_UPDATE_CONN_PARAMS default n -#!ZMK_SPLIT_ROLE_CENTRAL -endif +endif # !ZMK_SPLIT_ROLE_CENTRAL endmenu -#ZMK_SPLIT_BLE -endif - - -if ZMK_BLE - -if ZMK_SPLIT_BLE && ZMK_SPLIT_ROLE_CENTRAL - -config BT_MAX_CONN - default 6 - -config BT_MAX_PAIRED - default 6 - -#ZMK_SPLIT_BLE && ZMK_SPLIT_ROLE_CENTRAL -endif - -if !ZMK_SPLIT_BLE - -config BT_MAX_CONN - default 5 - -config BT_MAX_PAIRED - default 5 - -#!ZMK_SPLIT_BLE -endif - -#ZMK_BLE -endif - +endif # ZMK_SPLIT_BLE diff --git a/app/src/split/bluetooth/Kconfig.defaults b/app/src/split/bluetooth/Kconfig.defaults new file mode 100644 index 00000000..85bd4d62 --- /dev/null +++ b/app/src/split/bluetooth/Kconfig.defaults @@ -0,0 +1,40 @@ +# Copyright (c) 2024 The ZMK Contributors +# SPDX-License-Identifier: MIT + +if ZMK_BLE + +if ZMK_SPLIT_BLE + +config ZMK_SPLIT_BLE_PRIORITY + default 1 + +if ZMK_SPLIT_ROLE_CENTRAL + +config ZMK_SPLIT_BLE_CENTRAL_PERIPHERALS + default 1 + +config BT_MAX_CONN + default 6 + +config BT_MAX_PAIRED + default 6 + +#ZMK_SPLIT_BLE && ZMK_SPLIT_ROLE_CENTRAL +endif + +endif + +if !ZMK_SPLIT_BLE + +config BT_MAX_CONN + default 5 + +config BT_MAX_PAIRED + default 5 + +#!ZMK_SPLIT_BLE +endif + +#ZMK_BLE +endif + diff --git a/app/src/split/bluetooth/central.c b/app/src/split/bluetooth/central.c index 0f4cd78b..b4b61ce7 100644 --- a/app/src/split/bluetooth/central.c +++ b/app/src/split/bluetooth/central.c @@ -23,13 +23,16 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include #include #include +#include #include #include #include #include #include #include +#include #include +#include static int start_scanning(void); @@ -56,26 +59,94 @@ struct peripheral_slot { #if IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) uint16_t update_hid_indicators; #endif // IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) + uint16_t selected_physical_layout_handle; uint8_t position_state[POSITION_STATE_DATA_LEN]; uint8_t changed_positions[POSITION_STATE_DATA_LEN]; }; +#if IS_ENABLED(CONFIG_ZMK_INPUT_SPLIT) + +static const struct bt_uuid *gatt_ccc_uuid = BT_UUID_GATT_CCC; +static const struct bt_uuid *gatt_cpf_uuid = BT_UUID_GATT_CPF; + +struct peripheral_input_slot { + struct bt_conn *conn; + struct bt_gatt_subscribe_params sub; + uint8_t reg; +}; + +#define COUNT_INPUT_SPLIT(n) +1 + +static struct peripheral_input_slot + peripheral_input_slots[(0 DT_FOREACH_STATUS_OKAY(zmk_input_split, COUNT_INPUT_SPLIT))]; + +static bool input_slot_is_open(size_t i) { + return i < ARRAY_SIZE(peripheral_input_slots) && peripheral_input_slots[i].conn == NULL; +} + +static bool input_slot_is_pending(size_t i) { + return i < ARRAY_SIZE(peripheral_input_slots) && peripheral_input_slots[i].conn != NULL && + (!peripheral_input_slots[i].sub.value_handle || + !peripheral_input_slots[i].sub.ccc_handle || !peripheral_input_slots[i].reg); +} + +static int reserve_next_open_input_slot(struct peripheral_input_slot **slot, struct bt_conn *conn) { + for (size_t i = 0; i < ARRAY_SIZE(peripheral_input_slots); i++) { + if (input_slot_is_open(i)) { + peripheral_input_slots[i].conn = conn; + + // Clear out any previously set values + peripheral_input_slots[i].sub.value_handle = 0; + peripheral_input_slots[i].sub.ccc_handle = 0; + peripheral_input_slots[i].reg = 0; + *slot = &peripheral_input_slots[i]; + return i; + } + } + + return -ENOMEM; +} + +static int find_pending_input_slot(struct peripheral_input_slot **slot, struct bt_conn *conn) { + for (size_t i = 0; i < ARRAY_SIZE(peripheral_input_slots); i++) { + if (peripheral_input_slots[i].conn == conn && input_slot_is_pending(i)) { + *slot = &peripheral_input_slots[i]; + return i; + } + } + + return -ENODEV; +} + +void release_peripheral_input_subs(struct bt_conn *conn) { + for (size_t i = 0; i < ARRAY_SIZE(peripheral_input_slots); i++) { + if (peripheral_input_slots[i].conn == conn) { + peripheral_input_slots[i].conn = NULL; + zmk_input_split_peripheral_disconnected(peripheral_input_slots[i].reg); + } + } +} + +#endif // IS_ENABLED(CONFIG_ZMK_INPUT_SPLIT) + +static zmk_split_transport_central_status_changed_cb_t transport_status_cb; +static bool is_enabled; + static struct peripheral_slot peripherals[ZMK_SPLIT_BLE_PERIPHERAL_COUNT]; static bool is_scanning = false; static const struct bt_uuid_128 split_service_uuid = BT_UUID_INIT_128(ZMK_SPLIT_BT_SERVICE_UUID); -K_MSGQ_DEFINE(peripheral_event_msgq, sizeof(struct zmk_position_state_changed), +struct peripheral_event_wrapper { + uint8_t source; + struct zmk_split_transport_peripheral_event event; +}; + +K_MSGQ_DEFINE(peripheral_event_msgq, sizeof(struct peripheral_event_wrapper), CONFIG_ZMK_SPLIT_BLE_CENTRAL_POSITION_QUEUE_SIZE, 4); -void peripheral_event_work_callback(struct k_work *work) { - struct zmk_position_state_changed ev; - while (k_msgq_get(&peripheral_event_msgq, &ev, K_NO_WAIT) == 0) { - LOG_DBG("Trigger key position state change for %d", ev.position); - raise_zmk_position_state_changed(ev); - } -} +void peripheral_event_work_callback(struct k_work *work); K_WORK_DEFINE(peripheral_event_work, peripheral_event_work_callback); @@ -122,10 +193,13 @@ int release_peripheral_slot(int index) { for (int j = 0; j < 8; j++) { if (slot->position_state[i] & BIT(j)) { uint32_t position = (i * 8) + j; - struct zmk_position_state_changed ev = {.source = index, - .position = position, - .state = false, - .timestamp = k_uptime_get()}; + struct peripheral_event_wrapper ev = { + .source = index, + .event = {.type = ZMK_SPLIT_TRANSPORT_PERIPHERAL_EVENT_TYPE_KEY_POSITION_EVENT, + .data = {.key_position_event = { + .position = position, + .pressed = false, + }}}}; k_msgq_put(&peripheral_event_msgq, &ev, K_NO_WAIT); k_work_submit(&peripheral_event_work); @@ -141,6 +215,7 @@ int release_peripheral_slot(int index) { // Clean up previously discovered handles; slot->subscribe_params.value_handle = 0; slot->run_behavior_handle = 0; + slot->selected_physical_layout_handle = 0; #if IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) slot->update_hid_indicators = 0; #endif // IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) @@ -181,19 +256,13 @@ int confirm_peripheral_slot_conn(struct bt_conn *conn) { return 0; } +static void notify_transport_status(void); + +static void notify_status_work_cb(struct k_work *_work) { notify_transport_status(); } + +static K_WORK_DEFINE(notify_status_work, notify_status_work_cb); + #if ZMK_KEYMAP_HAS_SENSORS -K_MSGQ_DEFINE(peripheral_sensor_event_msgq, sizeof(struct zmk_sensor_event), - CONFIG_ZMK_SPLIT_BLE_CENTRAL_POSITION_QUEUE_SIZE, 4); - -void peripheral_sensor_event_work_callback(struct k_work *work) { - struct zmk_sensor_event ev; - while (k_msgq_get(&peripheral_sensor_event_msgq, &ev, K_NO_WAIT) == 0) { - LOG_DBG("Trigger sensor change for %d", ev.sensor_index); - raise_zmk_sensor_event(ev); - } -} - -K_WORK_DEFINE(peripheral_sensor_event_work, peripheral_sensor_event_work_callback); static uint8_t split_central_sensor_notify_func(struct bt_conn *conn, struct bt_gatt_subscribe_params *params, @@ -213,20 +282,70 @@ static uint8_t split_central_sensor_notify_func(struct bt_conn *conn, struct sensor_event sensor_event; memcpy(&sensor_event, data, MIN(length, sizeof(sensor_event))); - struct zmk_sensor_event ev = { - .sensor_index = sensor_event.sensor_index, - .channel_data_size = MIN(sensor_event.channel_data_size, ZMK_SENSOR_EVENT_MAX_CHANNELS), - .timestamp = k_uptime_get()}; + if (sensor_event.channel_data_size != 1) { + return BT_GATT_ITER_STOP; + } - memcpy(ev.channel_data, sensor_event.channel_data, - sizeof(struct zmk_sensor_channel_data) * sensor_event.channel_data_size); - k_msgq_put(&peripheral_sensor_event_msgq, &ev, K_NO_WAIT); - k_work_submit(&peripheral_sensor_event_work); + struct peripheral_event_wrapper event_wrapper = { + .source = peripheral_slot_index_for_conn(conn), + .event = {.type = ZMK_SPLIT_TRANSPORT_PERIPHERAL_EVENT_TYPE_SENSOR_EVENT, + .data = {.sensor_event = { + .channel_data = sensor_event.channel_data[0], + .sensor_index = sensor_event.sensor_index, + }}}}; + + k_msgq_put(&peripheral_event_msgq, &event_wrapper, K_NO_WAIT); + k_work_submit(&peripheral_event_work); return BT_GATT_ITER_CONTINUE; } #endif /* ZMK_KEYMAP_HAS_SENSORS */ +#if IS_ENABLED(CONFIG_ZMK_INPUT_SPLIT) + +static uint8_t peripheral_input_event_notify_cb(struct bt_conn *conn, + struct bt_gatt_subscribe_params *params, + const void *data, uint16_t length) { + if (!data) { + LOG_DBG("[UNSUBSCRIBED]"); + params->value_handle = 0U; + return BT_GATT_ITER_STOP; + } + + LOG_DBG("[INPUT EVENT] data %p length %u", data, length); + + if (length != sizeof(struct zmk_split_input_event_payload)) { + LOG_WRN("Ignoring input event notify with incorrect data length (%d)", length); + return BT_GATT_ITER_STOP; + } + + struct zmk_split_input_event_payload payload; + memcpy(&payload, data, MIN(length, sizeof(struct zmk_split_input_event_payload))); + + for (size_t i = 0; i < ARRAY_SIZE(peripheral_input_slots); i++) { + if (&peripheral_input_slots[i].sub == params) { + struct peripheral_event_wrapper event_wrapper = { + .source = peripheral_slot_index_for_conn(conn), + .event = {.type = ZMK_SPLIT_TRANSPORT_PERIPHERAL_EVENT_TYPE_INPUT_EVENT, + .data = {.input_event = { + .reg = peripheral_input_slots[i].reg, + .sync = payload.sync, + .code = payload.code, + .type = payload.type, + .value = payload.value, + }}}}; + + k_msgq_put(&peripheral_event_msgq, &event_wrapper, K_NO_WAIT); + k_work_submit(&peripheral_event_work); + break; + } + } + + return BT_GATT_ITER_CONTINUE; +} + +#endif + static uint8_t split_central_notify_func(struct bt_conn *conn, struct bt_gatt_subscribe_params *params, const void *data, uint16_t length) { @@ -248,20 +367,21 @@ static uint8_t split_central_notify_func(struct bt_conn *conn, for (int i = 0; i < POSITION_STATE_DATA_LEN; i++) { slot->changed_positions[i] = ((uint8_t *)data)[i] ^ slot->position_state[i]; slot->position_state[i] = ((uint8_t *)data)[i]; - LOG_DBG("data: %d", slot->position_state[i]); } + LOG_HEXDUMP_DBG(slot->position_state, POSITION_STATE_DATA_LEN, "data"); for (int i = 0; i < POSITION_STATE_DATA_LEN; i++) { for (int j = 0; j < 8; j++) { if (slot->changed_positions[i] & BIT(j)) { uint32_t position = (i * 8) + j; bool pressed = slot->position_state[i] & BIT(j); - struct zmk_position_state_changed ev = {.source = - peripheral_slot_index_for_conn(conn), - .position = position, - .state = pressed, - .timestamp = k_uptime_get()}; - + struct peripheral_event_wrapper ev = { + .source = peripheral_slot_index_for_conn(conn), + .event = {.type = ZMK_SPLIT_TRANSPORT_PERIPHERAL_EVENT_TYPE_KEY_POSITION_EVENT, + .data = {.key_position_event = { + .position = position, + .pressed = pressed, + }}}}; k_msgq_put(&peripheral_event_msgq, &ev, K_NO_WAIT); k_work_submit(&peripheral_event_work); } @@ -273,35 +393,6 @@ static uint8_t split_central_notify_func(struct bt_conn *conn, #if IS_ENABLED(CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_FETCHING) -static uint8_t peripheral_battery_levels[ZMK_SPLIT_BLE_PERIPHERAL_COUNT] = {0}; - -int zmk_split_get_peripheral_battery_level(uint8_t source, uint8_t *level) { - if (source >= ARRAY_SIZE(peripheral_battery_levels)) { - return -EINVAL; - } - - if (peripherals[source].state != PERIPHERAL_SLOT_STATE_CONNECTED) { - return -ENOTCONN; - } - - *level = peripheral_battery_levels[source]; - return 0; -} - -K_MSGQ_DEFINE(peripheral_batt_lvl_msgq, sizeof(struct zmk_peripheral_battery_state_changed), - CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_QUEUE_SIZE, 4); - -void peripheral_batt_lvl_change_callback(struct k_work *work) { - struct zmk_peripheral_battery_state_changed ev; - while (k_msgq_get(&peripheral_batt_lvl_msgq, &ev, K_NO_WAIT) == 0) { - LOG_DBG("Triggering peripheral battery level change %u", ev.state_of_charge); - peripheral_battery_levels[ev.source] = ev.state_of_charge; - raise_zmk_peripheral_battery_state_changed(ev); - } -} - -K_WORK_DEFINE(peripheral_batt_lvl_work, peripheral_batt_lvl_change_callback); - static uint8_t split_central_battery_level_notify_func(struct bt_conn *conn, struct bt_gatt_subscribe_params *params, const void *data, uint16_t length) { @@ -326,10 +417,16 @@ static uint8_t split_central_battery_level_notify_func(struct bt_conn *conn, LOG_DBG("[BATTERY LEVEL NOTIFICATION] data %p length %u", data, length); uint8_t battery_level = ((uint8_t *)data)[0]; LOG_DBG("Battery level: %u", battery_level); - struct zmk_peripheral_battery_state_changed ev = { - .source = peripheral_slot_index_for_conn(conn), .state_of_charge = battery_level}; - k_msgq_put(&peripheral_batt_lvl_msgq, &ev, K_NO_WAIT); - k_work_submit(&peripheral_batt_lvl_work); + + struct peripheral_event_wrapper ev = { + .source = peripheral_slot_index_for_conn(conn), + .event = {.type = ZMK_SPLIT_TRANSPORT_PERIPHERAL_EVENT_TYPE_BATTERY_EVENT, + .data = {.battery_event = { + .level = battery_level, + }}}}; + + k_msgq_put(&peripheral_event_msgq, &ev, K_NO_WAIT); + k_work_submit(&peripheral_event_work); return BT_GATT_ITER_CONTINUE; } @@ -365,10 +462,15 @@ static uint8_t split_central_battery_level_read_func(struct bt_conn *conn, uint8 LOG_DBG("Battery level: %u", battery_level); - struct zmk_peripheral_battery_state_changed ev = { - .source = peripheral_slot_index_for_conn(conn), .state_of_charge = battery_level}; - k_msgq_put(&peripheral_batt_lvl_msgq, &ev, K_NO_WAIT); - k_work_submit(&peripheral_batt_lvl_work); + struct peripheral_event_wrapper ev = { + .source = peripheral_slot_index_for_conn(conn), + .event = {.type = ZMK_SPLIT_TRANSPORT_PERIPHERAL_EVENT_TYPE_BATTERY_EVENT, + .data = {.battery_event = { + .level = battery_level, + }}}}; + + k_msgq_put(&peripheral_event_msgq, &ev, K_NO_WAIT); + k_work_submit(&peripheral_event_work); return BT_GATT_ITER_CONTINUE; } @@ -376,6 +478,7 @@ static uint8_t split_central_battery_level_read_func(struct bt_conn *conn, uint8 #endif /* IS_ENABLED(CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_FETCHING) */ static int split_central_subscribe(struct bt_conn *conn, struct bt_gatt_subscribe_params *params) { + atomic_set(params->flags, BT_GATT_SUBSCRIBE_FLAG_NO_RESUB); int err = bt_gatt_subscribe(conn, params); switch (err) { case -EALREADY: @@ -392,6 +495,46 @@ static int split_central_subscribe(struct bt_conn *conn, struct bt_gatt_subscrib return err; } +static int update_peripheral_selected_layout(struct peripheral_slot *slot, uint8_t layout_idx) { + if (slot->state != PERIPHERAL_SLOT_STATE_CONNECTED) { + return -ENOTCONN; + } + + if (slot->selected_physical_layout_handle == 0) { + // It appears that sometimes the peripheral is considered connected + // before the GATT characteristics have been discovered. If this is + // the case, the selected_physical_layout_handle will not yet be set. + return -EAGAIN; + } + + if (bt_conn_get_security(slot->conn) < BT_SECURITY_L2) { + return -EAGAIN; + } + + int err = bt_gatt_write_without_response(slot->conn, slot->selected_physical_layout_handle, + &layout_idx, sizeof(layout_idx), true); + + if (err < 0) { + LOG_ERR("Failed to write physical layout index to peripheral (err %d)", err); + } + + return err; +} + +static void update_peripherals_selected_physical_layout(struct k_work *_work) { + uint8_t layout_idx = zmk_physical_layouts_get_selected(); + for (int i = 0; i < ZMK_SPLIT_BLE_PERIPHERAL_COUNT; i++) { + if (peripherals[i].state != PERIPHERAL_SLOT_STATE_CONNECTED) { + continue; + } + + update_peripheral_selected_layout(&peripherals[i], layout_idx); + } +} + +K_WORK_DEFINE(update_peripherals_selected_layouts_work, + update_peripherals_selected_physical_layout); + static uint8_t split_central_chrc_discovery_func(struct bt_conn *conn, const struct bt_gatt_attr *attr, struct bt_gatt_discover_params *params) { @@ -412,62 +555,138 @@ static uint8_t split_central_chrc_discovery_func(struct bt_conn *conn, } LOG_DBG("[ATTRIBUTE] handle %u", attr->handle); - const struct bt_uuid *chrc_uuid = ((struct bt_gatt_chrc *)attr->user_data)->uuid; + switch (params->type) { + case BT_GATT_DISCOVER_CHARACTERISTIC: { + const struct bt_uuid *chrc_uuid = ((struct bt_gatt_chrc *)attr->user_data)->uuid; - if (bt_uuid_cmp(chrc_uuid, BT_UUID_DECLARE_128(ZMK_SPLIT_BT_CHAR_POSITION_STATE_UUID)) == 0) { - LOG_DBG("Found position state characteristic"); - slot->subscribe_params.disc_params = &slot->sub_discover_params; - slot->subscribe_params.end_handle = slot->discover_params.end_handle; - slot->subscribe_params.value_handle = bt_gatt_attr_value_handle(attr); - slot->subscribe_params.notify = split_central_notify_func; - slot->subscribe_params.value = BT_GATT_CCC_NOTIFY; - split_central_subscribe(conn, &slot->subscribe_params); + if (bt_uuid_cmp(chrc_uuid, BT_UUID_DECLARE_128(ZMK_SPLIT_BT_CHAR_POSITION_STATE_UUID)) == + 0) { + LOG_DBG("Found position state characteristic"); + slot->subscribe_params.disc_params = &slot->sub_discover_params; + slot->subscribe_params.end_handle = slot->discover_params.end_handle; + slot->subscribe_params.value_handle = bt_gatt_attr_value_handle(attr); + slot->subscribe_params.notify = split_central_notify_func; + slot->subscribe_params.value = BT_GATT_CCC_NOTIFY; + split_central_subscribe(conn, &slot->subscribe_params); #if ZMK_KEYMAP_HAS_SENSORS - } else if (bt_uuid_cmp(chrc_uuid, BT_UUID_DECLARE_128(ZMK_SPLIT_BT_CHAR_SENSOR_STATE_UUID)) == - 0) { - slot->discover_params.uuid = NULL; - slot->discover_params.start_handle = attr->handle + 2; - slot->discover_params.type = BT_GATT_DISCOVER_CHARACTERISTIC; + } else if (bt_uuid_cmp(chrc_uuid, + BT_UUID_DECLARE_128(ZMK_SPLIT_BT_CHAR_SENSOR_STATE_UUID)) == 0) { + slot->discover_params.uuid = NULL; + slot->discover_params.start_handle = attr->handle + 2; + slot->discover_params.type = BT_GATT_DISCOVER_CHARACTERISTIC; - slot->sensor_subscribe_params.disc_params = &slot->sub_discover_params; - slot->sensor_subscribe_params.end_handle = slot->discover_params.end_handle; - slot->sensor_subscribe_params.value_handle = bt_gatt_attr_value_handle(attr); - slot->sensor_subscribe_params.notify = split_central_sensor_notify_func; - slot->sensor_subscribe_params.value = BT_GATT_CCC_NOTIFY; - split_central_subscribe(conn, &slot->sensor_subscribe_params); + slot->sensor_subscribe_params.disc_params = &slot->sub_discover_params; + slot->sensor_subscribe_params.end_handle = slot->discover_params.end_handle; + slot->sensor_subscribe_params.value_handle = bt_gatt_attr_value_handle(attr); + slot->sensor_subscribe_params.notify = split_central_sensor_notify_func; + slot->sensor_subscribe_params.value = BT_GATT_CCC_NOTIFY; + split_central_subscribe(conn, &slot->sensor_subscribe_params); #endif /* ZMK_KEYMAP_HAS_SENSORS */ - } else if (bt_uuid_cmp(chrc_uuid, BT_UUID_DECLARE_128(ZMK_SPLIT_BT_CHAR_RUN_BEHAVIOR_UUID)) == - 0) { - LOG_DBG("Found run behavior handle"); - slot->discover_params.uuid = NULL; - slot->discover_params.start_handle = attr->handle + 2; - slot->run_behavior_handle = bt_gatt_attr_value_handle(attr); +#if IS_ENABLED(CONFIG_ZMK_INPUT_SPLIT) + } else if (bt_uuid_cmp(chrc_uuid, BT_UUID_DECLARE_128(ZMK_SPLIT_BT_INPUT_EVENT_UUID)) == + 0) { + LOG_DBG("Found an input characteristic"); + struct peripheral_input_slot *input_slot; + int ret = reserve_next_open_input_slot(&input_slot, conn); + if (ret < 0) { + LOG_WRN("No available slot for peripheral input subscriptions (%d)", ret); + + slot->discover_params.uuid = NULL; + slot->discover_params.start_handle = attr->handle + 1; + slot->discover_params.type = BT_GATT_DISCOVER_CHARACTERISTIC; + } else { + LOG_DBG("Reserved a slot for the input subscription"); + input_slot->sub.value_handle = bt_gatt_attr_value_handle(attr); + + slot->discover_params.uuid = gatt_ccc_uuid; + slot->discover_params.start_handle = attr->handle; + slot->discover_params.type = BT_GATT_DISCOVER_STD_CHAR_DESC; + } +#endif // IS_ENABLED(CONFIG_ZMK_INPUT_SPLIT) + } else if (bt_uuid_cmp(chrc_uuid, + BT_UUID_DECLARE_128(ZMK_SPLIT_BT_CHAR_RUN_BEHAVIOR_UUID)) == 0) { + LOG_DBG("Found run behavior handle"); + slot->discover_params.uuid = NULL; + slot->discover_params.start_handle = attr->handle + 2; + slot->run_behavior_handle = bt_gatt_attr_value_handle(attr); + } else if (!bt_uuid_cmp(((struct bt_gatt_chrc *)attr->user_data)->uuid, + BT_UUID_DECLARE_128(ZMK_SPLIT_BT_SELECT_PHYS_LAYOUT_UUID))) { + LOG_DBG("Found select physical layout handle"); + slot->selected_physical_layout_handle = bt_gatt_attr_value_handle(attr); + k_work_submit(&update_peripherals_selected_layouts_work); #if IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) - } else if (!bt_uuid_cmp(((struct bt_gatt_chrc *)attr->user_data)->uuid, - BT_UUID_DECLARE_128(ZMK_SPLIT_BT_UPDATE_HID_INDICATORS_UUID))) { - LOG_DBG("Found update HID indicators handle"); - slot->update_hid_indicators = bt_gatt_attr_value_handle(attr); + } else if (!bt_uuid_cmp(((struct bt_gatt_chrc *)attr->user_data)->uuid, + BT_UUID_DECLARE_128(ZMK_SPLIT_BT_UPDATE_HID_INDICATORS_UUID))) { + LOG_DBG("Found update HID indicators handle"); + slot->update_hid_indicators = bt_gatt_attr_value_handle(attr); #endif // IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) #if IS_ENABLED(CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_FETCHING) - } else if (!bt_uuid_cmp(((struct bt_gatt_chrc *)attr->user_data)->uuid, - BT_UUID_BAS_BATTERY_LEVEL)) { - LOG_DBG("Found battery level characteristics"); - slot->batt_lvl_subscribe_params.disc_params = &slot->sub_discover_params; - slot->batt_lvl_subscribe_params.end_handle = slot->discover_params.end_handle; - slot->batt_lvl_subscribe_params.value_handle = bt_gatt_attr_value_handle(attr); - slot->batt_lvl_subscribe_params.notify = split_central_battery_level_notify_func; - slot->batt_lvl_subscribe_params.value = BT_GATT_CCC_NOTIFY; - split_central_subscribe(conn, &slot->batt_lvl_subscribe_params); + } else if (!bt_uuid_cmp(((struct bt_gatt_chrc *)attr->user_data)->uuid, + BT_UUID_BAS_BATTERY_LEVEL)) { + LOG_DBG("Found battery level characteristics"); + slot->batt_lvl_subscribe_params.disc_params = &slot->sub_discover_params; + slot->batt_lvl_subscribe_params.end_handle = slot->discover_params.end_handle; + slot->batt_lvl_subscribe_params.value_handle = bt_gatt_attr_value_handle(attr); + slot->batt_lvl_subscribe_params.notify = split_central_battery_level_notify_func; + slot->batt_lvl_subscribe_params.value = BT_GATT_CCC_NOTIFY; + split_central_subscribe(conn, &slot->batt_lvl_subscribe_params); - slot->batt_lvl_read_params.func = split_central_battery_level_read_func; - slot->batt_lvl_read_params.handle_count = 1; - slot->batt_lvl_read_params.single.handle = bt_gatt_attr_value_handle(attr); - slot->batt_lvl_read_params.single.offset = 0; - bt_gatt_read(conn, &slot->batt_lvl_read_params); + slot->batt_lvl_read_params.func = split_central_battery_level_read_func; + slot->batt_lvl_read_params.handle_count = 1; + slot->batt_lvl_read_params.single.handle = bt_gatt_attr_value_handle(attr); + slot->batt_lvl_read_params.single.offset = 0; + bt_gatt_read(conn, &slot->batt_lvl_read_params); #endif /* IS_ENABLED(CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_FETCHING) */ + } + break; + } + case BT_GATT_DISCOVER_STD_CHAR_DESC: +#if IS_ENABLED(CONFIG_ZMK_INPUT_SPLIT) + if (bt_uuid_cmp(slot->discover_params.uuid, BT_UUID_GATT_CCC) == 0) { + LOG_DBG("Found input CCC descriptor"); + struct peripheral_input_slot *input_slot; + int ret = find_pending_input_slot(&input_slot, conn); + if (ret < 0) { + LOG_DBG("No pending input slot (%d)", ret); + slot->discover_params.uuid = NULL; + slot->discover_params.start_handle = attr->handle + 1; + slot->discover_params.type = BT_GATT_DISCOVER_CHARACTERISTIC; + } else { + LOG_DBG("Found pending input slot"); + input_slot->sub.ccc_handle = attr->handle; + + slot->discover_params.uuid = gatt_cpf_uuid; + slot->discover_params.start_handle = attr->handle + 1; + slot->discover_params.type = BT_GATT_DISCOVER_STD_CHAR_DESC; + } + } else if (bt_uuid_cmp(slot->discover_params.uuid, BT_UUID_GATT_CPF) == 0) { + LOG_DBG("Found input CPF descriptor"); + struct bt_gatt_cpf *cpf = attr->user_data; + struct peripheral_input_slot *input_slot; + int ret = find_pending_input_slot(&input_slot, conn); + if (ret < 0) { + LOG_DBG("No pending input slot (%d)", ret); + } else { + LOG_DBG("Found pending input slot"); + input_slot->reg = cpf->description; + input_slot->sub.notify = peripheral_input_event_notify_cb; + input_slot->sub.value = BT_GATT_CCC_NOTIFY; + int err = split_central_subscribe(conn, &input_slot->sub); + if (err < 0) { + LOG_WRN("Failed to subscribe to input notifications %d", err); + } + } + + slot->discover_params.uuid = NULL; + slot->discover_params.start_handle = attr->handle + 1; + slot->discover_params.type = BT_GATT_DISCOVER_CHARACTERISTIC; + } +#endif // IS_ENABLED(CONFIG_ZMK_INPUT_SPLIT) + break; } - bool subscribed = slot->run_behavior_handle && slot->subscribe_params.value_handle; + bool subscribed = slot->run_behavior_handle && slot->subscribe_params.value_handle && + slot->selected_physical_layout_handle; #if ZMK_KEYMAP_HAS_SENSORS subscribed = subscribed && slot->sensor_subscribe_params.value_handle; @@ -479,6 +698,14 @@ static uint8_t split_central_chrc_discovery_func(struct bt_conn *conn, #if IS_ENABLED(CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_FETCHING) subscribed = subscribed && slot->batt_lvl_subscribe_params.value_handle; #endif /* IS_ENABLED(CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_FETCHING) */ +#if IS_ENABLED(CONFIG_ZMK_INPUT_SPLIT) + for (size_t i = 0; i < ARRAY_SIZE(peripheral_input_slots); i++) { + if (input_slot_is_open(i) || input_slot_is_pending(i)) { + subscribed = false; + break; + } + } +#endif // IS_ENABLED(CONFIG_ZMK_INPUT_SPLIT) return subscribed ? BT_GATT_ITER_STOP : BT_GATT_ITER_CONTINUE; } @@ -656,6 +883,11 @@ static void split_central_device_found(const bt_addr_le_t *addr, int8_t rssi, ui } static int start_scanning(void) { + if (!is_enabled) { + LOG_DBG("Not scanning, we're disabled"); + return 0; + } + // No action is necessary if central is already scanning. if (is_scanning) { LOG_DBG("Scanning already running"); @@ -713,6 +945,7 @@ static void split_central_connected(struct bt_conn *conn, uint8_t conn_err) { confirm_peripheral_slot_conn(conn); split_central_process_connection(conn); + k_work_submit(¬ify_status_work); } static void split_central_disconnected(struct bt_conn *conn, uint8_t reason) { @@ -724,24 +957,56 @@ static void split_central_disconnected(struct bt_conn *conn, uint8_t reason) { LOG_DBG("Disconnected: %s (reason %d)", addr, reason); #if IS_ENABLED(CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_FETCHING) - struct zmk_peripheral_battery_state_changed ev = { - .source = peripheral_slot_index_for_conn(conn), .state_of_charge = 0}; - k_msgq_put(&peripheral_batt_lvl_msgq, &ev, K_NO_WAIT); - k_work_submit(&peripheral_batt_lvl_work); + struct peripheral_event_wrapper ev = { + .source = peripheral_slot_index_for_conn(conn), + .event = {.type = ZMK_SPLIT_TRANSPORT_PERIPHERAL_EVENT_TYPE_BATTERY_EVENT, + .data = {.battery_event = { + .level = 0, + }}}}; + + k_msgq_put(&peripheral_event_msgq, &ev, K_NO_WAIT); + k_work_submit(&peripheral_event_work); #endif // IS_ENABLED(CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_FETCHING) +#if IS_ENABLED(CONFIG_ZMK_INPUT_SPLIT) + release_peripheral_input_subs(conn); +#endif + err = release_peripheral_slot_for_conn(conn); if (err < 0) { + LOG_WRN("Failed to release peripheral slot (%d)", err); + } + + k_work_submit(¬ify_status_work); + + start_scanning(); +} + +static void split_central_security_changed(struct bt_conn *conn, bt_security_t level, + enum bt_security_err err) { + struct peripheral_slot *slot = peripheral_slot_for_conn(conn); + if (!slot || !slot->selected_physical_layout_handle) { return; } - start_scanning(); + if (err > 0) { + LOG_DBG("Skipping updating the physical layout for peripheral with security error"); + return; + } + + if (level < BT_SECURITY_L2) { + LOG_DBG("Skipping updating the physical layout for peripheral with insufficient security"); + return; + } + + k_work_submit(&update_peripherals_selected_layouts_work); } static struct bt_conn_cb conn_callbacks = { .connected = split_central_connected, .disconnected = split_central_disconnected, + .security_changed = split_central_security_changed, }; K_THREAD_STACK_DEFINE(split_central_split_run_q_stack, @@ -749,17 +1014,16 @@ K_THREAD_STACK_DEFINE(split_central_split_run_q_stack, struct k_work_q split_central_split_run_q; -struct zmk_split_run_behavior_payload_wrapper { +struct central_cmd_wrapper { uint8_t source; - struct zmk_split_run_behavior_payload payload; + struct zmk_split_transport_central_command cmd; }; -K_MSGQ_DEFINE(zmk_split_central_split_run_msgq, - sizeof(struct zmk_split_run_behavior_payload_wrapper), +K_MSGQ_DEFINE(zmk_split_central_split_run_msgq, sizeof(struct central_cmd_wrapper), CONFIG_ZMK_SPLIT_BLE_CENTRAL_SPLIT_RUN_QUEUE_SIZE, 4); void split_central_split_run_callback(struct k_work *work) { - struct zmk_split_run_behavior_payload_wrapper payload_wrapper; + struct central_cmd_wrapper payload_wrapper; LOG_DBG(""); @@ -768,34 +1032,85 @@ void split_central_split_run_callback(struct k_work *work) { LOG_ERR("Source not connected"); continue; } - if (!peripherals[payload_wrapper.source].run_behavior_handle) { - LOG_ERR("Run behavior handle not found"); - continue; + + switch (payload_wrapper.cmd.type) { + case ZMK_SPLIT_TRANSPORT_CENTRAL_CMD_TYPE_INVOKE_BEHAVIOR: { + if (!peripherals[payload_wrapper.source].run_behavior_handle) { + LOG_ERR("Run behavior handle not found"); + continue; + } + + struct zmk_split_run_behavior_payload payload = { + .data = { + .param1 = payload_wrapper.cmd.data.invoke_behavior.param1, + .param2 = payload_wrapper.cmd.data.invoke_behavior.param2, + .position = payload_wrapper.cmd.data.invoke_behavior.position, + .source = payload_wrapper.cmd.data.invoke_behavior.event_source, + .state = payload_wrapper.cmd.data.invoke_behavior.state ? 1 : 0, + }}; + const size_t payload_dev_size = sizeof(payload.behavior_dev); + if (strlcpy(payload.behavior_dev, payload_wrapper.cmd.data.invoke_behavior.behavior_dev, + payload_dev_size) >= payload_dev_size) { + LOG_ERR("Truncated behavior label %s to %s before invoking peripheral behavior", + payload_wrapper.cmd.data.invoke_behavior.behavior_dev, + payload.behavior_dev); + } + + int err = bt_gatt_write_without_response( + peripherals[payload_wrapper.source].conn, + peripherals[payload_wrapper.source].run_behavior_handle, &payload, + sizeof(struct zmk_split_run_behavior_payload), true); + + if (err) { + LOG_ERR("Failed to write the behavior characteristic (err %d)", err); + } + break; } + case ZMK_SPLIT_TRANSPORT_CENTRAL_CMD_TYPE_SET_PHYSICAL_LAYOUT: + update_peripheral_selected_layout( + &peripherals[payload_wrapper.source], + payload_wrapper.cmd.data.set_physical_layout.layout_idx); + break; +#if IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) + case ZMK_SPLIT_TRANSPORT_CENTRAL_CMD_TYPE_SET_HID_INDICATORS: + LOG_WRN("do the indicators dance"); + if (peripherals[payload_wrapper.source].update_hid_indicators == 0) { + // It appears that sometimes the peripheral is considered connected + // before the GATT characteristics have been discovered. If this is + // the case, the update_hid_indicators handle will not yet be set. + LOG_WRN("NO HANDLE TO SET ON PERIPHERAL"); + break; + } - int err = bt_gatt_write_without_response( - peripherals[payload_wrapper.source].conn, - peripherals[payload_wrapper.source].run_behavior_handle, &payload_wrapper.payload, - sizeof(struct zmk_split_run_behavior_payload), true); + int err = bt_gatt_write_without_response( + peripherals[payload_wrapper.source].conn, + peripherals[payload_wrapper.source].update_hid_indicators, + &payload_wrapper.cmd.data.set_hid_indicators.indicators, + sizeof(payload_wrapper.cmd.data.set_hid_indicators.indicators), true); - if (err) { - LOG_ERR("Failed to write the behavior characteristic (err %d)", err); + if (err) { + LOG_ERR("Failed to write HID indicator characteristic (err %d)", err); + } + break; +#endif // IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) + default: + LOG_WRN("Unsupported wrapped central command type %d", payload_wrapper.cmd.type); + return; } } } K_WORK_DEFINE(split_central_split_run_work, split_central_split_run_callback); -static int -split_bt_invoke_behavior_payload(struct zmk_split_run_behavior_payload_wrapper payload_wrapper) { +static int split_bt_invoke_behavior_payload(struct central_cmd_wrapper payload_wrapper) { LOG_DBG(""); int err = k_msgq_put(&zmk_split_central_split_run_msgq, &payload_wrapper, K_MSEC(100)); if (err) { switch (err) { case -EAGAIN: { - LOG_WRN("Consumer message queue full, popping first message and queueing again"); - struct zmk_split_run_behavior_payload_wrapper discarded_report; + LOG_WRN("Run command message queue full, popping first message and queueing again"); + struct central_cmd_wrapper discarded_report; k_msgq_get(&zmk_split_central_split_run_msgq, &discarded_report, K_NO_WAIT); return split_bt_invoke_behavior_payload(payload_wrapper); } @@ -810,65 +1125,9 @@ split_bt_invoke_behavior_payload(struct zmk_split_run_behavior_payload_wrapper p return 0; }; -int zmk_split_bt_invoke_behavior(uint8_t source, struct zmk_behavior_binding *binding, - struct zmk_behavior_binding_event event, bool state) { - struct zmk_split_run_behavior_payload payload = {.data = { - .param1 = binding->param1, - .param2 = binding->param2, - .position = event.position, - .state = state ? 1 : 0, - }}; - const size_t payload_dev_size = sizeof(payload.behavior_dev); - if (strlcpy(payload.behavior_dev, binding->behavior_dev, payload_dev_size) >= - payload_dev_size) { - LOG_ERR("Truncated behavior label %s to %s before invoking peripheral behavior", - binding->behavior_dev, payload.behavior_dev); - } +static int finish_init(); - struct zmk_split_run_behavior_payload_wrapper wrapper = {.source = source, .payload = payload}; - return split_bt_invoke_behavior_payload(wrapper); -} - -#if IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) - -static zmk_hid_indicators_t hid_indicators = 0; - -static void split_central_update_indicators_callback(struct k_work *work) { - zmk_hid_indicators_t indicators = hid_indicators; - for (int i = 0; i < ZMK_SPLIT_BLE_PERIPHERAL_COUNT; i++) { - if (peripherals[i].state != PERIPHERAL_SLOT_STATE_CONNECTED) { - continue; - } - - if (peripherals[i].update_hid_indicators == 0) { - // It appears that sometimes the peripheral is considered connected - // before the GATT characteristics have been discovered. If this is - // the case, the update_hid_indicators handle will not yet be set. - continue; - } - - int err = bt_gatt_write_without_response(peripherals[i].conn, - peripherals[i].update_hid_indicators, &indicators, - sizeof(indicators), true); - - if (err) { - LOG_ERR("Failed to write HID indicator characteristic (err %d)", err); - } - } -} - -static K_WORK_DEFINE(split_central_update_indicators, split_central_update_indicators_callback); - -int zmk_split_bt_update_hid_indicator(zmk_hid_indicators_t indicators) { - hid_indicators = indicators; - return k_work_submit_to_queue(&split_central_split_run_q, &split_central_update_indicators); -} - -#endif // IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) - -static int finish_init() { - return IS_ENABLED(CONFIG_ZMK_BLE_CLEAR_BONDS_ON_START) ? 0 : start_scanning(); -} +static bool settings_loaded = false; #if IS_ENABLED(CONFIG_SETTINGS) @@ -897,3 +1156,135 @@ static int zmk_split_bt_central_init(void) { } SYS_INIT(zmk_split_bt_central_init, APPLICATION, CONFIG_ZMK_BLE_INIT_PRIORITY); + +static int zmk_split_bt_central_listener_cb(const zmk_event_t *eh) { + if (as_zmk_physical_layout_selection_changed(eh)) { + k_work_submit(&update_peripherals_selected_layouts_work); + } + return ZMK_EV_EVENT_BUBBLE; +} + +ZMK_LISTENER(zmk_split_bt_central, zmk_split_bt_central_listener_cb); +ZMK_SUBSCRIPTION(zmk_split_bt_central, zmk_physical_layout_selection_changed); + +static int split_central_bt_send_command(uint8_t source, + struct zmk_split_transport_central_command cmd) { + if (source >= ARRAY_SIZE(peripherals)) { + return -EINVAL; + } + + switch (cmd.type) { + case ZMK_SPLIT_TRANSPORT_CENTRAL_CMD_TYPE_SET_HID_INDICATORS: + case ZMK_SPLIT_TRANSPORT_CENTRAL_CMD_TYPE_SET_PHYSICAL_LAYOUT: + case ZMK_SPLIT_TRANSPORT_CENTRAL_CMD_TYPE_INVOKE_BEHAVIOR: { + struct central_cmd_wrapper wrapper = {.source = source, .cmd = cmd}; + return split_bt_invoke_behavior_payload(wrapper); + } + case ZMK_SPLIT_TRANSPORT_CENTRAL_CMD_TYPE_POLL_EVENTS: + return -ENOTSUP; + default: + return -ENOTSUP; + } + + return 0; +} + +static int split_central_bt_get_available_source_ids(uint8_t *sources) { + int count = 0; + for (int i = 0; i < ZMK_SPLIT_BLE_PERIPHERAL_COUNT; i++) { + if (peripherals[i].state != PERIPHERAL_SLOT_STATE_CONNECTED) { + continue; + } + + sources[count++] = i; + } + + return count; +} + +static int split_central_bt_set_enabled(bool enabled) { + is_enabled = enabled; + if (enabled) { + return start_scanning(); + } else { + int err = stop_scanning(); + if (err < 0) { + LOG_WRN("Failed to stop scanning for peripherals (%d)", err); + } + + for (int i = 0; i < ZMK_SPLIT_BLE_PERIPHERAL_COUNT; i++) { + if (peripherals[i].state != PERIPHERAL_SLOT_STATE_CONNECTED) { + continue; + } + + err = bt_conn_disconnect(peripherals[i].conn, BT_HCI_ERR_REMOTE_USER_TERM_CONN); + if (err < 0) { + LOG_WRN("Failed to disconnect a peripheral (%d)", err); + } + } + + return 0; + } +} + +static int +split_central_bt_set_status_callback(zmk_split_transport_central_status_changed_cb_t cb) { + transport_status_cb = cb; + return 0; +} + +static struct zmk_split_transport_status split_central_bt_get_status() { + uint8_t _source_ids[ZMK_SPLIT_BLE_PERIPHERAL_COUNT]; + + int count = split_central_bt_get_available_source_ids(_source_ids); + + enum zmk_split_transport_connections_status conn_status; + + if (count == 0) { + conn_status = ZMK_SPLIT_TRANSPORT_CONNECTIONS_STATUS_DISCONNECTED; + } else if (count == ZMK_SPLIT_BLE_PERIPHERAL_COUNT) { + conn_status = ZMK_SPLIT_TRANSPORT_CONNECTIONS_STATUS_ALL_CONNECTED; + } else { + conn_status = ZMK_SPLIT_TRANSPORT_CONNECTIONS_STATUS_SOME_CONNECTED; + } + + return (struct zmk_split_transport_status){ + .available = !IS_ENABLED(CONFIG_ZMK_BLE_CLEAR_BONDS_ON_START) && settings_loaded, + .enabled = is_enabled, + .connections = conn_status, + }; +} + +static const struct zmk_split_transport_central_api central_api = { + .send_command = split_central_bt_send_command, + .get_available_source_ids = split_central_bt_get_available_source_ids, + .set_enabled = split_central_bt_set_enabled, + .set_status_callback = split_central_bt_set_status_callback, + .get_status = split_central_bt_get_status, +}; + +ZMK_SPLIT_TRANSPORT_CENTRAL_REGISTER(bt_central, ¢ral_api, CONFIG_ZMK_SPLIT_BLE_PRIORITY); + +static void notify_transport_status(void) { + if (transport_status_cb) { + transport_status_cb(&bt_central, split_central_bt_get_status()); + } +} + +static int finish_init() { + settings_loaded = true; + + if (!transport_status_cb) { + return 0; + } + + return transport_status_cb(&bt_central, split_central_bt_get_status()); +} + +void peripheral_event_work_callback(struct k_work *work) { + struct peripheral_event_wrapper ev; + while (k_msgq_get(&peripheral_event_msgq, &ev, K_NO_WAIT) == 0) { + LOG_DBG("Trigger key position state change of type %d", ev.event.type); + zmk_split_transport_central_peripheral_event_handler(&bt_central, ev.source, ev.event); + } +} diff --git a/app/src/split/bluetooth/central_bas_proxy.c b/app/src/split/bluetooth/central_bas_proxy.c index 9515e556..f706d78f 100644 --- a/app/src/split/bluetooth/central_bas_proxy.c +++ b/app/src/split/bluetooth/central_bas_proxy.c @@ -18,7 +18,7 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include #include #include -#include +#include static void blvl_ccc_cfg_changed(const struct bt_gatt_attr *attr, uint16_t value) { ARG_UNUSED(attr); @@ -30,9 +30,9 @@ static void blvl_ccc_cfg_changed(const struct bt_gatt_attr *attr, uint16_t value static ssize_t read_blvl(struct bt_conn *conn, const struct bt_gatt_attr *attr, void *buf, uint16_t len, uint16_t offset) { - const uint8_t source = (uint8_t)(uint32_t)attr->user_data; + const uint8_t source = *(uint8_t *)attr->user_data; uint8_t level = 0; - int rc = zmk_split_get_peripheral_battery_level(source, &level); + int rc = zmk_split_central_get_peripheral_battery_level(source, &level); if (rc == -EINVAL) { LOG_ERR("Invalid peripheral index requested for battery level read: %d", source); @@ -60,7 +60,7 @@ static const struct bt_gatt_cpf aux_level_cpf = { #define PERIPH_BATT_LEVEL_ATTRS(i, _) \ BT_GATT_CHARACTERISTIC(BT_UUID_BAS_BATTERY_LEVEL, BT_GATT_CHRC_READ | BT_GATT_CHRC_NOTIFY, \ - BT_GATT_PERM_READ, read_blvl, NULL, i), \ + BT_GATT_PERM_READ, read_blvl, NULL, ((uint8_t[]){i})), \ BT_GATT_CCC(blvl_ccc_cfg_changed, BT_GATT_PERM_READ | BT_GATT_PERM_WRITE), \ BT_GATT_CPF(&aux_level_cpf), BT_GATT_CUD(PERIPH_CUD(i), BT_GATT_PERM_READ), diff --git a/app/src/split/bluetooth/peripheral.c b/app/src/split/bluetooth/peripheral.c index 5a12e0fc..0d3ad2de 100644 --- a/app/src/split/bluetooth/peripheral.c +++ b/app/src/split/bluetooth/peripheral.c @@ -20,6 +20,9 @@ #include #include +#include "peripheral.h" +#include "service.h" + #if IS_ENABLED(CONFIG_SETTINGS) #include @@ -65,11 +68,12 @@ static int start_advertising(bool low_duty) { return bt_le_adv_start(&adv_param, NULL, 0, NULL, 0); } else { is_bonded = false; - return bt_le_adv_start(BT_LE_ADV_CONN, zmk_ble_ad, ARRAY_SIZE(zmk_ble_ad), NULL, 0); + return bt_le_adv_start(BT_LE_ADV_CONN_FAST_2, zmk_ble_ad, ARRAY_SIZE(zmk_ble_ad), NULL, 0); } }; static bool low_duty_advertising = false; +static bool enabled = false; static void advertising_cb(struct k_work *work) { const int err = start_advertising(low_duty_advertising); @@ -86,12 +90,19 @@ static void connected(struct bt_conn *conn, uint8_t err) { raise_zmk_split_peripheral_status_changed( (struct zmk_split_peripheral_status_changed){.connected = is_connected}); - if (err == BT_HCI_ERR_ADV_TIMEOUT) { + if (err == BT_HCI_ERR_ADV_TIMEOUT && enabled) { low_duty_advertising = true; k_work_submit(&advertising_work); } } +static void recycled(void) { + if (enabled) { + low_duty_advertising = false; + k_work_submit(&advertising_work); + } +} + static void disconnected(struct bt_conn *conn, uint8_t reason) { char addr[BT_ADDR_LE_STR_LEN]; @@ -103,9 +114,6 @@ static void disconnected(struct bt_conn *conn, uint8_t reason) { raise_zmk_split_peripheral_status_changed( (struct zmk_split_peripheral_status_changed){.connected = is_connected}); - - low_duty_advertising = false; - k_work_submit(&advertising_work); } static void security_changed(struct bt_conn *conn, bt_security_t level, enum bt_security_err err) { @@ -132,6 +140,7 @@ static void le_param_updated(struct bt_conn *conn, uint16_t interval, uint16_t l static struct bt_conn_cb conn_callbacks = { .connected = connected, .disconnected = disconnected, + .recycled = recycled, .security_changed = security_changed, .le_param_updated = le_param_updated, }; @@ -146,6 +155,85 @@ bool zmk_split_bt_peripheral_is_connected(void) { return is_connected; } bool zmk_split_bt_peripheral_is_bonded(void) { return is_bonded; } +static zmk_split_transport_peripheral_status_changed_cb_t transport_status_cb; + +static int +split_peripheral_bt_set_status_callback(zmk_split_transport_peripheral_status_changed_cb_t cb) { + transport_status_cb = cb; + return 0; +} + +static void find_first_conn(struct bt_conn *conn, void *data) { + struct bt_conn **cp = (struct bt_conn **)data; + + *cp = conn; +} + +static int split_peripheral_bt_set_enabled(bool en) { + int err; + + enabled = en; + if (en) { + k_work_submit(&advertising_work); + return 0; + } else { + struct bt_conn *conn = NULL; + bt_conn_foreach(BT_CONN_TYPE_LE, find_first_conn, &conn); + if (conn) { + err = bt_conn_disconnect(conn, BT_HCI_ERR_REMOTE_USER_TERM_CONN); + if (err < 0) { + LOG_WRN("Failed to disconnect connection to central (%d)", err); + } + } + + err = bt_le_adv_stop(); + + if (err < 0) { + LOG_WRN("Failed to stop advertising (%d)", err); + } + + return 0; + } +} + +static void notify_transport_status(void); + +static void notify_status_work_cb(struct k_work *_work) { notify_transport_status(); } + +static K_WORK_DEFINE(notify_status_work, notify_status_work_cb); + +static bool settings_loaded = false; + +static struct zmk_split_transport_status split_peripheral_bt_get_status(void) { + return (struct zmk_split_transport_status){ + .available = !IS_ENABLED(CONFIG_ZMK_BLE_CLEAR_BONDS_ON_START) && settings_loaded, + .enabled = enabled, + .connections = zmk_split_bt_peripheral_is_connected() + ? ZMK_SPLIT_TRANSPORT_CONNECTIONS_STATUS_ALL_CONNECTED + : ZMK_SPLIT_TRANSPORT_CONNECTIONS_STATUS_DISCONNECTED, + }; +} + +static const struct zmk_split_transport_peripheral_api peripheral_api = { + .report_event = zmk_split_transport_peripheral_bt_report_event, + .set_enabled = split_peripheral_bt_set_enabled, + .set_status_callback = split_peripheral_bt_set_status_callback, + .get_status = split_peripheral_bt_get_status, +}; + +ZMK_SPLIT_TRANSPORT_PERIPHERAL_REGISTER(bt_peripheral, &peripheral_api, + CONFIG_ZMK_SPLIT_BLE_PRIORITY); + +struct zmk_split_transport_peripheral *zmk_split_transport_peripheral_bt(void) { + return &bt_peripheral; +} + +static void notify_transport_status(void) { + if (transport_status_cb) { + transport_status_cb(&bt_peripheral, split_peripheral_bt_get_status()); + } +} + static int zmk_peripheral_ble_complete_startup(void) { #if IS_ENABLED(CONFIG_ZMK_BLE_CLEAR_BONDS_ON_START) LOG_WRN("Clearing all existing BLE bond information from the keyboard"); @@ -156,7 +244,9 @@ static int zmk_peripheral_ble_complete_startup(void) { bt_conn_auth_info_cb_register(&zmk_peripheral_ble_auth_info_cb); low_duty_advertising = false; - k_work_submit(&advertising_work); + + settings_loaded = true; + k_work_submit(¬ify_status_work); #endif return 0; diff --git a/app/src/split/bluetooth/peripheral.h b/app/src/split/bluetooth/peripheral.h new file mode 100644 index 00000000..fd6c22f4 --- /dev/null +++ b/app/src/split/bluetooth/peripheral.h @@ -0,0 +1,12 @@ +/* + * Copyright (c) 2025 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#pragma once + +#include +#include + +struct zmk_split_transport_peripheral *zmk_split_transport_peripheral_bt(void); \ No newline at end of file diff --git a/app/src/split/bluetooth/service.c b/app/src/split/bluetooth/service.c index 505eb363..5bbed137 100644 --- a/app/src/split/bluetooth/service.c +++ b/app/src/split/bluetooth/service.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include @@ -17,11 +18,16 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include #include +#include #include #include +#include +#include #include #include +#include "peripheral.h" + #if IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) #include #endif // IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) @@ -58,48 +64,7 @@ static ssize_t split_svc_pos_state(struct bt_conn *conn, const struct bt_gatt_at static ssize_t split_svc_run_behavior(struct bt_conn *conn, const struct bt_gatt_attr *attrs, const void *buf, uint16_t len, uint16_t offset, - uint8_t flags) { - struct zmk_split_run_behavior_payload *payload = attrs->user_data; - uint16_t end_addr = offset + len; - - LOG_DBG("offset %d len %d", offset, len); - - if (end_addr > sizeof(struct zmk_split_run_behavior_payload)) { - return BT_GATT_ERR(BT_ATT_ERR_INVALID_OFFSET); - } - - memcpy(payload + offset, buf, len); - - // We run if: - // 1: We've gotten all the position/state/param data. - // 2: We have a null terminated string for the behavior device label. - const size_t behavior_dev_offset = - offsetof(struct zmk_split_run_behavior_payload, behavior_dev); - if ((end_addr > sizeof(struct zmk_split_run_behavior_data)) && - payload->behavior_dev[end_addr - behavior_dev_offset - 1] == '\0') { - struct zmk_behavior_binding binding = { - .param1 = payload->data.param1, - .param2 = payload->data.param2, - .behavior_dev = payload->behavior_dev, - }; - LOG_DBG("%s with params %d %d: pressed? %d", binding.behavior_dev, binding.param1, - binding.param2, payload->data.state); - struct zmk_behavior_binding_event event = {.position = payload->data.position, - .timestamp = k_uptime_get()}; - int err; - if (payload->data.state > 0) { - err = behavior_keymap_binding_pressed(&binding, event); - } else { - err = behavior_keymap_binding_released(&binding, event); - } - - if (err) { - LOG_ERR("Failed to invoke behavior %s: %d", binding.behavior_dev, err); - } - } - - return len; -} + uint8_t flags); static ssize_t split_svc_num_of_positions(struct bt_conn *conn, const struct bt_gatt_attr *attrs, void *buf, uint16_t len, uint16_t offset) { @@ -138,6 +103,81 @@ static ssize_t split_svc_update_indicators(struct bt_conn *conn, const struct bt #endif // IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) +static uint8_t selected_phys_layout = 0; + +static void split_svc_select_phys_layout_callback(struct k_work *work) { + LOG_DBG("Selecting physical layout after GATT write of %d", selected_phys_layout); + zmk_physical_layouts_select(selected_phys_layout); +} + +static K_WORK_DEFINE(split_svc_select_phys_layout_work, split_svc_select_phys_layout_callback); + +static ssize_t split_svc_select_phys_layout(struct bt_conn *conn, const struct bt_gatt_attr *attr, + const void *buf, uint16_t len, uint16_t offset, + uint8_t flags) { + if (offset + len > sizeof(uint8_t) || len == 0) { + return BT_GATT_ERR(BT_ATT_ERR_INVALID_OFFSET); + } + + selected_phys_layout = *(uint8_t *)buf; + + k_work_submit(&split_svc_select_phys_layout_work); + + return len; +} + +static ssize_t split_svc_get_selected_phys_layout(struct bt_conn *conn, + const struct bt_gatt_attr *attrs, void *buf, + uint16_t len, uint16_t offset) { + int selected_ret = zmk_physical_layouts_get_selected(); + if (selected_ret < 0) { + return BT_GATT_ERR(BT_ATT_ERR_VALUE_NOT_ALLOWED); + } + + uint8_t selected = (uint8_t)selected_ret; + + return bt_gatt_attr_read(conn, attrs, buf, len, offset, &selected, sizeof(selected)); +} + +#if IS_ENABLED(CONFIG_ZMK_INPUT_SPLIT) + +static void split_input_events_ccc(const struct bt_gatt_attr *attr, uint16_t value) { + LOG_DBG("value %d", value); +} + +// Duplicated from Zephyr, since it is internal there +struct gatt_cpf { + uint8_t format; + int8_t exponent; + uint16_t unit; + uint8_t name_space; + uint16_t description; +} __packed; + +ssize_t bt_gatt_attr_read_input_split_cpf(struct bt_conn *conn, const struct bt_gatt_attr *attr, + void *buf, uint16_t len, uint16_t offset) { + uint16_t reg = (uint16_t)(uint32_t)attr->user_data; + struct gatt_cpf value; + + value.format = 0x1B; // Struct + value.exponent = 0; + value.unit = sys_cpu_to_le16(0x2700); // Unitless + value.name_space = 0x01; // Bluetooth SIG + value.description = sys_cpu_to_le16(reg); + + return bt_gatt_attr_read(conn, attr, buf, len, offset, &value, sizeof(value)); +} + +#define INPUT_SPLIT_CHARS(node_id) \ + BT_GATT_CHARACTERISTIC(BT_UUID_DECLARE_128(ZMK_SPLIT_BT_INPUT_EVENT_UUID), \ + BT_GATT_CHRC_NOTIFY, BT_GATT_PERM_READ_ENCRYPT, NULL, NULL, NULL), \ + BT_GATT_CCC(split_input_events_ccc, \ + BT_GATT_PERM_READ_ENCRYPT | BT_GATT_PERM_WRITE_ENCRYPT), \ + BT_GATT_DESCRIPTOR(BT_UUID_GATT_CPF, BT_GATT_PERM_READ, bt_gatt_attr_read_input_split_cpf, \ + NULL, (void *)DT_REG_ADDR(node_id)), + +#endif + BT_GATT_SERVICE_DEFINE( split_svc, BT_GATT_PRIMARY_SERVICE(BT_UUID_DECLARE_128(ZMK_SPLIT_BT_SERVICE_UUID)), BT_GATT_CHARACTERISTIC(BT_UUID_DECLARE_128(ZMK_SPLIT_BT_CHAR_POSITION_STATE_UUID), @@ -155,12 +195,17 @@ BT_GATT_SERVICE_DEFINE( split_svc_sensor_state, NULL, &last_sensor_event), BT_GATT_CCC(split_svc_sensor_state_ccc, BT_GATT_PERM_READ_ENCRYPT | BT_GATT_PERM_WRITE_ENCRYPT), #endif /* ZMK_KEYMAP_HAS_SENSORS */ + DT_FOREACH_STATUS_OKAY(zmk_input_split, INPUT_SPLIT_CHARS) #if IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) - BT_GATT_CHARACTERISTIC(BT_UUID_DECLARE_128(ZMK_SPLIT_BT_UPDATE_HID_INDICATORS_UUID), - BT_GATT_CHRC_WRITE_WITHOUT_RESP, BT_GATT_PERM_WRITE_ENCRYPT, NULL, - split_svc_update_indicators, NULL), + BT_GATT_CHARACTERISTIC(BT_UUID_DECLARE_128(ZMK_SPLIT_BT_UPDATE_HID_INDICATORS_UUID), + BT_GATT_CHRC_WRITE_WITHOUT_RESP, BT_GATT_PERM_WRITE_ENCRYPT, NULL, + split_svc_update_indicators, NULL), #endif // IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) -); + BT_GATT_CHARACTERISTIC(BT_UUID_DECLARE_128(ZMK_SPLIT_BT_SELECT_PHYS_LAYOUT_UUID), + BT_GATT_CHRC_WRITE | BT_GATT_CHRC_READ, + BT_GATT_PERM_WRITE_ENCRYPT | BT_GATT_PERM_READ_ENCRYPT, + split_svc_get_selected_phys_layout, split_svc_select_phys_layout, + NULL), ); K_THREAD_STACK_DEFINE(service_q_stack, CONFIG_ZMK_SPLIT_BLE_PERIPHERAL_STACK_SIZE); @@ -203,12 +248,12 @@ int send_position_state() { return 0; } -int zmk_split_bt_position_pressed(uint8_t position) { +static int zmk_split_bt_position_pressed(uint8_t position) { WRITE_BIT(position_state[position / 8], position % 8, true); return send_position_state(); } -int zmk_split_bt_position_released(uint8_t position) { +static int zmk_split_bt_position_released(uint8_t position) { WRITE_BIT(position_state[position / 8], position % 8, false); return send_position_state(); } @@ -250,9 +295,9 @@ int send_sensor_state(struct sensor_event ev) { return 0; } -int zmk_split_bt_sensor_triggered(uint8_t sensor_index, - const struct zmk_sensor_channel_data channel_data[], - size_t channel_data_size) { +static int zmk_split_bt_sensor_triggered(uint8_t sensor_index, + const struct zmk_sensor_channel_data channel_data[], + size_t channel_data_size) { if (channel_data_size > ZMK_SENSOR_EVENT_MAX_CHANNELS) { return -EINVAL; } @@ -265,6 +310,30 @@ int zmk_split_bt_sensor_triggered(uint8_t sensor_index, } #endif /* ZMK_KEYMAP_HAS_SENSORS */ +#if IS_ENABLED(CONFIG_ZMK_INPUT_SPLIT) + +static int zmk_split_bt_report_input(uint8_t reg, uint8_t type, uint16_t code, int32_t value, + bool sync) { + + for (size_t i = 0; i < split_svc.attr_count; i++) { + if (bt_uuid_cmp(split_svc.attrs[i].uuid, + BT_UUID_DECLARE_128(ZMK_SPLIT_BT_INPUT_EVENT_UUID)) == 0 && + (uint8_t)(uint32_t)split_svc.attrs[i + 2].user_data == reg) { + struct zmk_split_input_event_payload payload = { + .type = type, + .code = code, + .value = value, + .sync = sync ? 1 : 0, + }; + + return bt_gatt_notify(NULL, &split_svc.attrs[i], &payload, sizeof(payload)); + } + } + return -ENODEV; +} + +#endif /* IS_ENABLED(CONFIG_ZMK_INPUT_SPLIT) */ + static int service_init(void) { static const struct k_work_queue_config queue_config = { .name = "Split Peripheral Notification Queue"}; @@ -275,3 +344,94 @@ static int service_init(void) { } SYS_INIT(service_init, APPLICATION, CONFIG_ZMK_BLE_INIT_PRIORITY); + +int zmk_split_transport_peripheral_bt_report_event( + const struct zmk_split_transport_peripheral_event *ev) { + switch (ev->type) { + case ZMK_SPLIT_TRANSPORT_PERIPHERAL_EVENT_TYPE_KEY_POSITION_EVENT: + if (ev->data.key_position_event.pressed) { + zmk_split_bt_position_pressed(ev->data.key_position_event.position); + } else { + zmk_split_bt_position_released(ev->data.key_position_event.position); + } + break; +#if ZMK_KEYMAP_HAS_SENSORS + case ZMK_SPLIT_TRANSPORT_PERIPHERAL_EVENT_TYPE_SENSOR_EVENT: + zmk_split_bt_sensor_triggered(ev->data.sensor_event.sensor_index, + &ev->data.sensor_event.channel_data, 1); + + break; +#endif + +#if IS_ENABLED(CONFIG_ZMK_INPUT_SPLIT) + case ZMK_SPLIT_TRANSPORT_PERIPHERAL_EVENT_TYPE_INPUT_EVENT: + return zmk_split_bt_report_input(ev->data.input_event.reg, ev->data.input_event.type, + ev->data.input_event.code, ev->data.input_event.value, + ev->data.input_event.sync); +#endif + +#if IS_ENABLED(CONFIG_ZMK_BATTERY_REPORTING) + case ZMK_SPLIT_TRANSPORT_PERIPHERAL_EVENT_TYPE_BATTERY_EVENT: + // The BLE transport uses standard BAS service for propagation, so just return success here. + return 0; +#endif + default: + LOG_WRN("Unhandled event type %d", ev->type); + return -ENOTSUP; + } + + return 0; +} + +static ssize_t split_svc_run_behavior(struct bt_conn *conn, const struct bt_gatt_attr *attrs, + const void *buf, uint16_t len, uint16_t offset, + uint8_t flags) { + struct zmk_split_run_behavior_payload *payload = attrs->user_data; + uint16_t end_addr = offset + len; + + LOG_DBG("offset %d len %d", offset, len); + + if (end_addr > sizeof(struct zmk_split_run_behavior_payload)) { + return BT_GATT_ERR(BT_ATT_ERR_INVALID_OFFSET); + } + + memcpy(payload + offset, buf, len); + + // We run if: + // 1: We've gotten all the position/state/param data. + // 2: We have a null terminated string for the behavior device label. + const size_t behavior_dev_offset = + offsetof(struct zmk_split_run_behavior_payload, behavior_dev); + if ((end_addr > sizeof(struct zmk_split_run_behavior_data)) && + payload->behavior_dev[end_addr - behavior_dev_offset - 1] == '\0') { + + struct zmk_split_transport_central_command cmd = { + .type = ZMK_SPLIT_TRANSPORT_CENTRAL_CMD_TYPE_INVOKE_BEHAVIOR, + .data = {.invoke_behavior = { + .param1 = payload->data.param1, + .param2 = payload->data.param2, + .position = payload->data.position, + .state = payload->data.state, + }}}; + + const size_t payload_dev_size = sizeof(cmd.data.invoke_behavior.behavior_dev); + if (strlcpy(cmd.data.invoke_behavior.behavior_dev, payload->behavior_dev, + payload_dev_size) >= payload_dev_size) { + LOG_ERR("Truncated behavior label %s to %s before invoking peripheral behavior", + payload->behavior_dev, cmd.data.invoke_behavior.behavior_dev); + } + + LOG_DBG("%s with params %d %d: pressed? %d", cmd.data.invoke_behavior.behavior_dev, + cmd.data.invoke_behavior.param1, cmd.data.invoke_behavior.param2, + cmd.data.invoke_behavior.state); + + int err = zmk_split_transport_peripheral_command_handler( + zmk_split_transport_peripheral_bt(), cmd); + + if (err) { + LOG_ERR("Failed to invoke behavior %s: %d", payload->behavior_dev, err); + } + } + + return len; +} \ No newline at end of file diff --git a/app/src/split/bluetooth/service.h b/app/src/split/bluetooth/service.h new file mode 100644 index 00000000..20ff7513 --- /dev/null +++ b/app/src/split/bluetooth/service.h @@ -0,0 +1,12 @@ +/* + * Copyright (c) 2025 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#pragma once + +#include + +int zmk_split_transport_peripheral_bt_report_event( + const struct zmk_split_transport_peripheral_event *ev); \ No newline at end of file diff --git a/app/src/split/bluetooth/split_listener.c b/app/src/split/bluetooth/split_listener.c deleted file mode 100644 index 9b680d2c..00000000 --- a/app/src/split/bluetooth/split_listener.c +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2020 The ZMK Contributors - * - * SPDX-License-Identifier: MIT - */ - -#include -#include - -#include - -LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); - -#include -#include -#include -#include -#include -#include - -int split_listener(const zmk_event_t *eh) { - LOG_DBG(""); - const struct zmk_position_state_changed *pos_ev; - if ((pos_ev = as_zmk_position_state_changed(eh)) != NULL) { - if (pos_ev->state) { - return zmk_split_bt_position_pressed(pos_ev->position); - } else { - return zmk_split_bt_position_released(pos_ev->position); - } - } - -#if ZMK_KEYMAP_HAS_SENSORS - const struct zmk_sensor_event *sensor_ev; - if ((sensor_ev = as_zmk_sensor_event(eh)) != NULL) { - return zmk_split_bt_sensor_triggered(sensor_ev->sensor_index, sensor_ev->channel_data, - sensor_ev->channel_data_size); - } -#endif /* ZMK_KEYMAP_HAS_SENSORS */ - return ZMK_EV_EVENT_BUBBLE; -} - -ZMK_LISTENER(split_listener, split_listener); -ZMK_SUBSCRIPTION(split_listener, zmk_position_state_changed); - -#if ZMK_KEYMAP_HAS_SENSORS -ZMK_SUBSCRIPTION(split_listener, zmk_sensor_event); -#endif /* ZMK_KEYMAP_HAS_SENSORS */ diff --git a/app/src/split/central.c b/app/src/split/central.c new file mode 100644 index 00000000..e2b80643 --- /dev/null +++ b/app/src/split/central.c @@ -0,0 +1,227 @@ +/* + * Copyright (c) 2025 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include + +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include + +LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); + +const struct zmk_split_transport_central *active_transport; + +#if IS_ENABLED(CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_FETCHING) + +static uint8_t peripheral_battery_levels[ZMK_SPLIT_CENTRAL_PERIPHERAL_COUNT] = {0}; + +#endif // IS_ENABLED(CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_FETCHING) + +int zmk_split_transport_central_peripheral_event_handler( + const struct zmk_split_transport_central *transport, uint8_t source, + struct zmk_split_transport_peripheral_event ev) { + if (transport != active_transport) { + // Ignoring events from non-active transport + LOG_WRN("Ignoring peripheral event from non-active transport"); + return -EINVAL; + } + switch (ev.type) { + case ZMK_SPLIT_TRANSPORT_PERIPHERAL_EVENT_TYPE_KEY_POSITION_EVENT: { + struct zmk_position_state_changed state_ev = {.source = source, + .position = + ev.data.key_position_event.position, + .state = ev.data.key_position_event.pressed, + .timestamp = k_uptime_get()}; + return raise_zmk_position_state_changed(state_ev); + } +#if IS_ENABLED(CONFIG_ZMK_INPUT_SPLIT) + case ZMK_SPLIT_TRANSPORT_PERIPHERAL_EVENT_TYPE_INPUT_EVENT: { + return zmk_input_split_report_peripheral_event( + ev.data.input_event.reg, ev.data.input_event.type, ev.data.input_event.code, + ev.data.input_event.value, ev.data.input_event.sync); + } +#endif // IS_ENABLED(CONFIG_ZMK_POINTING) +#if IS_ENABLED(CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_FETCHING) + case ZMK_SPLIT_TRANSPORT_PERIPHERAL_EVENT_TYPE_BATTERY_EVENT: { + struct zmk_peripheral_battery_state_changed battery_ev = { + .source = source, + .state_of_charge = ev.data.battery_event.level, + }; + peripheral_battery_levels[source] = ev.data.battery_event.level; + return raise_zmk_peripheral_battery_state_changed(battery_ev); + } +#endif + case ZMK_SPLIT_TRANSPORT_PERIPHERAL_EVENT_TYPE_SENSOR_EVENT: { + struct zmk_sensor_event sensor_ev = {.sensor_index = ev.data.sensor_event.sensor_index, + .channel_data_size = 1, + .timestamp = k_uptime_get()}; + + sensor_ev.channel_data[0] = ev.data.sensor_event.channel_data; + + return raise_zmk_sensor_event(sensor_ev); + } + default: + LOG_WRN("GOT AN UNKNOWN EVENT TYPE %d", ev.type); + return -ENOTSUP; + } +} + +int zmk_split_central_invoke_behavior(uint8_t source, struct zmk_behavior_binding *binding, + struct zmk_behavior_binding_event event, bool state) { + if (!active_transport || !active_transport->api || !active_transport->api->send_command) { + return -ENODEV; + } + + struct zmk_split_transport_central_command command = + (struct zmk_split_transport_central_command){ + .type = ZMK_SPLIT_TRANSPORT_CENTRAL_CMD_TYPE_INVOKE_BEHAVIOR, + .data = + { + .invoke_behavior = + { + .param1 = binding->param1, + .param2 = binding->param2, + .position = event.position, + .event_source = event.source, + .state = state ? 1 : 0, + }, + }, + }; + + const size_t payload_dev_size = sizeof(command.data.invoke_behavior.behavior_dev); + if (strlcpy(command.data.invoke_behavior.behavior_dev, binding->behavior_dev, + payload_dev_size) >= payload_dev_size) { + LOG_ERR("Truncated behavior label %s to %s before invoking peripheral behavior", + binding->behavior_dev, command.data.invoke_behavior.behavior_dev); + } + + return active_transport->api->send_command(source, command); +}; + +#if IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) + +int zmk_split_central_update_hid_indicator(zmk_hid_indicators_t indicators) { + if (!active_transport || !active_transport->api || + !active_transport->api->get_available_source_ids || !active_transport->api->send_command) { + return -ENODEV; + } + + uint8_t source_ids[ZMK_SPLIT_CENTRAL_PERIPHERAL_COUNT]; + + int ret = active_transport->api->get_available_source_ids(source_ids); + + if (ret < 0) { + return ret; + } + + struct zmk_split_transport_central_command command = + (struct zmk_split_transport_central_command){ + .type = ZMK_SPLIT_TRANSPORT_CENTRAL_CMD_TYPE_SET_HID_INDICATORS, + .data = + { + .set_hid_indicators = + { + .indicators = indicators, + }, + }, + }; + + for (size_t i = 0; i < ret; i++) { + ret = active_transport->api->send_command(source_ids[i], command); + if (ret < 0) { + return ret; + } + } + + return 0; +} + +#endif // IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) + +#if IS_ENABLED(CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_FETCHING) + +int zmk_split_central_get_peripheral_battery_level(uint8_t source, uint8_t *level) { + if (source >= ARRAY_SIZE(peripheral_battery_levels)) { + return -EINVAL; + } + + *level = peripheral_battery_levels[source]; + return 0; +} + +#endif // IS_ENABLED(CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_FETCHING) + +static int select_first_available_transport(void) { + // Transports are sorted by priority, so find the first + // One that's available, and enable it. Any transport that + // Doesn't support `get_status` is assumed to be always + // available and fully connected. + STRUCT_SECTION_FOREACH(zmk_split_transport_central, t) { + if (!t->api->get_status || t->api->get_status().available) { + + if (active_transport == t) { + LOG_DBG("First available is already selected, moving on"); + return 0; + } + + if (active_transport && active_transport->api->set_enabled) { + int err = active_transport->api->set_enabled(false); + if (err < 0) { + LOG_WRN("Error disabling previously selected split transport (%d)", err); + } + } + + active_transport = t; + int err = 0; + if (active_transport->api->set_enabled) { + err = active_transport->api->set_enabled(true); + } + + return err; + } + } + + return -ENODEV; +} + +static int transport_status_changed_cb(const struct zmk_split_transport_central *central, + struct zmk_split_transport_status status) { + if (central == active_transport) { + LOG_DBG("Central at %p changed status: enabled %d, available %d, connections %d", central, + status.enabled, status.available, status.connections); + if (status.connections == ZMK_SPLIT_TRANSPORT_CONNECTIONS_STATUS_DISCONNECTED) { + return select_first_available_transport(); + } + } else { + // Just to be sure, in case a higher priority transport becomes available + select_first_available_transport(); + } + + return 0; +} + +static int central_init(void) { + STRUCT_SECTION_FOREACH(zmk_split_transport_central, t) { + if (!t->api->set_status_callback) { + continue; + } + + t->api->set_status_callback(transport_status_changed_cb); + } + + return select_first_available_transport(); +} + +SYS_INIT(central_init, APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT); diff --git a/app/src/split/peripheral.c b/app/src/split/peripheral.c new file mode 100644 index 00000000..b814df61 --- /dev/null +++ b/app/src/split/peripheral.c @@ -0,0 +1,205 @@ +/* + * Copyright (c) 2025 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include + +#include +#include + +#include +#include +#include + +#include +#include +#include +#include + +#if IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) +#include +#endif + +#include +#include + +LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); + +const struct zmk_split_transport_peripheral *active_transport; + +int zmk_split_transport_peripheral_command_handler( + const struct zmk_split_transport_peripheral *transport, + struct zmk_split_transport_central_command cmd) { + LOG_DBG(""); + + switch (cmd.type) { + case ZMK_SPLIT_TRANSPORT_CENTRAL_CMD_TYPE_INVOKE_BEHAVIOR: { + struct zmk_behavior_binding binding = { + .param1 = cmd.data.invoke_behavior.param1, + .param2 = cmd.data.invoke_behavior.param2, + .behavior_dev = cmd.data.invoke_behavior.behavior_dev, + }; + LOG_DBG("%s with params %d %d: pressed? %d", binding.behavior_dev, binding.param1, + binding.param2, cmd.data.invoke_behavior.state); + struct zmk_behavior_binding_event event = {.position = cmd.data.invoke_behavior.position, + .timestamp = k_uptime_get()}; + int err; + if (cmd.data.invoke_behavior.state > 0) { + err = behavior_keymap_binding_pressed(&binding, event); + } else { + err = behavior_keymap_binding_released(&binding, event); + } + + if (err) { + LOG_ERR("Failed to invoke behavior %s: %d", binding.behavior_dev, err); + } + return err; + } + case ZMK_SPLIT_TRANSPORT_CENTRAL_CMD_TYPE_SET_PHYSICAL_LAYOUT: { + return zmk_physical_layouts_select(cmd.data.set_physical_layout.layout_idx); + } +#if IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) + case ZMK_SPLIT_TRANSPORT_CENTRAL_CMD_TYPE_SET_HID_INDICATORS: { + return raise_zmk_hid_indicators_changed((struct zmk_hid_indicators_changed){ + .indicators = cmd.data.set_hid_indicators.indicators}); + } +#endif + default: + LOG_WRN("Unhandled command type %d", cmd.type); + return -ENOTSUP; + } + return 0; +} + +int zmk_split_peripheral_report_event(const struct zmk_split_transport_peripheral_event *event) { + if (!active_transport || !active_transport->api || !active_transport->api->report_event) { + LOG_WRN("No active transport that supports reporting events!"); + return -ENODEV; + } + + return active_transport->api->report_event(event); +} + +static int select_first_available_transport(void) { + // Transports are sorted by priority, so find the first + // One that's available, and enable it. Any transport that + // Doesn't support `get_status` is assumed to be always + // available and fully connected. + STRUCT_SECTION_FOREACH(zmk_split_transport_peripheral, t) { + if (!t->api->get_status || t->api->get_status().available) { + if (active_transport == t) { + LOG_DBG("First available is already selected, moving on"); + return 0; + } + + if (active_transport && active_transport->api->set_enabled) { + int err = active_transport->api->set_enabled(false); + if (err < 0) { + LOG_WRN("Error disabling previously selected split transport (%d)", err); + } + } + + active_transport = t; + int err = 0; + if (active_transport->api->set_enabled) { + err = active_transport->api->set_enabled(true); + } + + return err; + } + } + + return -ENODEV; +} + +static int transport_status_changed_cb(const struct zmk_split_transport_peripheral *p, + struct zmk_split_transport_status status) { + if (p == active_transport) { + LOG_DBG("Peripheral at %p changed status: enabled %d, available %d, connections %d", p, + status.enabled, status.available, status.connections); + if (status.connections == ZMK_SPLIT_TRANSPORT_CONNECTIONS_STATUS_DISCONNECTED) { + LOG_DBG("Find us a new active transport!"); + + return select_first_available_transport(); + } + } else { + select_first_available_transport(); + } + + return 0; +} + +static int peripheral_init(void) { + STRUCT_SECTION_FOREACH(zmk_split_transport_peripheral, t) { + if (!t->api->set_status_callback) { + continue; + } + + t->api->set_status_callback(transport_status_changed_cb); + } + + return select_first_available_transport(); +} + +SYS_INIT(peripheral_init, APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT); + +int split_peripheral_listener(const zmk_event_t *eh) { + LOG_DBG(""); + const struct zmk_position_state_changed *pos_ev; + if ((pos_ev = as_zmk_position_state_changed(eh)) != NULL) { + struct zmk_split_transport_peripheral_event ev = { + .type = ZMK_SPLIT_TRANSPORT_PERIPHERAL_EVENT_TYPE_KEY_POSITION_EVENT, + .data = {.key_position_event = { + .position = pos_ev->position, + .pressed = pos_ev->state, + }}}; + + zmk_split_peripheral_report_event(&ev); + } + +#if ZMK_KEYMAP_HAS_SENSORS + const struct zmk_sensor_event *sensor_ev; + if ((sensor_ev = as_zmk_sensor_event(eh)) != NULL) { + if (sensor_ev->channel_data_size != 1) { + return -ENOTSUP; + } + + struct zmk_split_transport_peripheral_event ev = { + .type = ZMK_SPLIT_TRANSPORT_PERIPHERAL_EVENT_TYPE_SENSOR_EVENT, + .data = {.sensor_event = { + .channel_data = sensor_ev->channel_data[0], + .sensor_index = sensor_ev->sensor_index, + }}}; + + zmk_split_peripheral_report_event(&ev); + } +#endif /* ZMK_KEYMAP_HAS_SENSORS */ + +#if IS_ENABLED(CONFIG_ZMK_BATTERY_REPORTING) + const struct zmk_battery_state_changed *battery_ev; + if ((battery_ev = as_zmk_battery_state_changed(eh)) != NULL) { + struct zmk_split_transport_peripheral_event ev = { + .type = ZMK_SPLIT_TRANSPORT_PERIPHERAL_EVENT_TYPE_BATTERY_EVENT, + .data = {.battery_event = { + .level = battery_ev->state_of_charge, + }}}; + + zmk_split_peripheral_report_event(&ev); + } +#endif // IS_ENABLED(CONFIG_ZMK_BATTERY_REPORTING) + + return ZMK_EV_EVENT_BUBBLE; +} + +ZMK_LISTENER(split_peripheral, split_peripheral_listener); +ZMK_SUBSCRIPTION(split_peripheral, zmk_position_state_changed); + +#if ZMK_KEYMAP_HAS_SENSORS +ZMK_SUBSCRIPTION(split_peripheral, zmk_sensor_event); +#endif /* ZMK_KEYMAP_HAS_SENSORS */ + +#if IS_ENABLED(CONFIG_ZMK_BATTERY_REPORTING) +ZMK_SUBSCRIPTION(split_peripheral, zmk_battery_state_changed); +#endif \ No newline at end of file diff --git a/app/src/split/wired/CMakeLists.txt b/app/src/split/wired/CMakeLists.txt new file mode 100644 index 00000000..599f7e35 --- /dev/null +++ b/app/src/split/wired/CMakeLists.txt @@ -0,0 +1,6 @@ +# Copyright (c) 2025 The ZMK Contributors +# SPDX-License-Identifier: MIT + +target_sources(app PRIVATE wired.c) +target_sources_ifdef(CONFIG_ZMK_SPLIT_ROLE_CENTRAL app PRIVATE central.c) +target_sources_ifndef(CONFIG_ZMK_SPLIT_ROLE_CENTRAL app PRIVATE peripheral.c) \ No newline at end of file diff --git a/app/src/split/wired/Kconfig b/app/src/split/wired/Kconfig new file mode 100644 index 00000000..465fac01 --- /dev/null +++ b/app/src/split/wired/Kconfig @@ -0,0 +1,57 @@ +# Copyright (c) 2025 The ZMK Contributors +# SPDX-License-Identifier: MIT + +if ZMK_SPLIT_WIRED + +config ZMK_SPLIT_WIRED_PRIORITY + int "Wired transport priority" + help + Lower number priorities transports are favored over higher numbers. + +choice + prompt "UART Mode" + +config ZMK_SPLIT_WIRED_UART_MODE_ASYNC + bool "Async (DMA) Mode" + # For now, don't use async/DMA on nRF52 due to RX bug (fixed + # in newer Zephyr version?) + depends on SERIAL_SUPPORT_ASYNC + select UART_ASYNC_API + +config ZMK_SPLIT_WIRED_UART_MODE_INTERRUPT + bool "Interrupt Mode" + depends on SERIAL_SUPPORT_INTERRUPT + select UART_INTERRUPT_DRIVEN + +config ZMK_SPLIT_WIRED_UART_MODE_POLLING + bool "Polling Mode" + +endchoice + +if ZMK_SPLIT_WIRED_UART_MODE_POLLING + +config ZMK_SPLIT_WIRED_POLLING_RX_PERIOD + int "Ticks between RX polls" + +endif + +if ZMK_SPLIT_WIRED_UART_MODE_ASYNC + +config ZMK_SPLIT_WIRED_ASYNC_RX_TIMEOUT + int "RX Timeout (in microseconds) before reporting received data" + +endif + +config ZMK_SPLIT_WIRED_CMD_BUFFER_ITEMS + int "Number of central commands to buffer for TX/RX" + +config ZMK_SPLIT_WIRED_EVENT_BUFFER_ITEMS + int "Number of peripheral events to buffer for TX/RX" + +config ZMK_SPLIT_WIRED_HALF_DUPLEX_RX_TIMEOUT + int "RX timeout (in ms) when polling peripheral(s) and waiting for any response" + +config ZMK_SPLIT_WIRED_HALF_DUPLEX_RX_COMPLETE_TIMEOUT + int "RX complete timeout (in ticks) when polling peripheral(s) after receiving some response data" + +endif diff --git a/app/src/split/wired/Kconfig.defaults b/app/src/split/wired/Kconfig.defaults new file mode 100644 index 00000000..8d810efe --- /dev/null +++ b/app/src/split/wired/Kconfig.defaults @@ -0,0 +1,37 @@ +# Copyright (c) 2025 The ZMK Contributors +# SPDX-License-Identifier: MIT + +if ZMK_SPLIT_WIRED + +config ZMK_SPLIT_WIRED_PRIORITY + default 0 + +config ZMK_SPLIT_WIRED_CMD_BUFFER_ITEMS + default 4 + +config ZMK_SPLIT_WIRED_EVENT_BUFFER_ITEMS + default 16 + + +if ZMK_SPLIT_WIRED_UART_MODE_POLLING + +config ZMK_SPLIT_WIRED_POLLING_RX_PERIOD + default 10 + +endif + + +if ZMK_SPLIT_WIRED_UART_MODE_ASYNC + +config ZMK_SPLIT_WIRED_ASYNC_RX_TIMEOUT + default 20 + +endif + +config ZMK_SPLIT_WIRED_HALF_DUPLEX_RX_TIMEOUT + default 15 + +config ZMK_SPLIT_WIRED_HALF_DUPLEX_RX_COMPLETE_TIMEOUT + default 20 + +endif \ No newline at end of file diff --git a/app/src/split/wired/central.c b/app/src/split/wired/central.c new file mode 100644 index 00000000..0354e52d --- /dev/null +++ b/app/src/split/wired/central.c @@ -0,0 +1,487 @@ +/* + * Copyright (c) 2025 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include +#include + +#include +#include +#include +#include +#include + +#include + +LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "wired.h" + +#define DT_DRV_COMPAT zmk_wired_split + +#define IS_HALF_DUPLEX_MODE \ + (DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) && DT_INST_PROP_OR(0, half_duplex, false)) + +#define RX_BUFFER_SIZE \ + ((sizeof(struct event_envelope) + sizeof(struct msg_postfix)) * \ + CONFIG_ZMK_SPLIT_WIRED_EVENT_BUFFER_ITEMS) +#define TX_BUFFER_SIZE \ + ((sizeof(struct command_envelope) + sizeof(struct msg_postfix)) * \ + CONFIG_ZMK_SPLIT_WIRED_CMD_BUFFER_ITEMS) + +#if IS_HALF_DUPLEX_MODE + +static K_SEM_DEFINE(tx_sem, 0, 1); + +#endif + +RING_BUF_DECLARE(rx_buf, RX_BUFFER_SIZE); +RING_BUF_DECLARE(tx_buf, TX_BUFFER_SIZE); + +#if DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) + +static const struct device *uart = DEVICE_DT_GET(DT_INST_PHANDLE(0, device)); + +#define HAS_DIR_GPIO (IS_HALF_DUPLEX_MODE && DT_INST_NODE_HAS_PROP(0, dir_gpios)) + +#if HAS_DIR_GPIO + +static const struct gpio_dt_spec dir_gpio = GPIO_DT_SPEC_INST_GET(0, dir_gpios); + +#endif + +#define HAS_DETECT_GPIO DT_INST_NODE_HAS_PROP(0, detect_gpios) + +#if HAS_DETECT_GPIO + +static const struct gpio_dt_spec detect_gpio = GPIO_DT_SPEC_INST_GET(0, detect_gpios); + +#endif + +#else + +#error \ + "Need to create a node with compatible of 'zmk,wired-split` with a `device` property set to an enabled UART. See http://zmk.dev/docs/hardware-integration/new-shield#wired-split" + +#endif + +static void publish_events_work(struct k_work *work); + +K_WORK_DEFINE(publish_events, publish_events_work); + +#if IS_ENABLED(CONFIG_ZMK_SPLIT_WIRED_UART_MODE_ASYNC) + +uint8_t async_rx_buf[2][RX_BUFFER_SIZE / 2]; + +static struct zmk_split_wired_async_state async_state = { + .process_tx_work = &publish_events, + .rx_bufs = {async_rx_buf[0], async_rx_buf[1]}, + .rx_bufs_len = RX_BUFFER_SIZE / 2, + .rx_size_process_trigger = MSG_EXTRA_SIZE + 1, + .rx_buf = &rx_buf, + .tx_buf = &tx_buf, +#if HAS_DIR_GPIO + .dir_gpio = &dir_gpio, +#endif +}; + +#endif + +#if IS_HALF_DUPLEX_MODE + +static int can_tx(void) { return k_sem_take(&tx_sem, K_NO_WAIT); } + +#else + +static inline int can_tx(void) { return 0; } + +#endif + +#if IS_ENABLED(CONFIG_ZMK_SPLIT_WIRED_UART_MODE_POLLING) + +static void send_pending_tx_work_cb(struct k_work *work); + +static K_WORK_DEFINE(wired_central_tx_work, send_pending_tx_work_cb); + +static void read_timer_cb(struct k_timer *_timer) { + zmk_split_wired_poll_in(&rx_buf, uart, &publish_events, NULL); + // Check if we found any bytes, read some, or read all the bytes in the RX +} + +static K_TIMER_DEFINE(wired_central_read_timer, read_timer_cb, NULL); + +#endif + +static void begin_tx(void) { +#if IS_ENABLED(CONFIG_ZMK_SPLIT_WIRED_UART_MODE_INTERRUPT) + uart_irq_tx_enable(uart); +#elif IS_ENABLED(CONFIG_ZMK_SPLIT_WIRED_UART_MODE_ASYNC) + zmk_split_wired_async_tx(&async_state); +#else + k_work_submit(&wired_central_tx_work); +#endif +} + +static void begin_rx(void) { +#if IS_ENABLED(CONFIG_PM_DEVICE_RUNTIME) + pm_device_runtime_get(uart); +#elif IS_ENABLED(CONFIG_PM_DEVICE) + pm_device_action_run(uart, PM_DEVICE_ACTION_RESUME); +#endif // IS_ENABLED(CONFIG_PM_DEVICE) + +#if IS_ENABLED(CONFIG_ZMK_SPLIT_WIRED_UART_MODE_INTERRUPT) + uart_irq_rx_enable(uart); +#elif IS_ENABLED(CONFIG_ZMK_SPLIT_WIRED_UART_MODE_ASYNC) + zmk_split_wired_async_rx(&async_state); +#else + k_timer_start(&wired_central_read_timer, K_TICKS(CONFIG_ZMK_SPLIT_WIRED_POLLING_RX_PERIOD), + K_TICKS(CONFIG_ZMK_SPLIT_WIRED_POLLING_RX_PERIOD)); +#endif +} + +#if HAS_DETECT_GPIO + +static void stop_rx(void) { +#if IS_ENABLED(CONFIG_ZMK_SPLIT_WIRED_UART_MODE_INTERRUPT) + uart_irq_rx_disable(uart); +#elif IS_ENABLED(CONFIG_ZMK_SPLIT_WIRED_UART_MODE_ASYNC) + zmk_split_wired_async_rx_cancel(&async_state); +#else + k_timer_stop(&wired_central_read_timer); +#endif + +#if IS_ENABLED(CONFIG_PM_DEVICE_RUNTIME) + pm_device_runtime_put(uart); +#elif IS_ENABLED(CONFIG_PM_DEVICE) + pm_device_action_run(uart, PM_DEVICE_ACTION_SUSPEND); +#endif // IS_ENABLED(CONFIG_PM_DEVICE) +} + +#endif // HAS_DETECT_GPIO + +static ssize_t get_payload_data_size(const struct zmk_split_transport_central_command *cmd) { + switch (cmd->type) { + case ZMK_SPLIT_TRANSPORT_CENTRAL_CMD_TYPE_POLL_EVENTS: + return 0; + case ZMK_SPLIT_TRANSPORT_CENTRAL_CMD_TYPE_INVOKE_BEHAVIOR: + return sizeof(cmd->data.invoke_behavior); + case ZMK_SPLIT_TRANSPORT_CENTRAL_CMD_TYPE_SET_PHYSICAL_LAYOUT: + return sizeof(cmd->data.set_physical_layout); + case ZMK_SPLIT_TRANSPORT_CENTRAL_CMD_TYPE_SET_HID_INDICATORS: + return sizeof(cmd->data.set_hid_indicators); + default: + return -ENOTSUP; + } +} + +static int split_central_wired_send_command(uint8_t source, + struct zmk_split_transport_central_command cmd) { + if (source != 0) { + return -EINVAL; + } + + ssize_t data_size = get_payload_data_size(&cmd); + if (data_size < 0) { + LOG_WRN("Failed to determine payload data size %d", data_size); + return data_size; + } + + // Data + type + source + size_t payload_size = + data_size + sizeof(source) + sizeof(enum zmk_split_transport_central_command_type); + + if (ring_buf_space_get(&tx_buf) < MSG_EXTRA_SIZE + payload_size) { + LOG_WRN("No room to send command to the peripheral %d", source); + return -ENOSPC; + } + + struct command_envelope env = {.prefix = + { + .magic_prefix = ZMK_SPLIT_WIRED_ENVELOPE_MAGIC_PREFIX, + .payload_size = payload_size, + }, + .payload = { + .source = source, + .cmd = cmd, + }}; + + struct msg_postfix postfix = {.crc = + crc32_ieee((void *)&env, sizeof(env.prefix) + payload_size)}; + + ring_buf_put(&tx_buf, (uint8_t *)&env, sizeof(env.prefix) + payload_size); + ring_buf_put(&tx_buf, (uint8_t *)&postfix, sizeof(postfix)); + + if (can_tx() >= 0) { + begin_tx(); + } + + return 0; +} + +#if IS_HALF_DUPLEX_MODE + +void rx_done_cb(struct k_work *work); + +static K_WORK_DELAYABLE_DEFINE(rx_done_work, rx_done_cb); + +void rx_done_cb(struct k_work *work) { + k_sem_give(&tx_sem); + + // Poll for the next event data! + split_central_wired_send_command(0, + (struct zmk_split_transport_central_command){ + .type = ZMK_SPLIT_TRANSPORT_CENTRAL_CMD_TYPE_POLL_EVENTS, + }); + + k_work_reschedule(&rx_done_work, K_MSEC(CONFIG_ZMK_SPLIT_WIRED_HALF_DUPLEX_RX_TIMEOUT)); +} + +#endif + +#if IS_ENABLED(CONFIG_ZMK_SPLIT_WIRED_UART_MODE_INTERRUPT) + +static void serial_cb(const struct device *dev, void *user_data) { + + while (uart_irq_update(dev) && uart_irq_is_pending(dev)) { + if (uart_irq_rx_ready(dev)) { + zmk_split_wired_fifo_read(dev, &rx_buf, &publish_events, NULL); +#if IS_HALF_DUPLEX_MODE + k_work_reschedule(&rx_done_work, + K_TICKS(CONFIG_ZMK_SPLIT_WIRED_HALF_DUPLEX_RX_COMPLETE_TIMEOUT)); +#endif + } + + if (uart_irq_tx_complete(dev)) { + + if (ring_buf_size_get(&tx_buf) == 0) { + uart_irq_tx_disable(dev); +#if HAS_DIR_GPIO + gpio_pin_set_dt(&dir_gpio, 0); +#endif + } + } + + if (uart_irq_tx_ready(dev)) { +#if HAS_DIR_GPIO + gpio_pin_set_dt(&dir_gpio, 1); +#endif + zmk_split_wired_fifo_fill(dev, &tx_buf); + } + } +} + +#elif IS_ENABLED(CONFIG_ZMK_SPLIT_WIRED_UART_MODE_POLLING) + +static void send_pending_tx_work_cb(struct k_work *work) { + zmk_split_wired_poll_out(&tx_buf, uart); +} + +#endif + +#if HAS_DETECT_GPIO + +static void notify_transport_status(void); + +static struct gpio_callback detect_callback; + +static void notify_status_work_cb(struct k_work *_work) { notify_transport_status(); } + +static K_WORK_DEFINE(notify_status_work, notify_status_work_cb); + +static void detect_pin_irq_callback_handler(const struct device *port, struct gpio_callback *cb, + const gpio_port_pins_t pin) { + k_work_submit(¬ify_status_work); +} + +#endif + +static int zmk_split_wired_central_init(void) { + if (!device_is_ready(uart)) { + return -ENODEV; + } + +#if IS_ENABLED(CONFIG_PM_DEVICE_RUNTIME) + pm_device_runtime_put(uart); +#elif IS_ENABLED(CONFIG_PM_DEVICE) + pm_device_action_run(uart, PM_DEVICE_ACTION_SUSPEND); +#endif // IS_ENABLED(CONFIG_PM_DEVICE) + +#if IS_ENABLED(CONFIG_ZMK_SPLIT_WIRED_UART_MODE_INTERRUPT) + + int ret = uart_irq_callback_user_data_set(uart, serial_cb, NULL); + + if (ret < 0) { + if (ret == -ENOTSUP) { + LOG_ERR("Interrupt-driven UART API support not enabled"); + } else if (ret == -ENOSYS) { + LOG_ERR("UART device does not support interrupt-driven API"); + } else { + LOG_ERR("Error setting UART callback: %d\n", ret); + } + return ret; + } + + uart_irq_rx_enable(uart); + +#elif IS_ENABLED(CONFIG_ZMK_SPLIT_WIRED_UART_MODE_ASYNC) + + async_state.uart = uart; + int ret = zmk_split_wired_async_init(&async_state); + if (ret < 0) { + LOG_ERR("Failed to set up async wired split UART (%d)", ret); + return ret; + } + +#endif // IS_ENABLED(CONFIG_ZMK_SPLIT_WIRED_UART_MODE_*) + +#if IS_HALF_DUPLEX_MODE + +#if HAS_DIR_GPIO + gpio_pin_configure_dt(&dir_gpio, GPIO_OUTPUT_INACTIVE); +#endif + +#endif // IS_HALF_DUPLEX_MODE + +#if HAS_DETECT_GPIO + + gpio_pin_configure_dt(&detect_gpio, GPIO_INPUT); + + gpio_init_callback(&detect_callback, detect_pin_irq_callback_handler, BIT(detect_gpio.pin)); + int err = gpio_add_callback(detect_gpio.port, &detect_callback); + if (err) { + LOG_ERR("Error adding the callback to the detect pin: %i", err); + return err; + } + + err = gpio_pin_interrupt_configure_dt(&detect_gpio, GPIO_INT_EDGE_BOTH); + if (err < 0) { + LOG_WRN("Failed to so configure interrupt for detection pin (%d)", err); + return err; + } + +#endif // HAS_DETECT_GPIO + + return 0; +} + +SYS_INIT(zmk_split_wired_central_init, APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT); + +static int split_central_wired_get_available_source_ids(uint8_t *sources) { + sources[0] = 0; + + return 1; +} + +static int split_central_wired_set_enabled(bool enabled) { + if (enabled) { + begin_rx(); +#if IS_HALF_DUPLEX_MODE + k_work_schedule(&rx_done_work, K_MSEC(CONFIG_ZMK_SPLIT_WIRED_HALF_DUPLEX_RX_TIMEOUT)); +#endif + return 0; +#if HAS_DETECT_GPIO + } else { +#if IS_HALF_DUPLEX_MODE + k_work_cancel_delayable(&rx_done_work); +#endif + stop_rx(); + return 0; +#endif + } + + return -ENOTSUP; +} + +#if HAS_DETECT_GPIO + +static zmk_split_transport_central_status_changed_cb_t transport_status_cb; + +static int +split_central_wired_set_status_callback(zmk_split_transport_central_status_changed_cb_t cb) { + transport_status_cb = cb; + return 0; +} + +static struct zmk_split_transport_status split_central_wired_get_status() { + int detected = gpio_pin_get_dt(&detect_gpio); + if (detected > 0) { + return (struct zmk_split_transport_status){ + .available = true, + .enabled = true, // Track this + .connections = ZMK_SPLIT_TRANSPORT_CONNECTIONS_STATUS_ALL_CONNECTED, + + }; + } else { + return (struct zmk_split_transport_status){ + .available = false, + .enabled = true, // Track this + .connections = ZMK_SPLIT_TRANSPORT_CONNECTIONS_STATUS_DISCONNECTED, + + }; + } +} + +#endif // HAS_DETECT_GPIO + +static const struct zmk_split_transport_central_api central_api = { + .send_command = split_central_wired_send_command, + .get_available_source_ids = split_central_wired_get_available_source_ids, + .set_enabled = split_central_wired_set_enabled, +#if HAS_DETECT_GPIO + .set_status_callback = split_central_wired_set_status_callback, + .get_status = split_central_wired_get_status, +#endif // HAS_DETECT_GPIO +}; + +ZMK_SPLIT_TRANSPORT_CENTRAL_REGISTER(wired_central, ¢ral_api, CONFIG_ZMK_SPLIT_WIRED_PRIORITY); + +#if HAS_DETECT_GPIO + +static void notify_transport_status(void) { + if (transport_status_cb) { + transport_status_cb(&wired_central, split_central_wired_get_status()); + } +} + +#endif + +static void publish_events_work(struct k_work *work) { + +#if IS_HALF_DUPLEX_MODE + k_work_reschedule(&rx_done_work, + K_MSEC(CONFIG_ZMK_SPLIT_WIRED_HALF_DUPLEX_RX_COMPLETE_TIMEOUT)); +#endif // IS_HALF_DUPLEX_MODE + + while (ring_buf_size_get(&rx_buf) > MSG_EXTRA_SIZE) { + struct event_envelope env; + int item_err = + zmk_split_wired_get_item(&rx_buf, (uint8_t *)&env, sizeof(struct event_envelope)); + switch (item_err) { + case 0: + zmk_split_transport_central_peripheral_event_handler(&wired_central, env.payload.source, + env.payload.event); + break; + case -EAGAIN: + return; + default: + LOG_WRN("Issue fetching an item from the RX buffer: %d", item_err); + return; + } + } +} diff --git a/app/src/split/wired/peripheral.c b/app/src/split/wired/peripheral.c new file mode 100644 index 00000000..71d3da83 --- /dev/null +++ b/app/src/split/wired/peripheral.c @@ -0,0 +1,456 @@ +/* + * Copyright (c) 2025 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include +#include + +#include +#include +#include +#include +#include + +#include + +LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "wired.h" + +#define DT_DRV_COMPAT zmk_wired_split + +#define IS_HALF_DUPLEX_MODE \ + (DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) && DT_INST_PROP_OR(0, half_duplex, false)) + +#define TX_BUFFER_SIZE \ + ((sizeof(struct event_envelope) + sizeof(struct msg_postfix)) * \ + CONFIG_ZMK_SPLIT_WIRED_EVENT_BUFFER_ITEMS) +#define RX_BUFFER_SIZE \ + ((sizeof(struct command_envelope) + sizeof(struct msg_postfix)) * \ + CONFIG_ZMK_SPLIT_WIRED_CMD_BUFFER_ITEMS) + +RING_BUF_DECLARE(chosen_rx_buf, RX_BUFFER_SIZE); +RING_BUF_DECLARE(chosen_tx_buf, TX_BUFFER_SIZE); + +static const uint8_t peripheral_id = 0; + +K_SEM_DEFINE(tx_sem, 0, 1); + +#if DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) + +static const struct device *uart = DEVICE_DT_GET(DT_INST_PHANDLE(0, device)); + +#define HAS_DIR_GPIO (DT_INST_NODE_HAS_PROP(0, dir_gpios)) + +#if HAS_DIR_GPIO + +static const struct gpio_dt_spec dir_gpio = GPIO_DT_SPEC_INST_GET(0, dir_gpios); + +#endif + +#define HAS_DETECT_GPIO DT_INST_NODE_HAS_PROP(0, detect_gpios) + +#if HAS_DETECT_GPIO + +static const struct gpio_dt_spec detect_gpio = GPIO_DT_SPEC_INST_GET(0, detect_gpios); + +#endif + +#else + +#error \ + "Need to create a node with compatible of 'zmk,wired-split` with a `device` property set to an enabled UART. See http://zmk.dev/docs/hardware-integration/new-shield#wired-split" + +#endif + +static void publish_commands_work(struct k_work *work); + +K_WORK_DEFINE(publish_commands, publish_commands_work); + +static void process_tx_cb(void); +K_MSGQ_DEFINE(cmd_msg_queue, sizeof(struct zmk_split_transport_central_command), 3, 4); + +#if IS_ENABLED(CONFIG_ZMK_SPLIT_WIRED_UART_MODE_ASYNC) + +uint8_t async_rx_buf[2][RX_BUFFER_SIZE / 2]; + +static struct zmk_split_wired_async_state async_state = { + .rx_bufs = {async_rx_buf[0], async_rx_buf[1]}, + .rx_bufs_len = RX_BUFFER_SIZE / 2, + .rx_size_process_trigger = sizeof(struct command_envelope), + .process_tx_callback = process_tx_cb, + .rx_buf = &chosen_rx_buf, + .tx_buf = &chosen_tx_buf, +#if HAS_DIR_GPIO + .dir_gpio = &dir_gpio, +#endif +}; + +#endif + +#if IS_ENABLED(CONFIG_ZMK_SPLIT_WIRED_UART_MODE_POLLING) + +static void wired_peripheral_read_tick_cb(struct k_timer *timer) { + zmk_split_wired_poll_in(&chosen_rx_buf, uart, NULL, process_tx_cb); +} + +static K_TIMER_DEFINE(wired_peripheral_read_timer, wired_peripheral_read_tick_cb, NULL); + +#endif // IS_ENABLED(CONFIG_ZMK_SPLIT_WIRED_UART_MODE_POLLING) + +static void begin_rx(void) { +#if IS_ENABLED(CONFIG_PM_DEVICE_RUNTIME) + pm_device_runtime_get(uart); +#elif IS_ENABLED(CONFIG_PM_DEVICE) + pm_device_action_run(uart, PM_DEVICE_ACTION_RESUME); +#endif // IS_ENABLED(CONFIG_PM_DEVICE) + +#if IS_ENABLED(CONFIG_ZMK_SPLIT_WIRED_UART_MODE_INTERRUPT) + uart_irq_rx_enable(uart); +#elif IS_ENABLED(CONFIG_ZMK_SPLIT_WIRED_UART_MODE_ASYNC) + zmk_split_wired_async_rx(&async_state); +#else + k_timer_start(&wired_peripheral_read_timer, K_TICKS(CONFIG_ZMK_SPLIT_WIRED_POLLING_RX_PERIOD), + K_TICKS(CONFIG_ZMK_SPLIT_WIRED_POLLING_RX_PERIOD)); +#endif +} + +#if HAS_DETECT_GPIO + +static void stop_rx(void) { +#if IS_ENABLED(CONFIG_ZMK_SPLIT_WIRED_UART_MODE_INTERRUPT) + uart_irq_rx_disable(uart); +#elif IS_ENABLED(CONFIG_ZMK_SPLIT_WIRED_UART_MODE_ASYNC) + zmk_split_wired_async_rx_cancel(&async_state); +#else + k_timer_stop(&wired_peripheral_read_timer); +#endif + +#if IS_ENABLED(CONFIG_PM_DEVICE_RUNTIME) + pm_device_runtime_put(uart); +#elif IS_ENABLED(CONFIG_PM_DEVICE) + pm_device_action_run(uart, PM_DEVICE_ACTION_SUSPEND); +#endif // IS_ENABLED(CONFIG_PM_DEVICE) +} + +#endif // HAS_DETECT_GPIO + +#if IS_ENABLED(CONFIG_ZMK_SPLIT_WIRED_UART_MODE_INTERRUPT) + +static void serial_cb(const struct device *dev, void *user_data) { + while (uart_irq_update(dev) && uart_irq_is_pending(dev)) { + if (uart_irq_rx_ready(dev)) { + zmk_split_wired_fifo_read(dev, &chosen_rx_buf, NULL, process_tx_cb); + } + + if (uart_irq_tx_complete(dev)) { + if (ring_buf_size_get(&chosen_tx_buf) == 0) { + uart_irq_tx_disable(dev); + } + +#if HAS_DIR_GPIO + gpio_pin_set_dt(&dir_gpio, 0); +#endif + } + + if (uart_irq_tx_ready(dev)) { +#if HAS_DIR_GPIO + gpio_pin_set_dt(&dir_gpio, 1); +#endif + zmk_split_wired_fifo_fill(dev, &chosen_tx_buf); + } + } +} + +#elif IS_ENABLED(CONFIG_ZMK_SPLIT_WIRED_UART_MODE_POLLING) + +static void send_pending_tx_work_cb(struct k_work *work) { + zmk_split_wired_poll_out(&chosen_tx_buf, uart); +} + +static K_WORK_DEFINE(send_pending_tx, send_pending_tx_work_cb); + +#endif + +#if HAS_DETECT_GPIO + +static void notify_transport_status(void); + +static struct gpio_callback detect_callback; + +static void notify_status_work_cb(struct k_work *_work) { notify_transport_status(); } + +static K_WORK_DEFINE(notify_status_work, notify_status_work_cb); + +static void detect_pin_irq_callback_handler(const struct device *port, struct gpio_callback *cb, + const gpio_port_pins_t pin) { + k_work_submit(¬ify_status_work); +} + +#endif + +static int zmk_split_wired_peripheral_init(void) { + if (!device_is_ready(uart)) { + return -ENODEV; + } + +#if IS_ENABLED(CONFIG_PM_DEVICE_RUNTIME) + pm_device_runtime_put(uart); +#elif IS_ENABLED(CONFIG_PM_DEVICE) + pm_device_action_run(uart, PM_DEVICE_ACTION_SUSPEND); +#endif // IS_ENABLED(CONFIG_PM_DEVICE) + +#if HAS_DIR_GPIO + gpio_pin_configure_dt(&dir_gpio, GPIO_OUTPUT_INACTIVE); +#endif + +#if IS_ENABLED(CONFIG_ZMK_SPLIT_WIRED_UART_MODE_INTERRUPT) + /* configure interrupt and callback to receive data */ + int ret = uart_irq_callback_user_data_set(uart, serial_cb, NULL); + + if (ret < 0) { + if (ret == -ENOTSUP) { + LOG_ERR("Interrupt-driven UART API support not enabled"); + } else if (ret == -ENOSYS) { + LOG_ERR("UART device does not support interrupt-driven API"); + } else { + LOG_ERR("Error setting UART callback: %d\n", ret); + } + return ret; + } + +#elif IS_ENABLED(CONFIG_ZMK_SPLIT_WIRED_UART_MODE_ASYNC) + async_state.uart = uart; + int ret = zmk_split_wired_async_init(&async_state); + if (ret < 0) { + LOG_ERR("Failed to set up async wired split UART (%d)", ret); + return ret; + } +#endif // IS_ENABLED(CONFIG_ZMK_SPLIT_WIRED_UART_MODE_ASYNC) + +#if HAS_DETECT_GPIO + + gpio_pin_configure_dt(&detect_gpio, GPIO_INPUT); + + gpio_init_callback(&detect_callback, detect_pin_irq_callback_handler, BIT(detect_gpio.pin)); + int err = gpio_add_callback(detect_gpio.port, &detect_callback); + if (err) { + LOG_ERR("Error adding the callback to the detect pin: %i", err); + return err; + } + + err = gpio_pin_interrupt_configure_dt(&detect_gpio, GPIO_INT_EDGE_BOTH); + if (err < 0) { + LOG_WRN("Failed to so configure interrupt for detection pin (%d)", err); + return err; + } + +#endif // HAS_DETECT_GPIO + + return 0; +} + +SYS_INIT(zmk_split_wired_peripheral_init, APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT); + +static void begin_tx(void) { +#if IS_ENABLED(CONFIG_ZMK_SPLIT_WIRED_UART_MODE_INTERRUPT) + uart_irq_tx_enable(uart); +#elif IS_ENABLED(CONFIG_ZMK_SPLIT_WIRED_UART_MODE_ASYNC) + zmk_split_wired_async_tx(&async_state); +#elif IS_ENABLED(CONFIG_ZMK_SPLIT_WIRED_UART_MODE_POLLING) + k_work_submit(&send_pending_tx); +#endif +} + +static ssize_t get_payload_data_size(const struct zmk_split_transport_peripheral_event *evt) { + switch (evt->type) { + case ZMK_SPLIT_TRANSPORT_PERIPHERAL_EVENT_TYPE_INPUT_EVENT: + return sizeof(evt->data.input_event); + case ZMK_SPLIT_TRANSPORT_PERIPHERAL_EVENT_TYPE_KEY_POSITION_EVENT: + return sizeof(evt->data.key_position_event); + case ZMK_SPLIT_TRANSPORT_PERIPHERAL_EVENT_TYPE_SENSOR_EVENT: + return sizeof(evt->data.sensor_event); + case ZMK_SPLIT_TRANSPORT_PERIPHERAL_EVENT_TYPE_BATTERY_EVENT: + return sizeof(evt->data.battery_event); + default: + return -ENOTSUP; + } +} + +static int +split_peripheral_wired_report_event(const struct zmk_split_transport_peripheral_event *event) { + ssize_t data_size = get_payload_data_size(event); + if (data_size < 0) { + LOG_WRN("Failed to determine payload data size %d", data_size); + return data_size; + } + + // Data + type + source + size_t payload_size = + data_size + sizeof(peripheral_id) + sizeof(enum zmk_split_transport_peripheral_event_type); + + if (ring_buf_space_get(&chosen_tx_buf) < MSG_EXTRA_SIZE + payload_size) { + LOG_WRN("No room to send peripheral to the central (have %d but only space for %d)", + MSG_EXTRA_SIZE + payload_size, ring_buf_space_get(&chosen_tx_buf)); + return -ENOSPC; + } + + struct event_envelope env = {.prefix = + { + .magic_prefix = ZMK_SPLIT_WIRED_ENVELOPE_MAGIC_PREFIX, + .payload_size = payload_size, + }, + .payload = { + .source = peripheral_id, + .event = *event, + }}; + + struct msg_postfix postfix = {.crc = + crc32_ieee((void *)&env, sizeof(env.prefix) + payload_size)}; + + LOG_HEXDUMP_DBG(&env, sizeof(env.prefix) + payload_size, "Payload"); + + size_t put = ring_buf_put(&chosen_tx_buf, (uint8_t *)&env, sizeof(env.prefix) + payload_size); + if (put != sizeof(env.prefix) + payload_size) { + LOG_WRN("Failed to put the whole message (%d vs %d)", put, + sizeof(env.prefix) + payload_size); + } + put = ring_buf_put(&chosen_tx_buf, (uint8_t *)&postfix, sizeof(postfix)); + if (put != sizeof(postfix)) { + LOG_WRN("Failed to put the whole message (%d vs %d)", put, sizeof(postfix)); + } + +#if !IS_HALF_DUPLEX_MODE + begin_tx(); +#endif + + return 0; +} + +static bool is_enabled; + +static int split_peripheral_wired_set_enabled(bool enabled) { + if (is_enabled == enabled) { + return 0; + } + + is_enabled = enabled; + + if (enabled) { + begin_rx(); + return 0; +#if HAS_DETECT_GPIO + } else { + stop_rx(); + return 0; +#endif + } + + return -ENOTSUP; +} + +#if HAS_DETECT_GPIO + +static zmk_split_transport_peripheral_status_changed_cb_t transport_status_cb; + +static int +split_peripheral_wired_set_status_callback(zmk_split_transport_peripheral_status_changed_cb_t cb) { + transport_status_cb = cb; + return 0; +} + +static struct zmk_split_transport_status split_peripheral_wired_get_status() { + int detected = gpio_pin_get_dt(&detect_gpio); + if (detected > 0) { + return (struct zmk_split_transport_status){ + .available = true, + .enabled = true, // Track this + .connections = ZMK_SPLIT_TRANSPORT_CONNECTIONS_STATUS_ALL_CONNECTED, + + }; + } else { + return (struct zmk_split_transport_status){ + .available = false, + .enabled = true, // Track this + .connections = ZMK_SPLIT_TRANSPORT_CONNECTIONS_STATUS_DISCONNECTED, + + }; + } +} + +#endif // HAS_DETECT_GPIO + +static const struct zmk_split_transport_peripheral_api peripheral_api = { + .report_event = split_peripheral_wired_report_event, + .set_enabled = split_peripheral_wired_set_enabled, +#if HAS_DETECT_GPIO + .set_status_callback = split_peripheral_wired_set_status_callback, + .get_status = split_peripheral_wired_get_status, +#endif // HAS_DETECT_GPIO +}; + +ZMK_SPLIT_TRANSPORT_PERIPHERAL_REGISTER(wired_peripheral, &peripheral_api, + CONFIG_ZMK_SPLIT_WIRED_PRIORITY); + +#if HAS_DETECT_GPIO + +static void notify_transport_status(void) { + if (transport_status_cb) { + LOG_DBG("Invoking the status CB"); + transport_status_cb(&wired_peripheral, split_peripheral_wired_get_status()); + } +} + +#endif // HAS_DETECT_GPIO + +static void process_tx_cb(void) { + while (ring_buf_size_get(&chosen_rx_buf) > MSG_EXTRA_SIZE) { + struct command_envelope env; + int item_err = zmk_split_wired_get_item(&chosen_rx_buf, (uint8_t *)&env, + sizeof(struct command_envelope)); + switch (item_err) { + case 0: + if (env.payload.cmd.type == ZMK_SPLIT_TRANSPORT_CENTRAL_CMD_TYPE_POLL_EVENTS) { + begin_tx(); + } else { + int ret = k_msgq_put(&cmd_msg_queue, &env.payload.cmd, K_NO_WAIT); + if (ret < 0) { + LOG_WRN("Failed to queue command for processing (%d)", ret); + return; + } + + k_work_submit(&publish_commands); + } + break; + case -EAGAIN: + return; + default: + LOG_WRN("Issue fetching an item from the RX buffer: %d", item_err); + return; + } + } +} +static void publish_commands_work(struct k_work *work) { + struct zmk_split_transport_central_command cmd; + + while (k_msgq_get(&cmd_msg_queue, &cmd, K_NO_WAIT) >= 0) { + zmk_split_transport_peripheral_command_handler(&wired_peripheral, cmd); + } +} diff --git a/app/src/split/wired/wired.c b/app/src/split/wired/wired.c new file mode 100644 index 00000000..0df4c709 --- /dev/null +++ b/app/src/split/wired/wired.c @@ -0,0 +1,327 @@ +/* + * Copyright (c) 2025 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include "wired.h" + +#include +#include +#include +#include + +LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); + +#if IS_ENABLED(CONFIG_ZMK_SPLIT_WIRED_UART_MODE_POLLING) + +void zmk_split_wired_poll_out(struct ring_buf *tx_buf, const struct device *uart) { + uint8_t *buf; + uint32_t claim_len; + while ((claim_len = ring_buf_get_claim(tx_buf, &buf, MIN(32, tx_buf->size))) > 0) { + LOG_HEXDUMP_DBG(buf, claim_len, "TX Bytes"); + for (int i = 0; i < claim_len; i++) { + uart_poll_out(uart, buf[i]); + } + + ring_buf_get_finish(tx_buf, claim_len); + } +} + +int zmk_split_wired_poll_in(struct ring_buf *rx_buf, const struct device *uart, + struct k_work *process_data_work, + zmk_split_wired_process_tx_callback_t process_data_cb) { + uint8_t *buf; + uint32_t read = 0; + uint32_t claim_len = ring_buf_put_claim(rx_buf, &buf, ring_buf_space_get(rx_buf)); + if (claim_len < 1) { + LOG_WRN("No room available for reading in from the serial port"); + return -ENOSPC; + } + + bool all_read = false; + while (read < claim_len) { + if (uart_poll_in(uart, buf + read) < 0) { + all_read = true; + break; + } + + read++; + } + + ring_buf_put_finish(rx_buf, read); + + if (ring_buf_size_get(rx_buf) > 0) { + if (process_data_work) { + k_work_submit(process_data_work); + } else if (process_data_cb) { + process_data_cb(); + } + } + + // TODO: Also indicate if no bytes read at all? + return (all_read ? 1 : 0); +} + +#endif // IS_ENABLED(CONFIG_ZMK_SPLIT_WIRED_UART_MODE_POLLING) + +#if IS_ENABLED(CONFIG_ZMK_SPLIT_WIRED_UART_MODE_INTERRUPT) + +void zmk_split_wired_fifo_read(const struct device *dev, struct ring_buf *buf, + struct k_work *process_work, + zmk_split_wired_process_tx_callback_t process_cb) { + // TODO: Add error checking on platforms that support it + uint32_t last_read = 0, len = 0; + do { + uint8_t *buffer; + len = ring_buf_put_claim(buf, &buffer, buf->size); + if (len > 0) { + last_read = uart_fifo_read(dev, buffer, len); + + ring_buf_put_finish(buf, last_read); + } else { + LOG_ERR("Dropping incoming RPC byte, insufficient room in the RX buffer. Bump " + "CONFIG_ZMK_STUDIO_RPC_RX_BUF_SIZE."); + uint8_t dummy; + last_read = uart_fifo_read(dev, &dummy, 1); + } + } while (last_read && last_read == len); + + if (process_work) { + k_work_submit(process_work); + } else if (process_cb) { + process_cb(); + } +} + +void zmk_split_wired_fifo_fill(const struct device *dev, struct ring_buf *tx_buf) { + uint32_t len; + while ((len = ring_buf_size_get(tx_buf)) > 0) { + uint8_t *buf; + uint32_t claim_len = ring_buf_get_claim(tx_buf, &buf, tx_buf->size); + + if (claim_len <= 0) { + break; + } + + int sent = uart_fifo_fill(dev, buf, claim_len); + + ring_buf_get_finish(tx_buf, MAX(sent, 0)); + + if (sent <= 0) { + break; + } + } + + // if (ring_buf_size_get(tx_buf) == 0) { + // uart_irq_tx_disable(dev); + // } +} + +#endif // IS_ENABLED(CONFIG_ZMK_SPLIT_WIRED_UART_MODE_INTERRUPT) + +#if IS_ENABLED(CONFIG_ZMK_SPLIT_WIRED_UART_MODE_ASYNC) + +enum ASYNC_STATE_BITS { + ASYNC_STATE_BIT_RXBUF0_USED = 0, + ASYNC_STATE_BIT_RXBUF1_USED, +}; + +void zmk_split_wired_async_tx(struct zmk_split_wired_async_state *state) { + uint8_t *buf; + uint32_t claim_len = ring_buf_get_claim(state->tx_buf, &buf, ring_buf_size_get(state->tx_buf)); + + if (claim_len <= 0) { + return; + } + + if (state->dir_gpio) { + gpio_pin_set_dt(state->dir_gpio, 1); + } + +#if !IS_ENABLED(CONFIG_ZMK_SPLIT_ROLE_CENTRAL) + LOG_DBG("Sending %d", claim_len); +#endif + int err = uart_tx(state->uart, buf, claim_len, SYS_FOREVER_US); + if (err < 0) { + LOG_DBG("NO TX %d", err); + } +} + +int zmk_split_wired_async_rx(struct zmk_split_wired_async_state *state) { + + atomic_set_bit(&state->state, ASYNC_STATE_BIT_RXBUF0_USED); + atomic_clear_bit(&state->state, ASYNC_STATE_BIT_RXBUF1_USED); + + int ret = uart_rx_enable(state->uart, state->rx_bufs[0], state->rx_bufs_len, + CONFIG_ZMK_SPLIT_WIRED_ASYNC_RX_TIMEOUT); + if (ret < 0) { + LOG_ERR("Failed to enable RX (%d)", ret); + } + + return ret; +} + +int zmk_split_wired_async_rx_cancel(struct zmk_split_wired_async_state *state) { + return uart_rx_disable(state->uart); +} + +static void restart_rx_work_cb(struct k_work *work) { + struct k_work_delayable *dwork = k_work_delayable_from_work(work); + struct zmk_split_wired_async_state *state = + CONTAINER_OF(dwork, struct zmk_split_wired_async_state, restart_rx_work); + + zmk_split_wired_async_rx(state); +} + +static void async_uart_cb(const struct device *dev, struct uart_event *ev, void *user_data) { + struct zmk_split_wired_async_state *state = (struct zmk_split_wired_async_state *)user_data; + + switch (ev->type) { + case UART_TX_ABORTED: + // This can only really occur for a TX timeout for a HW flow control UART setup. What to do + // here in practice? + LOG_WRN("TX Aborted"); + break; + case UART_TX_DONE: + LOG_DBG("TX Done %d", ev->data.tx.len); + ring_buf_get_finish(state->tx_buf, ev->data.tx.len); + if (ring_buf_size_get(state->tx_buf) > 0) { + zmk_split_wired_async_tx(state); + } else { + if (state->dir_gpio) { + gpio_pin_set_dt(state->dir_gpio, 0); + } + } + break; + case UART_RX_RDY: { + size_t received = + ring_buf_put(state->rx_buf, &ev->data.rx.buf[ev->data.rx.offset], ev->data.rx.len); + if (received < ev->data.rx.len) { + LOG_ERR("RX overrun!"); + break; + } + + // LOG_DBG("RX %d and now buffer is %d", received, ring_buf_size_get(state->rx_buf)); + if (state->process_tx_callback) { + state->process_tx_callback(); + } else if (state->process_tx_work) { + k_work_submit(state->process_tx_work); + } + + break; + } + case UART_RX_BUF_RELEASED: + if (ev->data.rx_buf.buf == state->rx_bufs[0]) { + atomic_clear_bit(&state->state, ASYNC_STATE_BIT_RXBUF0_USED); + } else if (ev->data.rx_buf.buf == state->rx_bufs[1]) { + atomic_clear_bit(&state->state, ASYNC_STATE_BIT_RXBUF1_USED); + } + + break; + case UART_RX_BUF_REQUEST: + if (!atomic_test_and_set_bit(&state->state, ASYNC_STATE_BIT_RXBUF0_USED)) { + uart_rx_buf_rsp(state->uart, state->rx_bufs[0], state->rx_bufs_len); + break; + } + + if (!atomic_test_and_set_bit(&state->state, ASYNC_STATE_BIT_RXBUF1_USED)) { + uart_rx_buf_rsp(state->uart, state->rx_bufs[1], state->rx_bufs_len); + break; + } + + LOG_WRN("No RX buffers available!"); + break; + case UART_RX_STOPPED: + // LOG_WRN("UART RX Stopped %d with state %ld", ev->data.rx_stop.reason, state->state); + break; + case UART_RX_DISABLED: { + k_work_schedule(&state->restart_rx_work, K_MSEC(1)); + + break; + } + default: + break; + } +} + +int zmk_split_wired_async_init(struct zmk_split_wired_async_state *state) { + __ASSERT(state != NULL, "State is null"); + + k_work_init_delayable(&state->restart_rx_work, restart_rx_work_cb); + + int ret = uart_callback_set(state->uart, async_uart_cb, state); + if (ret < 0) { + LOG_ERR("Failed to set up async callback on UART (%d)", ret); + return ret; + } + + // atomic_set_bit(&state->state, ASYNC_STATE_BIT_RXBUF0_USED); + + // ret = uart_rx_enable(state->uart, state->rx_bufs[0], state->rx_bufs_len, + // CONFIG_ZMK_SPLIT_WIRED_ASYNC_RX_TIMEOUT); + // if (ret < 0) { + // LOG_ERR("Failed to enable RX (%d)", ret); + // return ret; + // } + + return 0; +} + +#endif + +int zmk_split_wired_get_item(struct ring_buf *rx_buf, uint8_t *env, size_t env_size) { + while (ring_buf_size_get(rx_buf) > sizeof(struct msg_prefix) + sizeof(struct msg_postfix)) { + struct msg_prefix prefix; + + __ASSERT_EVAL( + (void)ring_buf_peek(rx_buf, (uint8_t *)&prefix, sizeof(prefix)), + uint32_t peek_read = ring_buf_peek(rx_buf, (uint8_t *)&prefix, sizeof(prefix)), + peek_read == sizeof(prefix), "Somehow read less than we expect from the RX buffer"); + + if (memcmp(&prefix.magic_prefix, &ZMK_SPLIT_WIRED_ENVELOPE_MAGIC_PREFIX, + sizeof(prefix.magic_prefix)) != 0) { + uint8_t discarded_byte; + ring_buf_get(rx_buf, &discarded_byte, 1); + + LOG_WRN("Prefix mismatch, discarding byte %0x", discarded_byte); + + continue; + } + + size_t payload_to_read = sizeof(prefix) + prefix.payload_size; + + if (payload_to_read > env_size) { + LOG_WRN("Invalid message with payload %d bigger than expected max %d", payload_to_read, + env_size); + return -EINVAL; + } + + if (ring_buf_size_get(rx_buf) < payload_to_read + sizeof(struct msg_postfix)) { + return -EAGAIN; + } + + // Now that prefix matches, read it out so we can read the rest of the payload. + __ASSERT_EVAL((void)ring_buf_get(rx_buf, env, payload_to_read), + uint32_t read = ring_buf_get(rx_buf, env, payload_to_read), + read == payload_to_read, + "Somehow read less than we expect from the RX buffer"); + + struct msg_postfix postfix; + __ASSERT_EVAL((void)ring_buf_get(rx_buf, (uint8_t *)&postfix, sizeof(postfix)), + uint32_t read = ring_buf_get(rx_buf, (uint8_t *)&postfix, sizeof(postfix)), + read == sizeof(postfix), + "Somehow read less of the postfix than we expect from the RX buffer"); + + uint32_t crc = crc32_ieee(env, payload_to_read); + if (crc != postfix.crc) { + LOG_WRN("Data corruption in received peripheral event, ignoring %d vs %d", crc, + postfix.crc); + return -EINVAL; + } + + return 0; + } + + return -EAGAIN; +} \ No newline at end of file diff --git a/app/src/split/wired/wired.h b/app/src/split/wired/wired.h new file mode 100644 index 00000000..d48f29b7 --- /dev/null +++ b/app/src/split/wired/wired.h @@ -0,0 +1,96 @@ +/* + * Copyright (c) 2025 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#pragma once + +#include +#include + +#include + +#define ZMK_SPLIT_WIRED_ENVELOPE_MAGIC_PREFIX "ZmKw" + +struct msg_prefix { + uint8_t magic_prefix[sizeof(ZMK_SPLIT_WIRED_ENVELOPE_MAGIC_PREFIX) - 1]; + uint8_t payload_size; +} __packed; + +struct command_payload { + uint8_t source; + struct zmk_split_transport_central_command cmd; +} __packed; + +struct command_envelope { + struct msg_prefix prefix; + struct command_payload payload; +} __packed; + +struct event_payload { + uint8_t source; + struct zmk_split_transport_peripheral_event event; +} __packed; + +struct event_envelope { + struct msg_prefix prefix; + struct event_payload payload; +} __packed; + +struct msg_postfix { + uint32_t crc; +} __packed; + +#define MSG_EXTRA_SIZE (sizeof(struct msg_prefix) + sizeof(struct msg_postfix)) + +typedef void (*zmk_split_wired_process_tx_callback_t)(void); + +#if IS_ENABLED(CONFIG_ZMK_SPLIT_WIRED_UART_MODE_POLLING) + +void zmk_split_wired_poll_out(struct ring_buf *tx_buf, const struct device *uart); + +int zmk_split_wired_poll_in(struct ring_buf *rx_buf, const struct device *uart, + struct k_work *process_data_work, + zmk_split_wired_process_tx_callback_t process_data_cb); + +#endif + +#if IS_ENABLED(CONFIG_ZMK_SPLIT_WIRED_UART_MODE_INTERRUPT) + +void zmk_split_wired_fifo_read(const struct device *dev, struct ring_buf *buf, + struct k_work *process_work, + zmk_split_wired_process_tx_callback_t process_cb); +void zmk_split_wired_fifo_fill(const struct device *dev, struct ring_buf *tx_buf); + +#endif + +#if IS_ENABLED(CONFIG_ZMK_SPLIT_WIRED_UART_MODE_ASYNC) + +struct zmk_split_wired_async_state { + atomic_t state; + + uint8_t *rx_bufs[2]; + size_t rx_bufs_len; + size_t rx_size_process_trigger; + + struct ring_buf *tx_buf; + struct ring_buf *rx_buf; + + zmk_split_wired_process_tx_callback_t process_tx_callback; + + const struct device *uart; + + struct k_work_delayable restart_rx_work; + struct k_work *process_tx_work; + const struct gpio_dt_spec *dir_gpio; +}; + +int zmk_split_wired_async_init(struct zmk_split_wired_async_state *state); +void zmk_split_wired_async_tx(struct zmk_split_wired_async_state *state); +int zmk_split_wired_async_rx(struct zmk_split_wired_async_state *state); +int zmk_split_wired_async_rx_cancel(struct zmk_split_wired_async_state *state); + +#endif + +int zmk_split_wired_get_item(struct ring_buf *rx_buf, uint8_t *env, size_t env_size); \ No newline at end of file diff --git a/app/src/studio/Kconfig b/app/src/studio/Kconfig index d1315070..1f4da6d3 100644 --- a/app/src/studio/Kconfig +++ b/app/src/studio/Kconfig @@ -35,6 +35,7 @@ menuconfig ZMK_STUDIO_RPC # These two save stack size imply NANOPB_NO_ERRMSG imply NANOPB_WITHOUT_64BIT + imply NANOPB_NO_ENCODE_SIZE_CHECK imply ZMK_STUDIO_LOCKING if !ARCH_POSIX select CBPRINTF_LIBC_SUBSTS if ARCH_POSIX select SETTINGS @@ -50,17 +51,28 @@ if ZMK_STUDIO_RPC menu "Transports" +DT_CHOSEN_ZMK_STUDIO_RPC_UART := zmk,studio-rpc-uart + config ZMK_STUDIO_TRANSPORT_UART bool "Serial" select SERIAL select RING_BUFFER - default y if ZMK_USB || ARCH_POSIX + default y if $(dt_chosen_enabled,$(DT_CHOSEN_ZMK_STUDIO_RPC_UART)) + +if ZMK_STUDIO_TRANSPORT_UART config ZMK_STUDIO_TRANSPORT_UART_RX_STACK_SIZE int "RX Stack Size" depends on !UART_INTERRUPT_DRIVEN default 512 +config ZMK_STUDIO_TRANSPORT_UART_RX_PRIORITY + int "RX Thread Priority" + depends on !UART_INTERRUPT_DRIVEN + default 9 + +endif + config ZMK_STUDIO_TRANSPORT_BLE bool "BLE (GATT)" select RING_BUFFER @@ -68,9 +80,12 @@ config ZMK_STUDIO_TRANSPORT_BLE depends on ZMK_BLE default y + config BT_CONN_TX_MAX default 64 if ZMK_STUDIO_TRANSPORT_BLE +if ZMK_STUDIO_TRANSPORT_BLE + config ZMK_STUDIO_TRANSPORT_BLE_PREF_LATENCY int "BLE Transport preferred latency" default 10 @@ -78,6 +93,8 @@ config ZMK_STUDIO_TRANSPORT_BLE_PREF_LATENCY When the studio UI is connected, a lower latency can be requested in order to make the interactions between keyboard and studio faster. +endif + endmenu config ZMK_STUDIO_RPC_THREAD_STACK_SIZE diff --git a/app/src/studio/behavior_subsystem.c b/app/src/studio/behavior_subsystem.c index b8d1ef1d..24591315 100644 --- a/app/src/studio/behavior_subsystem.c +++ b/app/src/studio/behavior_subsystem.c @@ -33,6 +33,7 @@ static bool encode_behavior_summaries(pb_ostream_t *stream, const pb_field_t *fi } zmk_studio_Response list_all_behaviors(const zmk_studio_Request *req) { + LOG_DBG(""); zmk_behaviors_ListAllBehaviorsResponse beh_resp = zmk_behaviors_ListAllBehaviorsResponse_init_zero; beh_resp.behaviors.funcs.encode = encode_behavior_summaries; @@ -83,7 +84,7 @@ static bool encode_value_description(pb_ostream_t *stream, const pb_field_t *fie zmk_behaviors_BehaviorParameterValueDescription desc = zmk_behaviors_BehaviorParameterValueDescription_init_zero; desc.name.funcs.encode = encode_value_description_name; - desc.name.arg = val; + desc.name.arg = (void *)val; switch (val->type) { case BEHAVIOR_PARAMETER_VALUE_TYPE_VALUE: @@ -164,9 +165,10 @@ static struct encode_metadata_sets_state state = {}; zmk_studio_Response get_behavior_details(const zmk_studio_Request *req) { uint32_t behavior_id = req->subsystem.behaviors.request_type.get_behavior_details.behavior_id; - const char *behavior_name = zmk_behavior_find_behavior_name_from_local_id(behavior_id); + LOG_DBG("behavior_id %d, name %s", behavior_id, behavior_name); + if (!behavior_name) { LOG_WRN("No behavior found for ID %d", behavior_id); return ZMK_RPC_SIMPLE_ERR(GENERIC); diff --git a/app/src/studio/core_subsystem.c b/app/src/studio/core_subsystem.c index 2cdc9d7c..1739919a 100644 --- a/app/src/studio/core_subsystem.c +++ b/app/src/studio/core_subsystem.c @@ -45,6 +45,7 @@ static bool encode_device_info_serial_number(pb_ostream_t *stream, const pb_fiel #endif // IS_ENABLED(CONFIG_HWINFO) zmk_studio_Response get_device_info(const zmk_studio_Request *req) { + LOG_DBG(""); zmk_core_GetDeviceInfoResponse resp = zmk_core_GetDeviceInfoResponse_init_zero; resp.name.funcs.encode = encode_device_info_name; @@ -56,12 +57,14 @@ zmk_studio_Response get_device_info(const zmk_studio_Request *req) { } zmk_studio_Response get_lock_state(const zmk_studio_Request *req) { + LOG_DBG(""); zmk_core_LockState resp = zmk_studio_core_get_lock_state(); return CORE_RESPONSE(get_lock_state, resp); } zmk_studio_Response reset_settings(const zmk_studio_Request *req) { + LOG_DBG(""); ZMK_RPC_SUBSYSTEM_SETTINGS_RESET_FOREACH(sub) { int ret = sub->callback(); if (ret < 0) { diff --git a/app/src/studio/gatt_rpc_transport.c b/app/src/studio/gatt_rpc_transport.c index f0ab3152..dff18259 100644 --- a/app/src/studio/gatt_rpc_transport.c +++ b/app/src/studio/gatt_rpc_transport.c @@ -25,6 +25,7 @@ LOG_MODULE_DECLARE(zmk_studio, CONFIG_ZMK_STUDIO_LOG_LEVEL); static bool handling_rx = false; +static K_SEM_DEFINE(indicate_sem, 1, 1); static atomic_t notify_size; static void rpc_ccc_cfg_changed(const struct bt_gatt_attr *attr, uint16_t value) { @@ -125,8 +126,14 @@ static int gatt_stop_rx(void) { return 0; } +static uint8_t indicate_buffer[27]; + +static void indicate_cb(struct bt_conn *conn, struct bt_gatt_indicate_params *params, uint8_t err); + static struct bt_gatt_indicate_params rpc_indicate_params = { .attr = &rpc_interface.attrs[1], + .data = indicate_buffer, + .func = indicate_cb, }; static void notif_rpc_tx_cb(struct k_work *work) { @@ -139,34 +146,32 @@ static void notif_rpc_tx_cb(struct k_work *work) { return; } - uint16_t notify_size = get_notify_size_for_conn(conn); - uint8_t notify_bytes[notify_size]; + uint16_t notify_size = MIN(get_notify_size_for_conn(conn), sizeof(indicate_buffer)); + + if (ring_buf_size_get(tx_buf) > 0) { + int ret = k_sem_take(&indicate_sem, K_NO_WAIT); + if (ret < 0) { + return; + } - while (ring_buf_size_get(tx_buf) > 0) { uint16_t added = 0; while (added < notify_size && ring_buf_size_get(tx_buf) > 0) { uint8_t *buf; int len = ring_buf_get_claim(tx_buf, &buf, notify_size - added); - memcpy(notify_bytes + added, buf, len); + memcpy(indicate_buffer + added, buf, len); added += len; ring_buf_get_finish(tx_buf, len); } - rpc_indicate_params.data = notify_bytes; rpc_indicate_params.len = added; - int notify_attempts = 5; - do { - int err = bt_gatt_indicate(conn, &rpc_indicate_params); - if (err >= 0) { - break; - } - + int err = bt_gatt_indicate(conn, &rpc_indicate_params); + if (err < 0) { LOG_WRN("Failed to notify the response %d", err); - k_sleep(K_MSEC(200)); - } while (notify_attempts-- > 0); + k_sem_give(&indicate_sem); + } } bt_conn_unref(conn); @@ -178,6 +183,11 @@ struct gatt_write_state { size_t pending_notify; }; +static void indicate_cb(struct bt_conn *conn, struct bt_gatt_indicate_params *params, uint8_t err) { + k_sem_give(&indicate_sem); + k_work_submit(¬ify_tx_work); +} + static void gatt_tx_notify(struct ring_buf *tx_buf, size_t added, bool msg_done, void *user_data) { struct gatt_write_state *state = (struct gatt_write_state *)user_data; @@ -194,7 +204,7 @@ static void gatt_tx_notify(struct ring_buf *tx_buf, size_t added, bool msg_done, static struct gatt_write_state tx_state = {}; static void *gatt_tx_user_data(void) { - memset(&tx_state, sizeof(tx_state), 0); + memset(&tx_state, 0, sizeof(tx_state)); return &tx_state; } diff --git a/app/src/studio/keymap_subsystem.c b/app/src/studio/keymap_subsystem.c index aa4b9799..1d51975c 100644 --- a/app/src/studio/keymap_subsystem.c +++ b/app/src/studio/keymap_subsystem.c @@ -97,26 +97,34 @@ static bool encode_keymap_layers(pb_ostream_t *stream, const pb_field_t *field, return true; } -zmk_studio_Response get_keymap(const zmk_studio_Request *req) { - zmk_keymap_Keymap resp = zmk_keymap_Keymap_init_zero; +static void populate_keymap_extra_props(zmk_keymap_Keymap *keymap) { + keymap->max_layer_name_length = CONFIG_ZMK_KEYMAP_LAYER_NAME_MAX_LEN; - resp.layers.funcs.encode = encode_keymap_layers; - - resp.available_layers = 0; + keymap->available_layers = 0; for (zmk_keymap_layer_index_t index = 0; index < ZMK_KEYMAP_LAYERS_LEN; index++) { zmk_keymap_layer_id_t id = zmk_keymap_layer_index_to_id(index); if (id == UINT8_MAX) { - resp.available_layers = ZMK_KEYMAP_LAYERS_LEN - index; + keymap->available_layers = ZMK_KEYMAP_LAYERS_LEN - index; break; } } +} + +zmk_studio_Response get_keymap(const zmk_studio_Request *req) { + LOG_DBG(""); + zmk_keymap_Keymap resp = zmk_keymap_Keymap_init_zero; + + resp.layers.funcs.encode = encode_keymap_layers; + + populate_keymap_extra_props(&resp); return KEYMAP_RESPONSE(get_keymap, resp); } zmk_studio_Response set_layer_binding(const zmk_studio_Request *req) { + LOG_DBG(""); const zmk_keymap_SetLayerBindingRequest *set_req = &req->subsystem.keymap.request_type.set_layer_binding; @@ -165,31 +173,58 @@ zmk_studio_Response set_layer_binding(const zmk_studio_Request *req) { } zmk_studio_Response check_unsaved_changes(const zmk_studio_Request *req) { + LOG_DBG(""); int layout_changes = zmk_physical_layouts_check_unsaved_selection(); int keymap_changes = zmk_keymap_check_unsaved_changes(); return KEYMAP_RESPONSE(check_unsaved_changes, layout_changes > 0 || keymap_changes > 0); } +static void map_errno_to_save_resp(int err, zmk_keymap_SaveChangesResponse *resp) { + resp->which_result = zmk_keymap_SaveChangesResponse_err_tag; + + switch (err) { + case -ENOTSUP: + resp->result.err = zmk_keymap_SaveChangesErrorCode_SAVE_CHANGES_ERR_NOT_SUPPORTED; + break; + case -ENOSPC: + resp->result.err = zmk_keymap_SaveChangesErrorCode_SAVE_CHANGES_ERR_NO_SPACE; + break; + default: + resp->result.err = zmk_keymap_SaveChangesErrorCode_SAVE_CHANGES_ERR_GENERIC; + break; + } +} + zmk_studio_Response save_changes(const zmk_studio_Request *req) { + zmk_keymap_SaveChangesResponse resp = zmk_keymap_SaveChangesResponse_init_zero; + resp.which_result = zmk_keymap_SaveChangesResponse_ok_tag; + resp.result.ok = true; + + LOG_DBG(""); int ret = zmk_physical_layouts_save_selected(); if (ret < 0) { - return ZMK_RPC_SIMPLE_ERR(GENERIC); + LOG_WRN("Failed to save selected physical layout (%d)", ret); + map_errno_to_save_resp(ret, &resp); + return KEYMAP_RESPONSE(save_changes, resp); } ret = zmk_keymap_save_changes(); if (ret < 0) { - return ZMK_RPC_SIMPLE_ERR(GENERIC); + LOG_WRN("Failed to save keymap changes (%d)", ret); + map_errno_to_save_resp(ret, &resp); + return KEYMAP_RESPONSE(save_changes, resp); } raise_zmk_studio_rpc_notification((struct zmk_studio_rpc_notification){ .notification = KEYMAP_NOTIFICATION(unsaved_changes_status_changed, false)}); - return KEYMAP_RESPONSE(save_changes, true); + return KEYMAP_RESPONSE(save_changes, resp); } zmk_studio_Response discard_changes(const zmk_studio_Request *req) { + LOG_DBG(""); int ret = zmk_physical_layouts_revert_selected(); if (ret < 0) { return ZMK_RPC_SIMPLE_ERR(GENERIC); @@ -243,9 +278,11 @@ static bool encode_layout_keys(pb_ostream_t *stream, const pb_field_t *field, vo .height = layout_kp->height, .x = layout_kp->x, .y = layout_kp->y, +#if IS_ENABLED(CONFIG_ZMK_PHYSICAL_LAYOUT_KEY_ROTATION) .r = layout_kp->r, .rx = layout_kp->rx, .ry = layout_kp->ry, +#endif }; if (!pb_encode_submessage(stream, &zmk_keymap_KeyPhysicalAttrs_msg, &layout_kp_msg)) { @@ -271,10 +308,10 @@ static bool encode_layouts(pb_ostream_t *stream, const pb_field_t *field, void * zmk_keymap_PhysicalLayout layout = zmk_keymap_PhysicalLayout_init_zero; layout.name.funcs.encode = encode_layout_name; - layout.name.arg = l; + layout.name.arg = (void *)l; layout.keys.funcs.encode = encode_layout_keys; - layout.keys.arg = l; + layout.keys.arg = (void *)l; if (!pb_encode_submessage(stream, &zmk_keymap_PhysicalLayout_msg, &layout)) { LOG_WRN("Failed to encode layout submessage"); @@ -286,54 +323,15 @@ static bool encode_layouts(pb_ostream_t *stream, const pb_field_t *field, void * } zmk_studio_Response get_physical_layouts(const zmk_studio_Request *req) { + LOG_DBG(""); zmk_keymap_PhysicalLayouts resp = zmk_keymap_PhysicalLayouts_init_zero; resp.active_layout_index = zmk_physical_layouts_get_selected(); resp.layouts.funcs.encode = encode_layouts; return KEYMAP_RESPONSE(get_physical_layouts, resp); } -static void migrate_keymap(const uint8_t old) { - int new = zmk_physical_layouts_get_selected(); - - uint32_t new_to_old_map[ZMK_KEYMAP_LEN]; - int layout_size = - zmk_physical_layouts_get_position_map(old, new, ZMK_KEYMAP_LEN, new_to_old_map); - - if (layout_size < 0) { - return; - } - - for (int l = 0; l < ZMK_KEYMAP_LAYERS_LEN; l++) { - struct zmk_behavior_binding new_layer[ZMK_KEYMAP_LEN]; - - for (int b = 0; b < layout_size; b++) { - uint32_t old_b = new_to_old_map[b]; - - if (old_b == UINT32_MAX) { - memset(&new_layer[b], 0, sizeof(struct zmk_behavior_binding)); - continue; - } - - const struct zmk_behavior_binding *binding = - zmk_keymap_get_layer_binding_at_idx(l, old_b); - - if (!binding) { - memset(&new_layer[b], 0, sizeof(struct zmk_behavior_binding)); - continue; - } - - memcpy(&new_layer[b], binding, sizeof(struct zmk_behavior_binding)); - } - - for (int b = 0; b < layout_size; b++) { - zmk_keymap_set_layer_binding_at_idx(l, b, new_layer[b]); - } - } - - // TODO: Migrate combos? -} - zmk_studio_Response set_active_physical_layout(const zmk_studio_Request *req) { + LOG_DBG(""); uint8_t index = (uint8_t)req->subsystem.keymap.request_type.set_active_physical_layout; int old = zmk_physical_layouts_get_selected(); @@ -341,15 +339,14 @@ zmk_studio_Response set_active_physical_layout(const zmk_studio_Request *req) { zmk_keymap_SetActivePhysicalLayoutResponse_init_zero; resp.which_result = zmk_keymap_SetActivePhysicalLayoutResponse_ok_tag; resp.result.ok.layers.funcs.encode = encode_keymap_layers; + populate_keymap_extra_props(&resp.result.ok); if (old == index) { return KEYMAP_RESPONSE(set_active_physical_layout, resp); } int ret = zmk_physical_layouts_select(index); - if (ret >= 0) { - migrate_keymap(old); - } else { + if (ret < 0) { resp.which_result = zmk_keymap_SetActivePhysicalLayoutResponse_err_tag; resp.result.err = zmk_keymap_SetActivePhysicalLayoutErrorCode_SET_ACTIVE_PHYSICAL_LAYOUT_ERR_GENERIC; @@ -362,6 +359,7 @@ zmk_studio_Response set_active_physical_layout(const zmk_studio_Request *req) { } zmk_studio_Response move_layer(const zmk_studio_Request *req) { + LOG_DBG(""); const zmk_keymap_MoveLayerRequest *move_req = &req->subsystem.keymap.request_type.move_layer; zmk_keymap_MoveLayerResponse resp = zmk_keymap_MoveLayerResponse_init_zero; @@ -371,6 +369,7 @@ zmk_studio_Response move_layer(const zmk_studio_Request *req) { if (ret >= 0) { resp.which_result = zmk_keymap_SetActivePhysicalLayoutResponse_ok_tag; resp.result.ok.layers.funcs.encode = encode_keymap_layers; + populate_keymap_extra_props(&resp.result.ok); raise_zmk_studio_rpc_notification((struct zmk_studio_rpc_notification){ .notification = KEYMAP_NOTIFICATION(unsaved_changes_status_changed, true)}); @@ -384,6 +383,7 @@ zmk_studio_Response move_layer(const zmk_studio_Request *req) { } zmk_studio_Response add_layer(const zmk_studio_Request *req) { + LOG_DBG(""); // Use a static here to keep the value valid during serialization static zmk_keymap_layer_id_t layer_id = 0; @@ -426,6 +426,7 @@ zmk_studio_Response add_layer(const zmk_studio_Request *req) { } zmk_studio_Response remove_layer(const zmk_studio_Request *req) { + LOG_DBG(""); const zmk_keymap_RemoveLayerRequest *rm_req = &req->subsystem.keymap.request_type.remove_layer; zmk_keymap_RemoveLayerResponse resp = zmk_keymap_RemoveLayerResponse_init_zero; @@ -454,6 +455,7 @@ zmk_studio_Response remove_layer(const zmk_studio_Request *req) { } zmk_studio_Response restore_layer(const zmk_studio_Request *req) { + LOG_DBG(""); const zmk_keymap_RestoreLayerRequest *restore_req = &req->subsystem.keymap.request_type.restore_layer; @@ -466,10 +468,10 @@ zmk_studio_Response restore_layer(const zmk_studio_Request *req) { resp.result.ok.id = restore_req->layer_id; resp.result.ok.name.funcs.encode = encode_layer_name; - resp.result.ok.name.arg = &restore_req->layer_id; + resp.result.ok.name.arg = (void *)&restore_req->layer_id; resp.result.ok.bindings.funcs.encode = encode_layer_bindings; - resp.result.ok.bindings.arg = &restore_req->layer_id; + resp.result.ok.bindings.arg = (void *)&restore_req->layer_id; raise_zmk_studio_rpc_notification((struct zmk_studio_rpc_notification){ .notification = KEYMAP_NOTIFICATION(unsaved_changes_status_changed, true)}); @@ -490,6 +492,7 @@ zmk_studio_Response restore_layer(const zmk_studio_Request *req) { } zmk_studio_Response set_layer_props(const zmk_studio_Request *req) { + LOG_DBG(""); const zmk_keymap_SetLayerPropsRequest *set_req = &req->subsystem.keymap.request_type.set_layer_props; diff --git a/app/src/studio/rpc.c b/app/src/studio/rpc.c index 8dfb025d..e79b5568 100644 --- a/app/src/studio/rpc.c +++ b/app/src/studio/rpc.c @@ -11,6 +11,7 @@ #include #include +#include #include LOG_MODULE_REGISTER(zmk_studio, CONFIG_ZMK_STUDIO_LOG_LEVEL); @@ -77,9 +78,7 @@ static enum studio_framing_state rpc_framing_state; static K_MUTEX_DEFINE(rpc_transport_mutex); static struct zmk_rpc_transport *selected_transport; -struct ring_buf *zmk_rpc_get_rx_buf(void) { - return &rpc_rx_buf; -} +struct ring_buf *zmk_rpc_get_rx_buf(void) { return &rpc_rx_buf; } void zmk_rpc_rx_notify(void) { k_sem_give(&rpc_rx_sem); } @@ -88,7 +87,7 @@ static bool rpc_read_cb(pb_istream_t *stream, uint8_t *buf, size_t count) { do { uint8_t *buffer; - uint32_t len = ring_buf_get_claim(&rpc_rx_buf, &buffer, count); + uint32_t len = ring_buf_get_claim(&rpc_rx_buf, &buffer, count - write_offset); if (len > 0) { for (int i = 0; i < len; i++) { @@ -118,9 +117,7 @@ static pb_istream_t pb_istream_for_rx_ring_buf() { RING_BUF_DECLARE(rpc_tx_buf, CONFIG_ZMK_STUDIO_RPC_TX_BUF_SIZE); -struct ring_buf *zmk_rpc_get_tx_buf(void) { - return &rpc_tx_buf; -} +struct ring_buf *zmk_rpc_get_tx_buf(void) { return &rpc_tx_buf; } static bool rpc_tx_buffer_write(pb_ostream_t *stream, const uint8_t *buf, size_t count) { void *user_data = stream->state; @@ -219,6 +216,9 @@ static void rpc_main(void) { for (;;) { pb_istream_t stream = pb_istream_for_rx_ring_buf(); zmk_studio_Request req = zmk_studio_Request_init_zero; +#if IS_ENABLED(CONFIG_THREAD_ANALYZER) + thread_analyzer_print(0); +#endif // IS_ENABLED(CONFIG_THREAD_ANALYZER) bool status = pb_decode(&stream, &zmk_studio_Request_msg, &req); rpc_framing_state = FRAMING_STATE_IDLE; @@ -227,6 +227,9 @@ static void rpc_main(void) { zmk_studio_Response resp = handle_request(&req); int err = send_response(&resp); +#if IS_ENABLED(CONFIG_THREAD_ANALYZER) + thread_analyzer_print(0); +#endif // IS_ENABLED(CONFIG_THREAD_ANALYZER) if (err < 0) { LOG_ERR("Failed to send the RPC response %d", err); } @@ -240,7 +243,7 @@ K_THREAD_DEFINE(studio_rpc_thread, CONFIG_ZMK_STUDIO_RPC_THREAD_STACK_SIZE, rpc_ NULL, K_LOWEST_APPLICATION_THREAD_PRIO, 0, 0); static void refresh_selected_transport(void) { - enum zmk_transport transport = zmk_endpoints_selected().transport; + enum zmk_transport transport = zmk_endpoint_get_selected().transport; k_mutex_lock(&rpc_transport_mutex, K_FOREVER); diff --git a/app/src/studio/uart_rpc_transport.c b/app/src/studio/uart_rpc_transport.c index d4a4de83..6dcac6d1 100644 --- a/app/src/studio/uart_rpc_transport.c +++ b/app/src/studio/uart_rpc_transport.c @@ -65,7 +65,7 @@ static void uart_rx_main(void) { } K_THREAD_DEFINE(uart_transport_read_thread, CONFIG_ZMK_STUDIO_TRANSPORT_UART_RX_STACK_SIZE, - uart_rx_main, NULL, NULL, NULL, K_LOWEST_APPLICATION_THREAD_PRIO, 0, 0); + uart_rx_main, NULL, NULL, NULL, CONFIG_ZMK_STUDIO_TRANSPORT_UART_RX_PRIORITY, 0, 0); #endif diff --git a/app/src/usb.c b/app/src/usb.c index cd787618..cf76341e 100644 --- a/app/src/usb.c +++ b/app/src/usb.c @@ -20,6 +20,7 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); static enum usb_dc_status_code usb_status = USB_DC_UNKNOWN; +static bool is_configured; static void raise_usb_status_changed_event(struct k_work *_work) { raise_zmk_usb_conn_state_changed( @@ -49,6 +50,10 @@ enum zmk_usb_conn_state zmk_usb_get_conn_state(void) { } } +bool zmk_usb_is_hid_ready(void) { + return zmk_usb_get_conn_state() == ZMK_USB_CONN_HID && is_configured; +} + void usb_status_cb(enum usb_dc_status_code status, const uint8_t *params) { // Start-of-frame events are too frequent and noisy to notify, and they're // not used within ZMK @@ -62,6 +67,11 @@ void usb_status_cb(enum usb_dc_status_code status, const uint8_t *params) { } #endif usb_status = status; + if (zmk_usb_get_conn_state() == ZMK_USB_CONN_HID) { + is_configured |= usb_status == USB_DC_CONFIGURED; + } else { + is_configured = false; + } k_work_submit(&usb_status_notifier_work); }; diff --git a/app/src/usb_hid.c b/app/src/usb_hid.c index 9db10952..9adc7db8 100644 --- a/app/src/usb_hid.c +++ b/app/src/usb_hid.c @@ -13,9 +13,15 @@ #include #include #include + +#if IS_ENABLED(CONFIG_ZMK_POINTING_SMOOTH_SCROLLING) +#include +#endif // IS_ENABLED(CONFIG_ZMK_POINTING_SMOOTH_SCROLLING) + #if IS_ENABLED(CONFIG_ZMK_HID_INDICATORS) #include #endif // IS_ENABLED(CONFIG_ZMK_HID_INDICATORS) + #include LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); @@ -56,62 +62,114 @@ static uint8_t *get_keyboard_report(size_t *len) { static int get_report_cb(const struct device *dev, struct usb_setup_packet *setup, int32_t *len, uint8_t **data) { + switch (setup->wValue & HID_GET_REPORT_TYPE_MASK) { + case HID_REPORT_TYPE_FEATURE: + switch (setup->wValue & HID_GET_REPORT_ID_MASK) { +#if IS_ENABLED(CONFIG_ZMK_POINTING_SMOOTH_SCROLLING) + case ZMK_HID_REPORT_ID_MOUSE: + static struct zmk_hid_mouse_resolution_feature_report res_feature_report; - /* - * 7.2.1 of the HID v1.11 spec is unclear about handling requests for reports that do not exist - * For requested reports that aren't input reports, return -ENOTSUP like the Zephyr subsys does - */ - if ((setup->wValue & HID_GET_REPORT_TYPE_MASK) != HID_REPORT_TYPE_INPUT) { + struct zmk_endpoint_instance endpoint = { + .transport = ZMK_TRANSPORT_USB, + }; + + *len = sizeof(struct zmk_hid_mouse_resolution_feature_report); + struct zmk_pointing_resolution_multipliers mult = + zmk_pointing_resolution_multipliers_get_profile(endpoint); + + res_feature_report.body.wheel_res = mult.wheel; + res_feature_report.body.hwheel_res = mult.hor_wheel; + *data = (uint8_t *)&res_feature_report; + break; +#endif // IS_ENABLED(CONFIG_ZMK_POINTING_SMOOTH_SCROLLING) + default: + return -ENOTSUP; + } + break; + case HID_REPORT_TYPE_INPUT: + switch (setup->wValue & HID_GET_REPORT_ID_MASK) { + case ZMK_HID_REPORT_ID_KEYBOARD: { + size_t size; + *data = get_keyboard_report(&size); + *len = (int32_t)size; + break; + } + case ZMK_HID_REPORT_ID_CONSUMER: { + struct zmk_hid_consumer_report *report = zmk_hid_get_consumer_report(); + *data = (uint8_t *)report; + *len = sizeof(*report); + break; + } + default: + LOG_ERR("Invalid report ID %d requested", setup->wValue & HID_GET_REPORT_ID_MASK); + return -EINVAL; + } + break; + default: + /* + * 7.2.1 of the HID v1.11 spec is unclear about handling requests for reports that do not + * exist For requested reports that aren't input reports, return -ENOTSUP like the Zephyr + * subsys does + */ LOG_ERR("Unsupported report type %d requested", (setup->wValue & HID_GET_REPORT_TYPE_MASK) << 8); return -ENOTSUP; } - switch (setup->wValue & HID_GET_REPORT_ID_MASK) { - case ZMK_HID_REPORT_ID_KEYBOARD: { - *data = get_keyboard_report(len); - break; - } - case ZMK_HID_REPORT_ID_CONSUMER: { - struct zmk_hid_consumer_report *report = zmk_hid_get_consumer_report(); - *data = (uint8_t *)report; - *len = sizeof(*report); - break; - } - default: - LOG_ERR("Invalid report ID %d requested", setup->wValue & HID_GET_REPORT_ID_MASK); - return -EINVAL; - } - return 0; } static int set_report_cb(const struct device *dev, struct usb_setup_packet *setup, int32_t *len, uint8_t **data) { - if ((setup->wValue & HID_GET_REPORT_TYPE_MASK) != HID_REPORT_TYPE_OUTPUT) { - LOG_ERR("Unsupported report type %d requested", - (setup->wValue & HID_GET_REPORT_TYPE_MASK) >> 8); - return -ENOTSUP; - } + switch (setup->wValue & HID_GET_REPORT_TYPE_MASK) { + case HID_REPORT_TYPE_FEATURE: + switch (setup->wValue & HID_GET_REPORT_ID_MASK) { +#if IS_ENABLED(CONFIG_ZMK_POINTING_SMOOTH_SCROLLING) + case ZMK_HID_REPORT_ID_MOUSE: + if (*len != sizeof(struct zmk_hid_mouse_resolution_feature_report)) { + return -EINVAL; + } - switch (setup->wValue & HID_GET_REPORT_ID_MASK) { -#if IS_ENABLED(CONFIG_ZMK_HID_INDICATORS) - case ZMK_HID_REPORT_ID_LEDS: - if (*len != sizeof(struct zmk_hid_led_report)) { - LOG_ERR("LED set report is malformed: length=%d", *len); - return -EINVAL; - } else { - struct zmk_hid_led_report *report = (struct zmk_hid_led_report *)*data; + struct zmk_hid_mouse_resolution_feature_report *report = + (struct zmk_hid_mouse_resolution_feature_report *)*data; struct zmk_endpoint_instance endpoint = { .transport = ZMK_TRANSPORT_USB, }; - zmk_hid_indicators_process_report(&report->body, endpoint); + + zmk_pointing_resolution_multipliers_process_report(&report->body, endpoint); + + break; +#endif // IS_ENABLED(CONFIG_ZMK_POINTING_SMOOTH_SCROLLING) + default: + return -ENOTSUP; } break; + + case HID_REPORT_TYPE_OUTPUT: + switch (setup->wValue & HID_GET_REPORT_ID_MASK) { +#if IS_ENABLED(CONFIG_ZMK_HID_INDICATORS) + case ZMK_HID_REPORT_ID_LEDS: + if (*len != sizeof(struct zmk_hid_led_report)) { + LOG_ERR("LED set report is malformed: length=%d", *len); + return -EINVAL; + } else { + struct zmk_hid_led_report *report = (struct zmk_hid_led_report *)*data; + struct zmk_endpoint_instance endpoint = { + .transport = ZMK_TRANSPORT_USB, + }; + zmk_hid_indicators_process_report(&report->body, endpoint); + } + break; #endif // IS_ENABLED(CONFIG_ZMK_HID_INDICATORS) + default: + LOG_ERR("Invalid report ID %d requested", setup->wValue & HID_GET_REPORT_ID_MASK); + return -EINVAL; + } + break; default: - LOG_ERR("Invalid report ID %d requested", setup->wValue & HID_GET_REPORT_ID_MASK); - return -EINVAL; + LOG_ERR("Unsupported report type %d requested", + (setup->wValue & HID_GET_REPORT_TYPE_MASK) >> 8); + return -ENOTSUP; } return 0; @@ -164,7 +222,7 @@ int zmk_usb_hid_send_consumer_report(void) { return zmk_usb_hid_send_report((uint8_t *)report, sizeof(*report)); } -#if IS_ENABLED(CONFIG_ZMK_MOUSE) +#if IS_ENABLED(CONFIG_ZMK_POINTING) int zmk_usb_hid_send_mouse_report() { #if IS_ENABLED(CONFIG_ZMK_USB_BOOT) if (hid_protocol == HID_PROTOCOL_BOOT) { @@ -175,7 +233,7 @@ int zmk_usb_hid_send_mouse_report() { struct zmk_hid_mouse_report *report = zmk_hid_get_mouse_report(); return zmk_usb_hid_send_report((uint8_t *)report, sizeof(*report)); } -#endif // IS_ENABLED(CONFIG_ZMK_MOUSE) +#endif // IS_ENABLED(CONFIG_ZMK_POINTING) static int zmk_usb_hid_init(void) { hid_dev = device_get_binding("HID_0"); diff --git a/app/src/workqueue.c b/app/src/workqueue.c index e6e55c87..2decc5aa 100644 --- a/app/src/workqueue.c +++ b/app/src/workqueue.c @@ -13,9 +13,7 @@ K_THREAD_STACK_DEFINE(lowprio_q_stack, CONFIG_ZMK_LOW_PRIORITY_THREAD_STACK_SIZE static struct k_work_q lowprio_work_q; -struct k_work_q *zmk_workqueue_lowprio_work_q(void) { - return &lowprio_work_q; -} +struct k_work_q *zmk_workqueue_lowprio_work_q(void) { return &lowprio_work_q; } static int workqueue_init(void) { static const struct k_work_queue_config queue_config = {.name = "Low Priority Work Queue"}; diff --git a/app/tests/backlight/basic/native_posix_64.conf b/app/tests/backlight/basic/native_sim.conf similarity index 100% rename from app/tests/backlight/basic/native_posix_64.conf rename to app/tests/backlight/basic/native_sim.conf diff --git a/app/tests/backlight/basic/native_posix_64.keymap b/app/tests/backlight/basic/native_sim.keymap similarity index 100% rename from app/tests/backlight/basic/native_posix_64.keymap rename to app/tests/backlight/basic/native_sim.keymap diff --git a/app/tests/backlight/config-brt/native_posix_64.conf b/app/tests/backlight/config-brt/native_sim.conf similarity index 100% rename from app/tests/backlight/config-brt/native_posix_64.conf rename to app/tests/backlight/config-brt/native_sim.conf diff --git a/app/tests/backlight/config-brt/native_posix_64.keymap b/app/tests/backlight/config-brt/native_sim.keymap similarity index 100% rename from app/tests/backlight/config-brt/native_posix_64.keymap rename to app/tests/backlight/config-brt/native_sim.keymap diff --git a/app/tests/backlight/config-on/native_posix_64.conf b/app/tests/backlight/config-on/native_sim.conf similarity index 100% rename from app/tests/backlight/config-on/native_posix_64.conf rename to app/tests/backlight/config-on/native_sim.conf diff --git a/app/tests/backlight/config-on/native_posix_64.keymap b/app/tests/backlight/config-on/native_sim.keymap similarity index 100% rename from app/tests/backlight/config-on/native_posix_64.keymap rename to app/tests/backlight/config-on/native_sim.keymap diff --git a/app/tests/backlight/config-step/native_posix_64.conf b/app/tests/backlight/config-step/native_sim.conf similarity index 100% rename from app/tests/backlight/config-step/native_posix_64.conf rename to app/tests/backlight/config-step/native_sim.conf diff --git a/app/tests/backlight/config-step/native_posix_64.keymap b/app/tests/backlight/config-step/native_sim.keymap similarity index 100% rename from app/tests/backlight/config-step/native_posix_64.keymap rename to app/tests/backlight/config-step/native_sim.keymap diff --git a/app/tests/backlight/cycle/native_posix_64.conf b/app/tests/backlight/cycle/native_sim.conf similarity index 100% rename from app/tests/backlight/cycle/native_posix_64.conf rename to app/tests/backlight/cycle/native_sim.conf diff --git a/app/tests/backlight/cycle/native_posix_64.keymap b/app/tests/backlight/cycle/native_sim.keymap similarity index 100% rename from app/tests/backlight/cycle/native_posix_64.keymap rename to app/tests/backlight/cycle/native_sim.keymap diff --git a/app/tests/backlight/low-brightness/native_posix_64.conf b/app/tests/backlight/low-brightness/native_sim.conf similarity index 100% rename from app/tests/backlight/low-brightness/native_posix_64.conf rename to app/tests/backlight/low-brightness/native_sim.conf diff --git a/app/tests/backlight/low-brightness/native_posix_64.keymap b/app/tests/backlight/low-brightness/native_sim.keymap similarity index 100% rename from app/tests/backlight/low-brightness/native_posix_64.keymap rename to app/tests/backlight/low-brightness/native_sim.keymap diff --git a/app/tests/ble/central/src/main.c b/app/tests/ble/central/src/main.c index 1e2c786e..f33d50e0 100644 --- a/app/tests/ble/central/src/main.c +++ b/app/tests/ble/central/src/main.c @@ -44,6 +44,8 @@ static bool read_hid_report_on_connect = false; static bool skip_set_security_on_connect = false; static bool skip_discovery_on_connect = false; static bool read_directly_on_discovery = false; +static bool write_hid_indicators_on_discovery = false; +static bool subscribe_to_pointer_report = false; static int32_t wait_on_start = 0; static void ble_central_native_posix_options(void) { @@ -73,6 +75,11 @@ static void ble_central_native_posix_options(void) { .type = 'b', .dest = (void *)&read_hid_report_on_connect, .descript = "Read the peripheral HID report after connecting"}, + {.is_switch = true, + .option = "subscribe_to_pointer_report", + .type = 'b', + .dest = (void *)&subscribe_to_pointer_report, + .descript = "Subscribe to peripheral mouse HID report after connecting"}, {.is_switch = true, .option = "skip_discovery_on_connect", .type = 'b', @@ -83,6 +90,11 @@ static void ble_central_native_posix_options(void) { .type = 'b', .dest = (void *)&read_directly_on_discovery, .descript = "Read HIDS report after GATT characteristic discovery"}, + {.is_switch = true, + .option = "write_hid_indicators_on_discovery", + .type = 'b', + .dest = (void *)&write_hid_indicators_on_discovery, + .descript = "Write HIDS indecator report after GATT characteristic discovery"}, {.option = "wait_on_start", .name = "milliseconds", .type = 'u', @@ -97,13 +109,15 @@ NATIVE_TASK(ble_central_native_posix_options, PRE_BOOT_1, 1); #endif -static void start_scan(void); +static int start_scan(void); static struct bt_conn *default_conn; static struct bt_uuid_16 uuid = BT_UUID_INIT_16(0); static struct bt_gatt_discover_params discover_params; static struct bt_gatt_subscribe_params subscribe_params; +static struct bt_gatt_subscribe_params consumer_subscribe_params; +static struct bt_gatt_subscribe_params pointer_subscribe_params; static uint8_t notify_func(struct bt_conn *conn, struct bt_gatt_subscribe_params *params, const void *data, uint16_t length) { @@ -140,25 +154,21 @@ static uint8_t discover_func(struct bt_conn *conn, const struct bt_gatt_attr *at LOG_DBG("[ATTRIBUTE] handle %u", attr->handle); - if (!bt_uuid_cmp(discover_params.uuid, BT_UUID_HIDS)) { - memcpy(&uuid, BT_UUID_HIDS_REPORT, sizeof(uuid)); - discover_params.uuid = &uuid.uuid; - discover_params.start_handle = attr->handle + 1; - discover_params.type = BT_GATT_DISCOVER_CHARACTERISTIC; + bool find_next_hids_report = false; - err = bt_gatt_discover(conn, &discover_params); - if (err) { - LOG_DBG("[Discover failed] (err %d)", err); - } + if (!bt_uuid_cmp(discover_params.uuid, BT_UUID_HIDS)) { + find_next_hids_report = true; } else if (!bt_uuid_cmp(discover_params.uuid, BT_UUID_HIDS_REPORT)) { - if (read_directly_on_discovery) { + if (read_directly_on_discovery && !read_params.single.handle) { read_params.single.handle = bt_gatt_attr_value_handle(attr); read_params.single.offset = 0; read_params.handle_count = 1; read_params.func = read_cb; bt_gatt_read(conn, &read_params); - } else { + + find_next_hids_report = write_hid_indicators_on_discovery; + } else if (!subscribe_params.value_handle) { memcpy(&uuid, BT_UUID_GATT_CCC, sizeof(uuid)); discover_params.uuid = &uuid.uuid; discover_params.start_handle = attr->handle + 2; @@ -169,20 +179,90 @@ static uint8_t discover_func(struct bt_conn *conn, const struct bt_gatt_attr *at if (err) { LOG_DBG("[Discover failed] (err %d)", err); } - } - } else { - subscribe_params.notify = notify_func; - subscribe_params.value = BT_GATT_CCC_NOTIFY; - subscribe_params.ccc_handle = attr->handle; + } else if (!consumer_subscribe_params.value_handle) { + memcpy(&uuid, BT_UUID_GATT_CCC, sizeof(uuid)); + discover_params.uuid = &uuid.uuid; + discover_params.start_handle = attr->handle + 2; + discover_params.type = BT_GATT_DISCOVER_DESCRIPTOR; + consumer_subscribe_params.value_handle = bt_gatt_attr_value_handle(attr); - err = bt_gatt_subscribe(conn, &subscribe_params); - if (err && err != -EALREADY) { - LOG_DBG("[Subscribe failed] (err %d)", err); + err = bt_gatt_discover(conn, &discover_params); + if (err) { + LOG_DBG("[Discover failed] (err %d)", err); + } + } else if (subscribe_to_pointer_report && !pointer_subscribe_params.value_handle) { + memcpy(&uuid, BT_UUID_GATT_CCC, sizeof(uuid)); + discover_params.uuid = &uuid.uuid; + discover_params.start_handle = attr->handle + 2; + discover_params.type = BT_GATT_DISCOVER_DESCRIPTOR; + pointer_subscribe_params.value_handle = bt_gatt_attr_value_handle(attr); + + err = bt_gatt_discover(conn, &discover_params); + if (err) { + LOG_DBG("[Discover failed] (err %d)", err); + } } else { - LOG_DBG("[SUBSCRIBED]"); + uint8_t indicators = 0b00000111; + int resp = bt_gatt_write_without_response(conn, bt_gatt_attr_value_handle(attr), + &indicators, 1, true); + if (resp < 0) { + LOG_ERR("Failed to write %d", resp); + } + + return BT_GATT_ITER_CONTINUE; + } + } else if (discover_params.type == BT_GATT_DISCOVER_DESCRIPTOR) { + if (!subscribe_params.ccc_handle) { + + subscribe_params.notify = notify_func; + subscribe_params.value = BT_GATT_CCC_NOTIFY; + subscribe_params.ccc_handle = attr->handle; + + err = bt_gatt_subscribe(conn, &subscribe_params); + if (err && err != -EALREADY) { + LOG_DBG("[Subscribe failed] (err %d)", err); + } else { + LOG_DBG("[SUBSCRIBED]"); + } + } else if (!consumer_subscribe_params.ccc_handle) { + + consumer_subscribe_params.notify = notify_func; + consumer_subscribe_params.value = BT_GATT_CCC_NOTIFY; + consumer_subscribe_params.ccc_handle = attr->handle; + + err = bt_gatt_subscribe(conn, &consumer_subscribe_params); + if (err && err != -EALREADY) { + LOG_DBG("[Subscribe failed] (err %d)", err); + } else { + LOG_DBG("[CONSUMER SUBSCRIBED]"); + } + } else { + pointer_subscribe_params.notify = notify_func; + pointer_subscribe_params.value = BT_GATT_CCC_NOTIFY; + pointer_subscribe_params.ccc_handle = attr->handle; + + err = bt_gatt_subscribe(conn, &pointer_subscribe_params); + if (err && err != -EALREADY) { + LOG_DBG("[Subscribe failed] (err %d)", err); + } else { + LOG_DBG("[MOUSE SUBSCRIBED]"); + } } - return BT_GATT_ITER_STOP; + find_next_hids_report = !consumer_subscribe_params.ccc_handle || + write_hid_indicators_on_discovery || subscribe_to_pointer_report; + } + + if (find_next_hids_report) { + memcpy(&uuid, BT_UUID_HIDS_REPORT, sizeof(uuid)); + discover_params.uuid = &uuid.uuid; + discover_params.start_handle = attr->handle + 1; + discover_params.type = BT_GATT_DISCOVER_CHARACTERISTIC; + + err = bt_gatt_discover(conn, &discover_params); + if (err) { + LOG_DBG("[Discover failed] (err %d)", err); + } } return BT_GATT_ITER_STOP; @@ -264,7 +344,7 @@ static void device_found(const bt_addr_le_t *addr, int8_t rssi, uint8_t type, } } -static void start_scan(void) { +static int start_scan(void) { int err; /* Use active scanning and disable duplicate filtering to handle any @@ -279,10 +359,11 @@ static void start_scan(void) { err = bt_le_scan_start(&scan_param, device_found); if (err) { LOG_DBG("[Scanning failed to start] (err %d)", err); - return; + return err; } LOG_DBG("[Scanning successfully started]"); + return 0; } static void discover_conn(struct bt_conn *conn) { @@ -401,7 +482,7 @@ struct bt_conn_auth_info_cb auth_info_cb = { .pairing_complete = pairing_complete, }; -void main(void) { +int main(void) { int err; if (wait_on_start > 0) { @@ -414,10 +495,10 @@ void main(void) { if (err) { LOG_DBG("[Bluetooth init failed] (err %d)", err); - return; + return err; } LOG_DBG("[Bluetooth initialized]"); - start_scan(); + return start_scan(); } diff --git a/app/tests/ble/profiles/bond-clear-then-bond-second-client/centrals.txt b/app/tests/ble/profiles/bond-clear-then-bond-second-client/siblings.txt similarity index 100% rename from app/tests/ble/profiles/bond-clear-then-bond-second-client/centrals.txt rename to app/tests/ble/profiles/bond-clear-then-bond-second-client/siblings.txt diff --git a/app/tests/ble/profiles/bond-clear-then-bond-second-client/snapshot.log b/app/tests/ble/profiles/bond-clear-then-bond-second-client/snapshot.log index 077634f2..ce5e9e33 100644 --- a/app/tests/ble/profiles/bond-clear-then-bond-second-client/snapshot.log +++ b/app/tests/ble/profiles/bond-clear-then-bond-second-client/snapshot.log @@ -2,7 +2,6 @@ profile 0 bt_id: No static addresses stored in controller profile 0 ble_central: main: [Bluetooth initialized] profile 0 ble_central: start_scan: [Scanning successfully started] profile 0 ble_central: device_found: [DEVICE]: FD:9E:B2:48:47:39 (random), AD evt type 0, AD data len 15, RSSI -59 -profile 0 ble_central: eir_found: [AD]: 9 data_len 0 profile 0 ble_central: eir_found: [AD]: 25 data_len 2 profile 0 ble_central: eir_found: [AD]: 1 data_len 1 profile 0 ble_central: eir_found: [AD]: 2 data_len 4 @@ -13,7 +12,6 @@ profile 1 bt_id: No static addresses stored in controller profile 1 ble_central: main: [Bluetooth initialized] profile 1 ble_central: start_scan: [Scanning successfully started] profile 1 ble_central: device_found: [DEVICE]: FD:9E:B2:48:47:39 (random), AD evt type 0, AD data len 15, RSSI -59 -profile 1 ble_central: eir_found: [AD]: 9 data_len 0 profile 1 ble_central: eir_found: [AD]: 25 data_len 2 profile 1 ble_central: eir_found: [AD]: 1 data_len 1 profile 1 ble_central: eir_found: [AD]: 2 data_len 4 @@ -25,9 +23,10 @@ profile 1 ble_central: discover_func: [ATTRIBUTE] handle 23 profile 1 ble_central: discover_func: [ATTRIBUTE] handle 28 profile 1 ble_central: discover_func: [ATTRIBUTE] handle 30 profile 1 ble_central: discover_func: [SUBSCRIBED] +profile 1 ble_central: discover_func: [ATTRIBUTE] handle 32 +profile 1 ble_central: discover_func: [ATTRIBUTE] handle 34 +profile 1 ble_central: discover_func: [CONSUMER SUBSCRIBED] profile 1 ble_central: notify_func: payload profile 1 00 00 04 00 00 00 00 00 |........ profile 1 ble_central: notify_func: payload profile 1 00 00 00 00 00 00 00 00 |........ -profile 1 ble_central: notify_func: payload -profile 1 00 00 00 00 00 00 00 00 |........ diff --git a/app/tests/ble/profiles/bond-to-cleared-profile/centrals.txt b/app/tests/ble/profiles/bond-to-cleared-profile/siblings.txt similarity index 100% rename from app/tests/ble/profiles/bond-to-cleared-profile/centrals.txt rename to app/tests/ble/profiles/bond-to-cleared-profile/siblings.txt diff --git a/app/tests/ble/profiles/bond-to-cleared-profile/snapshot.log b/app/tests/ble/profiles/bond-to-cleared-profile/snapshot.log index 077634f2..ce5e9e33 100644 --- a/app/tests/ble/profiles/bond-to-cleared-profile/snapshot.log +++ b/app/tests/ble/profiles/bond-to-cleared-profile/snapshot.log @@ -2,7 +2,6 @@ profile 0 bt_id: No static addresses stored in controller profile 0 ble_central: main: [Bluetooth initialized] profile 0 ble_central: start_scan: [Scanning successfully started] profile 0 ble_central: device_found: [DEVICE]: FD:9E:B2:48:47:39 (random), AD evt type 0, AD data len 15, RSSI -59 -profile 0 ble_central: eir_found: [AD]: 9 data_len 0 profile 0 ble_central: eir_found: [AD]: 25 data_len 2 profile 0 ble_central: eir_found: [AD]: 1 data_len 1 profile 0 ble_central: eir_found: [AD]: 2 data_len 4 @@ -13,7 +12,6 @@ profile 1 bt_id: No static addresses stored in controller profile 1 ble_central: main: [Bluetooth initialized] profile 1 ble_central: start_scan: [Scanning successfully started] profile 1 ble_central: device_found: [DEVICE]: FD:9E:B2:48:47:39 (random), AD evt type 0, AD data len 15, RSSI -59 -profile 1 ble_central: eir_found: [AD]: 9 data_len 0 profile 1 ble_central: eir_found: [AD]: 25 data_len 2 profile 1 ble_central: eir_found: [AD]: 1 data_len 1 profile 1 ble_central: eir_found: [AD]: 2 data_len 4 @@ -25,9 +23,10 @@ profile 1 ble_central: discover_func: [ATTRIBUTE] handle 23 profile 1 ble_central: discover_func: [ATTRIBUTE] handle 28 profile 1 ble_central: discover_func: [ATTRIBUTE] handle 30 profile 1 ble_central: discover_func: [SUBSCRIBED] +profile 1 ble_central: discover_func: [ATTRIBUTE] handle 32 +profile 1 ble_central: discover_func: [ATTRIBUTE] handle 34 +profile 1 ble_central: discover_func: [CONSUMER SUBSCRIBED] profile 1 ble_central: notify_func: payload profile 1 00 00 04 00 00 00 00 00 |........ profile 1 ble_central: notify_func: payload profile 1 00 00 00 00 00 00 00 00 |........ -profile 1 ble_central: notify_func: payload -profile 1 00 00 00 00 00 00 00 00 |........ diff --git a/app/tests/ble/profiles/connnect-and-output-to-selection/centrals.txt b/app/tests/ble/profiles/connnect-and-output-to-selection/siblings.txt similarity index 100% rename from app/tests/ble/profiles/connnect-and-output-to-selection/centrals.txt rename to app/tests/ble/profiles/connnect-and-output-to-selection/siblings.txt diff --git a/app/tests/ble/profiles/connnect-and-output-to-selection/snapshot.log b/app/tests/ble/profiles/connnect-and-output-to-selection/snapshot.log index 62cb2d6d..2c83ae2e 100644 --- a/app/tests/ble/profiles/connnect-and-output-to-selection/snapshot.log +++ b/app/tests/ble/profiles/connnect-and-output-to-selection/snapshot.log @@ -2,7 +2,6 @@ ble_central: main: [Bluetooth initialized] ble_central: start_scan: [Scanning successfully started] ble_central: device_found: [DEVICE]: FD:9E:B2:48:47:39 (random), AD evt type 0, AD data len 15, RSSI -59 - ble_central: eir_found: [AD]: 9 data_len 0 ble_central: eir_found: [AD]: 25 data_len 2 ble_central: eir_found: [AD]: 1 data_len 1 ble_central: eir_found: [AD]: 2 data_len 4 @@ -14,6 +13,9 @@ ble_central: discover_func: [ATTRIBUTE] handle 28 ble_central: discover_func: [ATTRIBUTE] handle 30 ble_central: discover_func: [SUBSCRIBED] + ble_central: discover_func: [ATTRIBUTE] handle 32 + ble_central: discover_func: [ATTRIBUTE] handle 34 + ble_central: discover_func: [CONSUMER SUBSCRIBED] ble_central: notify_func: payload 00 00 04 00 00 00 00 00 |........ ble_central: notify_func: payload @@ -22,5 +24,3 @@ 00 00 05 00 00 00 00 00 |........ ble_central: notify_func: payload 00 00 00 00 00 00 00 00 |........ - ble_central: notify_func: payload - 00 00 00 00 00 00 00 00 |........ diff --git a/app/tests/ble/profiles/dont-bond-to-taken-profile/centrals.txt b/app/tests/ble/profiles/dont-bond-to-taken-profile/siblings.txt similarity index 100% rename from app/tests/ble/profiles/dont-bond-to-taken-profile/centrals.txt rename to app/tests/ble/profiles/dont-bond-to-taken-profile/siblings.txt diff --git a/app/tests/ble/profiles/dont-bond-to-taken-profile/snapshot.log b/app/tests/ble/profiles/dont-bond-to-taken-profile/snapshot.log index 6ea4fc72..d754b9c4 100644 --- a/app/tests/ble/profiles/dont-bond-to-taken-profile/snapshot.log +++ b/app/tests/ble/profiles/dont-bond-to-taken-profile/snapshot.log @@ -2,7 +2,6 @@ profile 0 bt_id: No static addresses stored in controller profile 0 ble_central: main: [Bluetooth initialized] profile 0 ble_central: start_scan: [Scanning successfully started] profile 0 ble_central: device_found: [DEVICE]: FD:9E:B2:48:47:39 (random), AD evt type 0, AD data len 15, RSSI -59 -profile 0 ble_central: eir_found: [AD]: 9 data_len 0 profile 0 ble_central: eir_found: [AD]: 25 data_len 2 profile 0 ble_central: eir_found: [AD]: 1 data_len 1 profile 0 ble_central: eir_found: [AD]: 2 data_len 4 @@ -13,7 +12,6 @@ profile 1 bt_id: No static addresses stored in controller profile 1 ble_central: main: [Bluetooth initialized] profile 1 ble_central: start_scan: [Scanning successfully started] profile 1 ble_central: device_found: [DEVICE]: FD:9E:B2:48:47:39 (random), AD evt type 0, AD data len 15, RSSI -59 -profile 1 ble_central: eir_found: [AD]: 9 data_len 0 profile 1 ble_central: eir_found: [AD]: 25 data_len 2 profile 1 ble_central: eir_found: [AD]: 1 data_len 1 profile 1 ble_central: eir_found: [AD]: 2 data_len 4 diff --git a/app/tests/ble/profiles/first-and-second-profile-paired-then-send-data/centrals.txt b/app/tests/ble/profiles/first-and-second-profile-paired-then-send-data/siblings.txt similarity index 100% rename from app/tests/ble/profiles/first-and-second-profile-paired-then-send-data/centrals.txt rename to app/tests/ble/profiles/first-and-second-profile-paired-then-send-data/siblings.txt diff --git a/app/tests/ble/profiles/first-and-second-profile-paired-then-send-data/snapshot.log b/app/tests/ble/profiles/first-and-second-profile-paired-then-send-data/snapshot.log index 1a88748d..4a58305a 100644 --- a/app/tests/ble/profiles/first-and-second-profile-paired-then-send-data/snapshot.log +++ b/app/tests/ble/profiles/first-and-second-profile-paired-then-send-data/snapshot.log @@ -2,7 +2,6 @@ profile 0 bt_id: No static addresses stored in controller profile 0 ble_central: main: [Bluetooth initialized] profile 0 ble_central: start_scan: [Scanning successfully started] profile 0 ble_central: device_found: [DEVICE]: FD:9E:B2:48:47:39 (random), AD evt type 0, AD data len 15, RSSI -59 -profile 0 ble_central: eir_found: [AD]: 9 data_len 0 profile 0 ble_central: eir_found: [AD]: 25 data_len 2 profile 0 ble_central: eir_found: [AD]: 1 data_len 1 profile 0 ble_central: eir_found: [AD]: 2 data_len 4 @@ -17,12 +16,14 @@ profile 0 ble_central: discover_func: [ATTRIBUTE] handle 23 profile 0 ble_central: discover_func: [ATTRIBUTE] handle 28 profile 0 ble_central: discover_func: [ATTRIBUTE] handle 30 profile 0 ble_central: discover_func: [SUBSCRIBED] +profile 0 ble_central: discover_func: [ATTRIBUTE] handle 32 +profile 0 ble_central: discover_func: [ATTRIBUTE] handle 34 +profile 0 ble_central: discover_func: [CONSUMER SUBSCRIBED] profile 0 ble_central: notify_func: payload profile 0 00 00 04 00 00 00 00 00 |........ profile 0 ble_central: notify_func: payload profile 0 00 00 00 00 00 00 00 00 |........ profile 1 ble_central: device_found: [DEVICE]: FD:9E:B2:48:47:39 (random), AD evt type 0, AD data len 15, RSSI -59 -profile 1 ble_central: eir_found: [AD]: 9 data_len 0 profile 1 ble_central: eir_found: [AD]: 25 data_len 2 profile 1 ble_central: eir_found: [AD]: 1 data_len 1 profile 1 ble_central: eir_found: [AD]: 2 data_len 4 @@ -34,9 +35,10 @@ profile 1 ble_central: discover_func: [ATTRIBUTE] handle 23 profile 1 ble_central: discover_func: [ATTRIBUTE] handle 28 profile 1 ble_central: discover_func: [ATTRIBUTE] handle 30 profile 1 ble_central: discover_func: [SUBSCRIBED] +profile 1 ble_central: discover_func: [ATTRIBUTE] handle 32 +profile 1 ble_central: discover_func: [ATTRIBUTE] handle 34 +profile 1 ble_central: discover_func: [CONSUMER SUBSCRIBED] profile 1 ble_central: notify_func: payload profile 1 00 00 05 00 00 00 00 00 |........ profile 1 ble_central: notify_func: payload profile 1 00 00 00 00 00 00 00 00 |........ -profile 1 ble_central: notify_func: payload -profile 1 00 00 00 00 00 00 00 00 |........ diff --git a/app/tests/ble/profiles/overwrite-enabled-reconnect-without-bond-then-output-to-selection/centrals.txt b/app/tests/ble/profiles/overwrite-enabled-reconnect-without-bond-then-output-to-selection/siblings.txt similarity index 100% rename from app/tests/ble/profiles/overwrite-enabled-reconnect-without-bond-then-output-to-selection/centrals.txt rename to app/tests/ble/profiles/overwrite-enabled-reconnect-without-bond-then-output-to-selection/siblings.txt diff --git a/app/tests/ble/profiles/overwrite-enabled-reconnect-without-bond-then-output-to-selection/snapshot.log b/app/tests/ble/profiles/overwrite-enabled-reconnect-without-bond-then-output-to-selection/snapshot.log index 6c0bac58..afa4f676 100644 --- a/app/tests/ble/profiles/overwrite-enabled-reconnect-without-bond-then-output-to-selection/snapshot.log +++ b/app/tests/ble/profiles/overwrite-enabled-reconnect-without-bond-then-output-to-selection/snapshot.log @@ -2,7 +2,6 @@ ble_central: main: [Bluetooth initialized] ble_central: start_scan: [Scanning successfully started] ble_central: device_found: [DEVICE]: FD:9E:B2:48:47:39 (random), AD evt type 0, AD data len 15, RSSI -59 - ble_central: eir_found: [AD]: 9 data_len 0 ble_central: eir_found: [AD]: 25 data_len 2 ble_central: eir_found: [AD]: 1 data_len 1 ble_central: eir_found: [AD]: 2 data_len 4 @@ -12,7 +11,6 @@ ble_central: disconnected: [Disconnected]: FD:9E:B2:48:47:39 (random) (reason 0x16) ble_central: start_scan: [Scanning successfully started] ble_central: device_found: [DEVICE]: FD:9E:B2:48:47:39 (random), AD evt type 0, AD data len 15, RSSI -59 - ble_central: eir_found: [AD]: 9 data_len 0 ble_central: eir_found: [AD]: 25 data_len 2 ble_central: eir_found: [AD]: 1 data_len 1 ble_central: eir_found: [AD]: 2 data_len 4 @@ -24,6 +22,9 @@ ble_central: discover_func: [ATTRIBUTE] handle 28 ble_central: discover_func: [ATTRIBUTE] handle 30 ble_central: discover_func: [SUBSCRIBED] + ble_central: discover_func: [ATTRIBUTE] handle 32 + ble_central: discover_func: [ATTRIBUTE] handle 34 + ble_central: discover_func: [CONSUMER SUBSCRIBED] ble_central: notify_func: payload 00 00 04 00 00 00 00 00 |........ ble_central: notify_func: payload @@ -32,5 +33,3 @@ 00 00 05 00 00 00 00 00 |........ ble_central: notify_func: payload 00 00 00 00 00 00 00 00 |........ - ble_central: notify_func: payload - 00 00 00 00 00 00 00 00 |........ diff --git a/app/tests/ble/profiles/reconnect-then-output-to-selection/centrals.txt b/app/tests/ble/profiles/reconnect-then-output-to-selection/siblings.txt similarity index 100% rename from app/tests/ble/profiles/reconnect-then-output-to-selection/centrals.txt rename to app/tests/ble/profiles/reconnect-then-output-to-selection/siblings.txt diff --git a/app/tests/ble/profiles/reconnect-then-output-to-selection/snapshot.log b/app/tests/ble/profiles/reconnect-then-output-to-selection/snapshot.log index 2323de6f..b12db556 100644 --- a/app/tests/ble/profiles/reconnect-then-output-to-selection/snapshot.log +++ b/app/tests/ble/profiles/reconnect-then-output-to-selection/snapshot.log @@ -2,7 +2,6 @@ ble_central: main: [Bluetooth initialized] ble_central: start_scan: [Scanning successfully started] ble_central: device_found: [DEVICE]: FD:9E:B2:48:47:39 (random), AD evt type 0, AD data len 15, RSSI -59 - ble_central: eir_found: [AD]: 9 data_len 0 ble_central: eir_found: [AD]: 25 data_len 2 ble_central: eir_found: [AD]: 1 data_len 1 ble_central: eir_found: [AD]: 2 data_len 4 @@ -12,7 +11,6 @@ ble_central: disconnected: [Disconnected]: FD:9E:B2:48:47:39 (random) (reason 0x16) ble_central: start_scan: [Scanning successfully started] ble_central: device_found: [DEVICE]: FD:9E:B2:48:47:39 (random), AD evt type 0, AD data len 15, RSSI -59 - ble_central: eir_found: [AD]: 9 data_len 0 ble_central: eir_found: [AD]: 25 data_len 2 ble_central: eir_found: [AD]: 1 data_len 1 ble_central: eir_found: [AD]: 2 data_len 4 @@ -23,6 +21,9 @@ ble_central: discover_func: [ATTRIBUTE] handle 28 ble_central: discover_func: [ATTRIBUTE] handle 30 ble_central: discover_func: [SUBSCRIBED] + ble_central: discover_func: [ATTRIBUTE] handle 32 + ble_central: discover_func: [ATTRIBUTE] handle 34 + ble_central: discover_func: [CONSUMER SUBSCRIBED] ble_central: notify_func: payload 00 00 04 00 00 00 00 00 |........ ble_central: notify_func: payload @@ -31,5 +32,3 @@ 00 00 05 00 00 00 00 00 |........ ble_central: notify_func: payload 00 00 00 00 00 00 00 00 |........ - ble_central: notify_func: payload - 00 00 00 00 00 00 00 00 |........ diff --git a/app/tests/ble/security/read-hid-after-connect-with-auto-sec/centrals.txt b/app/tests/ble/security/read-hid-after-connect-with-auto-sec/siblings.txt similarity index 100% rename from app/tests/ble/security/read-hid-after-connect-with-auto-sec/centrals.txt rename to app/tests/ble/security/read-hid-after-connect-with-auto-sec/siblings.txt diff --git a/app/tests/ble/security/read-hid-after-connect-with-auto-sec/snapshot.log b/app/tests/ble/security/read-hid-after-connect-with-auto-sec/snapshot.log index b8ee29eb..4c8f2c27 100644 --- a/app/tests/ble/security/read-hid-after-connect-with-auto-sec/snapshot.log +++ b/app/tests/ble/security/read-hid-after-connect-with-auto-sec/snapshot.log @@ -2,7 +2,6 @@ ble_central: main: [Bluetooth initialized] ble_central: start_scan: [Scanning successfully started] ble_central: device_found: [DEVICE]: FD:9E:B2:48:47:39 (random), AD evt type 0, AD data len 15, RSSI -59 - ble_central: eir_found: [AD]: 9 data_len 0 ble_central: eir_found: [AD]: 25 data_len 2 ble_central: eir_found: [AD]: 1 data_len 1 ble_central: eir_found: [AD]: 2 data_len 4 @@ -10,3 +9,4 @@ ble_central: pairing_complete: Pairing complete ble_central: read_cb: Read err: 0, length 8 ble_central: read_cb: Read err: 0, length 12 + ble_central: read_cb: Read err: 10, length 0 diff --git a/app/tests/ble/security/read-hid-after-connect-without-auto-sec/centrals.txt b/app/tests/ble/security/read-hid-after-connect-without-auto-sec/siblings.txt similarity index 100% rename from app/tests/ble/security/read-hid-after-connect-without-auto-sec/centrals.txt rename to app/tests/ble/security/read-hid-after-connect-without-auto-sec/siblings.txt diff --git a/app/tests/ble/security/read-hid-after-connect-without-auto-sec/snapshot.log b/app/tests/ble/security/read-hid-after-connect-without-auto-sec/snapshot.log index 2157fd03..e32f76af 100644 --- a/app/tests/ble/security/read-hid-after-connect-without-auto-sec/snapshot.log +++ b/app/tests/ble/security/read-hid-after-connect-without-auto-sec/snapshot.log @@ -2,7 +2,6 @@ ble_central: main: [Bluetooth initialized] ble_central: start_scan: [Scanning successfully started] ble_central: device_found: [DEVICE]: FD:9E:B2:48:47:39 (random), AD evt type 0, AD data len 15, RSSI -59 - ble_central: eir_found: [AD]: 9 data_len 0 ble_central: eir_found: [AD]: 25 data_len 2 ble_central: eir_found: [AD]: 1 data_len 1 ble_central: eir_found: [AD]: 2 data_len 4 diff --git a/app/tests/ble/split/basic/events.patterns b/app/tests/ble/split/basic/events.patterns new file mode 100644 index 00000000..f8cf363c --- /dev/null +++ b/app/tests/ble/split/basic/events.patterns @@ -0,0 +1 @@ +s/^d_02: @[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9][0-9][0-9][0-9] .{19}/profile 0 /p diff --git a/app/tests/ble/split/basic/nrf52_bsim.conf b/app/tests/ble/split/basic/nrf52_bsim.conf new file mode 100644 index 00000000..ea5f08aa --- /dev/null +++ b/app/tests/ble/split/basic/nrf52_bsim.conf @@ -0,0 +1 @@ +CONFIG_ZMK_SPLIT=y \ No newline at end of file diff --git a/app/tests/ble/split/basic/nrf52_bsim.keymap b/app/tests/ble/split/basic/nrf52_bsim.keymap new file mode 100644 index 00000000..0947d14d --- /dev/null +++ b/app/tests/ble/split/basic/nrf52_bsim.keymap @@ -0,0 +1,19 @@ +#include +#include +#include + +&kscan { + /delete-property/ exit-after; + events = <>; +}; +/ { + keymap { + compatible = "zmk,keymap"; + + default_layer { + bindings = < + &kp A &kp B + &bt BT_SEL 0 &bt BT_CLR>; + }; + }; +}; diff --git a/app/tests/ble/split/basic/peripheral.overlay b/app/tests/ble/split/basic/peripheral.overlay new file mode 100644 index 00000000..03404758 --- /dev/null +++ b/app/tests/ble/split/basic/peripheral.overlay @@ -0,0 +1,12 @@ + +#include + + +&kscan { + events = + ; +}; \ No newline at end of file diff --git a/app/tests/ble/split/basic/siblings.txt b/app/tests/ble/split/basic/siblings.txt new file mode 100644 index 00000000..75959af4 --- /dev/null +++ b/app/tests/ble/split/basic/siblings.txt @@ -0,0 +1,2 @@ +./ble_test_central.exe -d=2 +./tests_ble_split_basic_peripheral.exe -d=3 diff --git a/app/tests/ble/split/basic/snapshot.log b/app/tests/ble/split/basic/snapshot.log new file mode 100644 index 00000000..545a0f36 --- /dev/null +++ b/app/tests/ble/split/basic/snapshot.log @@ -0,0 +1,26 @@ +profile 0 bt_id: No static addresses stored in controller +profile 0 ble_central: main: [Bluetooth initialized] +profile 0 ble_central: start_scan: [Scanning successfully started] +profile 0 ble_central: device_found: [DEVICE]: FD:9E:B2:48:47:39 (random), AD evt type 0, AD data len 15, RSSI -56 +profile 0 ble_central: eir_found: [AD]: 25 data_len 2 +profile 0 ble_central: eir_found: [AD]: 1 data_len 1 +profile 0 ble_central: eir_found: [AD]: 2 data_len 4 +profile 0 ble_central: connected: [Connected]: FD:9E:B2:48:47:39 (random) +profile 0 ble_central: connected: [Setting the security for the connection] +profile 0 ble_central: pairing_complete: Pairing complete +profile 0 ble_central: discover_conn: [Discovery started for conn] +profile 0 ble_central: discover_func: [ATTRIBUTE] handle 23 +profile 0 ble_central: discover_func: [ATTRIBUTE] handle 28 +profile 0 ble_central: discover_func: [ATTRIBUTE] handle 30 +profile 0 ble_central: discover_func: [SUBSCRIBED] +profile 0 ble_central: discover_func: [ATTRIBUTE] handle 32 +profile 0 ble_central: discover_func: [ATTRIBUTE] handle 34 +profile 0 ble_central: discover_func: [CONSUMER SUBSCRIBED] +profile 0 ble_central: notify_func: payload +profile 0 00 00 04 00 00 00 00 00 |........ +profile 0 ble_central: notify_func: payload +profile 0 00 00 00 00 00 00 00 00 |........ +profile 0 ble_central: notify_func: payload +profile 0 00 00 05 00 00 00 00 00 |........ +profile 0 ble_central: notify_func: payload +profile 0 00 00 00 00 00 00 00 00 |........ diff --git a/app/tests/ble/split/multiple-peripherals/events.patterns b/app/tests/ble/split/multiple-peripherals/events.patterns new file mode 100644 index 00000000..f8cf363c --- /dev/null +++ b/app/tests/ble/split/multiple-peripherals/events.patterns @@ -0,0 +1 @@ +s/^d_02: @[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9][0-9][0-9][0-9] .{19}/profile 0 /p diff --git a/app/tests/ble/split/multiple-peripherals/nrf52_bsim.conf b/app/tests/ble/split/multiple-peripherals/nrf52_bsim.conf new file mode 100644 index 00000000..147866fd --- /dev/null +++ b/app/tests/ble/split/multiple-peripherals/nrf52_bsim.conf @@ -0,0 +1,2 @@ +CONFIG_ZMK_SPLIT=y +CONFIG_ZMK_SPLIT_BLE_CENTRAL_PERIPHERALS=2 \ No newline at end of file diff --git a/app/tests/ble/split/multiple-peripherals/nrf52_bsim.keymap b/app/tests/ble/split/multiple-peripherals/nrf52_bsim.keymap new file mode 100644 index 00000000..0947d14d --- /dev/null +++ b/app/tests/ble/split/multiple-peripherals/nrf52_bsim.keymap @@ -0,0 +1,19 @@ +#include +#include +#include + +&kscan { + /delete-property/ exit-after; + events = <>; +}; +/ { + keymap { + compatible = "zmk,keymap"; + + default_layer { + bindings = < + &kp A &kp B + &bt BT_SEL 0 &bt BT_CLR>; + }; + }; +}; diff --git a/app/tests/ble/split/multiple-peripherals/peripheral1.overlay b/app/tests/ble/split/multiple-peripherals/peripheral1.overlay new file mode 100644 index 00000000..9ebf63af --- /dev/null +++ b/app/tests/ble/split/multiple-peripherals/peripheral1.overlay @@ -0,0 +1,10 @@ + +#include + + +&kscan { + events = + ; +}; \ No newline at end of file diff --git a/app/tests/ble/split/multiple-peripherals/peripheral2.overlay b/app/tests/ble/split/multiple-peripherals/peripheral2.overlay new file mode 100644 index 00000000..7c851151 --- /dev/null +++ b/app/tests/ble/split/multiple-peripherals/peripheral2.overlay @@ -0,0 +1,10 @@ + +#include + + +&kscan { + events = + ; +}; \ No newline at end of file diff --git a/app/tests/ble/split/multiple-peripherals/siblings.txt b/app/tests/ble/split/multiple-peripherals/siblings.txt new file mode 100644 index 00000000..cb3c41b4 --- /dev/null +++ b/app/tests/ble/split/multiple-peripherals/siblings.txt @@ -0,0 +1,3 @@ +./ble_test_central.exe -d=2 +./tests_ble_split_multiple-peripherals_peripheral1.exe -d=3 +./tests_ble_split_multiple-peripherals_peripheral2.exe -d=4 diff --git a/app/tests/ble/split/multiple-peripherals/snapshot.log b/app/tests/ble/split/multiple-peripherals/snapshot.log new file mode 100644 index 00000000..7c19d59c --- /dev/null +++ b/app/tests/ble/split/multiple-peripherals/snapshot.log @@ -0,0 +1,26 @@ +profile 0 bt_id: No static addresses stored in controller +profile 0 ble_central: main: [Bluetooth initialized] +profile 0 ble_central: start_scan: [Scanning successfully started] +profile 0 ble_central: device_found: [DEVICE]: FD:9E:B2:48:47:39 (random), AD evt type 0, AD data len 15, RSSI -55 +profile 0 ble_central: eir_found: [AD]: 25 data_len 2 +profile 0 ble_central: eir_found: [AD]: 1 data_len 1 +profile 0 ble_central: eir_found: [AD]: 2 data_len 4 +profile 0 ble_central: connected: [Connected]: FD:9E:B2:48:47:39 (random) +profile 0 ble_central: connected: [Setting the security for the connection] +profile 0 ble_central: pairing_complete: Pairing complete +profile 0 ble_central: discover_conn: [Discovery started for conn] +profile 0 ble_central: discover_func: [ATTRIBUTE] handle 23 +profile 0 ble_central: discover_func: [ATTRIBUTE] handle 28 +profile 0 ble_central: discover_func: [ATTRIBUTE] handle 30 +profile 0 ble_central: discover_func: [SUBSCRIBED] +profile 0 ble_central: discover_func: [ATTRIBUTE] handle 32 +profile 0 ble_central: discover_func: [ATTRIBUTE] handle 34 +profile 0 ble_central: discover_func: [CONSUMER SUBSCRIBED] +profile 0 ble_central: notify_func: payload +profile 0 00 00 05 00 00 00 00 00 |........ +profile 0 ble_central: notify_func: payload +profile 0 00 00 05 04 00 00 00 00 |........ +profile 0 ble_central: notify_func: payload +profile 0 00 00 00 04 00 00 00 00 |........ +profile 0 ble_central: notify_func: payload +profile 0 00 00 00 00 00 00 00 00 |........ diff --git a/app/tests/ble/split/peripheral-encoder/events.patterns b/app/tests/ble/split/peripheral-encoder/events.patterns new file mode 100644 index 00000000..f8cf363c --- /dev/null +++ b/app/tests/ble/split/peripheral-encoder/events.patterns @@ -0,0 +1 @@ +s/^d_02: @[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9][0-9][0-9][0-9] .{19}/profile 0 /p diff --git a/app/tests/ble/split/peripheral-encoder/nrf52_bsim.conf b/app/tests/ble/split/peripheral-encoder/nrf52_bsim.conf new file mode 100644 index 00000000..ba7e6a1c --- /dev/null +++ b/app/tests/ble/split/peripheral-encoder/nrf52_bsim.conf @@ -0,0 +1,2 @@ +CONFIG_ZMK_SPLIT=y +CONFIG_SENSOR=y \ No newline at end of file diff --git a/app/tests/ble/split/peripheral-encoder/nrf52_bsim.keymap b/app/tests/ble/split/peripheral-encoder/nrf52_bsim.keymap new file mode 100644 index 00000000..635b2a25 --- /dev/null +++ b/app/tests/ble/split/peripheral-encoder/nrf52_bsim.keymap @@ -0,0 +1,23 @@ +#include +#include +#include + +#include "shared.dtsi" + +&kscan { + /delete-property/ exit-after; + events = <>; +}; +/ { + keymap { + compatible = "zmk,keymap"; + + default_layer { + bindings = < + &kp A &kp B + &bt BT_SEL 0 &bt BT_CLR>; + + sensor-bindings = <&inc_dec_kp A B>; + }; + }; +}; diff --git a/app/tests/ble/split/peripheral-encoder/peripheral.overlay b/app/tests/ble/split/peripheral-encoder/peripheral.overlay new file mode 100644 index 00000000..145c30e2 --- /dev/null +++ b/app/tests/ble/split/peripheral-encoder/peripheral.overlay @@ -0,0 +1,18 @@ + +#include + +#include "shared.dtsi" + +&kscan { + events = <>; + + /delete-property/ exit-after; +}; + +&mock_encoder { + status = "okay"; + + event-startup-delay = <2000>; + event-period = <2000>; + events = <18 (-18)>; +}; diff --git a/app/tests/ble/split/peripheral-encoder/shared.dtsi b/app/tests/ble/split/peripheral-encoder/shared.dtsi new file mode 100644 index 00000000..7ae4eded --- /dev/null +++ b/app/tests/ble/split/peripheral-encoder/shared.dtsi @@ -0,0 +1,12 @@ +/ { + mock_encoder: mock_encoder { + compatible = "zmk,sensor-encoder-mock"; + status = "disabled"; + }; + + sensors: sensors { + compatible = "zmk,keymap-sensors"; + sensors = <&mock_encoder>; + triggers-per-rotation = <20>; + }; +}; \ No newline at end of file diff --git a/app/tests/ble/split/peripheral-encoder/siblings.txt b/app/tests/ble/split/peripheral-encoder/siblings.txt new file mode 100644 index 00000000..52dfbb78 --- /dev/null +++ b/app/tests/ble/split/peripheral-encoder/siblings.txt @@ -0,0 +1,2 @@ +./ble_test_central.exe -d=2 +./tests_ble_split_peripheral-encoder_peripheral.exe -d=3 diff --git a/app/tests/ble/split/peripheral-encoder/snapshot.log b/app/tests/ble/split/peripheral-encoder/snapshot.log new file mode 100644 index 00000000..545a0f36 --- /dev/null +++ b/app/tests/ble/split/peripheral-encoder/snapshot.log @@ -0,0 +1,26 @@ +profile 0 bt_id: No static addresses stored in controller +profile 0 ble_central: main: [Bluetooth initialized] +profile 0 ble_central: start_scan: [Scanning successfully started] +profile 0 ble_central: device_found: [DEVICE]: FD:9E:B2:48:47:39 (random), AD evt type 0, AD data len 15, RSSI -56 +profile 0 ble_central: eir_found: [AD]: 25 data_len 2 +profile 0 ble_central: eir_found: [AD]: 1 data_len 1 +profile 0 ble_central: eir_found: [AD]: 2 data_len 4 +profile 0 ble_central: connected: [Connected]: FD:9E:B2:48:47:39 (random) +profile 0 ble_central: connected: [Setting the security for the connection] +profile 0 ble_central: pairing_complete: Pairing complete +profile 0 ble_central: discover_conn: [Discovery started for conn] +profile 0 ble_central: discover_func: [ATTRIBUTE] handle 23 +profile 0 ble_central: discover_func: [ATTRIBUTE] handle 28 +profile 0 ble_central: discover_func: [ATTRIBUTE] handle 30 +profile 0 ble_central: discover_func: [SUBSCRIBED] +profile 0 ble_central: discover_func: [ATTRIBUTE] handle 32 +profile 0 ble_central: discover_func: [ATTRIBUTE] handle 34 +profile 0 ble_central: discover_func: [CONSUMER SUBSCRIBED] +profile 0 ble_central: notify_func: payload +profile 0 00 00 04 00 00 00 00 00 |........ +profile 0 ble_central: notify_func: payload +profile 0 00 00 00 00 00 00 00 00 |........ +profile 0 ble_central: notify_func: payload +profile 0 00 00 05 00 00 00 00 00 |........ +profile 0 ble_central: notify_func: payload +profile 0 00 00 00 00 00 00 00 00 |........ diff --git a/app/tests/ble/split/peripheral-input/events.patterns b/app/tests/ble/split/peripheral-input/events.patterns new file mode 100644 index 00000000..c08c1766 --- /dev/null +++ b/app/tests/ble/split/peripheral-input/events.patterns @@ -0,0 +1,2 @@ +s/^d_02: @[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9][0-9][0-9][0-9] .{19}/profile 0 /p +s/^d_00: @[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9][0-9][0-9][0-9] .{19}.*zmk_hid_mouse_button_/mouse button /p diff --git a/app/tests/ble/split/peripheral-input/nrf52_bsim.conf b/app/tests/ble/split/peripheral-input/nrf52_bsim.conf new file mode 100644 index 00000000..08e4ff08 --- /dev/null +++ b/app/tests/ble/split/peripheral-input/nrf52_bsim.conf @@ -0,0 +1,2 @@ +CONFIG_ZMK_SPLIT=y +CONFIG_ZMK_POINTING=y \ No newline at end of file diff --git a/app/tests/ble/split/peripheral-input/nrf52_bsim.keymap b/app/tests/ble/split/peripheral-input/nrf52_bsim.keymap new file mode 100644 index 00000000..d1a0f3ea --- /dev/null +++ b/app/tests/ble/split/peripheral-input/nrf52_bsim.keymap @@ -0,0 +1,27 @@ +#include +#include +#include + +#include "shared.dtsi" + +&kscan { + /delete-property/ exit-after; + events = <>; +}; + +&split_listener { + status = "okay"; +}; +/ { + keymap { + compatible = "zmk,keymap"; + + default_layer { + bindings = < + &kp A &kp B + &bt BT_SEL 0 &bt BT_CLR>; + + sensor-bindings = <&inc_dec_kp A B>; + }; + }; +}; diff --git a/app/tests/ble/split/peripheral-input/peripheral.overlay b/app/tests/ble/split/peripheral-input/peripheral.overlay new file mode 100644 index 00000000..8f403b5e --- /dev/null +++ b/app/tests/ble/split/peripheral-input/peripheral.overlay @@ -0,0 +1,32 @@ + +#include +#include + +#include "shared.dtsi" + +&kscan { + events = <>; + + /delete-property/ exit-after; +}; + +/ { + mock_input: mock_input { + compatible = "zmk,input-mock"; + status = "okay"; + event-startup-delay = <4000>; + event-period = <2000>; + events + = + , + , + , + , + ; + exit-after; + }; +}; + +&split_input { + device = <&mock_input>; +}; diff --git a/app/tests/ble/split/peripheral-input/shared.dtsi b/app/tests/ble/split/peripheral-input/shared.dtsi new file mode 100644 index 00000000..3a31a28f --- /dev/null +++ b/app/tests/ble/split/peripheral-input/shared.dtsi @@ -0,0 +1,16 @@ +/ { + splits { + #address-cells = <1>; + #size-cells = <0>; + split_input: split_input@0 { + compatible = "zmk,input-split"; + reg = <0>; + }; + }; + + split_listener: split_listener { + compatible = "zmk,input-listener"; + status = "disabled"; + device = <&split_input>; + }; +}; \ No newline at end of file diff --git a/app/tests/ble/split/peripheral-input/siblings.txt b/app/tests/ble/split/peripheral-input/siblings.txt new file mode 100644 index 00000000..16ee6097 --- /dev/null +++ b/app/tests/ble/split/peripheral-input/siblings.txt @@ -0,0 +1,2 @@ +./ble_test_central.exe -d=2 -subscribe_to_pointer_report +./tests_ble_split_peripheral-input_peripheral.exe -d=3 diff --git a/app/tests/ble/split/peripheral-input/snapshot.log b/app/tests/ble/split/peripheral-input/snapshot.log new file mode 100644 index 00000000..a31d449d --- /dev/null +++ b/app/tests/ble/split/peripheral-input/snapshot.log @@ -0,0 +1,35 @@ +profile 0 bt_id: No static addresses stored in controller +profile 0 ble_central: main: [Bluetooth initialized] +profile 0 ble_central: start_scan: [Scanning successfully started] +profile 0 ble_central: device_found: [DEVICE]: FD:9E:B2:48:47:39 (random), AD evt type 0, AD data len 15, RSSI -56 +profile 0 ble_central: eir_found: [AD]: 25 data_len 2 +profile 0 ble_central: eir_found: [AD]: 1 data_len 1 +profile 0 ble_central: eir_found: [AD]: 2 data_len 4 +profile 0 ble_central: connected: [Connected]: FD:9E:B2:48:47:39 (random) +profile 0 ble_central: connected: [Setting the security for the connection] +profile 0 ble_central: pairing_complete: Pairing complete +profile 0 ble_central: discover_conn: [Discovery started for conn] +profile 0 ble_central: discover_func: [ATTRIBUTE] handle 23 +profile 0 ble_central: discover_func: [ATTRIBUTE] handle 28 +profile 0 ble_central: discover_func: [ATTRIBUTE] handle 30 +profile 0 ble_central: discover_func: [SUBSCRIBED] +profile 0 ble_central: discover_func: [ATTRIBUTE] handle 32 +profile 0 ble_central: discover_func: [ATTRIBUTE] handle 34 +profile 0 ble_central: discover_func: [CONSUMER SUBSCRIBED] +profile 0 ble_central: discover_func: [ATTRIBUTE] handle 36 +profile 0 ble_central: discover_func: [ATTRIBUTE] handle 38 +profile 0 ble_central: discover_func: [MOUSE SUBSCRIBED] +profile 0 ble_central: discover_func: [Discover complete] +profile 0 ble_central: notify_func: payload +profile 0 00 64 00 64 00 00 00 00 00 |.d.d.... . +profile 0 ble_central: notify_func: payload +profile 0 00 28 00 32 00 00 00 00 00 |.(.2.... . +mouse button press: Button 1 count 1 +mouse button press: Mouse buttons set to 0x02 +profile 0 ble_central: notify_func: payload +profile 0 02 00 00 00 00 00 00 00 00 |........ . +mouse button release: Button 1 count: 0 +mouse button release: Button 1 released +mouse button release: Mouse buttons set to 0x00 +profile 0 ble_central: notify_func: payload +profile 0 00 00 00 00 00 00 00 00 00 |........ . diff --git a/app/tests/ble/split/run-peripheral-behavior/events.patterns b/app/tests/ble/split/run-peripheral-behavior/events.patterns new file mode 100644 index 00000000..01188623 --- /dev/null +++ b/app/tests/ble/split/run-peripheral-behavior/events.patterns @@ -0,0 +1 @@ +s/^d_03: @[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9][0-9][0-9][0-9] .{19}/peripheral 0 /p diff --git a/app/tests/ble/split/run-peripheral-behavior/nrf52_bsim.conf b/app/tests/ble/split/run-peripheral-behavior/nrf52_bsim.conf new file mode 100644 index 00000000..0155316d --- /dev/null +++ b/app/tests/ble/split/run-peripheral-behavior/nrf52_bsim.conf @@ -0,0 +1,2 @@ +CONFIG_BOOT_BANNER=n +CONFIG_ZMK_SPLIT=y diff --git a/app/tests/ble/split/run-peripheral-behavior/nrf52_bsim.keymap b/app/tests/ble/split/run-peripheral-behavior/nrf52_bsim.keymap new file mode 100644 index 00000000..fd6fa9d9 --- /dev/null +++ b/app/tests/ble/split/run-peripheral-behavior/nrf52_bsim.keymap @@ -0,0 +1,19 @@ +#include +#include +#include + +&kscan { + /delete-property/ exit-after; + events = <>; +}; +/ { + keymap { + compatible = "zmk,keymap"; + + default_layer { + bindings = < + &kp A &kp B + &kp C &sys_reset>; + }; + }; +}; diff --git a/app/tests/ble/split/run-peripheral-behavior/peripheral.overlay b/app/tests/ble/split/run-peripheral-behavior/peripheral.overlay new file mode 100644 index 00000000..82a3f777 --- /dev/null +++ b/app/tests/ble/split/run-peripheral-behavior/peripheral.overlay @@ -0,0 +1,10 @@ + +#include + + +&kscan { + events = + ; +}; \ No newline at end of file diff --git a/app/tests/ble/split/run-peripheral-behavior/siblings.txt b/app/tests/ble/split/run-peripheral-behavior/siblings.txt new file mode 100644 index 00000000..ed3f46f1 --- /dev/null +++ b/app/tests/ble/split/run-peripheral-behavior/siblings.txt @@ -0,0 +1,2 @@ +./ble_test_central.exe -d=2 +./tests_ble_split_run-peripheral-behavior_peripheral.exe -d=3 diff --git a/app/tests/ble/split/run-peripheral-behavior/snapshot.log b/app/tests/ble/split/run-peripheral-behavior/snapshot.log new file mode 100644 index 00000000..2289d9c1 --- /dev/null +++ b/app/tests/ble/split/run-peripheral-behavior/snapshot.log @@ -0,0 +1,24 @@ +peripheral 0 bt_hci_core: HW Platform: Nordic Semiconductor (0x0002) +peripheral 0 bt_hci_core: HW Variant: nRF52x (0x0002) +peripheral 0 bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 4.1 Build 0 +peripheral 0 bt_id: No static addresses stored in controller +peripheral 0 bt_hci_core: Identity: D1:0B:03:A3:ED:6F (random) +peripheral 0 bt_hci_core: HCI: version 5.4 (0x0d) revision 0x0000, manufacturer 0x05f1 +peripheral 0 bt_hci_core: LMP: version 5.4 (0x0d) subver 0xffff +peripheral 0 zmk: kscan_mock_schedule_next_event_0: delaying next keypress: 5000 +peripheral 0 zmk: Welcome to ZMK! +peripheral 0 zmk: security_changed: Security changed: FD:9E:B2:48:47:39 (random) level 2 +peripheral 0 zmk: split_svc_pos_state_ccc: value 1 +peripheral 0 zmk: split_svc_select_phys_layout_callback: Selecting physical layout after GATT write of 0 +peripheral 0 zmk: kscan_mock_work_handler_0: ev 327680000 row 0 column 0 state 0 +peripheral 0 zmk: kscan_mock_schedule_next_event_0: delaying next keypress: 5000 +peripheral 0 zmk: zmk_physical_layouts_kscan_process_msgq: Row: 0, col: 0, position: 0, pressed: false +peripheral 0 zmk: split_peripheral_listener: +peripheral 0 zmk: kscan_mock_work_handler_0: ev 2475163905 row 1 column 1 state 1 +peripheral 0 zmk: kscan_mock_schedule_next_event_0: delaying next keypress: 5000 +peripheral 0 zmk: zmk_physical_layouts_kscan_process_msgq: Row: 1, col: 1, position: 3, pressed: true +peripheral 0 zmk: split_peripheral_listener: +peripheral 0 zmk: split_svc_run_behavior: offset 0 len 20 +peripheral 0 zmk: split_svc_run_behavior: sysreset with params 0 0: pressed? 1 +peripheral 0 zmk: zmk_split_transport_peripheral_command_handler: +peripheral 0 zmk: zmk_split_transport_peripheral_command_handler: sysreset with params 0 0: pressed? 1 diff --git a/app/tests/ble/split/set-hid-indicators/events.patterns b/app/tests/ble/split/set-hid-indicators/events.patterns new file mode 100644 index 00000000..01188623 --- /dev/null +++ b/app/tests/ble/split/set-hid-indicators/events.patterns @@ -0,0 +1 @@ +s/^d_03: @[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9][0-9][0-9][0-9] .{19}/peripheral 0 /p diff --git a/app/tests/ble/split/set-hid-indicators/nrf52_bsim.conf b/app/tests/ble/split/set-hid-indicators/nrf52_bsim.conf new file mode 100644 index 00000000..3b0069b4 --- /dev/null +++ b/app/tests/ble/split/set-hid-indicators/nrf52_bsim.conf @@ -0,0 +1,4 @@ +CONFIG_BOOT_BANNER=n +CONFIG_ZMK_SPLIT=y +CONFIG_ZMK_HID_INDICATORS=y +CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS=y diff --git a/app/tests/ble/split/set-hid-indicators/nrf52_bsim.keymap b/app/tests/ble/split/set-hid-indicators/nrf52_bsim.keymap new file mode 100644 index 00000000..5390dab8 --- /dev/null +++ b/app/tests/ble/split/set-hid-indicators/nrf52_bsim.keymap @@ -0,0 +1,19 @@ +#include +#include +#include + +&kscan { + /delete-property/ exit-after; + events = <>; +}; +/ { + keymap { + compatible = "zmk,keymap"; + + default_layer { + bindings = < + &kp A &kp B + &kp C &kp D>; + }; + }; +}; diff --git a/app/tests/ble/split/set-hid-indicators/peripheral.overlay b/app/tests/ble/split/set-hid-indicators/peripheral.overlay new file mode 100644 index 00000000..f8617952 --- /dev/null +++ b/app/tests/ble/split/set-hid-indicators/peripheral.overlay @@ -0,0 +1,8 @@ + +#include + + +&kscan { + /delete-property/ exit-after; + events = <>; +}; \ No newline at end of file diff --git a/app/tests/ble/split/set-hid-indicators/siblings.txt b/app/tests/ble/split/set-hid-indicators/siblings.txt new file mode 100644 index 00000000..37f5f4d4 --- /dev/null +++ b/app/tests/ble/split/set-hid-indicators/siblings.txt @@ -0,0 +1,2 @@ +./ble_test_central.exe -d=2 -wait_on_start=1300 -write_hid_indicators_on_discovery +./tests_ble_split_set-hid-indicators_peripheral.exe -d=3 diff --git a/app/tests/ble/split/set-hid-indicators/snapshot.log b/app/tests/ble/split/set-hid-indicators/snapshot.log new file mode 100644 index 00000000..580c139e --- /dev/null +++ b/app/tests/ble/split/set-hid-indicators/snapshot.log @@ -0,0 +1,13 @@ +peripheral 0 bt_hci_core: HW Platform: Nordic Semiconductor (0x0002) +peripheral 0 bt_hci_core: HW Variant: nRF52x (0x0002) +peripheral 0 bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 4.1 Build 0 +peripheral 0 bt_id: No static addresses stored in controller +peripheral 0 bt_hci_core: Identity: D1:0B:03:A3:ED:6F (random) +peripheral 0 bt_hci_core: HCI: version 5.4 (0x0d) revision 0x0000, manufacturer 0x05f1 +peripheral 0 bt_hci_core: LMP: version 5.4 (0x0d) subver 0xffff +peripheral 0 zmk: Welcome to ZMK! +peripheral 0 zmk: security_changed: Security changed: FD:9E:B2:48:47:39 (random) level 2 +peripheral 0 zmk: split_svc_pos_state_ccc: value 1 +peripheral 0 zmk: split_svc_select_phys_layout_callback: Selecting physical layout after GATT write of 0 +peripheral 0 zmk: split_svc_update_indicators_callback: Raising HID indicators changed event: 0 +peripheral 0 zmk: split_svc_update_indicators_callback: Raising HID indicators changed event: 7 diff --git a/app/tests/caps-word/continue-with-modifiers/native_posix_64.keymap b/app/tests/caps-word/continue-with-modifiers/native_sim.keymap similarity index 100% rename from app/tests/caps-word/continue-with-modifiers/native_posix_64.keymap rename to app/tests/caps-word/continue-with-modifiers/native_sim.keymap diff --git a/app/tests/caps-word/continue-with-non-alpha-continue-list-item/native_posix_64.keymap b/app/tests/caps-word/continue-with-non-alpha-continue-list-item/native_sim.keymap similarity index 100% rename from app/tests/caps-word/continue-with-non-alpha-continue-list-item/native_posix_64.keymap rename to app/tests/caps-word/continue-with-non-alpha-continue-list-item/native_sim.keymap diff --git a/app/tests/caps-word/continue-with-non-modified-numeric-usage-id/native_posix_64.keymap b/app/tests/caps-word/continue-with-non-modified-numeric-usage-id/native_sim.keymap similarity index 100% rename from app/tests/caps-word/continue-with-non-modified-numeric-usage-id/native_posix_64.keymap rename to app/tests/caps-word/continue-with-non-modified-numeric-usage-id/native_sim.keymap diff --git a/app/tests/caps-word/deactivate-by-non-alpha-non-continuation/native_posix_64.keymap b/app/tests/caps-word/deactivate-by-non-alpha-non-continuation/native_sim.keymap similarity index 100% rename from app/tests/caps-word/deactivate-by-non-alpha-non-continuation/native_posix_64.keymap rename to app/tests/caps-word/deactivate-by-non-alpha-non-continuation/native_sim.keymap diff --git a/app/tests/caps-word/deactivate-by-second-press/native_posix_64.keymap b/app/tests/caps-word/deactivate-by-second-press/native_sim.keymap similarity index 100% rename from app/tests/caps-word/deactivate-by-second-press/native_posix_64.keymap rename to app/tests/caps-word/deactivate-by-second-press/native_sim.keymap diff --git a/app/tests/combo/combos-and-holdtaps-0/native_posix_64.keymap b/app/tests/combo/combos-and-holdtaps-0/native_sim.keymap similarity index 100% rename from app/tests/combo/combos-and-holdtaps-0/native_posix_64.keymap rename to app/tests/combo/combos-and-holdtaps-0/native_sim.keymap diff --git a/app/tests/combo/combos-and-holdtaps-1/native_posix_64.keymap b/app/tests/combo/combos-and-holdtaps-1/native_sim.keymap similarity index 100% rename from app/tests/combo/combos-and-holdtaps-1/native_posix_64.keymap rename to app/tests/combo/combos-and-holdtaps-1/native_sim.keymap diff --git a/app/tests/combo/combos-and-holdtaps-2/native_posix_64.keymap b/app/tests/combo/combos-and-holdtaps-2/native_sim.keymap similarity index 100% rename from app/tests/combo/combos-and-holdtaps-2/native_posix_64.keymap rename to app/tests/combo/combos-and-holdtaps-2/native_sim.keymap diff --git a/app/tests/combo/combos-and-holdtaps-3/native_posix_64.keymap b/app/tests/combo/combos-and-holdtaps-3/native_sim.keymap similarity index 100% rename from app/tests/combo/combos-and-holdtaps-3/native_posix_64.keymap rename to app/tests/combo/combos-and-holdtaps-3/native_sim.keymap diff --git a/app/tests/combo/combos-and-holdtaps-4/native_posix_64.keymap b/app/tests/combo/combos-and-holdtaps-4/native_sim.keymap similarity index 100% rename from app/tests/combo/combos-and-holdtaps-4/native_posix_64.keymap rename to app/tests/combo/combos-and-holdtaps-4/native_sim.keymap diff --git a/app/tests/combo/layer-filter-0/native_posix_64.keymap b/app/tests/combo/layer-filter-0/native_sim.keymap similarity index 100% rename from app/tests/combo/layer-filter-0/native_posix_64.keymap rename to app/tests/combo/layer-filter-0/native_sim.keymap diff --git a/app/tests/combo/layer-filter-1/native_posix_64.keymap b/app/tests/combo/layer-filter-1/native_sim.keymap similarity index 100% rename from app/tests/combo/layer-filter-1/native_posix_64.keymap rename to app/tests/combo/layer-filter-1/native_sim.keymap diff --git a/app/tests/combo/multiple-timeouts/native_posix_64.keymap b/app/tests/combo/multiple-timeouts/native_sim.keymap similarity index 100% rename from app/tests/combo/multiple-timeouts/native_posix_64.keymap rename to app/tests/combo/multiple-timeouts/native_sim.keymap diff --git a/app/tests/combo/overlapping-combos-0/native_posix_64.keymap b/app/tests/combo/overlapping-combos-0/native_sim.keymap similarity index 100% rename from app/tests/combo/overlapping-combos-0/native_posix_64.keymap rename to app/tests/combo/overlapping-combos-0/native_sim.keymap diff --git a/app/tests/combo/overlapping-combos-1/native_posix_64.keymap b/app/tests/combo/overlapping-combos-1/native_sim.keymap similarity index 100% rename from app/tests/combo/overlapping-combos-1/native_posix_64.keymap rename to app/tests/combo/overlapping-combos-1/native_sim.keymap diff --git a/app/tests/combo/overlapping-combos-2/native_posix_64.keymap b/app/tests/combo/overlapping-combos-2/native_sim.keymap similarity index 100% rename from app/tests/combo/overlapping-combos-2/native_posix_64.keymap rename to app/tests/combo/overlapping-combos-2/native_sim.keymap diff --git a/app/tests/combo/overlapping-combos-3/native_posix_64.keymap b/app/tests/combo/overlapping-combos-3/native_sim.keymap similarity index 100% rename from app/tests/combo/overlapping-combos-3/native_posix_64.keymap rename to app/tests/combo/overlapping-combos-3/native_sim.keymap diff --git a/app/tests/combo/overlapping-combos-4-different-timeouts/native_posix_64.keymap b/app/tests/combo/overlapping-combos-4-different-timeouts/native_sim.keymap similarity index 100% rename from app/tests/combo/overlapping-combos-4-different-timeouts/native_posix_64.keymap rename to app/tests/combo/overlapping-combos-4-different-timeouts/native_sim.keymap diff --git a/app/tests/combo/partially-overlapping-combos/native_posix_64.keymap b/app/tests/combo/partially-overlapping-combos/native_sim.keymap similarity index 100% rename from app/tests/combo/partially-overlapping-combos/native_posix_64.keymap rename to app/tests/combo/partially-overlapping-combos/native_sim.keymap diff --git a/app/tests/combo/press-release-long-combo-complete/native_posix_64.keymap b/app/tests/combo/press-release-long-combo-complete/native_sim.keymap similarity index 100% rename from app/tests/combo/press-release-long-combo-complete/native_posix_64.keymap rename to app/tests/combo/press-release-long-combo-complete/native_sim.keymap diff --git a/app/tests/combo/press-release-long-combo-incomplete/native_posix_64.keymap b/app/tests/combo/press-release-long-combo-incomplete/native_sim.keymap similarity index 100% rename from app/tests/combo/press-release-long-combo-incomplete/native_posix_64.keymap rename to app/tests/combo/press-release-long-combo-incomplete/native_sim.keymap diff --git a/app/tests/combo/press-release-long-combo-wrong-last-key/native_posix_64.keymap b/app/tests/combo/press-release-long-combo-wrong-last-key/native_sim.keymap similarity index 100% rename from app/tests/combo/press-release-long-combo-wrong-last-key/native_posix_64.keymap rename to app/tests/combo/press-release-long-combo-wrong-last-key/native_sim.keymap diff --git a/app/tests/combo/press-release/native_posix_64.keymap b/app/tests/combo/press-release/native_sim.keymap similarity index 100% rename from app/tests/combo/press-release/native_posix_64.keymap rename to app/tests/combo/press-release/native_sim.keymap diff --git a/app/tests/combo/press-timeout/native_posix_64.keymap b/app/tests/combo/press-timeout/native_sim.keymap similarity index 100% rename from app/tests/combo/press-timeout/native_posix_64.keymap rename to app/tests/combo/press-timeout/native_sim.keymap diff --git a/app/tests/combo/press1-press2-release1-release2/native_posix_64.keymap b/app/tests/combo/press1-press2-release1-release2/native_sim.keymap similarity index 100% rename from app/tests/combo/press1-press2-release1-release2/native_posix_64.keymap rename to app/tests/combo/press1-press2-release1-release2/native_sim.keymap diff --git a/app/tests/combo/press1-press2-release2-release1/native_posix_64.keymap b/app/tests/combo/press1-press2-release2-release1/native_sim.keymap similarity index 100% rename from app/tests/combo/press1-press2-release2-release1/native_posix_64.keymap rename to app/tests/combo/press1-press2-release2-release1/native_sim.keymap diff --git a/app/tests/combo/press1-release1-press2-release2/native_posix_64.keymap b/app/tests/combo/press1-release1-press2-release2/native_sim.keymap similarity index 100% rename from app/tests/combo/press1-release1-press2-release2/native_posix_64.keymap rename to app/tests/combo/press1-release1-press2-release2/native_sim.keymap diff --git a/app/tests/combo/require-prior-idle/native_posix_64.keymap b/app/tests/combo/require-prior-idle/native_sim.keymap similarity index 100% rename from app/tests/combo/require-prior-idle/native_posix_64.keymap rename to app/tests/combo/require-prior-idle/native_sim.keymap diff --git a/app/tests/combo/slowrelease-disabled/native_posix_64.keymap b/app/tests/combo/slowrelease-disabled/native_sim.keymap similarity index 100% rename from app/tests/combo/slowrelease-disabled/native_posix_64.keymap rename to app/tests/combo/slowrelease-disabled/native_sim.keymap diff --git a/app/tests/combo/slowrelease-enabled/native_posix_64.keymap b/app/tests/combo/slowrelease-enabled/native_sim.keymap similarity index 100% rename from app/tests/combo/slowrelease-enabled/native_posix_64.keymap rename to app/tests/combo/slowrelease-enabled/native_sim.keymap diff --git a/app/tests/conditional-layer/chained-activation/native_posix_64.keymap b/app/tests/conditional-layer/chained-activation/native_sim.keymap similarity index 100% rename from app/tests/conditional-layer/chained-activation/native_posix_64.keymap rename to app/tests/conditional-layer/chained-activation/native_sim.keymap diff --git a/app/tests/conditional-layer/locked-layers-2/events.patterns b/app/tests/conditional-layer/locked-layers-2/events.patterns new file mode 100644 index 00000000..30bd2338 --- /dev/null +++ b/app/tests/conditional-layer/locked-layers-2/events.patterns @@ -0,0 +1,4 @@ +s/.*hid_listener_keycode/kp/p +s/.*mo_keymap_binding/mo/p +s/.*tog_keymap_binding/tog/p +s/.*conditional_layer/cl/p diff --git a/app/tests/conditional-layer/locked-layers-2/keycode_events.snapshot b/app/tests/conditional-layer/locked-layers-2/keycode_events.snapshot new file mode 100644 index 00000000..1bd77bd9 --- /dev/null +++ b/app/tests/conditional-layer/locked-layers-2/keycode_events.snapshot @@ -0,0 +1,17 @@ +kp_pressed: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 +kp_released: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 +tog_pressed: position 2 layer 1 +tog_released: position 2 layer 1 +kp_pressed: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 +kp_released: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 +mo_pressed: position 3 layer 2 +cl_activate: layer 3 +kp_pressed: usage_page 0x07 keycode 0x07 implicit_mods 0x00 explicit_mods 0x00 +kp_released: usage_page 0x07 keycode 0x07 implicit_mods 0x00 explicit_mods 0x00 +tog_pressed: position 1 layer 3 +tog_released: position 1 layer 3 +kp_pressed: usage_page 0x07 keycode 0x07 implicit_mods 0x00 explicit_mods 0x00 +kp_released: usage_page 0x07 keycode 0x07 implicit_mods 0x00 explicit_mods 0x00 +mo_released: position 3 layer 2 +kp_pressed: usage_page 0x07 keycode 0x07 implicit_mods 0x00 explicit_mods 0x00 +kp_released: usage_page 0x07 keycode 0x07 implicit_mods 0x00 explicit_mods 0x00 \ No newline at end of file diff --git a/app/tests/conditional-layer/locked-layers-2/native_posix_64.keymap b/app/tests/conditional-layer/locked-layers-2/native_posix_64.keymap new file mode 100644 index 00000000..aa17e285 --- /dev/null +++ b/app/tests/conditional-layer/locked-layers-2/native_posix_64.keymap @@ -0,0 +1,66 @@ +#include +#include +#include + +&tog { + toggle-mode = "on"; +}; + +/ { + conditional_layers { + compatible = "zmk,conditional-layers"; + tri_layer { + if-layers = <1 2>; + then-layer = <3>; + }; + }; + + keymap { + compatible = "zmk,keymap"; + default_layer { + bindings = < + &kp A &tog 3 + &tog 1 &mo 2 + >; + }; + layer_1 { + bindings = < + &kp B &trans + &trans &trans + >; + }; + layer_2 { + bindings = < + &kp C &trans + &trans &trans + >; + }; + layer_3 { + bindings = < + &kp D &trans + &trans &trans + >; + }; + }; +}; + +&kscan { + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(1,1,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(1,1,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + >; +}; diff --git a/app/tests/conditional-layer/locked-layers/events.patterns b/app/tests/conditional-layer/locked-layers/events.patterns new file mode 100644 index 00000000..30bd2338 --- /dev/null +++ b/app/tests/conditional-layer/locked-layers/events.patterns @@ -0,0 +1,4 @@ +s/.*hid_listener_keycode/kp/p +s/.*mo_keymap_binding/mo/p +s/.*tog_keymap_binding/tog/p +s/.*conditional_layer/cl/p diff --git a/app/tests/conditional-layer/locked-layers/keycode_events.snapshot b/app/tests/conditional-layer/locked-layers/keycode_events.snapshot new file mode 100644 index 00000000..4afa80c0 --- /dev/null +++ b/app/tests/conditional-layer/locked-layers/keycode_events.snapshot @@ -0,0 +1,20 @@ +kp_pressed: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 +kp_released: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 +tog_pressed: position 2 layer 1 +tog_released: position 2 layer 1 +kp_pressed: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 +kp_released: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 +tog_pressed: position 3 layer 2 +cl_activate: layer 3 +tog_released: position 3 layer 2 +kp_pressed: usage_page 0x07 keycode 0x07 implicit_mods 0x00 explicit_mods 0x00 +kp_released: usage_page 0x07 keycode 0x07 implicit_mods 0x00 explicit_mods 0x00 +mo_pressed: position 1 layer 3 +mo_released: position 1 layer 3 +kp_pressed: usage_page 0x07 keycode 0x07 implicit_mods 0x00 explicit_mods 0x00 +kp_released: usage_page 0x07 keycode 0x07 implicit_mods 0x00 explicit_mods 0x00 +tog_pressed: position 2 layer 1 +cl_deactivate: layer 3 +tog_released: position 2 layer 1 +kp_pressed: usage_page 0x07 keycode 0x06 implicit_mods 0x00 explicit_mods 0x00 +kp_released: usage_page 0x07 keycode 0x06 implicit_mods 0x00 explicit_mods 0x00 diff --git a/app/tests/conditional-layer/locked-layers/native_posix_64.keymap b/app/tests/conditional-layer/locked-layers/native_posix_64.keymap new file mode 100644 index 00000000..5c6c15db --- /dev/null +++ b/app/tests/conditional-layer/locked-layers/native_posix_64.keymap @@ -0,0 +1,64 @@ +#include +#include +#include + +/ { + conditional_layers { + compatible = "zmk,conditional-layers"; + tri_layer { + if-layers = <1 2>; + then-layer = <3>; + }; + }; + + keymap { + compatible = "zmk,keymap"; + default_layer { + bindings = < + &kp A &mo 3 + &tog 1 &tog 2 + >; + }; + layer_1 { + bindings = < + &kp B &trans + &trans &trans + >; + }; + layer_2 { + bindings = < + &kp C &trans + &trans &trans + >; + }; + layer_3 { + bindings = < + &kp D &trans + &trans &trans + >; + }; + }; +}; + +&kscan { + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(1,1,10) + ZMK_MOCK_RELEASE(1,1,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + >; +}; diff --git a/app/tests/conditional-layer/mo-overlap/native_posix_64.keymap b/app/tests/conditional-layer/mo-overlap/native_sim.keymap similarity index 100% rename from app/tests/conditional-layer/mo-overlap/native_posix_64.keymap rename to app/tests/conditional-layer/mo-overlap/native_sim.keymap diff --git a/app/tests/conditional-layer/multiple-configs/native_posix_64.keymap b/app/tests/conditional-layer/multiple-configs/native_sim.keymap similarity index 100% rename from app/tests/conditional-layer/multiple-configs/native_posix_64.keymap rename to app/tests/conditional-layer/multiple-configs/native_sim.keymap diff --git a/app/tests/conditional-layer/quad-layer/native_posix_64.keymap b/app/tests/conditional-layer/quad-layer/native_sim.keymap similarity index 100% rename from app/tests/conditional-layer/quad-layer/native_posix_64.keymap rename to app/tests/conditional-layer/quad-layer/native_sim.keymap diff --git a/app/tests/conditional-layer/same-layer-reached-both-ways/native_posix_64.keymap b/app/tests/conditional-layer/same-layer-reached-both-ways/native_sim.keymap similarity index 100% rename from app/tests/conditional-layer/same-layer-reached-both-ways/native_posix_64.keymap rename to app/tests/conditional-layer/same-layer-reached-both-ways/native_sim.keymap diff --git a/app/tests/conditional-layer/same-layer-reached-differently/native_posix_64.keymap b/app/tests/conditional-layer/same-layer-reached-differently/native_sim.keymap similarity index 100% rename from app/tests/conditional-layer/same-layer-reached-differently/native_posix_64.keymap rename to app/tests/conditional-layer/same-layer-reached-differently/native_sim.keymap diff --git a/app/tests/conditional-layer/tri-layer-alt-order/native_posix_64.keymap b/app/tests/conditional-layer/tri-layer-alt-order/native_sim.keymap similarity index 100% rename from app/tests/conditional-layer/tri-layer-alt-order/native_posix_64.keymap rename to app/tests/conditional-layer/tri-layer-alt-order/native_sim.keymap diff --git a/app/tests/conditional-layer/tri-layer-lt/native_posix_64.keymap b/app/tests/conditional-layer/tri-layer-lt/native_sim.keymap similarity index 100% rename from app/tests/conditional-layer/tri-layer-lt/native_posix_64.keymap rename to app/tests/conditional-layer/tri-layer-lt/native_sim.keymap diff --git a/app/tests/conditional-layer/tri-layer/native_posix_64.keymap b/app/tests/conditional-layer/tri-layer/native_sim.keymap similarity index 100% rename from app/tests/conditional-layer/tri-layer/native_posix_64.keymap rename to app/tests/conditional-layer/tri-layer/native_sim.keymap diff --git a/app/tests/encoders/behavior_keymap.dtsi b/app/tests/encoders/behavior_keymap.dtsi new file mode 100644 index 00000000..6ac37f01 --- /dev/null +++ b/app/tests/encoders/behavior_keymap.dtsi @@ -0,0 +1,44 @@ +#include +#include +#include + +/ { + keymap { + compatible = "zmk,keymap"; + + default_layer { + bindings = < + &tog 2 &kp X + &tog 1 &none + >; + sensor-bindings = <&inc_dec_kp A B>; + }; + skip_layer { + bindings = < + &trans &kp Y + &none &none + >; + sensor-bindings = <&inc_dec_kp N M>; + }; + alt_layer { + bindings = < + &trans &kp Z + &none &none + >; + sensor-bindings = <&inc_dec_kp C D>; + }; + }; + + mock_encoder: mock_encoder { + compatible = "zmk,sensor-encoder-mock"; + status = "okay"; + event-startup-delay = <200>; + event-period = <200>; + }; + + sensors: sensors { + compatible = "zmk,keymap-sensors"; + sensors = <&mock_encoder>; + triggers-per-rotation = <20>; + }; +}; \ No newline at end of file diff --git a/app/tests/encoders/layers-1/events.patterns b/app/tests/encoders/layers-1/events.patterns new file mode 100644 index 00000000..517ae5a2 --- /dev/null +++ b/app/tests/encoders/layers-1/events.patterns @@ -0,0 +1,2 @@ +s/.*hid_listener_keycode_//p +s/.*layer_changed/layer_changed/p \ No newline at end of file diff --git a/app/tests/encoders/layers-1/keycode_events.snapshot b/app/tests/encoders/layers-1/keycode_events.snapshot new file mode 100644 index 00000000..0adde28b --- /dev/null +++ b/app/tests/encoders/layers-1/keycode_events.snapshot @@ -0,0 +1,3 @@ +layer_changed: layer 2 state 1 locked 1 +pressed: usage_page 0x07 keycode 0x06 implicit_mods 0x00 explicit_mods 0x00 +released: usage_page 0x07 keycode 0x06 implicit_mods 0x00 explicit_mods 0x00 diff --git a/app/tests/encoders/layers-1/native_sim.keymap b/app/tests/encoders/layers-1/native_sim.keymap new file mode 100644 index 00000000..6996f551 --- /dev/null +++ b/app/tests/encoders/layers-1/native_sim.keymap @@ -0,0 +1,11 @@ +#include "../behavior_keymap.dtsi" + +&kscan { + events = < ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(1,1,8000) + >; +}; + +&mock_encoder { + events = <18>; +}; diff --git a/app/tests/encoders/layers-2/events.patterns b/app/tests/encoders/layers-2/events.patterns new file mode 100644 index 00000000..517ae5a2 --- /dev/null +++ b/app/tests/encoders/layers-2/events.patterns @@ -0,0 +1,2 @@ +s/.*hid_listener_keycode_//p +s/.*layer_changed/layer_changed/p \ No newline at end of file diff --git a/app/tests/encoders/layers-2/keycode_events.snapshot b/app/tests/encoders/layers-2/keycode_events.snapshot new file mode 100644 index 00000000..38cbe27d --- /dev/null +++ b/app/tests/encoders/layers-2/keycode_events.snapshot @@ -0,0 +1,4 @@ +layer_changed: layer 1 state 1 locked 1 +layer_changed: layer 2 state 1 locked 1 +pressed: usage_page 0x07 keycode 0x06 implicit_mods 0x00 explicit_mods 0x00 +released: usage_page 0x07 keycode 0x06 implicit_mods 0x00 explicit_mods 0x00 \ No newline at end of file diff --git a/app/tests/encoders/layers-2/native_sim.keymap b/app/tests/encoders/layers-2/native_sim.keymap new file mode 100644 index 00000000..7b7fbdb2 --- /dev/null +++ b/app/tests/encoders/layers-2/native_sim.keymap @@ -0,0 +1,11 @@ +#include "../behavior_keymap.dtsi" + +&kscan { + events = < ZMK_MOCK_PRESS(1,0,10) ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(1,1,8000) + >; +}; + +&mock_encoder { + events = <18>; +}; diff --git a/app/tests/encoders/rotate/events.patterns b/app/tests/encoders/rotate/events.patterns new file mode 100644 index 00000000..833100f6 --- /dev/null +++ b/app/tests/encoders/rotate/events.patterns @@ -0,0 +1 @@ +s/.*hid_listener_keycode_//p \ No newline at end of file diff --git a/app/tests/encoders/rotate/keycode_events.snapshot b/app/tests/encoders/rotate/keycode_events.snapshot new file mode 100644 index 00000000..b809163d --- /dev/null +++ b/app/tests/encoders/rotate/keycode_events.snapshot @@ -0,0 +1,4 @@ +pressed: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 +released: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 +pressed: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 +released: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 diff --git a/app/tests/encoders/rotate/native_sim.keymap b/app/tests/encoders/rotate/native_sim.keymap new file mode 100644 index 00000000..883352e7 --- /dev/null +++ b/app/tests/encoders/rotate/native_sim.keymap @@ -0,0 +1,10 @@ +#include "../behavior_keymap.dtsi" + +&kscan { + events = < ZMK_MOCK_PRESS(1,1,1000) + >; +}; + +&mock_encoder { + events = <18 (-18)>; +}; diff --git a/app/tests/gresc/gresc-press-release/native_posix_64.keymap b/app/tests/gresc/gresc-press-release/native_sim.keymap similarity index 100% rename from app/tests/gresc/gresc-press-release/native_posix_64.keymap rename to app/tests/gresc/gresc-press-release/native_sim.keymap diff --git a/app/tests/gresc/gresc-two-instances/native_posix_64.keymap b/app/tests/gresc/gresc-two-instances/native_sim.keymap similarity index 100% rename from app/tests/gresc/gresc-two-instances/native_posix_64.keymap rename to app/tests/gresc/gresc-two-instances/native_sim.keymap diff --git a/app/tests/hold-tap/balanced/1-dn-up/native_posix_64.keymap b/app/tests/hold-tap/balanced/1-dn-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/balanced/1-dn-up/native_posix_64.keymap rename to app/tests/hold-tap/balanced/1-dn-up/native_sim.keymap diff --git a/app/tests/hold-tap/balanced/2-dn-timer-up/native_posix_64.keymap b/app/tests/hold-tap/balanced/2-dn-timer-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/balanced/2-dn-timer-up/native_posix_64.keymap rename to app/tests/hold-tap/balanced/2-dn-timer-up/native_sim.keymap diff --git a/app/tests/hold-tap/balanced/3a-moddn-dn-modup-up/native_posix_64.keymap b/app/tests/hold-tap/balanced/3a-moddn-dn-modup-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/balanced/3a-moddn-dn-modup-up/native_posix_64.keymap rename to app/tests/hold-tap/balanced/3a-moddn-dn-modup-up/native_sim.keymap diff --git a/app/tests/hold-tap/balanced/3b-moddn-dn-modup-timer-up/native_posix_64.keymap b/app/tests/hold-tap/balanced/3b-moddn-dn-modup-timer-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/balanced/3b-moddn-dn-modup-timer-up/native_posix_64.keymap rename to app/tests/hold-tap/balanced/3b-moddn-dn-modup-timer-up/native_sim.keymap diff --git a/app/tests/hold-tap/balanced/3c-kcdn-dn-kcup-up/native_posix_64.keymap b/app/tests/hold-tap/balanced/3c-kcdn-dn-kcup-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/balanced/3c-kcdn-dn-kcup-up/native_posix_64.keymap rename to app/tests/hold-tap/balanced/3c-kcdn-dn-kcup-up/native_sim.keymap diff --git a/app/tests/hold-tap/balanced/3d-kcdn-dn-kcup-timer-up/native_posix_64.keymap b/app/tests/hold-tap/balanced/3d-kcdn-dn-kcup-timer-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/balanced/3d-kcdn-dn-kcup-timer-up/native_posix_64.keymap rename to app/tests/hold-tap/balanced/3d-kcdn-dn-kcup-timer-up/native_sim.keymap diff --git a/app/tests/hold-tap/balanced/4a-dn-htdn-timer-htup-up/native_posix_64.keymap b/app/tests/hold-tap/balanced/4a-dn-htdn-timer-htup-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/balanced/4a-dn-htdn-timer-htup-up/native_posix_64.keymap rename to app/tests/hold-tap/balanced/4a-dn-htdn-timer-htup-up/native_sim.keymap diff --git a/app/tests/hold-tap/balanced/4a-dn-kcdn-timer-kcup-up/native_posix_64.keymap b/app/tests/hold-tap/balanced/4a-dn-kcdn-timer-kcup-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/balanced/4a-dn-kcdn-timer-kcup-up/native_posix_64.keymap rename to app/tests/hold-tap/balanced/4a-dn-kcdn-timer-kcup-up/native_sim.keymap diff --git a/app/tests/hold-tap/balanced/4b-dn-kcdn-kcup-timer-up/native_posix_64.keymap b/app/tests/hold-tap/balanced/4b-dn-kcdn-kcup-timer-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/balanced/4b-dn-kcdn-kcup-timer-up/native_posix_64.keymap rename to app/tests/hold-tap/balanced/4b-dn-kcdn-kcup-timer-up/native_sim.keymap diff --git a/app/tests/hold-tap/balanced/4c-dn-kcdn-kcup-up/native_posix_64.keymap b/app/tests/hold-tap/balanced/4c-dn-kcdn-kcup-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/balanced/4c-dn-kcdn-kcup-up/native_posix_64.keymap rename to app/tests/hold-tap/balanced/4c-dn-kcdn-kcup-up/native_sim.keymap diff --git a/app/tests/hold-tap/balanced/4d-dn-kcdn-timer-up-kcup/native_posix_64.keymap b/app/tests/hold-tap/balanced/4d-dn-kcdn-timer-up-kcup/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/balanced/4d-dn-kcdn-timer-up-kcup/native_posix_64.keymap rename to app/tests/hold-tap/balanced/4d-dn-kcdn-timer-up-kcup/native_sim.keymap diff --git a/app/tests/hold-tap/balanced/5-quick-tap/native_posix_64.keymap b/app/tests/hold-tap/balanced/5-quick-tap/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/balanced/5-quick-tap/native_posix_64.keymap rename to app/tests/hold-tap/balanced/5-quick-tap/native_sim.keymap diff --git a/app/tests/hold-tap/balanced/6-retro-tap/native_posix_64.keymap b/app/tests/hold-tap/balanced/6-retro-tap/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/balanced/6-retro-tap/native_posix_64.keymap rename to app/tests/hold-tap/balanced/6-retro-tap/native_sim.keymap diff --git a/app/tests/hold-tap/balanced/7-positional/2-dn-timer-up/native_posix_64.keymap b/app/tests/hold-tap/balanced/7-positional/2-dn-timer-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/balanced/7-positional/2-dn-timer-up/native_posix_64.keymap rename to app/tests/hold-tap/balanced/7-positional/2-dn-timer-up/native_sim.keymap diff --git a/app/tests/hold-tap/balanced/7-positional/4a-dn-ntgdn-timer-ntgup-up/native_posix_64.keymap b/app/tests/hold-tap/balanced/7-positional/4a-dn-ntgdn-timer-ntgup-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/balanced/7-positional/4a-dn-ntgdn-timer-ntgup-up/native_posix_64.keymap rename to app/tests/hold-tap/balanced/7-positional/4a-dn-ntgdn-timer-ntgup-up/native_sim.keymap diff --git a/app/tests/hold-tap/balanced/7-positional/4a-dn-tgdn-timer-tgup-up/native_posix_64.keymap b/app/tests/hold-tap/balanced/7-positional/4a-dn-tgdn-timer-tgup-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/balanced/7-positional/4a-dn-tgdn-timer-tgup-up/native_posix_64.keymap rename to app/tests/hold-tap/balanced/7-positional/4a-dn-tgdn-timer-tgup-up/native_sim.keymap diff --git a/app/tests/hold-tap/balanced/7-positional/on-release-no-trigger/native_posix_64.keymap b/app/tests/hold-tap/balanced/7-positional/on-release-no-trigger/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/balanced/7-positional/on-release-no-trigger/native_posix_64.keymap rename to app/tests/hold-tap/balanced/7-positional/on-release-no-trigger/native_sim.keymap diff --git a/app/tests/hold-tap/balanced/7-positional/on-release-trigger/native_posix_64.keymap b/app/tests/hold-tap/balanced/7-positional/on-release-trigger/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/balanced/7-positional/on-release-trigger/native_posix_64.keymap rename to app/tests/hold-tap/balanced/7-positional/on-release-trigger/native_sim.keymap diff --git a/app/tests/hold-tap/balanced/7-positional/tgdn-dn-ntgdn-timer-ntgup-tgup-up/native_posix_64.keymap b/app/tests/hold-tap/balanced/7-positional/tgdn-dn-ntgdn-timer-ntgup-tgup-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/balanced/7-positional/tgdn-dn-ntgdn-timer-ntgup-tgup-up/native_posix_64.keymap rename to app/tests/hold-tap/balanced/7-positional/tgdn-dn-ntgdn-timer-ntgup-tgup-up/native_sim.keymap diff --git a/app/tests/hold-tap/balanced/8-require-prior-idle/1-basic/native_posix_64.keymap b/app/tests/hold-tap/balanced/8-require-prior-idle/1-basic/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/balanced/8-require-prior-idle/1-basic/native_posix_64.keymap rename to app/tests/hold-tap/balanced/8-require-prior-idle/1-basic/native_sim.keymap diff --git a/app/tests/hold-tap/balanced/8-require-prior-idle/2-double-hold/native_posix_64.keymap b/app/tests/hold-tap/balanced/8-require-prior-idle/2-double-hold/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/balanced/8-require-prior-idle/2-double-hold/native_posix_64.keymap rename to app/tests/hold-tap/balanced/8-require-prior-idle/2-double-hold/native_sim.keymap diff --git a/app/tests/hold-tap/balanced/many-nested/native_posix_64.keymap b/app/tests/hold-tap/balanced/many-nested/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/balanced/many-nested/native_posix_64.keymap rename to app/tests/hold-tap/balanced/many-nested/native_sim.keymap diff --git a/app/tests/hold-tap/hold-preferred/1-dn-up/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/1-dn-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/hold-preferred/1-dn-up/native_posix_64.keymap rename to app/tests/hold-tap/hold-preferred/1-dn-up/native_sim.keymap diff --git a/app/tests/hold-tap/hold-preferred/2-dn-timer-up/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/2-dn-timer-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/hold-preferred/2-dn-timer-up/native_posix_64.keymap rename to app/tests/hold-tap/hold-preferred/2-dn-timer-up/native_sim.keymap diff --git a/app/tests/hold-tap/hold-preferred/3a-moddn-dn-modup-up/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/3a-moddn-dn-modup-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/hold-preferred/3a-moddn-dn-modup-up/native_posix_64.keymap rename to app/tests/hold-tap/hold-preferred/3a-moddn-dn-modup-up/native_sim.keymap diff --git a/app/tests/hold-tap/hold-preferred/3b-moddn-dn-modup-timer-up/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/3b-moddn-dn-modup-timer-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/hold-preferred/3b-moddn-dn-modup-timer-up/native_posix_64.keymap rename to app/tests/hold-tap/hold-preferred/3b-moddn-dn-modup-timer-up/native_sim.keymap diff --git a/app/tests/hold-tap/hold-preferred/3c-kcdn-dn-kcup-up/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/3c-kcdn-dn-kcup-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/hold-preferred/3c-kcdn-dn-kcup-up/native_posix_64.keymap rename to app/tests/hold-tap/hold-preferred/3c-kcdn-dn-kcup-up/native_sim.keymap diff --git a/app/tests/hold-tap/hold-preferred/3d-kcdn-dn-kcup-timer-up/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/3d-kcdn-dn-kcup-timer-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/hold-preferred/3d-kcdn-dn-kcup-timer-up/native_posix_64.keymap rename to app/tests/hold-tap/hold-preferred/3d-kcdn-dn-kcup-timer-up/native_sim.keymap diff --git a/app/tests/hold-tap/hold-preferred/4a-dn-htdn-timer-htup-up/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/4a-dn-htdn-timer-htup-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/hold-preferred/4a-dn-htdn-timer-htup-up/native_posix_64.keymap rename to app/tests/hold-tap/hold-preferred/4a-dn-htdn-timer-htup-up/native_sim.keymap diff --git a/app/tests/hold-tap/hold-preferred/4a-dn-kcdn-timer-kcup-up/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/4a-dn-kcdn-timer-kcup-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/hold-preferred/4a-dn-kcdn-timer-kcup-up/native_posix_64.keymap rename to app/tests/hold-tap/hold-preferred/4a-dn-kcdn-timer-kcup-up/native_sim.keymap diff --git a/app/tests/hold-tap/hold-preferred/4b-dn-kcdn-kcup-timer-up/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/4b-dn-kcdn-kcup-timer-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/hold-preferred/4b-dn-kcdn-kcup-timer-up/native_posix_64.keymap rename to app/tests/hold-tap/hold-preferred/4b-dn-kcdn-kcup-timer-up/native_sim.keymap diff --git a/app/tests/hold-tap/hold-preferred/4c-dn-kcdn-kcup-up/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/4c-dn-kcdn-kcup-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/hold-preferred/4c-dn-kcdn-kcup-up/native_posix_64.keymap rename to app/tests/hold-tap/hold-preferred/4c-dn-kcdn-kcup-up/native_sim.keymap diff --git a/app/tests/hold-tap/hold-preferred/4d-dn-kcdn-timer-up-kcup/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/4d-dn-kcdn-timer-up-kcup/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/hold-preferred/4d-dn-kcdn-timer-up-kcup/native_posix_64.keymap rename to app/tests/hold-tap/hold-preferred/4d-dn-kcdn-timer-up-kcup/native_sim.keymap diff --git a/app/tests/hold-tap/hold-preferred/5-quick-tap/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/5-quick-tap/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/hold-preferred/5-quick-tap/native_posix_64.keymap rename to app/tests/hold-tap/hold-preferred/5-quick-tap/native_sim.keymap diff --git a/app/tests/hold-tap/hold-preferred/6-retro-tap/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/6-retro-tap/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/hold-preferred/6-retro-tap/native_posix_64.keymap rename to app/tests/hold-tap/hold-preferred/6-retro-tap/native_sim.keymap diff --git a/app/tests/hold-tap/hold-preferred/7-positional/2-dn-timer-up/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/7-positional/2-dn-timer-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/hold-preferred/7-positional/2-dn-timer-up/native_posix_64.keymap rename to app/tests/hold-tap/hold-preferred/7-positional/2-dn-timer-up/native_sim.keymap diff --git a/app/tests/hold-tap/hold-preferred/7-positional/4a-dn-ntgdn-timer-ntgup-up/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/7-positional/4a-dn-ntgdn-timer-ntgup-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/hold-preferred/7-positional/4a-dn-ntgdn-timer-ntgup-up/native_posix_64.keymap rename to app/tests/hold-tap/hold-preferred/7-positional/4a-dn-ntgdn-timer-ntgup-up/native_sim.keymap diff --git a/app/tests/hold-tap/hold-preferred/7-positional/4a-dn-tgdn-timer-tgup-up/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/7-positional/4a-dn-tgdn-timer-tgup-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/hold-preferred/7-positional/4a-dn-tgdn-timer-tgup-up/native_posix_64.keymap rename to app/tests/hold-tap/hold-preferred/7-positional/4a-dn-tgdn-timer-tgup-up/native_sim.keymap diff --git a/app/tests/hold-tap/hold-preferred/7-positional/on-release-no-trigger/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/7-positional/on-release-no-trigger/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/hold-preferred/7-positional/on-release-no-trigger/native_posix_64.keymap rename to app/tests/hold-tap/hold-preferred/7-positional/on-release-no-trigger/native_sim.keymap diff --git a/app/tests/hold-tap/hold-preferred/7-positional/on-release-trigger/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/7-positional/on-release-trigger/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/hold-preferred/7-positional/on-release-trigger/native_posix_64.keymap rename to app/tests/hold-tap/hold-preferred/7-positional/on-release-trigger/native_sim.keymap diff --git a/app/tests/hold-tap/hold-preferred/7-positional/tgdn-dn-ntgdn-timer-ntgup-tgup-up/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/7-positional/tgdn-dn-ntgdn-timer-ntgup-tgup-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/hold-preferred/7-positional/tgdn-dn-ntgdn-timer-ntgup-tgup-up/native_posix_64.keymap rename to app/tests/hold-tap/hold-preferred/7-positional/tgdn-dn-ntgdn-timer-ntgup-tgup-up/native_sim.keymap diff --git a/app/tests/hold-tap/hold-preferred/8-require-prior-idle/1-basic/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/8-require-prior-idle/1-basic/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/hold-preferred/8-require-prior-idle/1-basic/native_posix_64.keymap rename to app/tests/hold-tap/hold-preferred/8-require-prior-idle/1-basic/native_sim.keymap diff --git a/app/tests/hold-tap/hold-preferred/8-require-prior-idle/2-double-hold/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/8-require-prior-idle/2-double-hold/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/hold-preferred/8-require-prior-idle/2-double-hold/native_posix_64.keymap rename to app/tests/hold-tap/hold-preferred/8-require-prior-idle/2-double-hold/native_sim.keymap diff --git a/app/tests/hold-tap/hold-while-undecided/1-tap/native_posix_64.keymap b/app/tests/hold-tap/hold-while-undecided/1-tap/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/hold-while-undecided/1-tap/native_posix_64.keymap rename to app/tests/hold-tap/hold-while-undecided/1-tap/native_sim.keymap diff --git a/app/tests/hold-tap/hold-while-undecided/2-hold/native_posix_64.keymap b/app/tests/hold-tap/hold-while-undecided/2-hold/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/hold-while-undecided/2-hold/native_posix_64.keymap rename to app/tests/hold-tap/hold-while-undecided/2-hold/native_sim.keymap diff --git a/app/tests/hold-tap/hold-while-undecided/3-linger/native_posix_64.keymap b/app/tests/hold-tap/hold-while-undecided/3-linger/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/hold-while-undecided/3-linger/native_posix_64.keymap rename to app/tests/hold-tap/hold-while-undecided/3-linger/native_sim.keymap diff --git a/app/tests/hold-tap/hold-while-undecided/4-linger-sk/native_posix_64.keymap b/app/tests/hold-tap/hold-while-undecided/4-linger-sk/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/hold-while-undecided/4-linger-sk/native_posix_64.keymap rename to app/tests/hold-tap/hold-while-undecided/4-linger-sk/native_sim.keymap diff --git a/app/tests/hold-tap/tap-preferred/1-dn-up/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/1-dn-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-preferred/1-dn-up/native_posix_64.keymap rename to app/tests/hold-tap/tap-preferred/1-dn-up/native_sim.keymap diff --git a/app/tests/hold-tap/tap-preferred/2-dn-timer-up/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/2-dn-timer-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-preferred/2-dn-timer-up/native_posix_64.keymap rename to app/tests/hold-tap/tap-preferred/2-dn-timer-up/native_sim.keymap diff --git a/app/tests/hold-tap/tap-preferred/3a-moddn-dn-modup-up/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/3a-moddn-dn-modup-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-preferred/3a-moddn-dn-modup-up/native_posix_64.keymap rename to app/tests/hold-tap/tap-preferred/3a-moddn-dn-modup-up/native_sim.keymap diff --git a/app/tests/hold-tap/tap-preferred/3b-moddn-dn-modup-timer-up/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/3b-moddn-dn-modup-timer-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-preferred/3b-moddn-dn-modup-timer-up/native_posix_64.keymap rename to app/tests/hold-tap/tap-preferred/3b-moddn-dn-modup-timer-up/native_sim.keymap diff --git a/app/tests/hold-tap/tap-preferred/3c-kcdn-dn-kcup-up/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/3c-kcdn-dn-kcup-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-preferred/3c-kcdn-dn-kcup-up/native_posix_64.keymap rename to app/tests/hold-tap/tap-preferred/3c-kcdn-dn-kcup-up/native_sim.keymap diff --git a/app/tests/hold-tap/tap-preferred/3d-kcdn-dn-kcup-timer-up/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/3d-kcdn-dn-kcup-timer-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-preferred/3d-kcdn-dn-kcup-timer-up/native_posix_64.keymap rename to app/tests/hold-tap/tap-preferred/3d-kcdn-dn-kcup-timer-up/native_sim.keymap diff --git a/app/tests/hold-tap/tap-preferred/4a-dn-htdn-timer-htup-up/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/4a-dn-htdn-timer-htup-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-preferred/4a-dn-htdn-timer-htup-up/native_posix_64.keymap rename to app/tests/hold-tap/tap-preferred/4a-dn-htdn-timer-htup-up/native_sim.keymap diff --git a/app/tests/hold-tap/tap-preferred/4a-dn-kcdn-timer-kcup-up/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/4a-dn-kcdn-timer-kcup-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-preferred/4a-dn-kcdn-timer-kcup-up/native_posix_64.keymap rename to app/tests/hold-tap/tap-preferred/4a-dn-kcdn-timer-kcup-up/native_sim.keymap diff --git a/app/tests/hold-tap/tap-preferred/4b-dn-kcdn-kcup-timer-up/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/4b-dn-kcdn-kcup-timer-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-preferred/4b-dn-kcdn-kcup-timer-up/native_posix_64.keymap rename to app/tests/hold-tap/tap-preferred/4b-dn-kcdn-kcup-timer-up/native_sim.keymap diff --git a/app/tests/hold-tap/tap-preferred/4c-dn-kcdn-kcup-up/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/4c-dn-kcdn-kcup-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-preferred/4c-dn-kcdn-kcup-up/native_posix_64.keymap rename to app/tests/hold-tap/tap-preferred/4c-dn-kcdn-kcup-up/native_sim.keymap diff --git a/app/tests/hold-tap/tap-preferred/4d-dn-kcdn-timer-up-kcup/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/4d-dn-kcdn-timer-up-kcup/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-preferred/4d-dn-kcdn-timer-up-kcup/native_posix_64.keymap rename to app/tests/hold-tap/tap-preferred/4d-dn-kcdn-timer-up-kcup/native_sim.keymap diff --git a/app/tests/hold-tap/tap-preferred/5-quick-tap/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/5-quick-tap/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-preferred/5-quick-tap/native_posix_64.keymap rename to app/tests/hold-tap/tap-preferred/5-quick-tap/native_sim.keymap diff --git a/app/tests/hold-tap/tap-preferred/6-nested-timeouts/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/6-nested-timeouts/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-preferred/6-nested-timeouts/native_posix_64.keymap rename to app/tests/hold-tap/tap-preferred/6-nested-timeouts/native_sim.keymap diff --git a/app/tests/hold-tap/tap-preferred/7-positional/2-dn-timer-up/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/7-positional/2-dn-timer-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-preferred/7-positional/2-dn-timer-up/native_posix_64.keymap rename to app/tests/hold-tap/tap-preferred/7-positional/2-dn-timer-up/native_sim.keymap diff --git a/app/tests/hold-tap/tap-preferred/7-positional/4a-dn-ntgdn-timer-ntgup-up/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/7-positional/4a-dn-ntgdn-timer-ntgup-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-preferred/7-positional/4a-dn-ntgdn-timer-ntgup-up/native_posix_64.keymap rename to app/tests/hold-tap/tap-preferred/7-positional/4a-dn-ntgdn-timer-ntgup-up/native_sim.keymap diff --git a/app/tests/hold-tap/tap-preferred/7-positional/4a-dn-tgdn-timer-tgup-up/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/7-positional/4a-dn-tgdn-timer-tgup-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-preferred/7-positional/4a-dn-tgdn-timer-tgup-up/native_posix_64.keymap rename to app/tests/hold-tap/tap-preferred/7-positional/4a-dn-tgdn-timer-tgup-up/native_sim.keymap diff --git a/app/tests/hold-tap/tap-preferred/7-positional/on-release-no-trigger/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/7-positional/on-release-no-trigger/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-preferred/7-positional/on-release-no-trigger/native_posix_64.keymap rename to app/tests/hold-tap/tap-preferred/7-positional/on-release-no-trigger/native_sim.keymap diff --git a/app/tests/hold-tap/tap-preferred/7-positional/on-release-trigger/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/7-positional/on-release-trigger/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-preferred/7-positional/on-release-trigger/native_posix_64.keymap rename to app/tests/hold-tap/tap-preferred/7-positional/on-release-trigger/native_sim.keymap diff --git a/app/tests/hold-tap/tap-preferred/7-positional/tgdn-dn-ntgdn-timer-ntgup-tgup-up/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/7-positional/tgdn-dn-ntgdn-timer-ntgup-tgup-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-preferred/7-positional/tgdn-dn-ntgdn-timer-ntgup-tgup-up/native_posix_64.keymap rename to app/tests/hold-tap/tap-preferred/7-positional/tgdn-dn-ntgdn-timer-ntgup-tgup-up/native_sim.keymap diff --git a/app/tests/hold-tap/tap-preferred/8-require-prior-idle/1-basic/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/8-require-prior-idle/1-basic/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-preferred/8-require-prior-idle/1-basic/native_posix_64.keymap rename to app/tests/hold-tap/tap-preferred/8-require-prior-idle/1-basic/native_sim.keymap diff --git a/app/tests/hold-tap/tap-preferred/8-require-prior-idle/2-double-hold/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/8-require-prior-idle/2-double-hold/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-preferred/8-require-prior-idle/2-double-hold/native_posix_64.keymap rename to app/tests/hold-tap/tap-preferred/8-require-prior-idle/2-double-hold/native_sim.keymap diff --git a/app/tests/hold-tap/tap-unless-interrupted/1-dn-up/native_posix_64.keymap b/app/tests/hold-tap/tap-unless-interrupted/1-dn-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-unless-interrupted/1-dn-up/native_posix_64.keymap rename to app/tests/hold-tap/tap-unless-interrupted/1-dn-up/native_sim.keymap diff --git a/app/tests/hold-tap/tap-unless-interrupted/2-dn-timer-up/native_posix_64.keymap b/app/tests/hold-tap/tap-unless-interrupted/2-dn-timer-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-unless-interrupted/2-dn-timer-up/native_posix_64.keymap rename to app/tests/hold-tap/tap-unless-interrupted/2-dn-timer-up/native_sim.keymap diff --git a/app/tests/hold-tap/tap-unless-interrupted/3a-moddn-dn-modup-up/native_posix_64.keymap b/app/tests/hold-tap/tap-unless-interrupted/3a-moddn-dn-modup-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-unless-interrupted/3a-moddn-dn-modup-up/native_posix_64.keymap rename to app/tests/hold-tap/tap-unless-interrupted/3a-moddn-dn-modup-up/native_sim.keymap diff --git a/app/tests/hold-tap/tap-unless-interrupted/3b-moddn-dn-modup-timer-up/native_posix_64.keymap b/app/tests/hold-tap/tap-unless-interrupted/3b-moddn-dn-modup-timer-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-unless-interrupted/3b-moddn-dn-modup-timer-up/native_posix_64.keymap rename to app/tests/hold-tap/tap-unless-interrupted/3b-moddn-dn-modup-timer-up/native_sim.keymap diff --git a/app/tests/hold-tap/tap-unless-interrupted/3c-kcdn-dn-kcup-up/native_posix_64.keymap b/app/tests/hold-tap/tap-unless-interrupted/3c-kcdn-dn-kcup-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-unless-interrupted/3c-kcdn-dn-kcup-up/native_posix_64.keymap rename to app/tests/hold-tap/tap-unless-interrupted/3c-kcdn-dn-kcup-up/native_sim.keymap diff --git a/app/tests/hold-tap/tap-unless-interrupted/3d-kcdn-dn-kcup-timer-up/native_posix_64.keymap b/app/tests/hold-tap/tap-unless-interrupted/3d-kcdn-dn-kcup-timer-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-unless-interrupted/3d-kcdn-dn-kcup-timer-up/native_posix_64.keymap rename to app/tests/hold-tap/tap-unless-interrupted/3d-kcdn-dn-kcup-timer-up/native_sim.keymap diff --git a/app/tests/hold-tap/tap-unless-interrupted/4a-dn-htdn-timer-htup-up/native_posix_64.keymap b/app/tests/hold-tap/tap-unless-interrupted/4a-dn-htdn-timer-htup-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-unless-interrupted/4a-dn-htdn-timer-htup-up/native_posix_64.keymap rename to app/tests/hold-tap/tap-unless-interrupted/4a-dn-htdn-timer-htup-up/native_sim.keymap diff --git a/app/tests/hold-tap/tap-unless-interrupted/4a-dn-kcdn-timer-kcup-up/native_posix_64.keymap b/app/tests/hold-tap/tap-unless-interrupted/4a-dn-kcdn-timer-kcup-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-unless-interrupted/4a-dn-kcdn-timer-kcup-up/native_posix_64.keymap rename to app/tests/hold-tap/tap-unless-interrupted/4a-dn-kcdn-timer-kcup-up/native_sim.keymap diff --git a/app/tests/hold-tap/tap-unless-interrupted/4b-dn-kcdn-kcup-timer-up/native_posix_64.keymap b/app/tests/hold-tap/tap-unless-interrupted/4b-dn-kcdn-kcup-timer-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-unless-interrupted/4b-dn-kcdn-kcup-timer-up/native_posix_64.keymap rename to app/tests/hold-tap/tap-unless-interrupted/4b-dn-kcdn-kcup-timer-up/native_sim.keymap diff --git a/app/tests/hold-tap/tap-unless-interrupted/4c-dn-kcdn-kcup-up/native_posix_64.keymap b/app/tests/hold-tap/tap-unless-interrupted/4c-dn-kcdn-kcup-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-unless-interrupted/4c-dn-kcdn-kcup-up/native_posix_64.keymap rename to app/tests/hold-tap/tap-unless-interrupted/4c-dn-kcdn-kcup-up/native_sim.keymap diff --git a/app/tests/hold-tap/tap-unless-interrupted/4d-dn-kcdn-timer-up-kcup/native_posix_64.keymap b/app/tests/hold-tap/tap-unless-interrupted/4d-dn-kcdn-timer-up-kcup/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-unless-interrupted/4d-dn-kcdn-timer-up-kcup/native_posix_64.keymap rename to app/tests/hold-tap/tap-unless-interrupted/4d-dn-kcdn-timer-up-kcup/native_sim.keymap diff --git a/app/tests/hold-tap/tap-unless-interrupted/5-quick-tap/native_posix_64.keymap b/app/tests/hold-tap/tap-unless-interrupted/5-quick-tap/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-unless-interrupted/5-quick-tap/native_posix_64.keymap rename to app/tests/hold-tap/tap-unless-interrupted/5-quick-tap/native_sim.keymap diff --git a/app/tests/hold-tap/tap-unless-interrupted/6-require-prior-idle/1-basic/native_posix_64.keymap b/app/tests/hold-tap/tap-unless-interrupted/6-require-prior-idle/1-basic/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-unless-interrupted/6-require-prior-idle/1-basic/native_posix_64.keymap rename to app/tests/hold-tap/tap-unless-interrupted/6-require-prior-idle/1-basic/native_sim.keymap diff --git a/app/tests/hold-tap/tap-unless-interrupted/6-require-prior-idle/2-double-hold/native_posix_64.keymap b/app/tests/hold-tap/tap-unless-interrupted/6-require-prior-idle/2-double-hold/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-unless-interrupted/6-require-prior-idle/2-double-hold/native_posix_64.keymap rename to app/tests/hold-tap/tap-unless-interrupted/6-require-prior-idle/2-double-hold/native_sim.keymap diff --git a/app/tests/key-repeat/ignore-other-usage-page-events/native_posix_64.keymap b/app/tests/key-repeat/ignore-other-usage-page-events/native_sim.keymap similarity index 100% rename from app/tests/key-repeat/ignore-other-usage-page-events/native_posix_64.keymap rename to app/tests/key-repeat/ignore-other-usage-page-events/native_sim.keymap diff --git a/app/tests/key-repeat/press-and-release-after-key-usage/native_posix_64.keymap b/app/tests/key-repeat/press-and-release-after-key-usage/native_sim.keymap similarity index 100% rename from app/tests/key-repeat/press-and-release-after-key-usage/native_posix_64.keymap rename to app/tests/key-repeat/press-and-release-after-key-usage/native_sim.keymap diff --git a/app/tests/key-repeat/press-and-release-with-explicit-modifiers/native_posix_64.keymap b/app/tests/key-repeat/press-and-release-with-explicit-modifiers/native_sim.keymap similarity index 100% rename from app/tests/key-repeat/press-and-release-with-explicit-modifiers/native_posix_64.keymap rename to app/tests/key-repeat/press-and-release-with-explicit-modifiers/native_sim.keymap diff --git a/app/tests/key-repeat/send-nothing-if-no-keys-pressed-yet/native_posix_64.keymap b/app/tests/key-repeat/send-nothing-if-no-keys-pressed-yet/native_sim.keymap similarity index 100% rename from app/tests/key-repeat/send-nothing-if-no-keys-pressed-yet/native_posix_64.keymap rename to app/tests/key-repeat/send-nothing-if-no-keys-pressed-yet/native_sim.keymap diff --git a/app/tests/key-repeat/tap-when-rolling/native_posix_64.keymap b/app/tests/key-repeat/tap-when-rolling/native_sim.keymap similarity index 100% rename from app/tests/key-repeat/tap-when-rolling/native_posix_64.keymap rename to app/tests/key-repeat/tap-when-rolling/native_sim.keymap diff --git a/app/tests/keypress/kp-press-release/native_posix_64.keymap b/app/tests/keypress/kp-press-release/native_sim.keymap similarity index 100% rename from app/tests/keypress/kp-press-release/native_posix_64.keymap rename to app/tests/keypress/kp-press-release/native_sim.keymap diff --git a/app/tests/keytoggle/kt-alt-tab/native_posix_64.keymap b/app/tests/keytoggle/kt-alt-tab/native_sim.keymap similarity index 100% rename from app/tests/keytoggle/kt-alt-tab/native_posix_64.keymap rename to app/tests/keytoggle/kt-alt-tab/native_sim.keymap diff --git a/app/tests/keytoggle/kt-modded-alpha/native_posix_64.keymap b/app/tests/keytoggle/kt-modded-alpha/native_sim.keymap similarity index 100% rename from app/tests/keytoggle/kt-modded-alpha/native_posix_64.keymap rename to app/tests/keytoggle/kt-modded-alpha/native_sim.keymap diff --git a/app/tests/keytoggle/kt-off/events.patterns b/app/tests/keytoggle/kt-off/events.patterns new file mode 100644 index 00000000..833100f6 --- /dev/null +++ b/app/tests/keytoggle/kt-off/events.patterns @@ -0,0 +1 @@ +s/.*hid_listener_keycode_//p \ No newline at end of file diff --git a/app/tests/keytoggle/kt-off/keycode_events.snapshot b/app/tests/keytoggle/kt-off/keycode_events.snapshot new file mode 100644 index 00000000..24404605 --- /dev/null +++ b/app/tests/keytoggle/kt-off/keycode_events.snapshot @@ -0,0 +1,4 @@ +released: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 +pressed: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 +released: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 +released: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 \ No newline at end of file diff --git a/app/tests/keytoggle/kt-off/native_sim.keymap b/app/tests/keytoggle/kt-off/native_sim.keymap new file mode 100644 index 00000000..4abf6ee9 --- /dev/null +++ b/app/tests/keytoggle/kt-off/native_sim.keymap @@ -0,0 +1,29 @@ +#include "../behavior_keymap.dtsi" + +&kt { + toggle-mode = "off"; +}; + +&kscan { + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(1,1,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(1,1,10) + ZMK_MOCK_RELEASE(0,0,10) + >; +}; + +/ { + keymap { + compatible = "zmk,keymap"; + + default_layer { + bindings = < + &kt B &trans + &trans &kp B + >; + }; + }; +}; \ No newline at end of file diff --git a/app/tests/keytoggle/kt-on/events.patterns b/app/tests/keytoggle/kt-on/events.patterns new file mode 100644 index 00000000..833100f6 --- /dev/null +++ b/app/tests/keytoggle/kt-on/events.patterns @@ -0,0 +1 @@ +s/.*hid_listener_keycode_//p \ No newline at end of file diff --git a/app/tests/keytoggle/kt-on/keycode_events.snapshot b/app/tests/keytoggle/kt-on/keycode_events.snapshot new file mode 100644 index 00000000..6954f3da --- /dev/null +++ b/app/tests/keytoggle/kt-on/keycode_events.snapshot @@ -0,0 +1,6 @@ +pressed: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 +pressed: unregistering usage_page 0x07 keycode 0x05 since it was already pressed +pressed: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 +pressed: unregistering usage_page 0x07 keycode 0x05 since it was already pressed +pressed: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 +released: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 \ No newline at end of file diff --git a/app/tests/keytoggle/kt-on/native_sim.keymap b/app/tests/keytoggle/kt-on/native_sim.keymap new file mode 100644 index 00000000..964aa93b --- /dev/null +++ b/app/tests/keytoggle/kt-on/native_sim.keymap @@ -0,0 +1,30 @@ +#include "../behavior_keymap.dtsi" + +&kt { + toggle-mode = "on"; +}; + + +&kscan { + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(1,1,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(1,1,10) + ZMK_MOCK_RELEASE(0,0,10) + >; +}; + +/ { + keymap { + compatible = "zmk,keymap"; + + default_layer { + bindings = < + &kt B &trans + &trans &kp B + >; + }; + }; +}; \ No newline at end of file diff --git a/app/tests/keytoggle/kt-press-release-nkro/native_posix_64.conf b/app/tests/keytoggle/kt-press-release-nkro/native_sim.conf similarity index 100% rename from app/tests/keytoggle/kt-press-release-nkro/native_posix_64.conf rename to app/tests/keytoggle/kt-press-release-nkro/native_sim.conf diff --git a/app/tests/keytoggle/kt-press-release-nkro/native_posix_64.keymap b/app/tests/keytoggle/kt-press-release-nkro/native_sim.keymap similarity index 100% rename from app/tests/keytoggle/kt-press-release-nkro/native_posix_64.keymap rename to app/tests/keytoggle/kt-press-release-nkro/native_sim.keymap diff --git a/app/tests/keytoggle/kt-press-release/native_posix_64.keymap b/app/tests/keytoggle/kt-press-release/native_sim.keymap similarity index 100% rename from app/tests/keytoggle/kt-press-release/native_posix_64.keymap rename to app/tests/keytoggle/kt-press-release/native_sim.keymap diff --git a/app/tests/macros/basic/native_posix_64.keymap b/app/tests/macros/basic/native_sim.keymap similarity index 100% rename from app/tests/macros/basic/native_posix_64.keymap rename to app/tests/macros/basic/native_sim.keymap diff --git a/app/tests/macros/mo-plus-modifier-from-hold-tap/native_posix_64.keymap b/app/tests/macros/mo-plus-modifier-from-hold-tap/native_sim.keymap similarity index 100% rename from app/tests/macros/mo-plus-modifier-from-hold-tap/native_posix_64.keymap rename to app/tests/macros/mo-plus-modifier-from-hold-tap/native_sim.keymap diff --git a/app/tests/macros/mo-plus-modifier-macro/native_posix_64.keymap b/app/tests/macros/mo-plus-modifier-macro/native_sim.keymap similarity index 100% rename from app/tests/macros/mo-plus-modifier-macro/native_posix_64.keymap rename to app/tests/macros/mo-plus-modifier-macro/native_sim.keymap diff --git a/app/tests/macros/param-then-no-param/events.patterns b/app/tests/macros/param-then-no-param/events.patterns new file mode 100644 index 00000000..a23e0563 --- /dev/null +++ b/app/tests/macros/param-then-no-param/events.patterns @@ -0,0 +1,2 @@ +s/.*hid_listener_keycode/kp/p +s/.*mo_keymap_binding/mo/p diff --git a/app/tests/macros/param-then-no-param/keycode_events.snapshot b/app/tests/macros/param-then-no-param/keycode_events.snapshot new file mode 100644 index 00000000..aee0e1e6 --- /dev/null +++ b/app/tests/macros/param-then-no-param/keycode_events.snapshot @@ -0,0 +1,8 @@ +kp_pressed: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 +kp_released: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 +mo_pressed: position 0 layer 1 +kp_pressed: usage_page 0x07 keycode 0x1C implicit_mods 0x00 explicit_mods 0x00 +kp_released: usage_page 0x07 keycode 0x1C implicit_mods 0x00 explicit_mods 0x00 +mo_released: position 0 layer 1 +kp_pressed: usage_page 0x07 keycode 0x06 implicit_mods 0x00 explicit_mods 0x00 +kp_released: usage_page 0x07 keycode 0x06 implicit_mods 0x00 explicit_mods 0x00 diff --git a/app/tests/macros/param-then-no-param/native_posix_64.keymap b/app/tests/macros/param-then-no-param/native_posix_64.keymap new file mode 100644 index 00000000..e6c42901 --- /dev/null +++ b/app/tests/macros/param-then-no-param/native_posix_64.keymap @@ -0,0 +1,47 @@ +#include +#include +#include + +/ { + macros { + kp_l1: kp_l1 { + compatible = "zmk,behavior-macro-one-param"; + #binding-cells = <1>; + wait-ms = <5>; + tap-ms = <5>; + bindings + = <¯o_param_1to1> + , <¯o_tap &kp MACRO_PLACEHOLDER> + , <¯o_press &mo 1> + , <¯o_pause_for_release> + , <¯o_release &mo 1>; + }; + }; + + keymap { + compatible = "zmk,keymap"; + + default_layer { + bindings = < + &kp_l1 A &kp B + &kp C &none>; + }; + + other_layer { + bindings = < + &kp X &kp Y + &kp Z &none>; + }; + }; +}; + +&kscan { + events = < + ZMK_MOCK_PRESS(0,0,20) // press macro (taps A) + ZMK_MOCK_PRESS(0,1,20) // press Y + ZMK_MOCK_RELEASE(0,1,20) // release Y + ZMK_MOCK_RELEASE(0,0,20) // release macro + ZMK_MOCK_PRESS(1,0,10) // press C + ZMK_MOCK_RELEASE(1,0,10) // release C + >; +}; diff --git a/app/tests/macros/place-holder-parameters/native_posix_64.keymap b/app/tests/macros/place-holder-parameters/native_sim.keymap similarity index 100% rename from app/tests/macros/place-holder-parameters/native_posix_64.keymap rename to app/tests/macros/place-holder-parameters/native_sim.keymap diff --git a/app/tests/macros/press-mid-macro/native_posix_64.keymap b/app/tests/macros/press-mid-macro/native_sim.keymap similarity index 100% rename from app/tests/macros/press-mid-macro/native_posix_64.keymap rename to app/tests/macros/press-mid-macro/native_sim.keymap diff --git a/app/tests/macros/press-release/native_posix_64.keymap b/app/tests/macros/press-release/native_sim.keymap similarity index 100% rename from app/tests/macros/press-release/native_posix_64.keymap rename to app/tests/macros/press-release/native_sim.keymap diff --git a/app/tests/macros/timing-override/native_posix_64.keymap b/app/tests/macros/timing-override/native_sim.keymap similarity index 100% rename from app/tests/macros/timing-override/native_posix_64.keymap rename to app/tests/macros/timing-override/native_sim.keymap diff --git a/app/tests/macros/wait-macro-release/native_posix_64.keymap b/app/tests/macros/wait-macro-release/native_sim.keymap similarity index 100% rename from app/tests/macros/wait-macro-release/native_posix_64.keymap rename to app/tests/macros/wait-macro-release/native_sim.keymap diff --git a/app/tests/matrix-input/kp-press-release/events.patterns b/app/tests/matrix-input/kp-press-release/events.patterns new file mode 100644 index 00000000..833100f6 --- /dev/null +++ b/app/tests/matrix-input/kp-press-release/events.patterns @@ -0,0 +1 @@ +s/.*hid_listener_keycode_//p \ No newline at end of file diff --git a/app/tests/matrix-input/kp-press-release/keycode_events.snapshot b/app/tests/matrix-input/kp-press-release/keycode_events.snapshot new file mode 100644 index 00000000..259501ba --- /dev/null +++ b/app/tests/matrix-input/kp-press-release/keycode_events.snapshot @@ -0,0 +1,2 @@ +pressed: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 +released: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 diff --git a/app/tests/matrix-input/kp-press-release/native_sim.conf b/app/tests/matrix-input/kp-press-release/native_sim.conf new file mode 100644 index 00000000..9ce5b96b --- /dev/null +++ b/app/tests/matrix-input/kp-press-release/native_sim.conf @@ -0,0 +1 @@ +CONFIG_INPUT=y \ No newline at end of file diff --git a/app/tests/matrix-input/kp-press-release/native_sim.keymap b/app/tests/matrix-input/kp-press-release/native_sim.keymap new file mode 100644 index 00000000..14e82d13 --- /dev/null +++ b/app/tests/matrix-input/kp-press-release/native_sim.keymap @@ -0,0 +1,60 @@ +#include +#include +#include +#include + +/delete-node/ &kscan; + +/ { + physical_layout: physical_layout { + display-name = "Layout"; + compatible = "zmk,physical-layout"; + input = <&mock_matrix_input>; + transform = <&matrix_transform0>; + }; + + chosen { + /delete-property/ zmk,kscan; + + // zmk,matrix-input = &mock_matrix_input; + }; + + matrix_transform0: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <20>; + rows = <5>; + + + map = < + RC(0,0) RC(0,1) + RC(1,0) RC(1,1) + >; + }; + + mock_matrix_input: mock_matrix_input { + compatible = "zmk,input-mock"; + + event-startup-delay = <100>; + event-period = <2000>; + events + = + , + , + , + , + , + ; + exit-after; + }; + + keymap { + compatible = "zmk,keymap"; + + default_layer { + bindings = < + &kp B &kp C + &kp D &kp E + >; + }; + }; +}; diff --git a/app/tests/mod-morph/1-no-morph/native_posix_64.keymap b/app/tests/mod-morph/1-no-morph/native_sim.keymap similarity index 100% rename from app/tests/mod-morph/1-no-morph/native_posix_64.keymap rename to app/tests/mod-morph/1-no-morph/native_sim.keymap diff --git a/app/tests/mod-morph/2a-masked-morph/native_posix_64.keymap b/app/tests/mod-morph/2a-masked-morph/native_sim.keymap similarity index 100% rename from app/tests/mod-morph/2a-masked-morph/native_posix_64.keymap rename to app/tests/mod-morph/2a-masked-morph/native_sim.keymap diff --git a/app/tests/mod-morph/2b-masked-morph-implicit-overwrite/native_posix_64.keymap b/app/tests/mod-morph/2b-masked-morph-implicit-overwrite/native_sim.keymap similarity index 100% rename from app/tests/mod-morph/2b-masked-morph-implicit-overwrite/native_posix_64.keymap rename to app/tests/mod-morph/2b-masked-morph-implicit-overwrite/native_sim.keymap diff --git a/app/tests/mod-morph/2c-masked-morph-and-explicit-mods/native_posix_64.keymap b/app/tests/mod-morph/2c-masked-morph-and-explicit-mods/native_sim.keymap similarity index 100% rename from app/tests/mod-morph/2c-masked-morph-and-explicit-mods/native_posix_64.keymap rename to app/tests/mod-morph/2c-masked-morph-and-explicit-mods/native_sim.keymap diff --git a/app/tests/mod-morph/2d-masked-morph-into-hold-tap-tap/native_posix_64.keymap b/app/tests/mod-morph/2d-masked-morph-into-hold-tap-tap/native_sim.keymap similarity index 100% rename from app/tests/mod-morph/2d-masked-morph-into-hold-tap-tap/native_posix_64.keymap rename to app/tests/mod-morph/2d-masked-morph-into-hold-tap-tap/native_sim.keymap diff --git a/app/tests/mod-morph/2e-masked-morph-into-hold-tap-hold/native_posix_64.keymap b/app/tests/mod-morph/2e-masked-morph-into-hold-tap-hold/native_sim.keymap similarity index 100% rename from app/tests/mod-morph/2e-masked-morph-into-hold-tap-hold/native_posix_64.keymap rename to app/tests/mod-morph/2e-masked-morph-into-hold-tap-hold/native_sim.keymap diff --git a/app/tests/mod-morph/3-unmasked-morph/native_posix_64.keymap b/app/tests/mod-morph/3-unmasked-morph/native_sim.keymap similarity index 100% rename from app/tests/mod-morph/3-unmasked-morph/native_posix_64.keymap rename to app/tests/mod-morph/3-unmasked-morph/native_sim.keymap diff --git a/app/tests/modifiers/explicit/kp-hyper-dn-a-dn-a-up-hyper-up/native_posix_64.keymap b/app/tests/modifiers/explicit/kp-hyper-dn-a-dn-a-up-hyper-up/native_sim.keymap similarity index 100% rename from app/tests/modifiers/explicit/kp-hyper-dn-a-dn-a-up-hyper-up/native_posix_64.keymap rename to app/tests/modifiers/explicit/kp-hyper-dn-a-dn-a-up-hyper-up/native_sim.keymap diff --git a/app/tests/modifiers/explicit/kp-lctl-dn-lctl-dn-lctl-up-lctl-up/native_posix_64.keymap b/app/tests/modifiers/explicit/kp-lctl-dn-lctl-dn-lctl-up-lctl-up/native_sim.keymap similarity index 100% rename from app/tests/modifiers/explicit/kp-lctl-dn-lctl-dn-lctl-up-lctl-up/native_posix_64.keymap rename to app/tests/modifiers/explicit/kp-lctl-dn-lctl-dn-lctl-up-lctl-up/native_sim.keymap diff --git a/app/tests/modifiers/explicit/kp-lctl-dn-lctl-up/native_posix_64.keymap b/app/tests/modifiers/explicit/kp-lctl-dn-lctl-up/native_sim.keymap similarity index 100% rename from app/tests/modifiers/explicit/kp-lctl-dn-lctl-up/native_posix_64.keymap rename to app/tests/modifiers/explicit/kp-lctl-dn-lctl-up/native_sim.keymap diff --git a/app/tests/modifiers/explicit/kp-lctl-dn-lsft-dn-lctl-up-lsft-up/native_posix_64.keymap b/app/tests/modifiers/explicit/kp-lctl-dn-lsft-dn-lctl-up-lsft-up/native_sim.keymap similarity index 100% rename from app/tests/modifiers/explicit/kp-lctl-dn-lsft-dn-lctl-up-lsft-up/native_posix_64.keymap rename to app/tests/modifiers/explicit/kp-lctl-dn-lsft-dn-lctl-up-lsft-up/native_sim.keymap diff --git a/app/tests/modifiers/explicit/kp-lctl-dn-lsft-dn-lsft-up-lctl-up/native_posix_64.keymap b/app/tests/modifiers/explicit/kp-lctl-dn-lsft-dn-lsft-up-lctl-up/native_sim.keymap similarity index 100% rename from app/tests/modifiers/explicit/kp-lctl-dn-lsft-dn-lsft-up-lctl-up/native_posix_64.keymap rename to app/tests/modifiers/explicit/kp-lctl-dn-lsft-dn-lsft-up-lctl-up/native_sim.keymap diff --git a/app/tests/modifiers/implicit/kp-mod1-dn-mod2-dn-mod1-up-mod2-up/native_posix_64.keymap b/app/tests/modifiers/implicit/kp-mod1-dn-mod2-dn-mod1-up-mod2-up/native_sim.keymap similarity index 100% rename from app/tests/modifiers/implicit/kp-mod1-dn-mod2-dn-mod1-up-mod2-up/native_posix_64.keymap rename to app/tests/modifiers/implicit/kp-mod1-dn-mod2-dn-mod1-up-mod2-up/native_sim.keymap diff --git a/app/tests/modifiers/implicit/kp-mod1-dn-mod2-dn-mod2-up-mod1-up/native_posix_64.keymap b/app/tests/modifiers/implicit/kp-mod1-dn-mod2-dn-mod2-up-mod1-up/native_sim.keymap similarity index 100% rename from app/tests/modifiers/implicit/kp-mod1-dn-mod2-dn-mod2-up-mod1-up/native_posix_64.keymap rename to app/tests/modifiers/implicit/kp-mod1-dn-mod2-dn-mod2-up-mod1-up/native_sim.keymap diff --git a/app/tests/modifiers/implicit/kp-rolling-symbols-same-key/native_posix_64.keymap b/app/tests/modifiers/implicit/kp-rolling-symbols-same-key/native_sim.keymap similarity index 100% rename from app/tests/modifiers/implicit/kp-rolling-symbols-same-key/native_posix_64.keymap rename to app/tests/modifiers/implicit/kp-rolling-symbols-same-key/native_sim.keymap diff --git a/app/tests/modifiers/mixed/kp-lctl-dn-mod-dn-lctl-up-mod-up/native_posix_64.keymap b/app/tests/modifiers/mixed/kp-lctl-dn-mod-dn-lctl-up-mod-up/native_sim.keymap similarity index 100% rename from app/tests/modifiers/mixed/kp-lctl-dn-mod-dn-lctl-up-mod-up/native_posix_64.keymap rename to app/tests/modifiers/mixed/kp-lctl-dn-mod-dn-lctl-up-mod-up/native_sim.keymap diff --git a/app/tests/modifiers/mixed/kp-lctl-dn-mod-dn-mod-up-lctl-up/native_posix_64.keymap b/app/tests/modifiers/mixed/kp-lctl-dn-mod-dn-mod-up-lctl-up/native_sim.keymap similarity index 100% rename from app/tests/modifiers/mixed/kp-lctl-dn-mod-dn-mod-up-lctl-up/native_posix_64.keymap rename to app/tests/modifiers/mixed/kp-lctl-dn-mod-dn-mod-up-lctl-up/native_sim.keymap diff --git a/app/tests/momentary-layer/1-normal/native_posix_64.keymap b/app/tests/momentary-layer/1-normal/native_sim.keymap similarity index 100% rename from app/tests/momentary-layer/1-normal/native_posix_64.keymap rename to app/tests/momentary-layer/1-normal/native_sim.keymap diff --git a/app/tests/momentary-layer/2-early-key-release/native_posix_64.keymap b/app/tests/momentary-layer/2-early-key-release/native_sim.keymap similarity index 100% rename from app/tests/momentary-layer/2-early-key-release/native_posix_64.keymap rename to app/tests/momentary-layer/2-early-key-release/native_sim.keymap diff --git a/app/tests/momentary-layer/3-covered/native_posix_64.keymap b/app/tests/momentary-layer/3-covered/native_sim.keymap similarity index 100% rename from app/tests/momentary-layer/3-covered/native_posix_64.keymap rename to app/tests/momentary-layer/3-covered/native_sim.keymap diff --git a/app/tests/momentary-layer/4-nested/native_posix_64.keymap b/app/tests/momentary-layer/4-nested/native_sim.keymap similarity index 100% rename from app/tests/momentary-layer/4-nested/native_posix_64.keymap rename to app/tests/momentary-layer/4-nested/native_sim.keymap diff --git a/app/tests/momentary-layer/5-nested-early-key-release/native_posix_64.keymap b/app/tests/momentary-layer/5-nested-early-key-release/native_sim.keymap similarity index 100% rename from app/tests/momentary-layer/5-nested-early-key-release/native_posix_64.keymap rename to app/tests/momentary-layer/5-nested-early-key-release/native_sim.keymap diff --git a/app/tests/mouse-keys/mkp/native_posix.keymap b/app/tests/mouse-keys/mkp/native_posix.keymap deleted file mode 100644 index 8e3071d4..00000000 --- a/app/tests/mouse-keys/mkp/native_posix.keymap +++ /dev/null @@ -1,27 +0,0 @@ -#include -#include -#include -#include - -/ { - keymap { - compatible = "zmk,keymap"; - - default_layer { - bindings = < - &mkp LCLK &none - &none &mkp RCLK - >; - }; - }; -}; - - -&kscan { - events = < - ZMK_MOCK_PRESS (0,0,100) - ZMK_MOCK_PRESS (1,1,100) - ZMK_MOCK_RELEASE(1,1, 10) - ZMK_MOCK_RELEASE(0,0, 10) - >; -}; diff --git a/app/tests/none/layered/native_posix_64.keymap b/app/tests/none/layered/native_sim.keymap similarity index 100% rename from app/tests/none/layered/native_posix_64.keymap rename to app/tests/none/layered/native_sim.keymap diff --git a/app/tests/none/normal/native_posix.keymap b/app/tests/none/normal/native_sim.keymap similarity index 100% rename from app/tests/none/normal/native_posix.keymap rename to app/tests/none/normal/native_sim.keymap diff --git a/app/tests/mouse-keys/mkp/events.patterns b/app/tests/pointing/mkp/events.patterns similarity index 100% rename from app/tests/mouse-keys/mkp/events.patterns rename to app/tests/pointing/mkp/events.patterns diff --git a/app/tests/mouse-keys/mkp/keycode_events.snapshot b/app/tests/pointing/mkp/keycode_events.snapshot similarity index 100% rename from app/tests/mouse-keys/mkp/keycode_events.snapshot rename to app/tests/pointing/mkp/keycode_events.snapshot diff --git a/app/boards/native_posix.conf b/app/tests/pointing/mkp/native_sim.conf similarity index 66% rename from app/boards/native_posix.conf rename to app/tests/pointing/mkp/native_sim.conf index c3d0260e..fa514727 100644 --- a/app/boards/native_posix.conf +++ b/app/tests/pointing/mkp/native_sim.conf @@ -3,5 +3,4 @@ CONFIG_ZMK_BLE=n CONFIG_LOG=y CONFIG_LOG_BACKEND_SHOW_COLOR=n CONFIG_ZMK_LOG_LEVEL_DBG=y -CONFIG_DEBUG=y -CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000 +CONFIG_ZMK_POINTING=y diff --git a/app/tests/mouse-keys/mkp/native_posix_64.keymap b/app/tests/pointing/mkp/native_sim.keymap similarity index 92% rename from app/tests/mouse-keys/mkp/native_posix_64.keymap rename to app/tests/pointing/mkp/native_sim.keymap index 8e3071d4..cec0b6e1 100644 --- a/app/tests/mouse-keys/mkp/native_posix_64.keymap +++ b/app/tests/pointing/mkp/native_sim.keymap @@ -1,7 +1,7 @@ #include #include #include -#include +#include / { keymap { diff --git a/app/tests/pointing/mouse-move/move_diagonal/events.patterns b/app/tests/pointing/mouse-move/move_diagonal/events.patterns new file mode 100644 index 00000000..812126fb --- /dev/null +++ b/app/tests/pointing/mouse-move/move_diagonal/events.patterns @@ -0,0 +1 @@ +s/.*hid_mouse_//p \ No newline at end of file diff --git a/app/tests/pointing/mouse-move/move_diagonal/keycode_events.snapshot b/app/tests/pointing/mouse-move/move_diagonal/keycode_events.snapshot new file mode 100644 index 00000000..6b9fa770 --- /dev/null +++ b/app/tests/pointing/mouse-move/move_diagonal/keycode_events.snapshot @@ -0,0 +1,18 @@ +movement_set: Mouse movement set to -1/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -2/-2 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -2/-2 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -3/-2 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -3/-3 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to 0/-3 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 diff --git a/app/boards/nrf52_bsim.conf b/app/tests/pointing/mouse-move/move_diagonal/native_sim.conf similarity index 57% rename from app/boards/nrf52_bsim.conf rename to app/tests/pointing/mouse-move/move_diagonal/native_sim.conf index 526f3bc7..fa514727 100644 --- a/app/boards/nrf52_bsim.conf +++ b/app/tests/pointing/mouse-move/move_diagonal/native_sim.conf @@ -1,4 +1,6 @@ -CONFIG_ZMK_BLE=y +CONFIG_GPIO=n +CONFIG_ZMK_BLE=n CONFIG_LOG=y CONFIG_LOG_BACKEND_SHOW_COLOR=n CONFIG_ZMK_LOG_LEVEL_DBG=y +CONFIG_ZMK_POINTING=y diff --git a/app/tests/pointing/mouse-move/move_diagonal/native_sim.keymap b/app/tests/pointing/mouse-move/move_diagonal/native_sim.keymap new file mode 100644 index 00000000..8fa0781d --- /dev/null +++ b/app/tests/pointing/mouse-move/move_diagonal/native_sim.keymap @@ -0,0 +1,29 @@ +#include +#include +#include +#include +#include + +/ { + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; + + default_layer { + bindings = < + &mmv MOVE_LEFT &mmv MOVE_UP + &none &none + >; + }; + }; +}; + + +&kscan { + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,100) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,1,10) + >; +}; \ No newline at end of file diff --git a/app/tests/pointing/mouse-move/move_x/events.patterns b/app/tests/pointing/mouse-move/move_x/events.patterns new file mode 100644 index 00000000..812126fb --- /dev/null +++ b/app/tests/pointing/mouse-move/move_x/events.patterns @@ -0,0 +1 @@ +s/.*hid_mouse_//p \ No newline at end of file diff --git a/app/tests/pointing/mouse-move/move_x/keycode_events.snapshot b/app/tests/pointing/mouse-move/move_x/keycode_events.snapshot new file mode 100644 index 00000000..678f71c9 --- /dev/null +++ b/app/tests/pointing/mouse-move/move_x/keycode_events.snapshot @@ -0,0 +1,24 @@ +movement_set: Mouse movement set to -1/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -2/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -2/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -3/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to 1/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to 2/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to 2/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to 3/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 diff --git a/app/tests/pointing/mouse-move/move_x/native_sim.conf b/app/tests/pointing/mouse-move/move_x/native_sim.conf new file mode 100644 index 00000000..fa514727 --- /dev/null +++ b/app/tests/pointing/mouse-move/move_x/native_sim.conf @@ -0,0 +1,6 @@ +CONFIG_GPIO=n +CONFIG_ZMK_BLE=n +CONFIG_LOG=y +CONFIG_LOG_BACKEND_SHOW_COLOR=n +CONFIG_ZMK_LOG_LEVEL_DBG=y +CONFIG_ZMK_POINTING=y diff --git a/app/tests/pointing/mouse-move/move_x/native_sim.keymap b/app/tests/pointing/mouse-move/move_x/native_sim.keymap new file mode 100644 index 00000000..ac367238 --- /dev/null +++ b/app/tests/pointing/mouse-move/move_x/native_sim.keymap @@ -0,0 +1,29 @@ +#include +#include +#include +#include +#include + +/ { + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; + + default_layer { + bindings = < + &mmv MOVE_LEFT &mmv MOVE_RIGHT + &none &none + >; + }; + }; +}; + + +&kscan { + events = < + ZMK_MOCK_PRESS(0,0,100) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,1,100) + ZMK_MOCK_RELEASE(0,1,10) + >; +}; \ No newline at end of file diff --git a/app/tests/pointing/mouse-move/move_y/events.patterns b/app/tests/pointing/mouse-move/move_y/events.patterns new file mode 100644 index 00000000..812126fb --- /dev/null +++ b/app/tests/pointing/mouse-move/move_y/events.patterns @@ -0,0 +1 @@ +s/.*hid_mouse_//p \ No newline at end of file diff --git a/app/tests/pointing/mouse-move/move_y/keycode_events.snapshot b/app/tests/pointing/mouse-move/move_y/keycode_events.snapshot new file mode 100644 index 00000000..d20154d5 --- /dev/null +++ b/app/tests/pointing/mouse-move/move_y/keycode_events.snapshot @@ -0,0 +1,24 @@ +movement_set: Mouse movement set to 0/-1 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to 0/-2 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to 0/-2 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to 0/-3 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to 0/1 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to 0/2 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to 0/2 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to 0/3 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 diff --git a/app/tests/pointing/mouse-move/move_y/native_sim.conf b/app/tests/pointing/mouse-move/move_y/native_sim.conf new file mode 100644 index 00000000..fa514727 --- /dev/null +++ b/app/tests/pointing/mouse-move/move_y/native_sim.conf @@ -0,0 +1,6 @@ +CONFIG_GPIO=n +CONFIG_ZMK_BLE=n +CONFIG_LOG=y +CONFIG_LOG_BACKEND_SHOW_COLOR=n +CONFIG_ZMK_LOG_LEVEL_DBG=y +CONFIG_ZMK_POINTING=y diff --git a/app/tests/pointing/mouse-move/move_y/native_sim.keymap b/app/tests/pointing/mouse-move/move_y/native_sim.keymap new file mode 100644 index 00000000..12d5725c --- /dev/null +++ b/app/tests/pointing/mouse-move/move_y/native_sim.keymap @@ -0,0 +1,29 @@ +#include +#include +#include +#include +#include + +/ { + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; + + default_layer { + bindings = < + &mmv MOVE_UP &mmv MOVE_DOWN + &none &none + >; + }; + }; +}; + + +&kscan { + events = < + ZMK_MOCK_PRESS(0,0,100) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,1,100) + ZMK_MOCK_RELEASE(0,1,10) + >; +}; \ No newline at end of file diff --git a/app/tests/pointing/mouse-move/processors/behaviors_basic/events.patterns b/app/tests/pointing/mouse-move/processors/behaviors_basic/events.patterns new file mode 100644 index 00000000..7374badf --- /dev/null +++ b/app/tests/pointing/mouse-move/processors/behaviors_basic/events.patterns @@ -0,0 +1,2 @@ +s/.*hid_mouse_//p +s/.*hid_listener_keycode_//p \ No newline at end of file diff --git a/app/tests/pointing/mouse-move/processors/behaviors_basic/keycode_events.snapshot b/app/tests/pointing/mouse-move/processors/behaviors_basic/keycode_events.snapshot new file mode 100644 index 00000000..7ad856db --- /dev/null +++ b/app/tests/pointing/mouse-move/processors/behaviors_basic/keycode_events.snapshot @@ -0,0 +1,6 @@ +pressed: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 +released: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 +pressed: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 +released: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 +pressed: usage_page 0x07 keycode 0x06 implicit_mods 0x00 explicit_mods 0x00 +released: usage_page 0x07 keycode 0x06 implicit_mods 0x00 explicit_mods 0x00 diff --git a/app/tests/pointing/mouse-move/processors/behaviors_basic/native_sim.conf b/app/tests/pointing/mouse-move/processors/behaviors_basic/native_sim.conf new file mode 100644 index 00000000..fa514727 --- /dev/null +++ b/app/tests/pointing/mouse-move/processors/behaviors_basic/native_sim.conf @@ -0,0 +1,6 @@ +CONFIG_GPIO=n +CONFIG_ZMK_BLE=n +CONFIG_LOG=y +CONFIG_LOG_BACKEND_SHOW_COLOR=n +CONFIG_ZMK_LOG_LEVEL_DBG=y +CONFIG_ZMK_POINTING=y diff --git a/app/tests/pointing/mouse-move/processors/behaviors_basic/native_sim.keymap b/app/tests/pointing/mouse-move/processors/behaviors_basic/native_sim.keymap new file mode 100644 index 00000000..e5079d33 --- /dev/null +++ b/app/tests/pointing/mouse-move/processors/behaviors_basic/native_sim.keymap @@ -0,0 +1,44 @@ + +#include +#include + +#include +#include +#include +#include +#include + + +&zip_button_behaviors { + bindings = <&kp A &kp B &kp C>; +}; + +&mkp_input_listener { + input-processors = <&zip_button_behaviors>; +}; + +/ { + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; + + default_layer { + bindings = < + &mkp LCLK &mkp RCLK + &mkp MCLK &none + >; + }; + }; +}; + + +&kscan { + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) + >; +}; \ No newline at end of file diff --git a/app/tests/pointing/mouse-move/processors/behaviors_hold_tap/events.patterns b/app/tests/pointing/mouse-move/processors/behaviors_hold_tap/events.patterns new file mode 100644 index 00000000..7374badf --- /dev/null +++ b/app/tests/pointing/mouse-move/processors/behaviors_hold_tap/events.patterns @@ -0,0 +1,2 @@ +s/.*hid_mouse_//p +s/.*hid_listener_keycode_//p \ No newline at end of file diff --git a/app/tests/pointing/mouse-move/processors/behaviors_hold_tap/keycode_events.snapshot b/app/tests/pointing/mouse-move/processors/behaviors_hold_tap/keycode_events.snapshot new file mode 100644 index 00000000..0712fa12 --- /dev/null +++ b/app/tests/pointing/mouse-move/processors/behaviors_hold_tap/keycode_events.snapshot @@ -0,0 +1,16 @@ +pressed: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 +released: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 +pressed: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 +released: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 +pressed: usage_page 0x07 keycode 0x06 implicit_mods 0x00 explicit_mods 0x00 +released: usage_page 0x07 keycode 0x06 implicit_mods 0x00 explicit_mods 0x00 +pressed: usage_page 0x07 keycode 0xE0 implicit_mods 0x00 explicit_mods 0x00 +released: usage_page 0x07 keycode 0xE0 implicit_mods 0x00 explicit_mods 0x00 +pressed: usage_page 0x07 keycode 0xE1 implicit_mods 0x00 explicit_mods 0x00 +released: usage_page 0x07 keycode 0xE1 implicit_mods 0x00 explicit_mods 0x00 +pressed: usage_page 0x07 keycode 0xE2 implicit_mods 0x00 explicit_mods 0x00 +released: usage_page 0x07 keycode 0xE2 implicit_mods 0x00 explicit_mods 0x00 +pressed: usage_page 0x07 keycode 0xE0 implicit_mods 0x00 explicit_mods 0x00 +pressed: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 +released: usage_page 0x07 keycode 0xE0 implicit_mods 0x00 explicit_mods 0x00 +released: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 diff --git a/app/tests/pointing/mouse-move/processors/behaviors_hold_tap/native_sim.conf b/app/tests/pointing/mouse-move/processors/behaviors_hold_tap/native_sim.conf new file mode 100644 index 00000000..fa514727 --- /dev/null +++ b/app/tests/pointing/mouse-move/processors/behaviors_hold_tap/native_sim.conf @@ -0,0 +1,6 @@ +CONFIG_GPIO=n +CONFIG_ZMK_BLE=n +CONFIG_LOG=y +CONFIG_LOG_BACKEND_SHOW_COLOR=n +CONFIG_ZMK_LOG_LEVEL_DBG=y +CONFIG_ZMK_POINTING=y diff --git a/app/tests/pointing/mouse-move/processors/behaviors_hold_tap/native_sim.keymap b/app/tests/pointing/mouse-move/processors/behaviors_hold_tap/native_sim.keymap new file mode 100644 index 00000000..092a20a0 --- /dev/null +++ b/app/tests/pointing/mouse-move/processors/behaviors_hold_tap/native_sim.keymap @@ -0,0 +1,58 @@ + +#include +#include + +#include +#include +#include +#include +#include + + +&zip_button_behaviors { + bindings = <&mt LCTL A &mt LSHFT B &mt LALT C>; +}; + +&mkp_input_listener { + input-processors = <&zip_button_behaviors>; +}; + +/ { + combos { + compatible = "zmk,combos"; + }; + + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; + + default_layer { + bindings = < + &mkp LCLK &mkp RCLK + &mkp MCLK &none + >; + }; + }; +}; + + +&kscan { + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_PRESS(0,0,500) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,1,500) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_PRESS(1,0,500) + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_RELEASE(0,0,10) + >; +}; \ No newline at end of file diff --git a/app/tests/pointing/mouse-move/processors/move_diagonal_scaling/events.patterns b/app/tests/pointing/mouse-move/processors/move_diagonal_scaling/events.patterns new file mode 100644 index 00000000..812126fb --- /dev/null +++ b/app/tests/pointing/mouse-move/processors/move_diagonal_scaling/events.patterns @@ -0,0 +1 @@ +s/.*hid_mouse_//p \ No newline at end of file diff --git a/app/tests/pointing/mouse-move/processors/move_diagonal_scaling/keycode_events.snapshot b/app/tests/pointing/mouse-move/processors/move_diagonal_scaling/keycode_events.snapshot new file mode 100644 index 00000000..77ffd6f8 --- /dev/null +++ b/app/tests/pointing/mouse-move/processors/move_diagonal_scaling/keycode_events.snapshot @@ -0,0 +1,18 @@ +movement_set: Mouse movement set to -1/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -4/-3 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -3/-3 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -5/-4 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -5/-5 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to 0/-5 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 diff --git a/app/tests/pointing/mouse-move/processors/move_diagonal_scaling/native_sim.conf b/app/tests/pointing/mouse-move/processors/move_diagonal_scaling/native_sim.conf new file mode 100644 index 00000000..fa514727 --- /dev/null +++ b/app/tests/pointing/mouse-move/processors/move_diagonal_scaling/native_sim.conf @@ -0,0 +1,6 @@ +CONFIG_GPIO=n +CONFIG_ZMK_BLE=n +CONFIG_LOG=y +CONFIG_LOG_BACKEND_SHOW_COLOR=n +CONFIG_ZMK_LOG_LEVEL_DBG=y +CONFIG_ZMK_POINTING=y diff --git a/app/tests/pointing/mouse-move/processors/move_diagonal_scaling/native_sim.keymap b/app/tests/pointing/mouse-move/processors/move_diagonal_scaling/native_sim.keymap new file mode 100644 index 00000000..7e4b71ae --- /dev/null +++ b/app/tests/pointing/mouse-move/processors/move_diagonal_scaling/native_sim.keymap @@ -0,0 +1,37 @@ + +#include +#include + +#include +#include +#include +#include +#include + +&mmv_input_listener { + input-processors = <&zip_xy_scaler 5 3>; +}; + +/ { + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; + + default_layer { + bindings = < + &mmv MOVE_LEFT &mmv MOVE_UP + &none &none + >; + }; + }; +}; + + +&kscan { + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,100) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,1,10) + >; +}; \ No newline at end of file diff --git a/app/tests/pointing/mouse-move/processors/move_diagonal_xy_invert/events.patterns b/app/tests/pointing/mouse-move/processors/move_diagonal_xy_invert/events.patterns new file mode 100644 index 00000000..812126fb --- /dev/null +++ b/app/tests/pointing/mouse-move/processors/move_diagonal_xy_invert/events.patterns @@ -0,0 +1 @@ +s/.*hid_mouse_//p \ No newline at end of file diff --git a/app/tests/pointing/mouse-move/processors/move_diagonal_xy_invert/keycode_events.snapshot b/app/tests/pointing/mouse-move/processors/move_diagonal_xy_invert/keycode_events.snapshot new file mode 100644 index 00000000..33bb267b --- /dev/null +++ b/app/tests/pointing/mouse-move/processors/move_diagonal_xy_invert/keycode_events.snapshot @@ -0,0 +1,18 @@ +movement_set: Mouse movement set to 1/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to 2/2 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to 2/2 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to 3/2 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to 3/3 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to 0/3 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 diff --git a/app/tests/pointing/mouse-move/processors/move_diagonal_xy_invert/native_sim.conf b/app/tests/pointing/mouse-move/processors/move_diagonal_xy_invert/native_sim.conf new file mode 100644 index 00000000..fa514727 --- /dev/null +++ b/app/tests/pointing/mouse-move/processors/move_diagonal_xy_invert/native_sim.conf @@ -0,0 +1,6 @@ +CONFIG_GPIO=n +CONFIG_ZMK_BLE=n +CONFIG_LOG=y +CONFIG_LOG_BACKEND_SHOW_COLOR=n +CONFIG_ZMK_LOG_LEVEL_DBG=y +CONFIG_ZMK_POINTING=y diff --git a/app/tests/pointing/mouse-move/processors/move_diagonal_xy_invert/native_sim.keymap b/app/tests/pointing/mouse-move/processors/move_diagonal_xy_invert/native_sim.keymap new file mode 100644 index 00000000..bc74135c --- /dev/null +++ b/app/tests/pointing/mouse-move/processors/move_diagonal_xy_invert/native_sim.keymap @@ -0,0 +1,34 @@ +#include +#include +#include +#include +#include +#include + +&mmv_input_listener { + input-processors = <&zip_xy_transform (INPUT_TRANSFORM_X_INVERT | INPUT_TRANSFORM_Y_INVERT)>; +}; + +/ { + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; + + default_layer { + bindings = < + &mmv MOVE_LEFT &mmv MOVE_UP + &none &none + >; + }; + }; +}; + + +&kscan { + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,100) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,1,10) + >; +}; \ No newline at end of file diff --git a/app/tests/pointing/mouse-move/processors/move_diagonal_xy_swap/events.patterns b/app/tests/pointing/mouse-move/processors/move_diagonal_xy_swap/events.patterns new file mode 100644 index 00000000..812126fb --- /dev/null +++ b/app/tests/pointing/mouse-move/processors/move_diagonal_xy_swap/events.patterns @@ -0,0 +1 @@ +s/.*hid_mouse_//p \ No newline at end of file diff --git a/app/tests/pointing/mouse-move/processors/move_diagonal_xy_swap/keycode_events.snapshot b/app/tests/pointing/mouse-move/processors/move_diagonal_xy_swap/keycode_events.snapshot new file mode 100644 index 00000000..40daa64f --- /dev/null +++ b/app/tests/pointing/mouse-move/processors/move_diagonal_xy_swap/keycode_events.snapshot @@ -0,0 +1,18 @@ +movement_set: Mouse movement set to 0/-1 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -2/-2 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -2/-2 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -2/-3 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -3/-3 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -3/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 diff --git a/app/tests/pointing/mouse-move/processors/move_diagonal_xy_swap/native_sim.conf b/app/tests/pointing/mouse-move/processors/move_diagonal_xy_swap/native_sim.conf new file mode 100644 index 00000000..fa514727 --- /dev/null +++ b/app/tests/pointing/mouse-move/processors/move_diagonal_xy_swap/native_sim.conf @@ -0,0 +1,6 @@ +CONFIG_GPIO=n +CONFIG_ZMK_BLE=n +CONFIG_LOG=y +CONFIG_LOG_BACKEND_SHOW_COLOR=n +CONFIG_ZMK_LOG_LEVEL_DBG=y +CONFIG_ZMK_POINTING=y diff --git a/app/tests/pointing/mouse-move/processors/move_diagonal_xy_swap/native_sim.keymap b/app/tests/pointing/mouse-move/processors/move_diagonal_xy_swap/native_sim.keymap new file mode 100644 index 00000000..e1d2d600 --- /dev/null +++ b/app/tests/pointing/mouse-move/processors/move_diagonal_xy_swap/native_sim.keymap @@ -0,0 +1,33 @@ +#include +#include +#include +#include +#include + +&mmv_input_listener { + input-processors = <&zip_xy_swap_mapper>; +}; + +/ { + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; + + default_layer { + bindings = < + &mmv MOVE_LEFT &mmv MOVE_UP + &none &none + >; + }; + }; +}; + + +&kscan { + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,100) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,1,10) + >; +}; \ No newline at end of file diff --git a/app/tests/pointing/mouse-move/processors/temp_layer/1-deactivate-layer-timeout/events.patterns b/app/tests/pointing/mouse-move/processors/temp_layer/1-deactivate-layer-timeout/events.patterns new file mode 100644 index 00000000..e9f2583e --- /dev/null +++ b/app/tests/pointing/mouse-move/processors/temp_layer/1-deactivate-layer-timeout/events.patterns @@ -0,0 +1,5 @@ +s/.*hid_mouse_//p +s/.*set_layer_state: //p +s/.*handle_state_changed_dispatcher: //p +s/.*handle_position_state_changed: //p +s/.*handle_keycode_state_changed: //p diff --git a/app/tests/pointing/mouse-move/processors/temp_layer/1-deactivate-layer-timeout/keycode_events.snapshot b/app/tests/pointing/mouse-move/processors/temp_layer/1-deactivate-layer-timeout/keycode_events.snapshot new file mode 100644 index 00000000..220da205 --- /dev/null +++ b/app/tests/pointing/mouse-move/processors/temp_layer/1-deactivate-layer-timeout/keycode_events.snapshot @@ -0,0 +1,16 @@ +layer_changed: layer 1 state 1 locked 0 +Dispatching handle_layer_state_changed +movement_set: Mouse movement set to -1/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -2/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -2/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -3/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +layer_changed: layer 1 state 0 locked 0 +Dispatching handle_layer_state_changed diff --git a/app/tests/pointing/mouse-move/processors/temp_layer/1-deactivate-layer-timeout/native_sim.conf b/app/tests/pointing/mouse-move/processors/temp_layer/1-deactivate-layer-timeout/native_sim.conf new file mode 100644 index 00000000..fa514727 --- /dev/null +++ b/app/tests/pointing/mouse-move/processors/temp_layer/1-deactivate-layer-timeout/native_sim.conf @@ -0,0 +1,6 @@ +CONFIG_GPIO=n +CONFIG_ZMK_BLE=n +CONFIG_LOG=y +CONFIG_LOG_BACKEND_SHOW_COLOR=n +CONFIG_ZMK_LOG_LEVEL_DBG=y +CONFIG_ZMK_POINTING=y diff --git a/app/tests/pointing/mouse-move/processors/temp_layer/1-deactivate-layer-timeout/native_sim.keymap b/app/tests/pointing/mouse-move/processors/temp_layer/1-deactivate-layer-timeout/native_sim.keymap new file mode 100644 index 00000000..2088e5ce --- /dev/null +++ b/app/tests/pointing/mouse-move/processors/temp_layer/1-deactivate-layer-timeout/native_sim.keymap @@ -0,0 +1,41 @@ + +#include +#include + +#include +#include +#include +#include +#include + +&mmv_input_listener { + input-processors = <&zip_temp_layer 1 500>; +}; + +/ { + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; + + default_layer { + bindings = < + &mmv MOVE_LEFT &mmv MOVE_UP + &none &none + >; + }; + + mkp_layer { + bindings = <&mkp LCLK &mkp RCLK &trans &trans>; + }; + }; +}; + + +&kscan { + events = < + ZMK_MOCK_PRESS(0,0,100) + ZMK_MOCK_RELEASE(0,0,150) + ZMK_MOCK_PRESS(1,0,200) + ZMK_MOCK_RELEASE(1,0,250) + >; +}; diff --git a/app/tests/pointing/mouse-move/processors/temp_layer/2a-deactivate-layer-position-trigger/events.patterns b/app/tests/pointing/mouse-move/processors/temp_layer/2a-deactivate-layer-position-trigger/events.patterns new file mode 100644 index 00000000..27695039 --- /dev/null +++ b/app/tests/pointing/mouse-move/processors/temp_layer/2a-deactivate-layer-position-trigger/events.patterns @@ -0,0 +1,7 @@ +s/.*hid_mouse_//p +s/.*set_layer_state: //p +s/.*hid_listener_keycode/kp/p +s/.*mo_keymap_binding/mo/p +s/.*handle_state_changed_dispatcher: //p +s/.*handle_position_state_changed: //p +s/.*handle_keycode_state_changed: //p diff --git a/app/tests/pointing/mouse-move/processors/temp_layer/2a-deactivate-layer-position-trigger/keycode_events.snapshot b/app/tests/pointing/mouse-move/processors/temp_layer/2a-deactivate-layer-position-trigger/keycode_events.snapshot new file mode 100644 index 00000000..97ed7672 --- /dev/null +++ b/app/tests/pointing/mouse-move/processors/temp_layer/2a-deactivate-layer-position-trigger/keycode_events.snapshot @@ -0,0 +1,23 @@ +Dispatching handle_position_state_changed +Position excluded, continuing +layer_changed: layer 1 state 1 locked 0 +Dispatching handle_layer_state_changed +movement_set: Mouse movement set to -1/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -2/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -2/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -3/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +Dispatching handle_position_state_changed +Dispatching handle_position_state_changed +Position not excluded, deactivating layer +layer_changed: layer 1 state 0 locked 0 +Dispatching handle_layer_state_changed +Position excluded, continuing +Dispatching handle_position_state_changed diff --git a/app/tests/pointing/mouse-move/processors/temp_layer/2a-deactivate-layer-position-trigger/native_sim.conf b/app/tests/pointing/mouse-move/processors/temp_layer/2a-deactivate-layer-position-trigger/native_sim.conf new file mode 100644 index 00000000..fa514727 --- /dev/null +++ b/app/tests/pointing/mouse-move/processors/temp_layer/2a-deactivate-layer-position-trigger/native_sim.conf @@ -0,0 +1,6 @@ +CONFIG_GPIO=n +CONFIG_ZMK_BLE=n +CONFIG_LOG=y +CONFIG_LOG_BACKEND_SHOW_COLOR=n +CONFIG_ZMK_LOG_LEVEL_DBG=y +CONFIG_ZMK_POINTING=y diff --git a/app/tests/pointing/mouse-move/processors/temp_layer/2a-deactivate-layer-position-trigger/native_sim.keymap b/app/tests/pointing/mouse-move/processors/temp_layer/2a-deactivate-layer-position-trigger/native_sim.keymap new file mode 100644 index 00000000..814d889c --- /dev/null +++ b/app/tests/pointing/mouse-move/processors/temp_layer/2a-deactivate-layer-position-trigger/native_sim.keymap @@ -0,0 +1,46 @@ + +#include +#include + +#include +#include +#include +#include +#include + +&mmv_input_listener { + input-processors = <&auto_mouse_layer 1 0>; +}; + +/ { + auto_mouse_layer: auto_mouse_layer { + compatible = "zmk,input-processor-temp-layer"; + #input-processor-cells = <2>; + excluded-positions = <0>; + }; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; + + default_layer { + bindings = < + &mmv MOVE_LEFT &mmv MOVE_UP + &none &none + >; + }; + + mkp_layer { + bindings = <&mkp LCLK &mkp RCLK &trans &trans>; + }; + }; +}; + + +&kscan { + events = < + ZMK_MOCK_PRESS(0,0,100) + ZMK_MOCK_RELEASE(0,0,150) + ZMK_MOCK_PRESS(1,0,200) + ZMK_MOCK_RELEASE(1,0,250) + >; +}; diff --git a/app/tests/pointing/mouse-move/processors/temp_layer/2b-deactivate-layer-position-not-trigger/events.patterns b/app/tests/pointing/mouse-move/processors/temp_layer/2b-deactivate-layer-position-not-trigger/events.patterns new file mode 100644 index 00000000..27695039 --- /dev/null +++ b/app/tests/pointing/mouse-move/processors/temp_layer/2b-deactivate-layer-position-not-trigger/events.patterns @@ -0,0 +1,7 @@ +s/.*hid_mouse_//p +s/.*set_layer_state: //p +s/.*hid_listener_keycode/kp/p +s/.*mo_keymap_binding/mo/p +s/.*handle_state_changed_dispatcher: //p +s/.*handle_position_state_changed: //p +s/.*handle_keycode_state_changed: //p diff --git a/app/tests/pointing/mouse-move/processors/temp_layer/2b-deactivate-layer-position-not-trigger/keycode_events.snapshot b/app/tests/pointing/mouse-move/processors/temp_layer/2b-deactivate-layer-position-not-trigger/keycode_events.snapshot new file mode 100644 index 00000000..214b8fea --- /dev/null +++ b/app/tests/pointing/mouse-move/processors/temp_layer/2b-deactivate-layer-position-not-trigger/keycode_events.snapshot @@ -0,0 +1,29 @@ +Dispatching handle_position_state_changed +Position excluded, continuing +layer_changed: layer 1 state 1 locked 0 +Dispatching handle_layer_state_changed +movement_set: Mouse movement set to -1/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -2/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -2/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -3/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +Dispatching handle_position_state_changed +Dispatching handle_position_state_changed +Position excluded, continuing +button_press: Button 0 count 1 +button_press: Mouse buttons set to 0x01 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +Dispatching handle_position_state_changed +button_release: Button 0 count: 0 +button_release: Button 0 released +button_release: Mouse buttons set to 0x00 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 diff --git a/app/tests/pointing/mouse-move/processors/temp_layer/2b-deactivate-layer-position-not-trigger/native_sim.conf b/app/tests/pointing/mouse-move/processors/temp_layer/2b-deactivate-layer-position-not-trigger/native_sim.conf new file mode 100644 index 00000000..fa514727 --- /dev/null +++ b/app/tests/pointing/mouse-move/processors/temp_layer/2b-deactivate-layer-position-not-trigger/native_sim.conf @@ -0,0 +1,6 @@ +CONFIG_GPIO=n +CONFIG_ZMK_BLE=n +CONFIG_LOG=y +CONFIG_LOG_BACKEND_SHOW_COLOR=n +CONFIG_ZMK_LOG_LEVEL_DBG=y +CONFIG_ZMK_POINTING=y diff --git a/app/tests/pointing/mouse-move/processors/temp_layer/2b-deactivate-layer-position-not-trigger/native_sim.keymap b/app/tests/pointing/mouse-move/processors/temp_layer/2b-deactivate-layer-position-not-trigger/native_sim.keymap new file mode 100644 index 00000000..73ff0463 --- /dev/null +++ b/app/tests/pointing/mouse-move/processors/temp_layer/2b-deactivate-layer-position-not-trigger/native_sim.keymap @@ -0,0 +1,46 @@ + +#include +#include + +#include +#include +#include +#include +#include + +&mmv_input_listener { + input-processors = <&auto_mouse_layer 1 0>; +}; + +/ { + auto_mouse_layer: auto_mouse_layer { + compatible = "zmk,input-processor-temp-layer"; + #input-processor-cells = <2>; + excluded-positions = <0>; + }; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; + + default_layer { + bindings = < + &mmv MOVE_LEFT &mmv MOVE_UP + &none &none + >; + }; + + mkp_layer { + bindings = <&mkp LCLK &mkp RCLK &trans &trans>; + }; + }; +}; + + +&kscan { + events = < + ZMK_MOCK_PRESS(0,0,100) + ZMK_MOCK_RELEASE(0,0,150) + ZMK_MOCK_PRESS(0,0,200) + ZMK_MOCK_RELEASE(0,0,250) + >; +}; diff --git a/app/tests/pointing/mouse-move/processors/temp_layer/3-require-prior-idle-ms/events.patterns b/app/tests/pointing/mouse-move/processors/temp_layer/3-require-prior-idle-ms/events.patterns new file mode 100644 index 00000000..ae24cce0 --- /dev/null +++ b/app/tests/pointing/mouse-move/processors/temp_layer/3-require-prior-idle-ms/events.patterns @@ -0,0 +1,6 @@ +s/.*hid_mouse_//p +s/.*set_layer_state: //p +s/.*hid_listener_keycode/kp/p +s/.*handle_state_changed_dispatcher: //p +s/.*handle_position_state_changed: //p +s/.*handle_keycode_state_changed: //p diff --git a/app/tests/pointing/mouse-move/processors/temp_layer/3-require-prior-idle-ms/keycode_events.snapshot b/app/tests/pointing/mouse-move/processors/temp_layer/3-require-prior-idle-ms/keycode_events.snapshot new file mode 100644 index 00000000..53555472 --- /dev/null +++ b/app/tests/pointing/mouse-move/processors/temp_layer/3-require-prior-idle-ms/keycode_events.snapshot @@ -0,0 +1,150 @@ +Dispatching handle_keycode_state_changed +Setting last_tapped_timestamp to: 11 +kp_pressed: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 +Dispatching handle_keycode_state_changed +kp_released: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 +movement_set: Mouse movement set to -1/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -2/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -2/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -3/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -3/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -4/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -4/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -1/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +layer_changed: layer 1 state 1 locked 0 +Dispatching handle_layer_state_changed +movement_set: Mouse movement set to -2/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -2/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -3/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -3/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -4/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -4/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -5/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -5/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -6/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -7/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -7/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -8/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -8/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -8/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -10/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -9/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -10/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -10/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -9/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -10/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -9/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -10/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -10/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -9/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -10/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -9/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -10/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -10/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -9/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -10/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -9/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -10/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -10/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -9/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -10/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -9/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -10/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -10/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -9/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +layer_changed: layer 1 state 0 locked 0 +Dispatching handle_layer_state_changed diff --git a/app/tests/pointing/mouse-move/processors/temp_layer/3-require-prior-idle-ms/native_sim.conf b/app/tests/pointing/mouse-move/processors/temp_layer/3-require-prior-idle-ms/native_sim.conf new file mode 100644 index 00000000..fa514727 --- /dev/null +++ b/app/tests/pointing/mouse-move/processors/temp_layer/3-require-prior-idle-ms/native_sim.conf @@ -0,0 +1,6 @@ +CONFIG_GPIO=n +CONFIG_ZMK_BLE=n +CONFIG_LOG=y +CONFIG_LOG_BACKEND_SHOW_COLOR=n +CONFIG_ZMK_LOG_LEVEL_DBG=y +CONFIG_ZMK_POINTING=y diff --git a/app/tests/pointing/mouse-move/processors/temp_layer/3-require-prior-idle-ms/native_sim.keymap b/app/tests/pointing/mouse-move/processors/temp_layer/3-require-prior-idle-ms/native_sim.keymap new file mode 100644 index 00000000..ec78569c --- /dev/null +++ b/app/tests/pointing/mouse-move/processors/temp_layer/3-require-prior-idle-ms/native_sim.keymap @@ -0,0 +1,50 @@ + +#include +#include + +#include +#include +#include +#include +#include + +&mmv_input_listener { + input-processors = <&auto_mouse_layer 1 500>; +}; + +/ { + auto_mouse_layer: auto_mouse_layer { + compatible = "zmk,input-processor-temp-layer"; + #input-processor-cells = <2>; + require-prior-idle-ms = <500>; + }; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; + + default_layer { + bindings = < + &mmv MOVE_LEFT &mmv MOVE_UP + &kp A &none + >; + }; + + mkp_layer { + bindings = <&mkp LCLK &mkp RCLK &trans &trans>; + }; + }; +}; + + +&kscan { + events = < + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(1,0,100) + /* before idle */ + ZMK_MOCK_PRESS(0,0,150) + ZMK_MOCK_RELEASE(0,0,200) + /* after idle */ + ZMK_MOCK_PRESS(0,0,700) + ZMK_MOCK_RELEASE(0,0,800) + >; +}; diff --git a/app/tests/pointing/mouse-move/processors/temp_layer/4-deactivated-layer-externally/events.patterns b/app/tests/pointing/mouse-move/processors/temp_layer/4-deactivated-layer-externally/events.patterns new file mode 100644 index 00000000..9fab690e --- /dev/null +++ b/app/tests/pointing/mouse-move/processors/temp_layer/4-deactivated-layer-externally/events.patterns @@ -0,0 +1,6 @@ +s/.*hid_mouse_//p +s/.*set_layer_state: //p +s/.*handle_state_changed_dispatcher: //p +s/.*handle_layer_state_changed: //p +s/.*handle_position_state_changed: //p +s/.*handle_keycode_state_changed: //p diff --git a/app/tests/pointing/mouse-move/processors/temp_layer/4-deactivated-layer-externally/keycode_events.snapshot b/app/tests/pointing/mouse-move/processors/temp_layer/4-deactivated-layer-externally/keycode_events.snapshot new file mode 100644 index 00000000..6cc1d8d9 --- /dev/null +++ b/app/tests/pointing/mouse-move/processors/temp_layer/4-deactivated-layer-externally/keycode_events.snapshot @@ -0,0 +1,31 @@ +layer_changed: layer 1 state 1 locked 0 +Dispatching handle_layer_state_changed +movement_set: Mouse movement set to -1/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -2/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -2/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -3/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +layer_changed: layer 1 state 0 locked 0 +Dispatching handle_layer_state_changed +Deactivating layer that was activated by this processor +layer_changed: layer 1 state 1 locked 0 +Dispatching handle_layer_state_changed +movement_set: Mouse movement set to -1/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -2/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -2/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +movement_set: Mouse movement set to -3/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 diff --git a/app/tests/pointing/mouse-move/processors/temp_layer/4-deactivated-layer-externally/native_sim.conf b/app/tests/pointing/mouse-move/processors/temp_layer/4-deactivated-layer-externally/native_sim.conf new file mode 100644 index 00000000..fa514727 --- /dev/null +++ b/app/tests/pointing/mouse-move/processors/temp_layer/4-deactivated-layer-externally/native_sim.conf @@ -0,0 +1,6 @@ +CONFIG_GPIO=n +CONFIG_ZMK_BLE=n +CONFIG_LOG=y +CONFIG_LOG_BACKEND_SHOW_COLOR=n +CONFIG_ZMK_LOG_LEVEL_DBG=y +CONFIG_ZMK_POINTING=y diff --git a/app/tests/pointing/mouse-move/processors/temp_layer/4-deactivated-layer-externally/native_sim.keymap b/app/tests/pointing/mouse-move/processors/temp_layer/4-deactivated-layer-externally/native_sim.keymap new file mode 100644 index 00000000..6ae1d228 --- /dev/null +++ b/app/tests/pointing/mouse-move/processors/temp_layer/4-deactivated-layer-externally/native_sim.keymap @@ -0,0 +1,43 @@ + +#include +#include + +#include +#include +#include +#include +#include + +&mmv_input_listener { + input-processors = <&zip_temp_layer 1 500>; +}; + +/ { + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; + + default_layer { + bindings = < + &mmv MOVE_LEFT &mmv MOVE_UP + &mo 1 &none + >; + }; + + mkp_layer { + bindings = <&mkp LCLK &mkp RCLK &trans &trans>; + }; + }; +}; + + +&kscan { + events = < + ZMK_MOCK_PRESS(0,0,100) + ZMK_MOCK_RELEASE(0,0,150) + ZMK_MOCK_PRESS(1,0,100) + ZMK_MOCK_RELEASE(1,0,100) + ZMK_MOCK_PRESS(0,0,100) + ZMK_MOCK_RELEASE(0,0,150) + >; +}; diff --git a/app/tests/pointing/mouse-scroll/move_diagonal/events.patterns b/app/tests/pointing/mouse-scroll/move_diagonal/events.patterns new file mode 100644 index 00000000..812126fb --- /dev/null +++ b/app/tests/pointing/mouse-scroll/move_diagonal/events.patterns @@ -0,0 +1 @@ +s/.*hid_mouse_//p \ No newline at end of file diff --git a/app/tests/pointing/mouse-scroll/move_diagonal/keycode_events.snapshot b/app/tests/pointing/mouse-scroll/move_diagonal/keycode_events.snapshot new file mode 100644 index 00000000..ac91bba5 --- /dev/null +++ b/app/tests/pointing/mouse-scroll/move_diagonal/keycode_events.snapshot @@ -0,0 +1,12 @@ +scroll_set: Mouse scroll set to -1/1 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +scroll_set: Mouse scroll set to -1/1 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +scroll_set: Mouse scroll set to -1/1 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +scroll_set: Mouse scroll set to -1/1 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 diff --git a/app/tests/pointing/mouse-scroll/move_diagonal/native_sim.conf b/app/tests/pointing/mouse-scroll/move_diagonal/native_sim.conf new file mode 100644 index 00000000..fa514727 --- /dev/null +++ b/app/tests/pointing/mouse-scroll/move_diagonal/native_sim.conf @@ -0,0 +1,6 @@ +CONFIG_GPIO=n +CONFIG_ZMK_BLE=n +CONFIG_LOG=y +CONFIG_LOG_BACKEND_SHOW_COLOR=n +CONFIG_ZMK_LOG_LEVEL_DBG=y +CONFIG_ZMK_POINTING=y diff --git a/app/tests/pointing/mouse-scroll/move_diagonal/native_sim.keymap b/app/tests/pointing/mouse-scroll/move_diagonal/native_sim.keymap new file mode 100644 index 00000000..e14fccb4 --- /dev/null +++ b/app/tests/pointing/mouse-scroll/move_diagonal/native_sim.keymap @@ -0,0 +1,28 @@ +#include +#include +#include +#include +#include + +/ { + keymap { + compatible = "zmk,keymap"; + + default_layer { + bindings = < + &msc SCRL_LEFT &msc SCRL_UP + &none &none + >; + }; + }; +}; + + +&kscan { + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,500) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,1,10) + >; +}; diff --git a/app/tests/pointing/mouse-scroll/move_hwheel/events.patterns b/app/tests/pointing/mouse-scroll/move_hwheel/events.patterns new file mode 100644 index 00000000..258c4cd8 --- /dev/null +++ b/app/tests/pointing/mouse-scroll/move_hwheel/events.patterns @@ -0,0 +1 @@ +s/.*hid_mouse_//p diff --git a/app/tests/pointing/mouse-scroll/move_hwheel/keycode_events.snapshot b/app/tests/pointing/mouse-scroll/move_hwheel/keycode_events.snapshot new file mode 100644 index 00000000..5625279d --- /dev/null +++ b/app/tests/pointing/mouse-scroll/move_hwheel/keycode_events.snapshot @@ -0,0 +1,24 @@ +scroll_set: Mouse scroll set to 1/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +scroll_set: Mouse scroll set to 1/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +scroll_set: Mouse scroll set to 1/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +scroll_set: Mouse scroll set to 1/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +scroll_set: Mouse scroll set to -1/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +scroll_set: Mouse scroll set to -1/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +scroll_set: Mouse scroll set to -1/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +scroll_set: Mouse scroll set to -1/0 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 diff --git a/app/tests/pointing/mouse-scroll/move_hwheel/native_sim.conf b/app/tests/pointing/mouse-scroll/move_hwheel/native_sim.conf new file mode 100644 index 00000000..fa514727 --- /dev/null +++ b/app/tests/pointing/mouse-scroll/move_hwheel/native_sim.conf @@ -0,0 +1,6 @@ +CONFIG_GPIO=n +CONFIG_ZMK_BLE=n +CONFIG_LOG=y +CONFIG_LOG_BACKEND_SHOW_COLOR=n +CONFIG_ZMK_LOG_LEVEL_DBG=y +CONFIG_ZMK_POINTING=y diff --git a/app/tests/pointing/mouse-scroll/move_hwheel/native_sim.keymap b/app/tests/pointing/mouse-scroll/move_hwheel/native_sim.keymap new file mode 100644 index 00000000..2810f03b --- /dev/null +++ b/app/tests/pointing/mouse-scroll/move_hwheel/native_sim.keymap @@ -0,0 +1,28 @@ +#include +#include +#include +#include +#include + +/ { + keymap { + compatible = "zmk,keymap"; + + default_layer { + bindings = < + &msc SCRL_RIGHT &msc SCRL_LEFT + &none &none + >; + }; + }; +}; + + +&kscan { + events = < + ZMK_MOCK_PRESS(0,0,500) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,1,500) + ZMK_MOCK_RELEASE(0,1,10) + >; +}; diff --git a/app/tests/pointing/mouse-scroll/move_wheel/events.patterns b/app/tests/pointing/mouse-scroll/move_wheel/events.patterns new file mode 100644 index 00000000..258c4cd8 --- /dev/null +++ b/app/tests/pointing/mouse-scroll/move_wheel/events.patterns @@ -0,0 +1 @@ +s/.*hid_mouse_//p diff --git a/app/tests/pointing/mouse-scroll/move_wheel/keycode_events.snapshot b/app/tests/pointing/mouse-scroll/move_wheel/keycode_events.snapshot new file mode 100644 index 00000000..18260573 --- /dev/null +++ b/app/tests/pointing/mouse-scroll/move_wheel/keycode_events.snapshot @@ -0,0 +1,24 @@ +scroll_set: Mouse scroll set to 0/1 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +scroll_set: Mouse scroll set to 0/1 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +scroll_set: Mouse scroll set to 0/1 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +scroll_set: Mouse scroll set to 0/1 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +scroll_set: Mouse scroll set to 0/-1 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +scroll_set: Mouse scroll set to 0/-1 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +scroll_set: Mouse scroll set to 0/-1 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +scroll_set: Mouse scroll set to 0/-1 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 diff --git a/app/tests/pointing/mouse-scroll/move_wheel/native_sim.conf b/app/tests/pointing/mouse-scroll/move_wheel/native_sim.conf new file mode 100644 index 00000000..fa514727 --- /dev/null +++ b/app/tests/pointing/mouse-scroll/move_wheel/native_sim.conf @@ -0,0 +1,6 @@ +CONFIG_GPIO=n +CONFIG_ZMK_BLE=n +CONFIG_LOG=y +CONFIG_LOG_BACKEND_SHOW_COLOR=n +CONFIG_ZMK_LOG_LEVEL_DBG=y +CONFIG_ZMK_POINTING=y diff --git a/app/tests/pointing/mouse-scroll/move_wheel/native_sim.keymap b/app/tests/pointing/mouse-scroll/move_wheel/native_sim.keymap new file mode 100644 index 00000000..893b8b0c --- /dev/null +++ b/app/tests/pointing/mouse-scroll/move_wheel/native_sim.keymap @@ -0,0 +1,28 @@ +#include +#include +#include +#include +#include + +/ { + keymap { + compatible = "zmk,keymap"; + + default_layer { + bindings = < + &msc SCRL_UP &msc SCRL_DOWN + &none &none + >; + }; + }; +}; + + +&kscan { + events = < + ZMK_MOCK_PRESS(0,0,500) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,1,500) + ZMK_MOCK_RELEASE(0,1,10) + >; +}; diff --git a/app/tests/pointing/mouse-scroll/processors/move_diagonal_scaling/events.patterns b/app/tests/pointing/mouse-scroll/processors/move_diagonal_scaling/events.patterns new file mode 100644 index 00000000..812126fb --- /dev/null +++ b/app/tests/pointing/mouse-scroll/processors/move_diagonal_scaling/events.patterns @@ -0,0 +1 @@ +s/.*hid_mouse_//p \ No newline at end of file diff --git a/app/tests/pointing/mouse-scroll/processors/move_diagonal_scaling/keycode_events.snapshot b/app/tests/pointing/mouse-scroll/processors/move_diagonal_scaling/keycode_events.snapshot new file mode 100644 index 00000000..64d0d3c4 --- /dev/null +++ b/app/tests/pointing/mouse-scroll/processors/move_diagonal_scaling/keycode_events.snapshot @@ -0,0 +1,12 @@ +scroll_set: Mouse scroll set to -3/3 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +scroll_set: Mouse scroll set to -3/3 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +scroll_set: Mouse scroll set to -3/3 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +scroll_set: Mouse scroll set to -3/3 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 diff --git a/app/tests/pointing/mouse-scroll/processors/move_diagonal_scaling/native_sim.conf b/app/tests/pointing/mouse-scroll/processors/move_diagonal_scaling/native_sim.conf new file mode 100644 index 00000000..fa514727 --- /dev/null +++ b/app/tests/pointing/mouse-scroll/processors/move_diagonal_scaling/native_sim.conf @@ -0,0 +1,6 @@ +CONFIG_GPIO=n +CONFIG_ZMK_BLE=n +CONFIG_LOG=y +CONFIG_LOG_BACKEND_SHOW_COLOR=n +CONFIG_ZMK_LOG_LEVEL_DBG=y +CONFIG_ZMK_POINTING=y diff --git a/app/tests/pointing/mouse-scroll/processors/move_diagonal_scaling/native_sim.keymap b/app/tests/pointing/mouse-scroll/processors/move_diagonal_scaling/native_sim.keymap new file mode 100644 index 00000000..235f1e8d --- /dev/null +++ b/app/tests/pointing/mouse-scroll/processors/move_diagonal_scaling/native_sim.keymap @@ -0,0 +1,36 @@ + +#include +#include + +#include +#include +#include +#include +#include + +&msc_input_listener { + input-processors = <&zip_scroll_scaler 6 2>; +}; + +/ { + keymap { + compatible = "zmk,keymap"; + + default_layer { + bindings = < + &msc SCRL_LEFT &msc SCRL_UP + &none &none + >; + }; + }; +}; + + +&kscan { + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,500) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,1,10) + >; +}; diff --git a/app/tests/pointing/mouse-scroll/processors/move_diagonal_xy_invert/events.patterns b/app/tests/pointing/mouse-scroll/processors/move_diagonal_xy_invert/events.patterns new file mode 100644 index 00000000..812126fb --- /dev/null +++ b/app/tests/pointing/mouse-scroll/processors/move_diagonal_xy_invert/events.patterns @@ -0,0 +1 @@ +s/.*hid_mouse_//p \ No newline at end of file diff --git a/app/tests/pointing/mouse-scroll/processors/move_diagonal_xy_invert/keycode_events.snapshot b/app/tests/pointing/mouse-scroll/processors/move_diagonal_xy_invert/keycode_events.snapshot new file mode 100644 index 00000000..22cac5bd --- /dev/null +++ b/app/tests/pointing/mouse-scroll/processors/move_diagonal_xy_invert/keycode_events.snapshot @@ -0,0 +1,12 @@ +scroll_set: Mouse scroll set to 1/-1 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +scroll_set: Mouse scroll set to 1/-1 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +scroll_set: Mouse scroll set to 1/-1 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 +scroll_set: Mouse scroll set to 1/-1 +scroll_set: Mouse scroll set to 0/0 +movement_set: Mouse movement set to 0/0 diff --git a/app/tests/pointing/mouse-scroll/processors/move_diagonal_xy_invert/native_sim.conf b/app/tests/pointing/mouse-scroll/processors/move_diagonal_xy_invert/native_sim.conf new file mode 100644 index 00000000..fa514727 --- /dev/null +++ b/app/tests/pointing/mouse-scroll/processors/move_diagonal_xy_invert/native_sim.conf @@ -0,0 +1,6 @@ +CONFIG_GPIO=n +CONFIG_ZMK_BLE=n +CONFIG_LOG=y +CONFIG_LOG_BACKEND_SHOW_COLOR=n +CONFIG_ZMK_LOG_LEVEL_DBG=y +CONFIG_ZMK_POINTING=y diff --git a/app/tests/pointing/mouse-scroll/processors/move_diagonal_xy_invert/native_sim.keymap b/app/tests/pointing/mouse-scroll/processors/move_diagonal_xy_invert/native_sim.keymap new file mode 100644 index 00000000..ce74df76 --- /dev/null +++ b/app/tests/pointing/mouse-scroll/processors/move_diagonal_xy_invert/native_sim.keymap @@ -0,0 +1,33 @@ +#include +#include +#include +#include +#include +#include + +&msc_input_listener { + input-processors = <&zip_scroll_transform (INPUT_TRANSFORM_X_INVERT | INPUT_TRANSFORM_Y_INVERT)>; +}; + +/ { + keymap { + compatible = "zmk,keymap"; + + default_layer { + bindings = < + &msc SCRL_LEFT &msc SCRL_UP + &none &none + >; + }; + }; +}; + + +&kscan { + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,500) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,1,10) + >; +}; diff --git a/app/tests/sticky-keys/1-os-dn-up/native_posix_64.keymap b/app/tests/sticky-keys/1-os-dn-up/native_sim.keymap similarity index 100% rename from app/tests/sticky-keys/1-os-dn-up/native_posix_64.keymap rename to app/tests/sticky-keys/1-os-dn-up/native_sim.keymap diff --git a/app/tests/sticky-keys/10-callum-mods-quick-release/native_posix_64.keymap b/app/tests/sticky-keys/10-callum-mods-quick-release/native_sim.keymap similarity index 100% rename from app/tests/sticky-keys/10-callum-mods-quick-release/native_posix_64.keymap rename to app/tests/sticky-keys/10-callum-mods-quick-release/native_sim.keymap diff --git a/app/tests/sticky-keys/10-callum-mods/native_posix_64.keymap b/app/tests/sticky-keys/10-callum-mods/native_sim.keymap similarity index 100% rename from app/tests/sticky-keys/10-callum-mods/native_posix_64.keymap rename to app/tests/sticky-keys/10-callum-mods/native_sim.keymap diff --git a/app/tests/sticky-keys/10-sl-sl-kp/native_posix_64.keymap b/app/tests/sticky-keys/10-sl-sl-kp/native_sim.keymap similarity index 100% rename from app/tests/sticky-keys/10-sl-sl-kp/native_posix_64.keymap rename to app/tests/sticky-keys/10-sl-sl-kp/native_sim.keymap diff --git a/app/tests/sticky-keys/11-lazy-timeout-during/native_posix_64.keymap b/app/tests/sticky-keys/11-lazy-timeout-during/native_sim.keymap similarity index 100% rename from app/tests/sticky-keys/11-lazy-timeout-during/native_posix_64.keymap rename to app/tests/sticky-keys/11-lazy-timeout-during/native_sim.keymap diff --git a/app/tests/sticky-keys/11-lazy-timeout/native_posix_64.keymap b/app/tests/sticky-keys/11-lazy-timeout/native_sim.keymap similarity index 100% rename from app/tests/sticky-keys/11-lazy-timeout/native_posix_64.keymap rename to app/tests/sticky-keys/11-lazy-timeout/native_sim.keymap diff --git a/app/tests/sticky-keys/11-lazy/native_posix_64.keymap b/app/tests/sticky-keys/11-lazy/native_sim.keymap similarity index 100% rename from app/tests/sticky-keys/11-lazy/native_posix_64.keymap rename to app/tests/sticky-keys/11-lazy/native_sim.keymap diff --git a/app/tests/sticky-keys/12-macro/events.patterns b/app/tests/sticky-keys/12-macro/events.patterns new file mode 100644 index 00000000..b1342af4 --- /dev/null +++ b/app/tests/sticky-keys/12-macro/events.patterns @@ -0,0 +1 @@ +s/.*hid_listener_keycode_//p diff --git a/app/tests/sticky-keys/12-macro/keycode_events.snapshot b/app/tests/sticky-keys/12-macro/keycode_events.snapshot new file mode 100644 index 00000000..6757e834 --- /dev/null +++ b/app/tests/sticky-keys/12-macro/keycode_events.snapshot @@ -0,0 +1,4 @@ +pressed: usage_page 0x07 keycode 0xE0 implicit_mods 0x00 explicit_mods 0x00 +pressed: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 +released: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 +released: usage_page 0x07 keycode 0xE0 implicit_mods 0x00 explicit_mods 0x00 diff --git a/app/tests/sticky-keys/12-macro/native_sim.keymap b/app/tests/sticky-keys/12-macro/native_sim.keymap new file mode 100644 index 00000000..e7ec5b27 --- /dev/null +++ b/app/tests/sticky-keys/12-macro/native_sim.keymap @@ -0,0 +1,36 @@ +#include +#include +#include + +/ { + behaviors { + ZMK_MACRO(sk_sl, wait-ms = <1>; tap-ms = <1>; bindings = <&sk LEFT_CONTROL &sl 1>;) + }; + + keymap { + compatible = "zmk,keymap"; + + default_layer { + bindings = < + &sk_sl &mo 1 + &kp Y &kp B>; + }; + + upper_layer { + bindings = < + &kp T &kp X + &kp A &kp Z>; + }; + }; +}; + +&kscan { + events = < + /* tap sk_sl */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + /* tap A */ + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) + >; +}; diff --git a/app/tests/sticky-keys/12-same-position-mods/events.patterns b/app/tests/sticky-keys/12-same-position-mods/events.patterns new file mode 100644 index 00000000..b1342af4 --- /dev/null +++ b/app/tests/sticky-keys/12-same-position-mods/events.patterns @@ -0,0 +1 @@ +s/.*hid_listener_keycode_//p diff --git a/app/tests/sticky-keys/12-same-position-mods/keycode_events.snapshot b/app/tests/sticky-keys/12-same-position-mods/keycode_events.snapshot new file mode 100644 index 00000000..56d45c00 --- /dev/null +++ b/app/tests/sticky-keys/12-same-position-mods/keycode_events.snapshot @@ -0,0 +1,6 @@ +pressed: usage_page 0x07 keycode 0xE0 implicit_mods 0x00 explicit_mods 0x00 +pressed: usage_page 0x07 keycode 0xE1 implicit_mods 0x00 explicit_mods 0x00 +pressed: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 +released: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 +released: usage_page 0x07 keycode 0xE0 implicit_mods 0x00 explicit_mods 0x00 +released: usage_page 0x07 keycode 0xE1 implicit_mods 0x00 explicit_mods 0x00 diff --git a/app/tests/sticky-keys/12-same-position-mods/native_sim.keymap b/app/tests/sticky-keys/12-same-position-mods/native_sim.keymap new file mode 100644 index 00000000..f3dd4ba9 --- /dev/null +++ b/app/tests/sticky-keys/12-same-position-mods/native_sim.keymap @@ -0,0 +1,39 @@ +#include +#include +#include + +/ { + keymap { + compatible = "zmk,keymap"; + + default_layer { + bindings = < + &sk LEFT_CONTROL &mo 1 + &kp A &kp B>; + }; + + lower_layer { + bindings = < + &sk LEFT_SHIFT &kp X + &kp Y &kp Z>; + }; + }; +}; + +&kscan { + events = < + /* tap sk LEFT_CONTROL */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + /* switch to lower layer */ + ZMK_MOCK_PRESS(0,1,10) + /* tap sk LEFT_SHIFT */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + /* deactivate lower layer */ + ZMK_MOCK_RELEASE(0,1,10) + /* tap A */ + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) + >; +}; diff --git a/app/tests/sticky-keys/12-same-position-sk-sl/events.patterns b/app/tests/sticky-keys/12-same-position-sk-sl/events.patterns new file mode 100644 index 00000000..b1342af4 --- /dev/null +++ b/app/tests/sticky-keys/12-same-position-sk-sl/events.patterns @@ -0,0 +1 @@ +s/.*hid_listener_keycode_//p diff --git a/app/tests/sticky-keys/12-same-position-sk-sl/keycode_events.snapshot b/app/tests/sticky-keys/12-same-position-sk-sl/keycode_events.snapshot new file mode 100644 index 00000000..6757e834 --- /dev/null +++ b/app/tests/sticky-keys/12-same-position-sk-sl/keycode_events.snapshot @@ -0,0 +1,4 @@ +pressed: usage_page 0x07 keycode 0xE0 implicit_mods 0x00 explicit_mods 0x00 +pressed: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 +released: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 +released: usage_page 0x07 keycode 0xE0 implicit_mods 0x00 explicit_mods 0x00 diff --git a/app/tests/sticky-keys/12-same-position-sk-sl/native_sim.keymap b/app/tests/sticky-keys/12-same-position-sk-sl/native_sim.keymap new file mode 100644 index 00000000..14473047 --- /dev/null +++ b/app/tests/sticky-keys/12-same-position-sk-sl/native_sim.keymap @@ -0,0 +1,45 @@ +#include +#include +#include + +/ { + keymap { + compatible = "zmk,keymap"; + + default_layer { + bindings = < + &sk LEFT_CONTROL &mo 1 + &kp A &kp B>; + }; + + lower_layer { + bindings = < + &sl 2 &kp X + &kp Y &kp Z>; + }; + + upper_layer { + bindings = < + &kp T &kp X + &kp A &kp Z>; + }; + }; +}; + +&kscan { + events = < + /* tap sk LEFT_CONTROL */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + /* switch to lower layer */ + ZMK_MOCK_PRESS(0,1,10) + /* tap sl upper_layer */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + /* tap A */ + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) + /* deactivate lower layer */ + ZMK_MOCK_RELEASE(0,1,10) + >; +}; diff --git a/app/tests/sticky-keys/2-os-dn-up-kcdn-kcup-quick-release/native_posix_64.keymap b/app/tests/sticky-keys/2-os-dn-up-kcdn-kcup-quick-release/native_sim.keymap similarity index 100% rename from app/tests/sticky-keys/2-os-dn-up-kcdn-kcup-quick-release/native_posix_64.keymap rename to app/tests/sticky-keys/2-os-dn-up-kcdn-kcup-quick-release/native_sim.keymap diff --git a/app/tests/sticky-keys/2-os-dn-up-kcdn-kcup/native_posix_64.keymap b/app/tests/sticky-keys/2-os-dn-up-kcdn-kcup/native_sim.keymap similarity index 100% rename from app/tests/sticky-keys/2-os-dn-up-kcdn-kcup/native_posix_64.keymap rename to app/tests/sticky-keys/2-os-dn-up-kcdn-kcup/native_sim.keymap diff --git a/app/tests/sticky-keys/2-sl-dn-up-kcdn-kcup/native_posix_64.keymap b/app/tests/sticky-keys/2-sl-dn-up-kcdn-kcup/native_sim.keymap similarity index 100% rename from app/tests/sticky-keys/2-sl-dn-up-kcdn-kcup/native_posix_64.keymap rename to app/tests/sticky-keys/2-sl-dn-up-kcdn-kcup/native_sim.keymap diff --git a/app/tests/sticky-keys/3a-os-dn-kcdn-kcup-up/native_posix_64.keymap b/app/tests/sticky-keys/3a-os-dn-kcdn-kcup-up/native_sim.keymap similarity index 100% rename from app/tests/sticky-keys/3a-os-dn-kcdn-kcup-up/native_posix_64.keymap rename to app/tests/sticky-keys/3a-os-dn-kcdn-kcup-up/native_sim.keymap diff --git a/app/tests/sticky-keys/3b-os-dn-kcdn-up-kcup/native_posix_64.keymap b/app/tests/sticky-keys/3b-os-dn-kcdn-up-kcup/native_sim.keymap similarity index 100% rename from app/tests/sticky-keys/3b-os-dn-kcdn-up-kcup/native_posix_64.keymap rename to app/tests/sticky-keys/3b-os-dn-kcdn-up-kcup/native_sim.keymap diff --git a/app/tests/sticky-keys/4-os-dn-up-kcdn-timer-kcup/native_posix_64.keymap b/app/tests/sticky-keys/4-os-dn-up-kcdn-timer-kcup/native_sim.keymap similarity index 100% rename from app/tests/sticky-keys/4-os-dn-up-kcdn-timer-kcup/native_posix_64.keymap rename to app/tests/sticky-keys/4-os-dn-up-kcdn-timer-kcup/native_sim.keymap diff --git a/app/tests/sticky-keys/5-os-kcdn-dn-kcup-up/native_posix_64.keymap b/app/tests/sticky-keys/5-os-kcdn-dn-kcup-up/native_sim.keymap similarity index 100% rename from app/tests/sticky-keys/5-os-kcdn-dn-kcup-up/native_posix_64.keymap rename to app/tests/sticky-keys/5-os-kcdn-dn-kcup-up/native_sim.keymap diff --git a/app/tests/sticky-keys/7-os-dn-up-kc1dn-kc2dn-kc1up-kc2up/native_posix_64.keymap b/app/tests/sticky-keys/7-os-dn-up-kc1dn-kc2dn-kc1up-kc2up/native_sim.keymap similarity index 100% rename from app/tests/sticky-keys/7-os-dn-up-kc1dn-kc2dn-kc1up-kc2up/native_posix_64.keymap rename to app/tests/sticky-keys/7-os-dn-up-kc1dn-kc2dn-kc1up-kc2up/native_sim.keymap diff --git a/app/tests/sticky-keys/8-lsk-osk-combination-quick-release/native_posix_64.keymap b/app/tests/sticky-keys/8-lsk-osk-combination-quick-release/native_sim.keymap similarity index 100% rename from app/tests/sticky-keys/8-lsk-osk-combination-quick-release/native_posix_64.keymap rename to app/tests/sticky-keys/8-lsk-osk-combination-quick-release/native_sim.keymap diff --git a/app/tests/sticky-keys/8-lsk-osk-combination/native_posix_64.keymap b/app/tests/sticky-keys/8-lsk-osk-combination/native_sim.keymap similarity index 100% rename from app/tests/sticky-keys/8-lsk-osk-combination/native_posix_64.keymap rename to app/tests/sticky-keys/8-lsk-osk-combination/native_sim.keymap diff --git a/app/tests/sticky-keys/9-sk-dn-up-dn-up/native_posix_64.keymap b/app/tests/sticky-keys/9-sk-dn-up-dn-up/native_sim.keymap similarity index 100% rename from app/tests/sticky-keys/9-sk-dn-up-dn-up/native_posix_64.keymap rename to app/tests/sticky-keys/9-sk-dn-up-dn-up/native_sim.keymap diff --git a/app/tests/studio/add-layer/basic/events.patterns b/app/tests/studio/add-layer/basic/events.patterns new file mode 100644 index 00000000..8b349f8d --- /dev/null +++ b/app/tests/studio/add-layer/basic/events.patterns @@ -0,0 +1,4 @@ +s/.*on_add_layer_binding_pressed/add_layer/p +s/.*on_set_layer_binding_at_idx_binding_pressed/set_layer_binding/p +s/.*layer_changed/layer_changed/p +s/.*hid_listener_keycode_//p diff --git a/app/tests/studio/add-layer/basic/extra-cmake-args b/app/tests/studio/add-layer/basic/extra-cmake-args new file mode 100644 index 00000000..c5e4f18e --- /dev/null +++ b/app/tests/studio/add-layer/basic/extra-cmake-args @@ -0,0 +1,5 @@ +-DCONFIG_ZMK_BEHAVIOR_METADATA=y +-DCONFIG_ZMK_BEHAVIOR_LOCAL_IDS=y +-DCONFIG_ZMK_KEYMAP_LAYER_REORDERING=y +-DCONFIG_ZMK_KEYMAP_SETTINGS_STORAGE=y +-DCONFIG_SETTINGS=y diff --git a/app/tests/studio/add-layer/basic/keycode_events.snapshot b/app/tests/studio/add-layer/basic/keycode_events.snapshot new file mode 100644 index 00000000..83fbf0fe --- /dev/null +++ b/app/tests/studio/add-layer/basic/keycode_events.snapshot @@ -0,0 +1,6 @@ +add_layer: Added layer 1 +set_layer_binding: Set binding at layer 1, index 0 to binding 1/2 +layer_changed: layer 1 state 1 locked 0 +pressed: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 +released: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 +layer_changed: layer 1 state 0 locked 0 \ No newline at end of file diff --git a/app/tests/studio/add-layer/basic/native_sim.conf b/app/tests/studio/add-layer/basic/native_sim.conf new file mode 100644 index 00000000..3fb69a9d --- /dev/null +++ b/app/tests/studio/add-layer/basic/native_sim.conf @@ -0,0 +1 @@ +CONFIG_ZMK_TEST_BEHAVIORS=y \ No newline at end of file diff --git a/app/tests/studio/add-layer/basic/native_sim.keymap b/app/tests/studio/add-layer/basic/native_sim.keymap new file mode 100644 index 00000000..59ac62a2 --- /dev/null +++ b/app/tests/studio/add-layer/basic/native_sim.keymap @@ -0,0 +1,23 @@ +#include +#include +#include +#include "../behavior_keymap.dtsi" + +// Test adding a layer, setting a binding, activating it, and pressing the binding +&kscan { + events = < + // add a new layer + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + // set binding A at layer 1, position 0 + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + // activate layer 1 with momentary + ZMK_MOCK_PRESS(1,0,10) + // press position 0 on new layer (should be A) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + // release momentary layer 1 + ZMK_MOCK_RELEASE(1,0,10) + >; +}; diff --git a/app/tests/studio/add-layer/behavior_keymap.dtsi b/app/tests/studio/add-layer/behavior_keymap.dtsi new file mode 100644 index 00000000..243a6e0f --- /dev/null +++ b/app/tests/studio/add-layer/behavior_keymap.dtsi @@ -0,0 +1,32 @@ +#include +#include +#include + +/ { + behaviors { + add_layer: add_layer { + compatible = "zmk,behavior-add-layer"; + #binding-cells = <0>; + }; + + set_binding: set_binding { + compatible = "zmk,behavior-set-layer-binding-at-idx"; + #binding-cells = <2>; + bindings = <&kp A>, <&kp B>; + }; + }; + + keymap { + compatible = "zmk,keymap"; + + default_layer { + bindings = < + &add_layer &set_binding 1 0 + &mo 1 &kp B>; + }; + + layer_1 { + status = "reserved"; + }; + }; +}; diff --git a/app/tests/studio/move-layer/basic/events.patterns b/app/tests/studio/move-layer/basic/events.patterns new file mode 100644 index 00000000..a3fbafba --- /dev/null +++ b/app/tests/studio/move-layer/basic/events.patterns @@ -0,0 +1,3 @@ +s/.*layer_changed/layer_changed/p +s/.*hid_listener_keycode_//p +s/.*on_move_layer_binding_pressed/move_layer/p diff --git a/app/tests/studio/move-layer/basic/extra-cmake-args b/app/tests/studio/move-layer/basic/extra-cmake-args new file mode 100644 index 00000000..c5e4f18e --- /dev/null +++ b/app/tests/studio/move-layer/basic/extra-cmake-args @@ -0,0 +1,5 @@ +-DCONFIG_ZMK_BEHAVIOR_METADATA=y +-DCONFIG_ZMK_BEHAVIOR_LOCAL_IDS=y +-DCONFIG_ZMK_KEYMAP_LAYER_REORDERING=y +-DCONFIG_ZMK_KEYMAP_SETTINGS_STORAGE=y +-DCONFIG_SETTINGS=y diff --git a/app/tests/studio/move-layer/basic/keycode_events.snapshot b/app/tests/studio/move-layer/basic/keycode_events.snapshot new file mode 100644 index 00000000..365afc62 --- /dev/null +++ b/app/tests/studio/move-layer/basic/keycode_events.snapshot @@ -0,0 +1,8 @@ +move_layer: Moved layer from index 1 to index 2 +layer_changed: layer 1 state 1 locked 0 +layer_changed: layer 2 state 1 locked 0 +pressed: usage_page 0x07 keycode 0x06 implicit_mods 0x00 explicit_mods 0x00 +released: usage_page 0x07 keycode 0x06 implicit_mods 0x00 explicit_mods 0x00 +layer_changed: layer 2 state 0 locked 0 +pressed: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 +released: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 diff --git a/app/tests/studio/move-layer/basic/native_sim.conf b/app/tests/studio/move-layer/basic/native_sim.conf new file mode 100644 index 00000000..3fb69a9d --- /dev/null +++ b/app/tests/studio/move-layer/basic/native_sim.conf @@ -0,0 +1 @@ +CONFIG_ZMK_TEST_BEHAVIORS=y \ No newline at end of file diff --git a/app/tests/studio/move-layer/basic/native_sim.keymap b/app/tests/studio/move-layer/basic/native_sim.keymap new file mode 100644 index 00000000..91afb094 --- /dev/null +++ b/app/tests/studio/move-layer/basic/native_sim.keymap @@ -0,0 +1,26 @@ +#include +#include +#include +#include "../behavior_keymap.dtsi" + +// Test moving a layer: swap layers 1 and 2, turn both on, +// press transparent on layer 1 at index 2 +// which should fall through to layer 2 at index 1 +&kscan { + events = < + // move layer 1 to position 2 (effectively swapping layers 1 and 2) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + // activate layers 1 and 2 + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_PRESS(1,1,10) + // press position 0,1 on layer 2 - should output C from layer 2 at index 1 + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + // release layer 2 (at index 1) + ZMK_MOCK_RELEASE(1,1,10) + // press position 0,1 again - should output A from default layer + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + >; +}; diff --git a/app/tests/studio/move-layer/behavior_keymap.dtsi b/app/tests/studio/move-layer/behavior_keymap.dtsi new file mode 100644 index 00000000..014bba46 --- /dev/null +++ b/app/tests/studio/move-layer/behavior_keymap.dtsi @@ -0,0 +1,34 @@ +#include +#include +#include + +/ { + behaviors { + move_layer: move_layer { + compatible = "zmk,behavior-move-layer"; + #binding-cells = <2>; + }; + }; + + keymap { + compatible = "zmk,keymap"; + + default_layer { + bindings = < + &move_layer 1 2 &kp A + &mo 1 &mo 2>; + }; + + layer_1 { + bindings = < + &kp B &trans + &trans &trans>; + }; + + layer_2 { + bindings = < + &trans &kp C + &trans &trans>; + }; + }; +}; diff --git a/app/tests/studio/remove-layer/basic/events.patterns b/app/tests/studio/remove-layer/basic/events.patterns new file mode 100644 index 00000000..2b04f256 --- /dev/null +++ b/app/tests/studio/remove-layer/basic/events.patterns @@ -0,0 +1,3 @@ +s/.*layer_changed/layer_changed/p +s/.*hid_listener_keycode_//p +s/.*on_remove_layer_binding_pressed/remove_layer/p diff --git a/app/tests/studio/remove-layer/basic/extra-cmake-args b/app/tests/studio/remove-layer/basic/extra-cmake-args new file mode 100644 index 00000000..c5e4f18e --- /dev/null +++ b/app/tests/studio/remove-layer/basic/extra-cmake-args @@ -0,0 +1,5 @@ +-DCONFIG_ZMK_BEHAVIOR_METADATA=y +-DCONFIG_ZMK_BEHAVIOR_LOCAL_IDS=y +-DCONFIG_ZMK_KEYMAP_LAYER_REORDERING=y +-DCONFIG_ZMK_KEYMAP_SETTINGS_STORAGE=y +-DCONFIG_SETTINGS=y diff --git a/app/tests/studio/remove-layer/basic/keycode_events.snapshot b/app/tests/studio/remove-layer/basic/keycode_events.snapshot new file mode 100644 index 00000000..4aa4cd63 --- /dev/null +++ b/app/tests/studio/remove-layer/basic/keycode_events.snapshot @@ -0,0 +1,7 @@ +remove_layer: Removed layer at index 1 +layer_changed: layer 1 state 1 locked 1 +pressed: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 +released: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 +layer_changed: layer 2 state 1 locked 1 +pressed: usage_page 0x07 keycode 0x06 implicit_mods 0x00 explicit_mods 0x00 +released: usage_page 0x07 keycode 0x06 implicit_mods 0x00 explicit_mods 0x00 \ No newline at end of file diff --git a/app/tests/studio/remove-layer/basic/native_sim.conf b/app/tests/studio/remove-layer/basic/native_sim.conf new file mode 100644 index 00000000..3fb69a9d --- /dev/null +++ b/app/tests/studio/remove-layer/basic/native_sim.conf @@ -0,0 +1 @@ +CONFIG_ZMK_TEST_BEHAVIORS=y \ No newline at end of file diff --git a/app/tests/studio/remove-layer/basic/native_sim.keymap b/app/tests/studio/remove-layer/basic/native_sim.keymap new file mode 100644 index 00000000..9f026de9 --- /dev/null +++ b/app/tests/studio/remove-layer/basic/native_sim.keymap @@ -0,0 +1,25 @@ +#include +#include +#include +#include "../behavior_keymap.dtsi" + +// Test removing layer 1 +&kscan { + events = < + // remove layer 1 + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) + // toggle layer 1 on + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + // press position 0,0 - should output A (layer 0) because layer 1 was removed + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + // toggle layer 2 on + ZMK_MOCK_PRESS(1,1,10) + ZMK_MOCK_RELEASE(1,1,10) + // press position 0,0 - should output C (layer 2) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + >; +}; diff --git a/app/tests/studio/remove-layer/behavior_keymap.dtsi b/app/tests/studio/remove-layer/behavior_keymap.dtsi new file mode 100644 index 00000000..14f093df --- /dev/null +++ b/app/tests/studio/remove-layer/behavior_keymap.dtsi @@ -0,0 +1,34 @@ +#include +#include +#include + +/ { + behaviors { + remove_layer_behavior: remove_layer_behavior { + compatible = "zmk,behavior-remove-layer"; + #binding-cells = <1>; + }; + }; + + keymap { + compatible = "zmk,keymap"; + + default_layer { + bindings = < + &kp A &tog 1 + &remove_layer_behavior 1 &tog 2>; + }; + + layer_1 { + bindings = < + &kp B &tog 1 + &remove_layer_behavior 0 &trans>; + }; + + layer_2 { + bindings = < + &kp C &trans + &none &trans>; + }; + }; +}; diff --git a/app/tests/studio/remove-layer/remove-default-layer/events.patterns b/app/tests/studio/remove-layer/remove-default-layer/events.patterns new file mode 100644 index 00000000..b11b5a68 --- /dev/null +++ b/app/tests/studio/remove-layer/remove-default-layer/events.patterns @@ -0,0 +1,5 @@ +s/.*layer_changed/layer_changed/p +s/.*hid_listener_keycode_//p +s/.*on_remove_layer_binding_pressed/remove_layer/p +s/.*tog_keymap_binding_pressed/tog_pressed/p + diff --git a/app/tests/studio/remove-layer/remove-default-layer/extra-cmake-args b/app/tests/studio/remove-layer/remove-default-layer/extra-cmake-args new file mode 100644 index 00000000..c5e4f18e --- /dev/null +++ b/app/tests/studio/remove-layer/remove-default-layer/extra-cmake-args @@ -0,0 +1,5 @@ +-DCONFIG_ZMK_BEHAVIOR_METADATA=y +-DCONFIG_ZMK_BEHAVIOR_LOCAL_IDS=y +-DCONFIG_ZMK_KEYMAP_LAYER_REORDERING=y +-DCONFIG_ZMK_KEYMAP_SETTINGS_STORAGE=y +-DCONFIG_SETTINGS=y diff --git a/app/tests/studio/remove-layer/remove-default-layer/keycode_events.snapshot b/app/tests/studio/remove-layer/remove-default-layer/keycode_events.snapshot new file mode 100644 index 00000000..ad99cc87 --- /dev/null +++ b/app/tests/studio/remove-layer/remove-default-layer/keycode_events.snapshot @@ -0,0 +1,8 @@ +tog_pressed: position 1 layer 1 +layer_changed: layer 1 state 1 locked 1 +remove_layer: Removed layer at index 0 +pressed: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 +released: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 +tog_pressed: position 1 layer 1 +pressed: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 +released: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 diff --git a/app/tests/studio/remove-layer/remove-default-layer/native_sim.conf b/app/tests/studio/remove-layer/remove-default-layer/native_sim.conf new file mode 100644 index 00000000..3fb69a9d --- /dev/null +++ b/app/tests/studio/remove-layer/remove-default-layer/native_sim.conf @@ -0,0 +1 @@ +CONFIG_ZMK_TEST_BEHAVIORS=y \ No newline at end of file diff --git a/app/tests/studio/remove-layer/remove-default-layer/native_sim.keymap b/app/tests/studio/remove-layer/remove-default-layer/native_sim.keymap new file mode 100644 index 00000000..1aa43a6a --- /dev/null +++ b/app/tests/studio/remove-layer/remove-default-layer/native_sim.keymap @@ -0,0 +1,26 @@ +#include +#include +#include +#include "../behavior_keymap.dtsi" + +// Test removing layer 0: layer 1 becomes bottom layer +&kscan { + events = < + // toggle layer 1 on + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + // remove layer 0 + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) + // press position 0,0 - should output B (layer 1) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + // try to toggle layer 1 off + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + // press position 0,0 - should output B + // (layer 1 is now the bottom layer, so shouldn't be disabled) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + >; +}; diff --git a/app/tests/studio/remove-layer/remove-default-layer/pending b/app/tests/studio/remove-layer/remove-default-layer/pending new file mode 100644 index 00000000..2e474100 --- /dev/null +++ b/app/tests/studio/remove-layer/remove-default-layer/pending @@ -0,0 +1,2 @@ +This test fails because the keymap function handling position state changes doesn't work correctly when the default layer is removed. +The iteration loop's end condition is incorrect. \ No newline at end of file diff --git a/app/tests/tap-dance/1a-tap1/native_posix_64.keymap b/app/tests/tap-dance/1a-tap1/native_sim.keymap similarity index 100% rename from app/tests/tap-dance/1a-tap1/native_posix_64.keymap rename to app/tests/tap-dance/1a-tap1/native_sim.keymap diff --git a/app/tests/tap-dance/1b-tap2/native_posix_64.keymap b/app/tests/tap-dance/1b-tap2/native_sim.keymap similarity index 100% rename from app/tests/tap-dance/1b-tap2/native_posix_64.keymap rename to app/tests/tap-dance/1b-tap2/native_sim.keymap diff --git a/app/tests/tap-dance/1c-tap3/native_posix_64.keymap b/app/tests/tap-dance/1c-tap3/native_sim.keymap similarity index 100% rename from app/tests/tap-dance/1c-tap3/native_posix_64.keymap rename to app/tests/tap-dance/1c-tap3/native_sim.keymap diff --git a/app/tests/tap-dance/2a-hold1/native_posix_64.keymap b/app/tests/tap-dance/2a-hold1/native_sim.keymap similarity index 100% rename from app/tests/tap-dance/2a-hold1/native_posix_64.keymap rename to app/tests/tap-dance/2a-hold1/native_sim.keymap diff --git a/app/tests/tap-dance/2b-hold2/native_posix_64.keymap b/app/tests/tap-dance/2b-hold2/native_sim.keymap similarity index 100% rename from app/tests/tap-dance/2b-hold2/native_posix_64.keymap rename to app/tests/tap-dance/2b-hold2/native_sim.keymap diff --git a/app/tests/tap-dance/2c-hold3/native_posix_64.keymap b/app/tests/tap-dance/2c-hold3/native_sim.keymap similarity index 100% rename from app/tests/tap-dance/2c-hold3/native_posix_64.keymap rename to app/tests/tap-dance/2c-hold3/native_sim.keymap diff --git a/app/tests/tap-dance/3a-tap-int-mid/native_posix_64.keymap b/app/tests/tap-dance/3a-tap-int-mid/native_sim.keymap similarity index 100% rename from app/tests/tap-dance/3a-tap-int-mid/native_posix_64.keymap rename to app/tests/tap-dance/3a-tap-int-mid/native_sim.keymap diff --git a/app/tests/tap-dance/3b-tap-int-seq/native_posix_64.keymap b/app/tests/tap-dance/3b-tap-int-seq/native_sim.keymap similarity index 100% rename from app/tests/tap-dance/3b-tap-int-seq/native_posix_64.keymap rename to app/tests/tap-dance/3b-tap-int-seq/native_sim.keymap diff --git a/app/tests/tap-dance/3c-tap-int-after/native_posix_64.keymap b/app/tests/tap-dance/3c-tap-int-after/native_sim.keymap similarity index 100% rename from app/tests/tap-dance/3c-tap-int-after/native_posix_64.keymap rename to app/tests/tap-dance/3c-tap-int-after/native_sim.keymap diff --git a/app/tests/tap-dance/3d-hold-int-mid/native_posix_64.keymap b/app/tests/tap-dance/3d-hold-int-mid/native_sim.keymap similarity index 100% rename from app/tests/tap-dance/3d-hold-int-mid/native_posix_64.keymap rename to app/tests/tap-dance/3d-hold-int-mid/native_sim.keymap diff --git a/app/tests/tap-dance/3e-hold-int-seq/native_posix_64.keymap b/app/tests/tap-dance/3e-hold-int-seq/native_sim.keymap similarity index 100% rename from app/tests/tap-dance/3e-hold-int-seq/native_posix_64.keymap rename to app/tests/tap-dance/3e-hold-int-seq/native_sim.keymap diff --git a/app/tests/tap-dance/3f-hold-int-after/native_posix_64.keymap b/app/tests/tap-dance/3f-hold-int-after/native_sim.keymap similarity index 100% rename from app/tests/tap-dance/3f-hold-int-after/native_posix_64.keymap rename to app/tests/tap-dance/3f-hold-int-after/native_sim.keymap diff --git a/app/tests/tap-dance/4a-single/native_posix_64.keymap b/app/tests/tap-dance/4a-single/native_sim.keymap similarity index 100% rename from app/tests/tap-dance/4a-single/native_posix_64.keymap rename to app/tests/tap-dance/4a-single/native_sim.keymap diff --git a/app/tests/tap-dance/5a-tdint-mid/native_posix_64.keymap b/app/tests/tap-dance/5a-tdint-mid/native_sim.keymap similarity index 100% rename from app/tests/tap-dance/5a-tdint-mid/native_posix_64.keymap rename to app/tests/tap-dance/5a-tdint-mid/native_sim.keymap diff --git a/app/tests/tap-dance/5b-tdint-seq/native_posix_64.keymap b/app/tests/tap-dance/5b-tdint-seq/native_sim.keymap similarity index 100% rename from app/tests/tap-dance/5b-tdint-seq/native_posix_64.keymap rename to app/tests/tap-dance/5b-tdint-seq/native_sim.keymap diff --git a/app/tests/tap-dance/5c-tdint-after/native_posix_64.keymap b/app/tests/tap-dance/5c-tdint-after/native_sim.keymap similarity index 100% rename from app/tests/tap-dance/5c-tdint-after/native_posix_64.keymap rename to app/tests/tap-dance/5c-tdint-after/native_sim.keymap diff --git a/app/tests/tap-dance/5d-tdint-multiple/native_posix_64.keymap b/app/tests/tap-dance/5d-tdint-multiple/native_sim.keymap similarity index 100% rename from app/tests/tap-dance/5d-tdint-multiple/native_posix_64.keymap rename to app/tests/tap-dance/5d-tdint-multiple/native_sim.keymap diff --git a/app/tests/tap-dance/6-combo-tap2/native_posix_64.keymap b/app/tests/tap-dance/6-combo-tap2/native_sim.keymap similarity index 100% rename from app/tests/tap-dance/6-combo-tap2/native_posix_64.keymap rename to app/tests/tap-dance/6-combo-tap2/native_sim.keymap diff --git a/app/tests/to-layer/normal/keycode_events.snapshot b/app/tests/to-layer/normal/keycode_events.snapshot index a98f7479..dcb1335c 100644 --- a/app/tests/to-layer/normal/keycode_events.snapshot +++ b/app/tests/to-layer/normal/keycode_events.snapshot @@ -1,18 +1,18 @@ kp_pressed: usage_page 0x07 keycode 0x16 implicit_mods 0x00 explicit_mods 0x00 kp_released: usage_page 0x07 keycode 0x16 implicit_mods 0x00 explicit_mods 0x00 to_pressed: position 1 layer 1 -layer_changed: layer 1 state 1 +layer_changed: layer 1 state 1 locked 1 to_released: position 1 layer 1 kp_pressed: usage_page 0x07 keycode 0x0E implicit_mods 0x00 explicit_mods 0x00 kp_released: usage_page 0x07 keycode 0x0E implicit_mods 0x00 explicit_mods 0x00 to_pressed: position 0 layer 0 -layer_changed: layer 1 state 0 -layer_changed: layer 0 state 1 +layer_changed: layer 1 state 0 locked 1 +layer_changed: layer 0 state 1 locked 1 to_released: position 0 layer 0 kp_pressed: usage_page 0x07 keycode 0x16 implicit_mods 0x00 explicit_mods 0x00 kp_released: usage_page 0x07 keycode 0x16 implicit_mods 0x00 explicit_mods 0x00 to_pressed: position 0 layer 0 to_released: position 0 layer 0 to_pressed: position 1 layer 1 -layer_changed: layer 1 state 1 +layer_changed: layer 1 state 1 locked 1 to_released: position 1 layer 1 diff --git a/app/tests/to-layer/normal/native_posix_64.keymap b/app/tests/to-layer/normal/native_sim.keymap similarity index 100% rename from app/tests/to-layer/normal/native_posix_64.keymap rename to app/tests/to-layer/normal/native_sim.keymap diff --git a/app/tests/toggle-layer/behavior_keymap.dtsi b/app/tests/toggle-layer/behavior_keymap.dtsi index 1ff4a81f..8fbf4858 100644 --- a/app/tests/toggle-layer/behavior_keymap.dtsi +++ b/app/tests/toggle-layer/behavior_keymap.dtsi @@ -3,13 +3,23 @@ #include / { + behaviors { + tog_off: toggle_layer_off_only { + compatible = "zmk,behavior-toggle-layer"; + #binding-cells = <1>; + display-name = "Toggle Layer Off"; + toggle-mode = "off"; + locking; + }; + }; + keymap { compatible = "zmk,keymap"; default_layer { bindings = < &kp B &tog 1 - &kp D &kp G>; + &mo 2 &to 1>; }; lower_layer { @@ -20,8 +30,8 @@ raise_layer { bindings = < - &kp W &kp U - &kp X &kp M>; + &kp W &tog 2 + &tog_off 2 &mo 2>; }; }; }; diff --git a/app/tests/toggle-layer/early-key-release/native_posix_64.keymap b/app/tests/toggle-layer/early-key-release/native_posix_64.keymap deleted file mode 100644 index 0a0c88ea..00000000 --- a/app/tests/toggle-layer/early-key-release/native_posix_64.keymap +++ /dev/null @@ -1,9 +0,0 @@ -#include -#include -#include -#include "../behavior_keymap.dtsi" - -&kscan { - events = ; -}; \ No newline at end of file diff --git a/app/tests/key-repeat/press-and-release-after-key-usage/native_posix.keymap b/app/tests/toggle-layer/early-key-release/native_sim.keymap similarity index 83% rename from app/tests/key-repeat/press-and-release-after-key-usage/native_posix.keymap rename to app/tests/toggle-layer/early-key-release/native_sim.keymap index 9078f304..dfdbe172 100644 --- a/app/tests/key-repeat/press-and-release-after-key-usage/native_posix.keymap +++ b/app/tests/toggle-layer/early-key-release/native_sim.keymap @@ -5,7 +5,9 @@ &kscan { events = < + ZMK_MOCK_PRESS(0,0,10) ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,0,10) ZMK_MOCK_RELEASE(0,1,10) ZMK_MOCK_PRESS(0,0,10) ZMK_MOCK_RELEASE(0,0,10) diff --git a/app/tests/toggle-layer/locking/events.patterns b/app/tests/toggle-layer/locking/events.patterns new file mode 100644 index 00000000..05b8cd15 --- /dev/null +++ b/app/tests/toggle-layer/locking/events.patterns @@ -0,0 +1,3 @@ +s/.*hid_listener_keycode/kp/p +s/.*tog_keymap_binding/tog/p +s/.*mo_keymap_binding/mo/p \ No newline at end of file diff --git a/app/tests/toggle-layer/locking/keycode_events.snapshot b/app/tests/toggle-layer/locking/keycode_events.snapshot new file mode 100644 index 00000000..73f4d251 --- /dev/null +++ b/app/tests/toggle-layer/locking/keycode_events.snapshot @@ -0,0 +1,16 @@ +kp_pressed: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 +kp_released: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 +mo_pressed: position 2 layer 2 +tog_pressed: position 1 layer 2 +tog_released: position 1 layer 2 +mo_released: position 2 layer 2 +kp_pressed: usage_page 0x07 keycode 0x1A implicit_mods 0x00 explicit_mods 0x00 +kp_released: usage_page 0x07 keycode 0x1A implicit_mods 0x00 explicit_mods 0x00 +mo_pressed: position 3 layer 2 +mo_released: position 3 layer 2 +kp_pressed: usage_page 0x07 keycode 0x1A implicit_mods 0x00 explicit_mods 0x00 +kp_released: usage_page 0x07 keycode 0x1A implicit_mods 0x00 explicit_mods 0x00 +tog_pressed: position 1 layer 2 +tog_released: position 1 layer 2 +kp_pressed: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 +kp_released: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 diff --git a/app/tests/toggle-layer/locking/native_posix_64.keymap b/app/tests/toggle-layer/locking/native_posix_64.keymap new file mode 100644 index 00000000..fc70576e --- /dev/null +++ b/app/tests/toggle-layer/locking/native_posix_64.keymap @@ -0,0 +1,25 @@ +#include +#include +#include +#include "../behavior_keymap.dtsi" + +&kscan { + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(1,1,10) + ZMK_MOCK_RELEASE(1,1,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + >; +}; \ No newline at end of file diff --git a/app/tests/toggle-layer/normal/keycode_events.snapshot b/app/tests/toggle-layer/normal/keycode_events.snapshot index 515772a4..1d28c7f9 100644 --- a/app/tests/toggle-layer/normal/keycode_events.snapshot +++ b/app/tests/toggle-layer/normal/keycode_events.snapshot @@ -2,3 +2,7 @@ tog_pressed: position 1 layer 1 tog_released: position 1 layer 1 kp_pressed: usage_page 0x0C keycode 0xB5 implicit_mods 0x00 explicit_mods 0x00 kp_released: usage_page 0x0C keycode 0xB5 implicit_mods 0x00 explicit_mods 0x00 +tog_pressed: position 1 layer 1 +tog_released: position 1 layer 1 +kp_pressed: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 +kp_released: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 \ No newline at end of file diff --git a/app/tests/toggle-layer/normal/native_posix_64.keymap b/app/tests/toggle-layer/normal/native_posix_64.keymap deleted file mode 100644 index 97bdd179..00000000 --- a/app/tests/toggle-layer/normal/native_posix_64.keymap +++ /dev/null @@ -1,8 +0,0 @@ -#include -#include -#include -#include "../behavior_keymap.dtsi" - -&kscan { - events = ; -}; \ No newline at end of file diff --git a/app/tests/caps-word/deactivate-by-second-press/native_posix.keymap b/app/tests/toggle-layer/normal/native_sim.keymap similarity index 100% rename from app/tests/caps-word/deactivate-by-second-press/native_posix.keymap rename to app/tests/toggle-layer/normal/native_sim.keymap index 121a827c..8f0124db 100644 --- a/app/tests/caps-word/deactivate-by-second-press/native_posix.keymap +++ b/app/tests/toggle-layer/normal/native_sim.keymap @@ -5,13 +5,13 @@ &kscan { events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) ZMK_MOCK_PRESS(0,1,10) ZMK_MOCK_RELEASE(0,1,10) ZMK_MOCK_PRESS(0,0,10) ZMK_MOCK_RELEASE(0,0,10) ZMK_MOCK_PRESS(0,1,10) ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) >; }; \ No newline at end of file diff --git a/app/tests/toggle-layer/toggle-mode-off/events.patterns b/app/tests/toggle-layer/toggle-mode-off/events.patterns new file mode 100644 index 00000000..30996ad0 --- /dev/null +++ b/app/tests/toggle-layer/toggle-mode-off/events.patterns @@ -0,0 +1,4 @@ +s/.*hid_listener_keycode/kp/p +s/.*to_keymap_binding/to/p +s/.*layer_changed/layer_changed/p +s/.*tog_keymap_binding/tog/p \ No newline at end of file diff --git a/app/tests/toggle-layer/toggle-mode-off/keycode_events.snapshot b/app/tests/toggle-layer/toggle-mode-off/keycode_events.snapshot new file mode 100644 index 00000000..e7db477d --- /dev/null +++ b/app/tests/toggle-layer/toggle-mode-off/keycode_events.snapshot @@ -0,0 +1,14 @@ +tog_pressed: position 1 layer 1 +tog_released: position 1 layer 1 +kp_pressed: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 +kp_released: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 +to_pressed: position 3 layer 1 +layer_changed: layer 1 state 1 locked 1 +to_released: position 3 layer 1 +kp_pressed: usage_page 0x0C keycode 0xB5 implicit_mods 0x00 explicit_mods 0x00 +kp_released: usage_page 0x0C keycode 0xB5 implicit_mods 0x00 explicit_mods 0x00 +tog_pressed: position 1 layer 1 +layer_changed: layer 1 state 0 locked 1 +tog_released: position 1 layer 1 +kp_pressed: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 +kp_released: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 \ No newline at end of file diff --git a/app/tests/toggle-layer/toggle-mode-off/native_sim.keymap b/app/tests/toggle-layer/toggle-mode-off/native_sim.keymap new file mode 100644 index 00000000..a89182fc --- /dev/null +++ b/app/tests/toggle-layer/toggle-mode-off/native_sim.keymap @@ -0,0 +1,25 @@ +#include +#include +#include +#include "../behavior_keymap.dtsi" + +&tog { + toggle-mode = "off"; +}; + +&kscan { + events = < + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(1,1,10) + ZMK_MOCK_RELEASE(1,1,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + >; +}; \ No newline at end of file diff --git a/app/tests/toggle-layer/toggle-mode-on/events.patterns b/app/tests/toggle-layer/toggle-mode-on/events.patterns new file mode 100644 index 00000000..397fef4f --- /dev/null +++ b/app/tests/toggle-layer/toggle-mode-on/events.patterns @@ -0,0 +1,2 @@ +s/.*hid_listener_keycode/kp/p +s/.*tog_keymap_binding/tog/p \ No newline at end of file diff --git a/app/tests/toggle-layer/toggle-mode-on/keycode_events.snapshot b/app/tests/toggle-layer/toggle-mode-on/keycode_events.snapshot new file mode 100644 index 00000000..3dd5f27e --- /dev/null +++ b/app/tests/toggle-layer/toggle-mode-on/keycode_events.snapshot @@ -0,0 +1,8 @@ +tog_pressed: position 1 layer 1 +tog_released: position 1 layer 1 +kp_pressed: usage_page 0x0C keycode 0xB5 implicit_mods 0x00 explicit_mods 0x00 +kp_released: usage_page 0x0C keycode 0xB5 implicit_mods 0x00 explicit_mods 0x00 +tog_pressed: position 1 layer 1 +tog_released: position 1 layer 1 +kp_pressed: usage_page 0x0C keycode 0xB5 implicit_mods 0x00 explicit_mods 0x00 +kp_released: usage_page 0x0C keycode 0xB5 implicit_mods 0x00 explicit_mods 0x00 \ No newline at end of file diff --git a/app/tests/key-repeat/tap-when-rolling/native_posix.keymap b/app/tests/toggle-layer/toggle-mode-on/native_sim.keymap similarity index 65% rename from app/tests/key-repeat/tap-when-rolling/native_posix.keymap rename to app/tests/toggle-layer/toggle-mode-on/native_sim.keymap index bb129d14..690787eb 100644 --- a/app/tests/key-repeat/tap-when-rolling/native_posix.keymap +++ b/app/tests/toggle-layer/toggle-mode-on/native_sim.keymap @@ -3,11 +3,19 @@ #include #include "../behavior_keymap.dtsi" +&tog { + toggle-mode = "on"; +}; + &kscan { events = < ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_PRESS(0,0,10) ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_PRESS(0,0,10) ZMK_MOCK_RELEASE(0,0,10) >; -}; +}; \ No newline at end of file diff --git a/app/tests/transparent/layered/native_posix_64.keymap b/app/tests/transparent/layered/native_sim.keymap similarity index 100% rename from app/tests/transparent/layered/native_posix_64.keymap rename to app/tests/transparent/layered/native_sim.keymap diff --git a/app/tests/transparent/normal/native_posix_64.keymap b/app/tests/transparent/normal/native_posix_64.keymap deleted file mode 100644 index 502f7ccc..00000000 --- a/app/tests/transparent/normal/native_posix_64.keymap +++ /dev/null @@ -1,8 +0,0 @@ -#include -#include -#include -#include "../behavior_keymap.dtsi" - -&kscan { - events = ; -}; \ No newline at end of file diff --git a/app/tests/none/normal/native_posix_64.keymap b/app/tests/transparent/normal/native_sim.keymap similarity index 100% rename from app/tests/none/normal/native_posix_64.keymap rename to app/tests/transparent/normal/native_sim.keymap diff --git a/app/tests/wpm/1-single_keypress/native_posix_64.conf b/app/tests/wpm/1-single_keypress/native_sim.conf similarity index 100% rename from app/tests/wpm/1-single_keypress/native_posix_64.conf rename to app/tests/wpm/1-single_keypress/native_sim.conf diff --git a/app/tests/wpm/1-single_keypress/native_posix_64.keymap b/app/tests/wpm/1-single_keypress/native_sim.keymap similarity index 100% rename from app/tests/wpm/1-single_keypress/native_posix_64.keymap rename to app/tests/wpm/1-single_keypress/native_sim.keymap diff --git a/app/tests/wpm/2-multiple_keypress/native_posix_64.conf b/app/tests/wpm/2-multiple_keypress/native_sim.conf similarity index 100% rename from app/tests/wpm/2-multiple_keypress/native_posix_64.conf rename to app/tests/wpm/2-multiple_keypress/native_sim.conf diff --git a/app/tests/wpm/2-multiple_keypress/native_posix_64.keymap b/app/tests/wpm/2-multiple_keypress/native_sim.keymap similarity index 100% rename from app/tests/wpm/2-multiple_keypress/native_posix_64.keymap rename to app/tests/wpm/2-multiple_keypress/native_sim.keymap diff --git a/app/west.yml b/app/west.yml index 5737bd00..0d9d1e02 100644 --- a/app/west.yml +++ b/app/west.yml @@ -7,7 +7,7 @@ manifest: projects: - name: zephyr remote: zmkfirmware - revision: v3.5.0+zmk-fixes + revision: v4.1.0+zmk-fixes clone-depth: 1 import: name-blocklist: @@ -18,7 +18,6 @@ manifest: - hal_microchip - hal_nxp - hal_openisa - - hal_silabs - hal_xtensa - hal_st - hal_ti @@ -29,13 +28,20 @@ manifest: - openthread - edtt - trusted-firmware-m - - name: nanopb - revision: 65cbefb4695bc7af1cb733ced99618afb3586b20 - path: modules/lib/nanopb - remote: zephyrproject-rtos + - name: hal_stm32 + revision: 4fcc3a3f32abe1c4cb76d9d1cef967728dd03908 + path: modules/hal/stm32 + remote: zmkfirmware + groups: + - hal + - name: lvgl + revision: f1db87ee98f1810328a8419572fa42a3b5f352ae + path: modules/lib/gui/lvgl + remote: zmkfirmware - name: zmk-studio-messages - revision: a79267a9661241a6603b6da3d2b3f71e8023a9d9 + revision: 6cb4c283e76209d59c45fbcb218800cd19e9339d path: modules/msgs/zmk-studio-messages remote: zmkfirmware + group-filter: [+optional] self: west-commands: scripts/west-commands.yml diff --git a/docs/.eslintignore b/docs/.eslintignore deleted file mode 100644 index b7dab5e9..00000000 --- a/docs/.eslintignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -build \ No newline at end of file diff --git a/docs/.eslintrc.js b/docs/.eslintrc.js deleted file mode 100644 index f29e73d2..00000000 --- a/docs/.eslintrc.js +++ /dev/null @@ -1,29 +0,0 @@ -module.exports = { - env: { - browser: true, - commonjs: true, - es2021: true, - node: true, - }, - extends: [ - "eslint:recommended", - "plugin:react/recommended", - "plugin:react/jsx-runtime", - "plugin:mdx/recommended", - "prettier", - ], - parserOptions: { - ecmaFeatures: { - jsx: true, - }, - ecmaVersion: 2021, - sourceType: "module", - }, - plugins: ["react"], - rules: { "react/no-unescaped-entities": "off" }, - settings: { - react: { - version: "detect", - }, - }, -}; diff --git a/docs/.prettierignore b/docs/.prettierignore index 2e03c0b0..5b489b61 100644 --- a/docs/.prettierignore +++ b/docs/.prettierignore @@ -3,3 +3,4 @@ build .docusaurus *.mustache hardware-metadata.json +src/hardware-metadata.d.ts diff --git a/docs/.prettierrc.js b/docs/.prettierrc.js index 2a1f0b48..2a60b0bd 100644 --- a/docs/.prettierrc.js +++ b/docs/.prettierrc.js @@ -1,3 +1,4 @@ module.exports = { endOfLine: "auto", + trailingComma: "es5", }; diff --git a/docs/blog/2020-08-12-zmk-sotf-1.md b/docs/blog/2020-08-12-zmk-sotf-1.md index c93566b1..9ea4038b 100644 --- a/docs/blog/2020-08-12-zmk-sotf-1.md +++ b/docs/blog/2020-08-12-zmk-sotf-1.md @@ -14,11 +14,11 @@ With interest and Discord activity growing, it seemed important to lay out the p There's been lots of various activity in ZMK land! -- [Nicell](https://github.com/Nicell) (nice!nano creator) contributed initial [RGB Underglow](/docs/features/underglow) ([#64](https://github.com/zmkfirmware/zmk/pull/64)) support to ZMK. +- [Nicell](https://github.com/Nicell) (nice!nano creator) contributed initial [RGB Underglow](/docs/features/lighting#rgb-underglow) ([#64](https://github.com/zmkfirmware/zmk/pull/64)) support to ZMK. - Tons of [documentation](/docs) work. - Refactoring ([#73](https://github.com/zmkfirmware/zmk/pull/73), [#74](https://github.com/zmkfirmware/zmk/pull/74)) of [keymaps](/docs/keymaps) to make them simpler for users. - Mod-Tap Behavior (docs coming!) is much improved ([#69](https://github.com/zmkfirmware/zmk/pull/69)) and usable now. -- An initial [`setup.sh`](/docs/user-setup#user-config-setup-script) script was created, allowing users to quickly bootstrap a "user config" setup and push it to GitHub, where GitHub Actions will build the firmware for you. +- An initial `setup.sh` script was created, allowing users to quickly bootstrap a "user config" setup and push it to GitHub, where GitHub Actions will build the firmware for you. - Corne shield ([#80](https://github.com/zmkfirmware/zmk/pull/80)) shield definition was added. - Initial [encoder](/docs/features/encoders) support ([#61](https://github.com/zmkfirmware/zmk/pull/61)) was added. diff --git a/docs/blog/2022-04-02-zephyr-3-0.md b/docs/blog/2022-04-02-zephyr-3-0.md index 15a79500..539f6dc7 100644 --- a/docs/blog/2022-04-02-zephyr-3-0.md +++ b/docs/blog/2022-04-02-zephyr-3-0.md @@ -73,7 +73,7 @@ The following changes have [already been completed](https://github.com/zmkfirmwa ### RGB Underglow -Zephyr's WS2812 `led_strip` driver added a new required property. When adding [underglow](/docs/features/underglow#adding-rgb-underglow-to-a-board) to a board, you now must also add the additional include `#include ` at the top of your devicetree file, and add a `color-mapping` property like: +Zephyr's WS2812 `led_strip` driver added a new required property. When adding [underglow](/docs/features/lighting#adding-rgb-underglow-support-to-a-keyboard) to a board, you now must also add the additional include `#include ` at the top of your devicetree file, and add a `color-mapping` property like: ```dts led_strip: ws2812@0 { diff --git a/docs/blog/2022-04-10-zmk-sotf-5.md b/docs/blog/2022-04-10-zmk-sotf-5.md index 55faeb41..e771f2e2 100644 --- a/docs/blog/2022-04-10-zmk-sotf-5.md +++ b/docs/blog/2022-04-10-zmk-sotf-5.md @@ -130,7 +130,7 @@ Another persistent bug that Apple users experienced was related to crashes and p The long awaited locality enhancement was finally merged by [petejohanson] in [#547](https://github.com/zmkfirmware/zmk/pull/547), allowing more fine grained control of where certain behaviors are invoked. Some key improvements thanks to the changes: -- [RGB Underglow](/docs/features/underglow) behaviors now run globally, so enabling/disabling RGB, changing the color, animation, etc. applies to both sides of a split properly. +- [RGB Underglow](/docs/features/lighting#rgb-underglow) behaviors now run globally, so enabling/disabling RGB, changing the color, animation, etc. applies to both sides of a split properly. - [Reset](/docs/keymaps/behaviors/reset#reset)/[Bootloader](/docs/keymaps/behaviors/reset#bootloader-reset) behaviors now run wherever the key was pressed. For example, adding a `&bootloader` reference to the peripheral side of a split will now put that side of the split into the bootloader when pressed. #### Split Connections @@ -141,7 +141,7 @@ The long awaited locality enhancement was finally merged by [petejohanson] in [# #### Backlight -[bortoz](https://github.com/bortoz) added [single color backlight support](/docs/features/backlight) in [#904](https://github.com/zmkfirmware/zmk/pull/904) for those keyboards that have it as an alternative to RGB underglow. +[bortoz](https://github.com/bortoz) added [single color backlight support](/docs/features/lighting#backlight) in [#904](https://github.com/zmkfirmware/zmk/pull/904) for those keyboards that have it as an alternative to RGB underglow. #### E-Paper Display (EPD) Driver @@ -219,7 +219,7 @@ This can be useful to be sure that lowering brightness doesn't set the brightnes ## Board/Shield Metadata -[nicell] and [petejohanson] worked together in [#883](https://github.com/zmkfirmware/zmk/pull/883) to settle on a [metadata format](/docs/development/hardware-integration/hardware-metadata-files) that is used to document every board and shield. This now drives automatic generation of our [supported hardware](/docs/hardware) page and our +[nicell] and [petejohanson] worked together in [#883](https://github.com/zmkfirmware/zmk/pull/883) to settle on a [metadata format](/docs/hardware-integration/hardware-metadata-files) that is used to document every board and shield. This now drives automatic generation of our [supported hardware](/docs/hardware) page and our more nuanced GH Actions automation for testing changes to ZMK. ## Coming Soon! diff --git a/docs/blog/2023-10-05-zmk-sotf-6.md b/docs/blog/2023-10-05-zmk-sotf-6.md index 609425ee..ba1bf63b 100644 --- a/docs/blog/2023-10-05-zmk-sotf-6.md +++ b/docs/blog/2023-10-05-zmk-sotf-6.md @@ -104,7 +104,7 @@ Note that documentation is still lacking for utilizing more than one peripheral [petejohanson] contributed a fix to release held keys on peripheral disconnect [#1340](https://github.com/zmkfirmware/zmk/pull/1340), which makes scenarios where a split disconnects unexpectedly less painful. -[petejohanson] also improved [the `settings_reset` shield](/docs/troubleshooting/connection-issues#split-keyboard-halves-unable-to-pair) by making it clear bonds more reliably, and allow it to build for all boards in [#1879](https://github.com/zmkfirmware/zmk/pull/1879). +[petejohanson] also improved [the `settings_reset` shield](/docs/troubleshooting/connection-issues#split-keyboard-parts-unable-to-pair) by making it clear bonds more reliably, and allow it to build for all boards in [#1879](https://github.com/zmkfirmware/zmk/pull/1879). [petejohanson] and [xudongzheng] contributed additional split connectivity improvements, via using directed advertising in [#1913](https://github.com/zmkfirmware/zmk/pull/1913) and improving the robustness of central scanning in [#1912](https://github.com/zmkfirmware/zmk/pull/1912). @@ -130,7 +130,7 @@ This refactor paved way to implementing a long-awaited feature, encoder support #### Underglow auto-off options -[ReFil] added two [new RGB auto off options](/docs/config/underglow), one using an idle timeout and the other USB status in [#1010](https://github.com/zmkfirmware/zmk/pull/1010). +[ReFil] added two [new RGB auto off options](/docs/config/lighting#rgb-underglow), one using an idle timeout and the other USB status in [#1010](https://github.com/zmkfirmware/zmk/pull/1010). #### nice!view support @@ -173,7 +173,7 @@ For users or future contributors that might want to dive into writing their own #### Shield interconnects -[petejohanson] updated the [new shield guide](/docs/development/hardware-integration/new-shield) for non-Pro Micro interconnects including Xiao, Arduino Uno and Blackpill in [#1607](https://github.com/zmkfirmware/zmk/pull/1607). +[petejohanson] updated the [new shield guide](/docs/hardware-integration/new-shield) for non-Pro Micro interconnects including Xiao, Arduino Uno and Blackpill in [#1607](https://github.com/zmkfirmware/zmk/pull/1607). #### Bluetooth feature page @@ -214,7 +214,7 @@ USB HID polling interval now defaults to 1 ms, i.e. a 1000Hz polling rate, thank - Waterfowl [#1554](https://github.com/zmkfirmware/zmk/pull/1554) - [JW2586](https://github.com/JW2586) - Kyria Rev 3 [#1627](https://github.com/zmkfirmware/zmk/pull/1627) - [petejohanson] - Leeloo v2 and Leeloo-Micro [#1762](https://github.com/zmkfirmware/zmk/pull/1762) - [ClicketySplit](https://github.com/ClicketySplit) -- Spaceman Pancake [#1400](https://github.com/zmkfirmware/zmk/pull/1400) - [jasonhazel](https://github.com/jasonhazel) +- Spaceboards Pancake [#1400](https://github.com/zmkfirmware/zmk/pull/1400) - [jasonhazel](https://github.com/jasonhazel) - Reviung5 [#1548](https://github.com/zmkfirmware/zmk/pull/1548) - [zblesk](https://github.com/zblesk) ## New Boards diff --git a/docs/blog/2024-01-05-zmk-tools.md b/docs/blog/2024-01-05-zmk-tools.md index 1104396d..f18ad30d 100644 --- a/docs/blog/2024-01-05-zmk-tools.md +++ b/docs/blog/2024-01-05-zmk-tools.md @@ -19,7 +19,7 @@ Stay tuned for future installments in the series! ## ZMK Tools -[ZMK Tools](https://github.com/joelspadin/zmk-tools) is an extension for [Visual Studio Code](https://code.visualstudio.com) that helps with editing a ZMK user config repo or a fork of ZMK. I originally created it to add some code completion in `.keymap` files, but then I realized that with the web version of VS Code, I could also let you set up a user config repo and build firmware, much like the [user setup script](/docs/user-setup#user-config-setup-script), except without downloading a single thing. +[ZMK Tools](https://github.com/joelspadin/zmk-tools) is an extension for [Visual Studio Code](https://code.visualstudio.com) that helps with editing a ZMK user config repo or a fork of ZMK. I originally created it to add some code completion in `.keymap` files, but then I realized that with the web version of VS Code, I could also let you set up a user config repo and build firmware, much like the user setup script, except without downloading a single thing. ### User Config Setup in Browser diff --git a/docs/blog/2024-11-11-zmk-studio-mvp-ga.mdx b/docs/blog/2024-11-11-zmk-studio-mvp-ga.mdx new file mode 100644 index 00000000..d1bb7218 --- /dev/null +++ b/docs/blog/2024-11-11-zmk-studio-mvp-ga.mdx @@ -0,0 +1,261 @@ +--- +title: "ZMK Studio MVP General Availability" +authors: petejohanson +tags: [firmware, studio, core] +--- + +import Metadata from "@site/src/data/hardware-metadata.json"; + +import ThemedImage from "@theme/ThemedImage"; + +import studioApp from "./assets/2024-11-11-zmk-studio-mvp-ga/zmk-studio-screenshot.png"; +import studioAppDarkMode from "./assets/2024-11-11-zmk-studio-mvp-ga/zmk-studio-screenshot-dark-mode.png"; + +import niceAndTyperactive from "./assets/2024-11-11-zmk-studio-mvp-ga/niceandtyperactive.png"; +import niceAndTyperactiveDarkMode from "./assets/2024-11-11-zmk-studio-mvp-ga/niceandtyperactive-dark-mode.png"; + +import kinesis from "./assets/2024-11-11-zmk-studio-mvp-ga/kinesis.png"; +import kinesisDarkMode from "./assets/2024-11-11-zmk-studio-mvp-ga/kinesis-dark-mode.png"; + +import cannonKeys from "./assets/2024-11-11-zmk-studio-mvp-ga/cannonkeys.png"; +import cannonKeysDarkMode from "./assets/2024-11-11-zmk-studio-mvp-ga/cannonkeys-dark-mode.png"; + +import keychron from "./assets/2024-11-11-zmk-studio-mvp-ga/keychron.png"; +import keychronDarkMode from "./assets/2024-11-11-zmk-studio-mvp-ga/keychron-dark-mode.png"; + +import littleKeyboards from "./assets/2024-11-11-zmk-studio-mvp-ga/littlekeyboards.avif"; +import littleKeyboardsDarkMode from "./assets/2024-11-11-zmk-studio-mvp-ga/littlekeyboards-dark-mode.avif"; + +import keebmaker from "./assets/2024-11-11-zmk-studio-mvp-ga/keebmaker.png"; +import keebmakerDarkMode from "./assets/2024-11-11-zmk-studio-mvp-ga/keebmaker-dark-mode.png"; + +import keebio from "./assets/2024-11-11-zmk-studio-mvp-ga/keebio.avif"; + +import mode from "./assets/2024-11-11-zmk-studio-mvp-ga/mode.png"; +import modeDarkMode from "./assets/2024-11-11-zmk-studio-mvp-ga/mode-dark-mode.png"; + +import phaseByte from "./assets/2024-11-11-zmk-studio-mvp-ga/phasebyte.png"; + +import deskHero from "./assets/2024-11-11-zmk-studio-mvp-ga/deskhero.webp"; +import deskHeroDarkMode from "./assets/2024-11-11-zmk-studio-mvp-ga/deskhero-dark-mode.webp"; + +import mechlovin from "./assets/2024-11-11-zmk-studio-mvp-ga/mechlovin.png"; +import mechlovinDarkMode from "./assets/2024-11-11-zmk-studio-mvp-ga/mechlovin-dark-mode.png"; + +import splitkb from "./assets/2024-11-11-zmk-studio-mvp-ga/splitkb.png"; +import splitkbDarkMode from "./assets/2024-11-11-zmk-studio-mvp-ga/splitkb-dark-mode.png"; + +import keycapsss from "./assets/2024-11-11-zmk-studio-mvp-ga/keycapsss.png"; +import keycapsssDarkMode from "./assets/2024-11-11-zmk-studio-mvp-ga/keycapsss-dark-mode.png"; + +import mekibo from "./assets/2024-11-11-zmk-studio-mvp-ga/mekibo.png"; +import mekiboDarkMode from "./assets/2024-11-11-zmk-studio-mvp-ga/mekibo-dark-mode.png"; + +I'm delighted to announce that after many months of work, the ZMK Studio Minimum Viable Product (MVP) has reached General Availability (GA) status. I'm very excited with the feature set and foundation we've gotten into this first release, and equally excited for the upcoming work to add even more features. + +ZMK Studio provides runtime keymap functionality for ZMK powered devices, allowing you to make changes without the need to flash new firmware. It is a combination of major firmware enhancements paired with a new frontend application for interacting with your keyboard. + +The app is available for compatible browsers, and as an installable desktop application for Linux, macOS, and Windows. + + + +{/* truncate */} + +## Gratitude + +I'm extremely grateful for everyone who has helped make this release possible, which includes testers, code reviewers/contributors, including [Nick-Munnich], [joelspadin], and [caksoylar], as well as the collection of vendors who have directly sponsored my work on the project, allowing it to come to fruition _much_ faster than it would have taken me to do in my spare time. + +### Vendor Sponsors + +The following sponsors were instrumental in making ZMK Studio possible by sponsoring my work on the firmware and frontend application: + +{(function() { +const sponsors = [ +{ +level: "Platinum", +vendors: [ +{ +name: "nice!keyboards / typeractive", +img: niceAndTyperactive, +darkModeImg: niceAndTyperactiveDarkMode, +url: "https://typeractive.xyz/", +}, +{ +name: "Kinesis", +img: kinesis, +darkModeImg: kinesisDarkMode, +url: "https://kinesis-ergo.com/", +}, +], +}, +{ +level: "Gold+", +vendors: [ +{ +name: "CannonKeys", +img: cannonKeys, +darkModeImg: cannonKeysDarkMode, +url: "https://cannonkeys.com/", +}, +{ +name: "Keychron", +img: keychron, +darkModeImg: keychronDarkMode, +url: "https://keychron.com/", +}, +], +}, +{ +level: "Gold", +vendors: [ +{ +name: "Little Keyboards", +img: littleKeyboards, +darkModeImg: littleKeyboardsDarkMode, +url: "https://littlekeyboards.com/", +}, +{ +name: "Keebmaker", +img: keebmaker, +darkModeImg: keebmakerDarkMode, +url: "https://keebmaker.com/", +}, +], +}, +{ +level: "Silver", +vendors: [ +{ +name: "keeb.io", +img: keebio, +url: "https://keeb.io/", +}, +{ +name: "Mode Designs", +img: mode, +darkModeImg: modeDarkMode, +url: "https://modedesigns.com/", +}, +], +}, +{ +level: "Bronze", +vendors: [ +{ +name: "deskhero", +img: deskHero, +darkModeImg: deskHeroDarkMode, +url: "https://deskhero.ca/", +}, +{ +name: "PhaseByte", +img: phaseByte, +url: "https://phasebyte.com/", +}, +{ +name: "Mechlovin'", +img: mechlovin, +darkModeImg: mechlovinDarkMode, +url: "https://mechlovin.studio/", +}, +], +}, +{ +level: "Additional", +vendors: [ +{ +name: "splitkb.com", +img: splitkb, +darkModeImg: splitkbDarkMode, +url: "https://splitkb.com/", +}, +{ +name: "keycapsss", +img: keycapsss, +darkModeImg: keycapsssDarkMode, +url: "https://keycapsss.com/", +}, +{ +name: "mekibo", +img: mekibo, +darkModeImg: mekiboDarkMode, +url: "https://mekibo.com/", +}, +], +}, +]; + +return sponsors.map(g => { +return ( + +
+

{g.level} Level

+
+ {g.vendors.map((v) => { + return ( + + + + ); + })} +
+
+); }); }())} + +## Using ZMK Studio + +:::note + +For keyboard maintainers, additional changes are needed to add metadata about the keyboard's physical layouts in order to use ZMK Studio. See the documentation on [physical layouts](/docs/hardware-integration/physical-layouts#optional-keys-property) for more information. +::: + +To use ZMK Studio, you need to have a firmware for your keyboard with the feature enabled, as well as a small keymap change to add an unlock key. See [Building with ZMK Studio](/docs/features/studio#building) and [ZMK Studio keymap changes](/docs/features/studio#keymap-changes) for more details. + +See [Accessing ZMK Studio](/docs/features/studio#accessing-zmk-studio) for more details on the browser and desktop options for using the ZMK Studio application. +Note: Depending on your browser, operating system, and app vs website selection, you may be limited to connecting over USB. See the previous link for details. + +## In-Tree Supported Keyboards + +The following in-tree keyboards have been updated to support ZMK Studio. +If your keyboard is supported by an external module/config, check with the maintainer to see +if support has been added. + +{(function() { +return ( + +
    + {Metadata.filter((m) => (m.features || []).includes("studio")).map((m) => { + return
  • {m.name}
  • ; + })} +
+); }())} + +## Next Steps + +The ZMK Studio MVP is truly that, a "minimum viable product". It establishes the core firmware functionality and frontend application infrastructure in order to validate the technology, prove the approaches, and get initial core features into user's hands as early as possible. + +There are many ZMK features that are not yet possible to update in ZMK Studio. For a better understanding of where ZMK Studio is today, and where we are headed, please have a look at the [ZMK Studio capabilities](/docs/features/studio#capabilities) table. + +[petejohanson]: https://github.com/petejohanson +[caksoylar]: https://github.com/caksoylar +[Nick-Munnich]: https://github.com/Nick-Munnich +[joelspadin]: https://github.com/joelspadin diff --git a/docs/blog/2025-03-20-contributor-sync-1.md b/docs/blog/2025-03-20-contributor-sync-1.md new file mode 100644 index 00000000..9267a8e5 --- /dev/null +++ b/docs/blog/2025-03-20-contributor-sync-1.md @@ -0,0 +1,111 @@ +--- +title: Contributor Sync February 2025 +authors: nmunnich +tags: [sync, keyboards, firmware, oss, ble] +--- + +On the 26th of February some of the ZMK contributors got together for a contributor sync. In the interest of transparency, it was decided that meeting notes from the sync would be published on the ZMK webpage. + + + +The following contributors were able to attend the sync: + +- [petejohanson] +- [caksoylar] +- [nmunnich] + +[joelspadin] was also able to comment on the meeting notes after the meeting. The notes have been adjusted accordingly. + +## Meeting Notes + +### Meeting Purpose + +- Purpose of meeting is to sync up, discuss blockers, talk about big picture work. +- Meeting notes should be published on the webpage, while the meetings themselves are private. + +### Pete's Summary + +- Starting a new job Mon. 2025-03-03. Reduced time for ZMK, but more freedom to work on what Pete wants/ZMK needs. +- Two main ZMK-contracts need to be finished: + - Pointer work. Basically good to go, just needs 2721 to be tested and verified as as fix. Then ZMK release v0.2 will happen. (This has already happened at time of publishing these notes) + - Wired split work. Separated into parts: + - UART full duplex, PR 2766. What's there seems very solid, barring some final touchups. Should have v0.2 released prior to merging this. (This has already happened at time of publishing these notes) + - Half-duplex with a single wire. To be a separate PR, but framework should be good for when that happens. To work on after UART full duplex is merged. + - Runtime dynamic switching between wired and wireless split using a GPIO as sense pin for wired. +- After contracts finish, look at versioning again. Better documentation, defaults, workflow improvements, etc. +- More Studio work is also on the cards. Studio work will continue, but slowly. + - Hoping for help from community around UI/UX, in particular clarity around saving edited keymaps would be good. + - Want to add runtime property modification next, allowing for e.g. changing hold-tap flavors in Studio. +- Investigate zmk-cli a bit; Pete has not investigated this enough and wants to get a solid overview of it. + +### Nick's summary: + +- Trying to make combo PR feasible (allows combo triggers inside behaviors, enabling e.g. tap-only combos) + - Adding `behavior_state_changed` event has a precursor (see 573, 532) + - Requires deleting ZMK_BEHAVIOR_TRANSPARENT + - Requires some refactoring/investigating of sensors/encoders, as they rely on ZMK_BEHAVIOR_TRANSPARENT +- Locking PR, needs review. Same with 2811. +- RP2040-Zero board definition matches upstream, acts as a temporary board definition until we update Zephyr (introduced to Zephyr in 4.1) +- Parameterised mod-morph and tap-dance + - Question: Do we move hold-tap over to the same system? + - Plan after discussion is to add a second hold-tap `compatible` and move over to it, to avoid breaking existing keymaps. +- Config index page and "Customising ZMK" docs overhaul, making them more visible and easier to understand. + +### Cem's summary: + +- Keymap recipes has been shelved for the time being. Prefer to have better examples in the behavior pages themselves, e.g. timeless homerow mods as an example under hold-tap. +- Hold-tap page needs overhauling. (This has already happened at time of publishing these notes) +- New behavior guide needs overhauling and should be aimed towards modules. +- 2758 needs a review and merge. (This has already happened at time of publishing these notes) + +### Other Discussion: + +#### ZMK-CLI: + +- It is likely time to rip the bandaid off and switch over to it, getting rid of the old setup script. +- CLI has some flaws that may need improvement (e.g. around modules), but is already much better than the existing script. +- New shield guide should be adjusted to take advantage of ZMK-CLI's templates. +- Joel requests issues be opened talking about points to improve on. + +#### zmk-locales: + +- Should be moved under zmkfirmware organisation + - Should do the same for zmk-locales-generator, and maybe figure out a way to set up a GH action that makes it send PRs to zmk-locales. + - Move first, make these adjustments afterwards + - Documenting them in list of keycodes page with a locale selector would be ideal, but complex + - Refer people to headers directly in the docs for the time being +- Runtime locale changing would be preferred, but would also be a lot of work. + - zmk-locales could be viewed as a (semi-permanent) bandaid until such a time + +#### Modules: + +- Need to find the right balance between overloading contributers and overfragmentation +- ZMK module collection https://github.com/nmunnich/zmk-module-collection seems like a good way to go forward + - Main concerns: + - Need to handle breaking changes elegantly, informing users _which_ module is to blame for the new version not working + - Need to have tests for modules (can assume keyboard works if it builds, what about other stuff?) + - Maintainability + - Hopefully have more volunteers from the community to look at modules and verify them, should be much easier than reviewing PRs + - Automated tests + - Add an "experimental" group tag for unverified modules + - Despite concerns, plenty of upsides. Seems like the best way forwards, and it is worth putting more time into. + - Some upsides: + - Very easy for users to add modules, particularly ones that depend on other modules + - Automated testing and notification for module owners + - Better discoverability + - Versioning parity between the collection and ZMK itself to allow for easy upgrades + - Likely will want to introduce "RC" releases, to allow module owners the time to fix any issues with their module before an actual release + - Likely will only accept keyboards and drivers initially, until better tooling and systems are in place, given they are easier to validate + +#### Minor notes: + +- Documenting BLE tests would be useful +- Need new display and lighting systems at some point +- Zephyr upgrade was not discussed in this meeting +- Would be good to give some extra priority to PRs from new contributors, to help motivate them. +- Would be nice to have another SOTF at some point. Doing a full commit overview is unfeasible at this point, but touching on the major issues seems doable. + +[petejohanson]: https://github.com/petejohanson +[joelspadin]: https://github.com/joelspadin +[caksoylar]: https://github.com/caksoylar +[nmunnich]: https://github.com/nmunnich diff --git a/docs/blog/2025-06-20-pinned-zmk.md b/docs/blog/2025-06-20-pinned-zmk.md new file mode 100644 index 00000000..4c9cb06e --- /dev/null +++ b/docs/blog/2025-06-20-pinned-zmk.md @@ -0,0 +1,110 @@ +--- +title: "Pin your ZMK version" +authors: nmunnich +tags: [keyboards, firmware, oss, versioning] +--- + +ZMK is preparing for a big breaking change. As such, users should consider pinning their ZMK version. Read on to find out more about our versioning system and how you can pin your ZMK version. + + + +## ZMK Versioning -- The 'what' and the 'why' + +Around 6 months ago, ZMK began using versioning. Prior to this point, all ZMK users ran their firmware off of `main`. This meant that users would always get the latest and greatest changes whenever they built new firmware, but on occasion there would be breaking changes in `main` that resulted in user confusion. + +Avoiding this user confusion became a limiting factor when it came to making changes. [Zephyr](https://www.zephyrproject.org/), the RTOS that ZMK is based off of, made some breaking changes in version 3.6. Hence ZMK has been stuck on Zephyr 3.5 for over 1.5 years, while Zephyr has already moved on to version 4.1. Asking when ZMK will upgrade is a frequent question we get asked, as the new version comes with plenty of improvements and drivers for newer, exciting hardware. + +With versioning now in place, users can pin their ZMK configuration to a particular version. This prevents sudden breaking changes from happening without user opt-in and frees ZMK contributors to make breaking changes more frequently, as is necessary. + +### ZMK's Versioning System + +ZMK follows the [Semantic Versioning](https://semver.org/) standard. Versions are `vX.Y.Z`. ZMK uses release branches and tags: Every major or minor version bump, a new branch and tag are created. The tag points to the latest patch version. For example, when releasing `v0.2.0` the branch `v0.2-branch` and tag `v0.2` were created. When patches are made, such as for `v0.2.1`, the branch and tag are updated to point to `v0.2.1` instead of `v0.2.0`. This way, users can receive non-breaking security and bug fixes without needing to bump their version. + +Whenever ZMK releases a major version with breaking changes, a proper changelog will be provided detailing the major changes from the previous version, along with clear instructions on how to upgrade and fix any breaking changes. + +## To Pin or Not To Pin + +For casual users of ZMK, pinning your version is recommended. Unpinned ZMK configurations are mainly suitable for those more heavily involved or interested in ZMK development. Moving forward, if you are on the `main` branch of ZMK you will be considered a (highly valued) tester, rather than a user. + +To ensure that you still update your ZMK version regularly and get the latest and greatest features that interest you, I would recommend setting up notifications about new releases. You can do so on the [GitHub repository](https://github.com/zmkfirmware/zmk): + +![Image of where to find the custom notifications](assets/2025-06-20-pinned-zmk/release1.png) +![Image of setting custom notification](assets/2025-06-20-pinned-zmk/release2.png) + +## How To Pin Your ZMK Version + +:::info +If you created your ZMK config on or after `2025-07-03`, then you are already pinned to what was the most recent ZMK version at the time of creation. +::: + +To pin your ZMK version, you need to edit two files: + +### West Manifest + +You need to edit the `config/west.yml` file in your `zmk-config` repository. The `config` folder also contains your keymaps, and is located next to the `build.yaml` file defining which keyboards are built in the first place. + +Your `west.yml` should look something like this (example without [modules](/docs/features/modules) shown for simplicity): + +```yaml {8} showLineNumbers +manifest: + remotes: + - name: zmkfirmware + url-base: https://github.com/zmkfirmware + projects: + - name: zmk + remote: zmkfirmware + revision: main + import: app/west.yml + self: + path: config +``` + +Simply edit the line `revision` to point to the release tag instead of `main`. At the time of writing, the latest release is `v0.2`, making your `west.yml` look something like this: + +```yaml {8} showLineNumbers +manifest: + remotes: + - name: zmkfirmware + url-base: https://github.com/zmkfirmware + projects: + - name: zmk + remote: zmkfirmware + revision: v0.2 + import: app/west.yml + self: + path: config +``` + +See that `main` has changed to `v0.2` on the 8th line. + +### GitHub Action + +You need to edit `.github/workflows/build.yml` in your `zmk-config`. Again, we are simply replacing `main` with the latest release tag (`v0.2` at time of writing): + +```yaml {6} showLineNumbers +name: Build ZMK firmware +on: [push, pull_request, workflow_dispatch] + +jobs: + build: + uses: zmkfirmware/zmk/.github/workflows/build-user-config.yml@main +``` + +Your file's contents should look identical to the above. Replace with the below: + +```yaml {6} showLineNumbers +name: Build ZMK firmware +on: [push, pull_request, workflow_dispatch] + +jobs: + build: + uses: zmkfirmware/zmk/.github/workflows/build-user-config.yml@v0.2 +``` + +The change occurred on the last line. + +### Version Bumping + +If in the future you wish to upgrade your ZMK's version, simply change the tag in both of these files. For example, change from `v0.1` to `v0.2`. + +[nmunnich]: https://github.com/nmunnich diff --git a/docs/blog/2025-12-09-zephyr-4-1.md b/docs/blog/2025-12-09-zephyr-4-1.md new file mode 100644 index 00000000..0d3eb07f --- /dev/null +++ b/docs/blog/2025-12-09-zephyr-4-1.md @@ -0,0 +1,447 @@ +--- +title: "Zephyr 4.1 Update" +authors: nmunnich +tags: [firmware, zephyr, core] +--- + +We're happy to announce that after a long wait, ZMK's `main` branch is now running [Zephyr 4.1](https://docs.zephyrproject.org/latest/releases/release-notes-4.1.html)! + + + +:::note + +The following changes have been made since this blog post was originally published: + +- The [move to `zmk` variants by default](https://github.com/zmkfirmware/zmk/pull/3145) for ZMK boards was documented. + +::: + +Zephyr 4.1 is a large leap forward from our previous version of 3.5, featuring: + +- Support for lots of new SoCs, boards, and shields, such as the WCH CH32V003, the Raspberry Pi Pico 2, and [many many more](https://docs.zephyrproject.org/4.1.0/boards/index.html#boards). +- Hardware Model V2 (HWMv2), providing better support for SoCs which have multiple cores on the same chip, such as the nRF5340. +- Lots of new drivers for chips such as the nPM1300. + +This was a very large undertaking, and a big congratulations and thanks to [petejohanson] is due for all of his hard work in making this possible. + +After we have verified functionality, ironed out any major bugs, and given any third party module maintainers time to update their code, we will be releasing ZMK `v0.4` as the first version to include this Zephyr version update. + +**All** out-of-tree keyboards will need to be updated to use HWMv2. If you maintain such a keyboard, you can find instructions on doing so [below](#moving-to-hwmv2). + +## Switching To the Previous Release + +Some readers may be coming here because the above changes have _broken_ their builds. ZMK uses a formal release process that allows users to build against a specific release, instead of following the unstable/development version found in the `main` branch. However, since this is a relatively new process, many users may still be tracking `main`. + +For all users, except those willing to accept periodic breaks they need to track down, we highly recommend [pinning your ZMK version](./2025-06-20-pinned-zmk.md). Doing so will allow you to avoid any issues related to the Zephyr upgrade, and allow you to choose when to upgrade to a future ZMK release when you are ready. + +## Getting The Changes + +### User Config Repositories Using GitHub Actions + +Existing user repositories that have `revision: main` in their `west.yml` will receive the changes automatically when rebuilding. + +Any user repositories created on or after `2025-07-03` are currently pinned to the most recent ZMK release. You will need to change over to `main` to get these changes immediately, or wait for `v0.4` and upgrade your version then. +See the recent [blog post on pinning ZMK versions](./2025-06-20-pinned-zmk.md) for more information. + +Likewise, if you are currently on `main` but do not wish to upgrade yet, please pin your ZMK version to `v0.3` by following the instructions in said blog post. + +### VS Code & Docker (Dev Container) + +If you build locally using VS Code & Docker then: + +- Pull the latest ZMK `main` with `git pull` for your ZMK checkout +- Reload the project +- If you are prompted to rebuild the remote container, click `Rebuild` +- Otherwise, press `F1` and run `Remote Containers: Rebuild Container` +- Once the container has rebuilt and reloaded, run `west update` to pull the updated Zephyr version and its dependencies. + +Once the container has rebuilt, VS Code will be running the 4.1 Docker image. + +### Local Host Development + +The following steps will get you building ZMK locally against Zephyr 4.1: + +- Run the updated [toolchain installation](/docs/development/local-toolchain/setup) steps, and once completed, remove the previously installed SDK version (optional, existing SDK should still work) +- Install the latest version of `west` by running `pip3 install --upgrade west` in a virtual environment, or add the `--user` flag if `west` is installed globally: `pip3 install --user --upgrade west`. +- Pull the latest ZMK `main` with `git pull` for your ZMK checkout +- Run `west update` to pull the updated Zephyr version and its dependencies +- Run `west packages pip --install` to update required Python packages + +From there, you should be ready to build as normal! + +## ZMK Board Variant + +The new Zephyr version includes a [standard mechanism for extending boards](https://docs.zephyrproject.org/4.1.0/hardware/porting/board_porting.html#board-extensions) found in Zephyr (like the Seeeduino XIAO, or Raspberry Pi Pico) with new variants that include additional configuration/defaults that are relevant to the application. This also means the original "stock" board can still be used as is, if consumers don't want to use those customizations for any reason. + +As a result, all board definitions found in the ZMK tree now must be used with a `zmk` variant. For example, the previous board ID of `adv360pro_left` would now be `adv360pro_left/nrf52840/zmk`, which can be shortened to `adv360pro_left//zmk` since there's only one SoC on the board. + +## Board Revisions + +As part of this change, ZMK is now using board/shield revisions, rather than duplicate board/shield definitions. This means that instead of having e.g. `nice_nano`, and `nice_nano_v2`, we only have `nice_nano`, which by default points to the `2.0.0` revision. To point to the original Nice!Nano V1, you would need to use `nice_nano@1.0.0` where you would have previously used `nice_nano`. Of course, you could also put `nice_nano@2.0.0` if you wished to make that explicit, instead of merely replacing `nice_nano_v2` with `nice_nano`. Some boards, such as the `nrfmicro`, also have additional _board qualifiers_ such as the choice between multiple SoCs. Board qualifiers must always be specified, and do not have defaults. See [Zephyr's overview](https://docs.zephyrproject.org/4.1.0/hardware/porting/board_porting.html#board-terminology) for more information on board qualifiers. The below table provides an overview of some of the differences in in-tree boards we have in ZMK, and how they are selected in the new build system. The shorthand shows the minimum needed to build with a specific board, taking into account defaults. + +- nice!nano (`nice_nano`) + - `nice_nano` -> `nice_nano@1.0.0//zmk` (short: `nice_nano@1//zmk`) + - `nice_nano_v2` -> `nice_nano@2.0.0//zmk` (short: `nice_nano//zmk`) +- nRFMicro (`nrfmicro/nrf52840`) + - `nrfmicro_11` -> `nrfmicro@1.1.0/nrf52840/zmk` (short: `nrfmicro@1.1/nrf52840/zmk`) + - `nrfmicro_11_flipped` -> `nrfmicro@1.1.0/nrf52840/flipped_zmk` (short: `nrfmicro@1.1/nrf52840/flipped_zmk`) + - `nrfmicro_13` -> `nrfmicro@1.3.0/nrf52840/zmk` (short: `nrfmicro/nrf52840/zmk`) + - `nrfmicro_13_52833` -> `nrfmicro@1.3.0/nrf52833/zmk` (short: `nrfmicro/nrf52833/zmk`) +- Mikoto (`mikoto`) + - `mikoto` -> `mikoto@5.20.0//zmk` (short: `mikoto//zmk`) + - `mikoto@6.1` -> `mikoto@6.1.0//zmk` (short: `mikoto@6//zmk`) + - `mikoto@7.2` -> `mikoto@7.2.0//zmk` (short: `mikoto@7//zmk`) +- XIAO RP2040 (`xiao_rp2040`) + - `seeeduino_xiao_rp2040` -> `xiao_rp2040//zmk` +- XIAO nRF52840/BLE (`xiao_ble`) + - `seeeduino_xiao_ble` -> `xiao_ble//zmk` +- BT60 (`bt60`) + - `bt60_v1` -> `bt60@1.0.0//zmk` + - `bt60_v2` -> `bt60@2.0.0//zmk` + - `bt60_hs` -> `bt60_hs//zmk` +- Planck (`planck`) + - `planck_rev6` -> `planck//zmk` +- BDN9 (`bdn9`) + - `bdn9_rev2` -> `bdn9//zmk` +- Ferris Rev2 (`ferris`) + - `ferris_rev02` -> `ferris@2.0.0//zmk` (short: `ferris//zmk`) +- Corne-ish Zen (`corneish_zen`) + - `corneish_zen_v2_left` -> `corneish_zen_left@2.0.0//zmk` (short: `corneish_zen_left//zmk`) + - `corneish_zen_v2_right` -> `corneish_zen_right@2.0.0//zmk` (short: `corneish_zen_right//zmk`) + - `corneish_zen_v1_left` -> `corneish_zen_left@1.0.0//zmk` (short: `corneish_zen_left@1//zmk`) + - `corneish_zen_v1_right` -> `corneish_zen_right@1.0.0//zmk` (short: `corneish_zen_right@1//zmk`) + +The boards above are those which have changed in ZMK's tree, with the addition of the very popular XIAO series. For other boards in Zephyr's tree, please refer to the Zephyr documentation or source files directly. + +## Moving To HWMv2 + +The move to HWMv2 has already been completed for all boards in ZMK's `main` branch. For out-of-tree boards, those need to be converted using either an automated script provided by the Zephyr project, or manually. + +:::note + +This _only_ applies to boards. Shields do not need any changes to account for the move to HWMv2. + +::: + +### Board Upgrade Script + +The Zephyr project provides a script to automate updating a board to HWMv2. To run the script, you'll need to have a local [development setup](/docs/development/local-toolchain/setup/) ready to use. You'll need to ensure you've updated to the new ZMK version and run `west update` to ensure you've got the new Zephyr version with the script available. + +:::note + +The board upgrade script does _not_ work well with split designs. If upgrading a split keyboard board definition, you'll need to update it by hand. + +::: + +The following parameters are relevant for out-of-tree boards: + +- `--board-root ` -- The board ID to update, e.g. `tenbit`. +- `-v ` -- The vendor for the board, this should be a vendor ID, or designer nickname. +- `-g ` -- The name of the group directory under which to place the new board files. Typically this will match the vendor ID. +- `-s ` -- The SoC identifier, e.g. `nrf52840`, `rp2040`, `stm32f411xe`. + +For example: + +```sh +$ python3 zmk/zephyr/scripts/utils/board_v1_to_v2.py \ + --board-root my-zmk-module -b my_board \ + -v my_company -g my_group -s nrf52840 +``` + +### Migrating an Out-Of-Tree Board Manually + +The following steps can be completed manually if you encounter issues with the upgrade script, or don't have a local development setup available. + +#### Vendor Directory + +Boards no longer need to live in a parent directory named after the architecture of the board (.e.g `boards/arm`), and should instead be placed in a vendor/designer named directory (e.g. `boards/my_company`). + +#### Write a `board.yml` + +In your board's folder, next to other files such as `.dts`, add a file called `board.yml`. This file should have the following structure: + +```yml title="board.yml" +board: + name: + vendor: + revision: + format: + default: + exact: + revisions: + - name: + - name: + ... + socs: + - name: + variants: + - name: + - name: + variants: + - name: + ... + - name: + ... +``` + +In the above: + +- `` is the name of the board as specified when selecting a build target, such as `nice_nano`. +- `` is the name of the board's vendor, such as `nicekeyboards`. If you are an individual, rather than acting as an organization, please use your name/online id/similar (e.g. `zhiayang` in the case of the `mikoto`). This value should match the vendor directory name that the board definition folder is placed in the previous section. +- `revision` defines any board revisions. See [Zephyr's overview](https://docs.zephyrproject.org/4.1.0/hardware/porting/board_porting.html#multiple-board-revisions) for more information on board revisions. If your board does not have any revisions, you can omit this section. +- `socs` lists all SoCs that your board could have, e.g. `nrf52840` or `stm32f072xb`. If your board only has one SoC available and no variants, then the SoC can be omitted when selecting a build target, but must still be specified in this file. For an understanding of SoC variants, refer to the Zephyr documentation. + +If you need to define multiple boards in the same `board.yml`, such as for a split keyboard, you can do so like this: + +```yml +boards: + - name: + ... + - name: + ... +``` + +#### Revision adjustments + +If, as a side effect of adding revisions, you renamed the board (e.g. `ferris_rev02` -> `ferris`), you should adjust the other places where the board name was previously -- `.zmk.yml` and `.yaml`. You may also need to rearrange/consolidate other Kconfig flags and devicetree nodes. See [the Zephyr documentation](https://docs.zephyrproject.org/latest/hardware/porting/board_porting.html#multiple-board-revisions) for more details. + +#### Adjust Kconfig files + +##### `Kconfig.` + +Previously, your board folder will have had a file named `Kconfig.board`. This should be renamed to `Kconfig.`, where `` is the board name given in `board.yml`. The contents of this file will previously look something like this: + +```title="Kconfig.board" +config BOARD_FERRIS + bool "Ferris rev 0.2" + depends on SOC_STM32F072XB +``` + +Remove the `bool` and change the `depends on` to a `select`: + +```title="Kconfig.ferris" +config BOARD_FERRIS + select SOC_STM32F072XB +``` + +If you had multiple boards specified for different SoCs, you should consolidate them to one: + +```title="Kconfig.nrfmicro" +config BOARD_NRFMICRO + select SOC_NRF52840_QIAA if BOARD_NRFMICRO_NRF52840 + select SOC_NRF52840_QIAA if BOARD_NRFMICRO_NRF52840_FLIPPED + select SOC_NRF52833_QIAA if BOARD_NRFMICRO_NRF52833 +``` + +##### `_defconfig` + +Previously, this file was used to select the board and SOC with Kconfig flags. All such selections should be removed from this file. For example, all of the below flags should be removed: + +``` +CONFIG_SOC_SERIES_NRF52X=y +CONFIG_SOC_NRF52833_QIAA=y +CONFIG_SOC_NRF52840_QIAA=y +CONFIG_BOARD_=y +CONFIG_SOC_SERIES_STM32F0X=y +CONFIG_SOC_STM32F072XB=y +``` + +#### DeviceTree changes + +For most boards, aside from rearranging due to moving to revisions, there should be no changes necessary to the devicetree nodes. However, if your board makes use of upstream Zephyr drivers, these may have been renamed (e.g. Ferris' `microchip,mcp230xx` has been changed to `microchip,mcp23017`). + +## General Board/Shield Changes + +A few other changes, unrelated to the HWMv2 move, may impact out-of-tree boards/shields: + +### Bootloader Setup + +With the version bump, the previous method to enable `&bootloader` has been disabled. Instead, ZMK is introducing _boot retention_, which as a side effect also enables `&bootloader` for SoCs which previously didn't work with said behavior, such as the STM32F072. To set up boot retention for your board, please read through [the dedicated page](/docs/hardware-integration/bootloader). + +### nRF52840 NFC Pins as GPIO + +If your board or shield is using either of the nRF52840 NFC pins, as is often done with the XIAO nRF52840, you'll need to perform an additional update. + +#### Remove deprecated Kconfig symbol + +Previously, using those pins required enabling `CONFIG_NFCT_PINS_AS_GPIOS=y` in some Kconfig file. That Kconfig symbol has been removed, so remove any use of that Kconfig symbol from your board/shield. + +#### Set up NFC GPIO devicetree + +The following should be added to the board or shield's devicetree, e.g. in `.dtsi` or in a board specific shield overlay file like `/boards/xiao_ble.overlay`: + +```dts +&uicr { + nfct-pins-as-gpios; +}; +``` + +### nRF52840 DC/DC Modes + +For boards with the necessary additional hardware to enable DC/DC modes for the reg0 and/or reg1 power stages, the configuration to enable DC/DC has also moved out of Kconfig and into devicetree. + +#### Remove Kconfig Settings + +Usually, the DC/DC modes were enabled in the board's `Kconfig.defconfig` file, looking like: + +```Kconfig +config BOARD_ENABLE_DCDC + bool "Enable DCDC mode" + select SOC_DCDC_NRF52X + default y + depends on (BOARD_MY_BOARD) + +config BOARD_ENABLE_DCDC_HV + bool "High voltage DCDC converter" + select SOC_DCDC_NRF52X_HV + default n + depends on (BOARD_MY_BOARD) +``` + +Remove the lines from the file that look like above, or remove the `Kconfig.defconfig` file entirely if that is the only content contained therein. + +#### Add DC/DC setup to devicetree + +The DC/DC mode is now enabled for the `®0` and `®1` devicetree nodes, depending on which stage you want to use in that mode. + +For a high voltage board, where the necessary inductor is connected to the `DCCH` pin, enable the following in the board's `.dts` file: + +```dts +®0 { + status = "okay"; +}; +``` + +For both high voltage and non-HV boards, where the necessary inductor is connected to the `DCC` pin, enable the following in the board's `.dts` file: + +```dts +®1 { + regulator-initial-mode = ; +}; +``` + +### RP2040 Board Adjustments + +A few small tweaks are required for custom/out-of-tree RP2040 based boards: + +#### Clock control + +RP2040 boards now require clock control enabled to use several peripherals, including USB. + +The following should be added to the board's `_defconfig` file: + +```dts +CONFIG_CLOCK_CONTROL=y +``` + +#### Base devicetree changes + +The location for the base set of devicetree these boards need to include has changed. In the board's `.dts` file, replace: + +```dts +#include +``` + +with + +```dts +#include +``` + +Next, any fixed clock node needs to be removed: + +```dts + xtal_clk: xtal-clk { + compatible = "fixed-clock"; + clock-frequency = <12000000>; + #clock-cells = <0>; + }; +``` + +And the following added, to set up the core device hardware properly: + +```dts +&timer { + status = "okay"; +}; + +&rtc { + clocks = <&clocks RPI_PICO_CLKID_CLK_RTC>; + status = "okay"; +}; + +&vreg { + regulator-always-on; + regulator-allowed-modes = ; +}; +``` + +Lastly, an additional property must be added to the `chosen` node to supplement the existing properties there: + +```dts +/ { + chosen { + ... + zephyr,flash-controller = &ssi; + ... + }; +}; +``` + +### LED Strip Kconfig Changes + +If your board or shield uses RGB underglow, the following Kconfig flag which was previously enabled should now be removed: + +``` +CONFIG_WS2812_STRIP=y +``` + +If this is the only SPI device your shield uses, also remove the Kconfig flag enabling SPI (assuming it is present). It will be automatically enabled. + +### Cirque Pinnacle Input Driver + +Upstream Zephyr now contains a driver for the popular small Cirque Pinnacle trackpads. To transition to the new upstream driver, instead of the [out-of-tree module](https://github.com/petejohanson/cirque-input-module), some small adjustments are needed. + +#### Remove module references + +Often, the out-of-tree module is referenced from the `west.yml` in user's repos. The entry pointing to the module should be removed from your `projects` list there. If building locally, be sure you are not adding the module directory to the `ZMK_EXTRA_MODULES` CMake parameter. + +#### Devicetree changes + +The properties for the upstream driver can be found [here](https://docs.zephyrproject.org/4.1.0/build/dts/api/bindings/input/cirque%2Cpinnacle-i2c.html#dtbinding-cirque-pinnacle-i2c). The following changes are required when migrating: + +- The `dr-gpios` property in out-of-tree module is named `data-ready-gpios`, so renaming the property is required. +- Instead of an opt-out `no-taps` property to disable taps, you can enable primary taps with `primary-tap-enable`. +- The `sleep` property is now named `sleep-mode-enable`. +- Use `invert-x`/`invert-y` instead of `x-invert`/`y-invert`. +- Use `swap-xy` instead of `rotate-90`. + +## Other Changes + +LVGL was updated to 9.3.0, which comes with breaking API changes. If you are using custom widgets or displays from a module, these will likely need fixing. See the [LVGL changelog](https://docs.lvgl.io/master/CHANGELOG.html#v9-3-0-3-june-2025) for details. + +## Board Extensions + +Zephyr has formalized the concept of "board extensions", allowing modules/applications to extend boards that are defined elsewhere. If using a board from the upstream Zephyr project that ZMK hasn't yet extended with default settings, e.g. enabling the `CONFIG_ZMK_USB` symbol, users can add their own extensions to their modules under the `/boards/extensions//` directory. See https://github.com/zmkfirmware/zmk/tree/main/app/boards/extensions for the extensions that ZMK has added. + +## Zephyr Upgrade Instructions + +Should you encounter any other issues with custom or out-of-tree Zephyr code, consider consulting the following Zephyr upgrade guides: + +- [3.7 Upgrade](https://docs.zephyrproject.org/4.1.0/releases/migration-guide-3.7.html) +- [4.1 Upgrade](https://docs.zephyrproject.org/4.1.0/releases/migration-guide-4.1.html) + +## Thanks! + +Thanks to all the testers who have helped verify ZMK functionality on the newer Zephyr version. + +## Future + +Once a ZMK version based on Zephyr 4.1 is released, we'll be working towards updating Zephyr even further, to try to catch up with the latest actual Zephyr release. This will likely mean a jump to the upcoming Zephyr 4.3. As part of that work, some other semi-disruptive changes will be required, including: + +- Removing ZMK's use of the deprecated, and now removed, `kscan` APIs in favor of the newer matrix input API. ZMK already supports the matrix input API, but has not yet converted our existing drivers to that API. Advanced users looking to test can try leveraging the upstream Zephyr drivers today to test that functionality, but that is _not_ officially supported and is likely to have bugs or untested side effects. +- Move the new USB stack, that includes better High-Speed USB support. + +[nmunnich]: https://github.com/nmunnich +[petejohanson]: https://github.com/petejohanson diff --git a/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/cannonkeys-dark-mode.png b/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/cannonkeys-dark-mode.png new file mode 100644 index 00000000..9c5b7475 Binary files /dev/null and b/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/cannonkeys-dark-mode.png differ diff --git a/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/cannonkeys.png b/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/cannonkeys.png new file mode 100644 index 00000000..fa9ab2c9 Binary files /dev/null and b/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/cannonkeys.png differ diff --git a/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/deskhero-dark-mode.webp b/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/deskhero-dark-mode.webp new file mode 100644 index 00000000..68ad35e1 Binary files /dev/null and b/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/deskhero-dark-mode.webp differ diff --git a/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/deskhero.webp b/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/deskhero.webp new file mode 100644 index 00000000..99018cf0 Binary files /dev/null and b/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/deskhero.webp differ diff --git a/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/keebio.avif b/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/keebio.avif new file mode 100644 index 00000000..294182ec Binary files /dev/null and b/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/keebio.avif differ diff --git a/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/keebmaker-dark-mode.png b/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/keebmaker-dark-mode.png new file mode 100644 index 00000000..d8b6b487 Binary files /dev/null and b/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/keebmaker-dark-mode.png differ diff --git a/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/keebmaker.png b/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/keebmaker.png new file mode 100644 index 00000000..4341f09a Binary files /dev/null and b/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/keebmaker.png differ diff --git a/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/keycapsss-dark-mode.png b/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/keycapsss-dark-mode.png new file mode 100644 index 00000000..28a0eb6c Binary files /dev/null and b/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/keycapsss-dark-mode.png differ diff --git a/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/keycapsss.png b/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/keycapsss.png new file mode 100644 index 00000000..b9158952 Binary files /dev/null and b/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/keycapsss.png differ diff --git a/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/keychron-dark-mode.png b/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/keychron-dark-mode.png new file mode 100644 index 00000000..173b8103 Binary files /dev/null and b/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/keychron-dark-mode.png differ diff --git a/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/keychron.png b/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/keychron.png new file mode 100644 index 00000000..26773f1f Binary files /dev/null and b/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/keychron.png differ diff --git a/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/kinesis-dark-mode.png b/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/kinesis-dark-mode.png new file mode 100644 index 00000000..617f2568 Binary files /dev/null and b/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/kinesis-dark-mode.png differ diff --git a/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/kinesis.png b/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/kinesis.png new file mode 100644 index 00000000..15617580 Binary files /dev/null and b/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/kinesis.png differ diff --git a/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/littlekeyboards-dark-mode.avif b/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/littlekeyboards-dark-mode.avif new file mode 100644 index 00000000..fd8159b7 Binary files /dev/null and b/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/littlekeyboards-dark-mode.avif differ diff --git a/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/littlekeyboards.avif b/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/littlekeyboards.avif new file mode 100644 index 00000000..957b4d7a Binary files /dev/null and b/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/littlekeyboards.avif differ diff --git a/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/mechlovin-dark-mode.png b/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/mechlovin-dark-mode.png new file mode 100644 index 00000000..b1951c20 Binary files /dev/null and b/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/mechlovin-dark-mode.png differ diff --git a/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/mechlovin.png b/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/mechlovin.png new file mode 100644 index 00000000..136a03ea Binary files /dev/null and b/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/mechlovin.png differ diff --git a/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/mekibo-dark-mode.png b/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/mekibo-dark-mode.png new file mode 100644 index 00000000..7058937e Binary files /dev/null and b/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/mekibo-dark-mode.png differ diff --git a/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/mekibo.png b/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/mekibo.png new file mode 100644 index 00000000..dcfdee9f Binary files /dev/null and b/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/mekibo.png differ diff --git a/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/mode-dark-mode.png b/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/mode-dark-mode.png new file mode 100644 index 00000000..27d8a73a Binary files /dev/null and b/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/mode-dark-mode.png differ diff --git a/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/mode.png b/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/mode.png new file mode 100644 index 00000000..fd8f8db4 Binary files /dev/null and b/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/mode.png differ diff --git a/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/niceandtyperactive-dark-mode.png b/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/niceandtyperactive-dark-mode.png new file mode 100644 index 00000000..39499508 Binary files /dev/null and b/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/niceandtyperactive-dark-mode.png differ diff --git a/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/niceandtyperactive.png b/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/niceandtyperactive.png new file mode 100644 index 00000000..8172555b Binary files /dev/null and b/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/niceandtyperactive.png differ diff --git a/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/phasebyte.png b/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/phasebyte.png new file mode 100644 index 00000000..69259103 Binary files /dev/null and b/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/phasebyte.png differ diff --git a/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/splitkb-dark-mode.png b/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/splitkb-dark-mode.png new file mode 100644 index 00000000..ec0e3204 Binary files /dev/null and b/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/splitkb-dark-mode.png differ diff --git a/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/splitkb.png b/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/splitkb.png new file mode 100644 index 00000000..cb4ff84f Binary files /dev/null and b/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/splitkb.png differ diff --git a/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/zmk-studio-screenshot-dark-mode.png b/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/zmk-studio-screenshot-dark-mode.png new file mode 100644 index 00000000..e0623558 Binary files /dev/null and b/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/zmk-studio-screenshot-dark-mode.png differ diff --git a/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/zmk-studio-screenshot.png b/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/zmk-studio-screenshot.png new file mode 100644 index 00000000..c4ada377 Binary files /dev/null and b/docs/blog/assets/2024-11-11-zmk-studio-mvp-ga/zmk-studio-screenshot.png differ diff --git a/docs/blog/assets/2025-06-20-pinned-zmk/release1.png b/docs/blog/assets/2025-06-20-pinned-zmk/release1.png new file mode 100644 index 00000000..0b0050c4 Binary files /dev/null and b/docs/blog/assets/2025-06-20-pinned-zmk/release1.png differ diff --git a/docs/blog/assets/2025-06-20-pinned-zmk/release2.png b/docs/blog/assets/2025-06-20-pinned-zmk/release2.png new file mode 100644 index 00000000..4a758020 Binary files /dev/null and b/docs/blog/assets/2025-06-20-pinned-zmk/release2.png differ diff --git a/docs/blog/authors.yml b/docs/blog/authors.yml index 639facab..e335cfb5 100644 --- a/docs/blog/authors.yml +++ b/docs/blog/authors.yml @@ -15,3 +15,9 @@ caksoylar: title: Documentation maintainer url: https://github.com/caksoylar image_url: https://avatars.githubusercontent.com/u/7876996 + +nmunnich: + name: Nicolas Munnich + title: Documentation maintainer + url: https://github.com/nmunnich + image_url: https://avatars.githubusercontent.com/u/98408764 diff --git a/docs/docs/assets/features/keymaps/layer-diagram.png b/docs/docs/assets/features/keymaps/layer-diagram.png deleted file mode 100644 index 7b42daae..00000000 Binary files a/docs/docs/assets/features/keymaps/layer-diagram.png and /dev/null differ diff --git a/docs/docs/assets/hardware-integration/numpad.svg b/docs/docs/assets/hardware-integration/numpad.svg new file mode 100644 index 00000000..073f2864 --- /dev/null +++ b/docs/docs/assets/hardware-integration/numpad.svg @@ -0,0 +1,182 @@ + + + + + + + +0 + + + +1 + + + +2 + + + +3 + + + +4 + + + +5 + + + +6 + + + +7 + + + +8 + + + +9 + + + +10 + + + +11 + + + +12 + + + +13 + + + +14 + + + +15 + + + +16 + + + +17 + + + +18 + + + +19 + + + +0 + + + +1 + + + +2 + + + +3 + + + +4 + + + +5 + + + +6 + + + +7 + + + +8 + + + +9 + + + +10 + + + +11 + + + +12 + + + +13 + + + +14 + + + +15 + + + +16 + + + + diff --git a/docs/docs/assets/hardware-integration/shift-register-daisy.png b/docs/docs/assets/hardware-integration/shift-register-daisy.png new file mode 100644 index 00000000..db4031a6 Binary files /dev/null and b/docs/docs/assets/hardware-integration/shift-register-daisy.png differ diff --git a/docs/docs/assets/hold-tap/case1_2.svg b/docs/docs/assets/hold-tap/case1_2.svg index 697d7346..27dada33 100644 --- a/docs/docs/assets/hold-tap/case1_2.svg +++ b/docs/docs/assets/hold-tap/case1_2.svg @@ -1,21 +1,137 @@ - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/docs/assets/keymaps/layer-diagram.png b/docs/docs/assets/keymaps/layer-diagram.png new file mode 100644 index 00000000..31ff1489 Binary files /dev/null and b/docs/docs/assets/keymaps/layer-diagram.png differ diff --git a/docs/docs/assets/troubleshooting/building/devicetree-step.png b/docs/docs/assets/troubleshooting/building/devicetree-step.png new file mode 100755 index 00000000..f2f75764 Binary files /dev/null and b/docs/docs/assets/troubleshooting/building/devicetree-step.png differ diff --git a/docs/docs/assets/troubleshooting/building/kconfig-step.png b/docs/docs/assets/troubleshooting/building/kconfig-step.png new file mode 100755 index 00000000..34bbdd22 Binary files /dev/null and b/docs/docs/assets/troubleshooting/building/kconfig-step.png differ diff --git a/docs/docs/assets/troubleshooting/multimeter/schematic_probe_example.png b/docs/docs/assets/troubleshooting/multimeter/schematic_probe_example.png new file mode 100644 index 00000000..f3536a7e Binary files /dev/null and b/docs/docs/assets/troubleshooting/multimeter/schematic_probe_example.png differ diff --git a/docs/docs/assets/troubleshooting/splitpairing/corecoverage.png b/docs/docs/assets/troubleshooting/splitpairing/corecoverage.png deleted file mode 100755 index a2a928be..00000000 Binary files a/docs/docs/assets/troubleshooting/splitpairing/corecoverage.png and /dev/null differ diff --git a/docs/docs/config/backlight.md b/docs/docs/config/backlight.md deleted file mode 100644 index 8fed7ca6..00000000 --- a/docs/docs/config/backlight.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: Backlight Configuration -sidebar_label: Backlight ---- - -See the [backlight feature page](../features/backlight.mdx) for more details, including instructions for adding backlight support to a board. - -See [Configuration Overview](index.md) for instructions on how to change these settings. - -## Kconfig - -Definition file: [zmk/app/Kconfig](https://github.com/zmkfirmware/zmk/blob/main/app/Kconfig) - -| Option | Type | Description | Default | -| ------------------------------------ | ---- | ----------------------------------------------------- | ------- | -| `CONFIG_ZMK_BACKLIGHT` | bool | Enables LED backlight | n | -| `CONFIG_ZMK_BACKLIGHT_BRT_STEP` | int | Brightness step in percent | 20 | -| `CONFIG_ZMK_BACKLIGHT_BRT_START` | int | Default brightness in percent | 40 | -| `CONFIG_ZMK_BACKLIGHT_ON_START` | bool | Default backlight state | y | -| `CONFIG_ZMK_BACKLIGHT_AUTO_OFF_IDLE` | bool | Turn off backlight when keyboard goes into idle state | n | -| `CONFIG_ZMK_BACKLIGHT_AUTO_OFF_USB` | bool | Turn off backlight when USB is disconnected | n | - -:::note -The `*_START` settings only determine the initial backlight state. Any changes you make with the [backlight behavior](../keymaps/behaviors/backlight.md) are saved to flash after a one minute delay and will be used after that. -::: - -## Devicetree - -Applies to: [`/chosen` node](https://docs.zephyrproject.org/3.5.0/build/dts/intro-syntax-structure.html#aliases-and-chosen-nodes) - -| Property | Type | Description | -| --------------- | ---- | -------------------------------------------- | -| `zmk,backlight` | path | The node for the backlight LED driver to use | - -See the Zephyr devicetree bindings for LED drivers: - -- [gpio-leds](https://docs.zephyrproject.org/3.5.0/build/dts/api/bindings/led/gpio-leds.html) -- [pwm-leds](https://docs.zephyrproject.org/3.5.0/build/dts/api/bindings/led/pwm-leds.html) - -See the [backlight feature page](../features/backlight.mdx) for examples of the properties that must be set to enable backlighting. diff --git a/docs/docs/config/battery.md b/docs/docs/config/battery.md index 4596395b..0c3ba752 100644 --- a/docs/docs/config/battery.md +++ b/docs/docs/config/battery.md @@ -30,7 +30,7 @@ On macOS the BLE battery reporting packets can cause the computer to wakeup from ### Peripheral Battery Monitoring -You can [configure ZMK to allow support for peripheral battery monitoring over BLE](system.md#split-keyboards) (e.g. when having a split keyboard with two independent and wirelessly connected sides). +You can [configure ZMK to allow support for peripheral battery monitoring over BLE](split.md) (e.g. when having a split keyboard with two independent and wirelessly connected sides). If you want to report the battery levels of both sides of a split keyboard, you should have both `CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_PROXY` and `CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_FETCHING` set to `y`. :::note[Displaying both battery levels on your host] @@ -41,7 +41,7 @@ Host support for multiple battery levels is undefined. It appears that in most o ### Devicetree -Applies to: [`/chosen` node](https://docs.zephyrproject.org/3.5.0/build/dts/intro-syntax-structure.html#aliases-and-chosen-nodes) +Applies to: [`/chosen` node](https://docs.zephyrproject.org/4.1.0/build/dts/intro-syntax-structure.html#aliases-and-chosen-nodes) | Property | Type | Description | | ------------- | ---- | --------------------------------------------- | @@ -55,7 +55,7 @@ Driver for reading the voltage of a battery using an ADC connected to a voltage Applies to: `compatible = "zmk,battery-voltage-divider"` -See [Zephyr's voltage divider documentation](https://docs.zephyrproject.org/3.5.0/build/dts/api/bindings/iio/afe/voltage-divider.html). +See [Zephyr's voltage divider documentation](https://docs.zephyrproject.org/4.1.0/build/dts/api/bindings/iio/afe/voltage-divider.html). ## nRF VDDH Battery Sensor diff --git a/docs/docs/config/behaviors.md b/docs/docs/config/behaviors.md index 6914495f..ce53ee99 100644 --- a/docs/docs/config/behaviors.md +++ b/docs/docs/config/behaviors.md @@ -17,6 +17,14 @@ See the [zmk/app/dts/behaviors/](https://github.com/zmkfirmware/zmk/tree/main/ap | --------------------------------- | ---- | ------------------------------------------------------------------------------------ | ------- | | `CONFIG_ZMK_BEHAVIORS_QUEUE_SIZE` | int | Maximum number of behaviors to allow queueing from a macro or other complex behavior | 64 | +### Devicetree + +Definition file: [zmk/app/dts/bindings/behaviors/behavior-metadata.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/dts/bindings/behaviors/behavior-metadata.yaml) + +| Property | Type | Description | Default | +| -------------- | ------ | -------------------------------------------------------------------------------- | ------- | +| `display-name` | string | Name of the layer, for use with a display or [ZMK Studio](../features/studio.md) | | + ## Caps Word Creates a custom behavior that behaves similar to a caps lock but deactivates when any key not in a continue list is pressed. @@ -64,18 +72,19 @@ Definition file: [zmk/app/dts/bindings/behaviors/zmk,behavior-hold-tap.yaml](htt Applies to: `compatible = "zmk,behavior-hold-tap"` -| Property | Type | Description | Default | -| ----------------------------- | -------- | -------------------------------------------------------------------------------------------------------------- | ------------------ | -| `#binding-cells` | int | Must be `<2>` | | -| `bindings` | phandles | A list of two behaviors (without parameters): one for hold and one for tap | | -| `flavor` | string | Adjusts how the behavior chooses between hold and tap | `"hold-preferred"` | -| `tapping-term-ms` | int | How long in milliseconds the key must be held to trigger a hold | | -| `quick-tap-ms` | int | Tap twice within this period (in milliseconds) to trigger a tap, even when held | -1 (disabled) | -| `require-prior-idle-ms` | int | Triggers a tap immediately if any non-modifier key was pressed within `require-prior-idle-ms` of the hold-tap. | -1 (disabled) | -| `retro-tap` | bool | Triggers the tap behavior on release if no other key was pressed during a hold | false | -| `hold-while-undecided` | bool | Triggers the hold behavior immediately on press and releases before a tap | false | -| `hold-while-undecided-linger` | bool | Continues to hold the hold behavior until after the tap is released | false | -| `hold-trigger-key-positions` | array | If set, pressing the hold-tap and then any key position _not_ in the list triggers a tap. | | +| Property | Type | Description | Default | +| ----------------------------- | -------- | ------------------------------------------------------------------------------------------------------------- | ------------------ | +| `#binding-cells` | int | Must be `<2>` | | +| `bindings` | phandles | A list of two behaviors (without parameters): one for hold and one for tap | | +| `flavor` | string | Adjusts how the behavior chooses between hold and tap | `"hold-preferred"` | +| `tapping-term-ms` | int | How long in milliseconds the key must be held to trigger a hold | | +| `quick-tap-ms` | int | Tap twice within this period (in milliseconds) to trigger a tap, even when held | -1 (disabled) | +| `require-prior-idle-ms` | int | Triggers a tap immediately if any non-modifier key was pressed within `require-prior-idle-ms` of the hold-tap | -1 (disabled) | +| `retro-tap` | bool | Triggers the tap behavior on release if no other key was pressed during a hold | false | +| `hold-while-undecided` | bool | Triggers the hold behavior immediately on press and releases before a tap | false | +| `hold-while-undecided-linger` | bool | Continues to hold the hold behavior until after the tap is released | false | +| `hold-trigger-key-positions` | array | If set, pressing the hold-tap and then any key position _not_ in the list triggers a tap | | +| `hold-trigger-on-release` | bool | If set, delays the evaluation of `hold-trigger-key-positions` until key release | false | This behavior forwards the first parameter it receives to the parameter of the first behavior specified in `bindings`, and second parameter to the parameter of the second behavior. @@ -95,7 +104,7 @@ You can use the following nodes to tweak the default behaviors: | Node | Behavior | | ----- | ----------------------------------------------------- | | `<` | [Layer-tap](../keymaps/behaviors/layers.md#layer-tap) | -| `&mt` | [Mod-tap](../keymaps/behaviors/mod-tap.md) | +| `&mt` | [Mod-tap](../keymaps/behaviors/hold-tap.mdx#mod-tap) | ## Key Repeat @@ -122,6 +131,99 @@ You can use the following nodes to tweak the default behaviors: | ------------- | ------------------------------------------------ | | `&key_repeat` | [Key repeat](../keymaps/behaviors/key-repeat.md) | +## Key Toggle + +Creates a custom behavior that toggles a key code on, off, or switches between the two states. + +See the [key toggle behavior](../keymaps/behaviors/key-toggle.md) documentation for more details and examples. + +### Devicetree + +Definition file: [zmk/app/dts/bindings/behaviors/zmk,behavior-key-toggle.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/dts/bindings/behaviors/zmk%2Cbehavior-key-toggle.yaml) + +Applies to: `compatible = "zmk,behavior-key-toggle"` + +| Property | Type | Description | Default | +| ---------------- | ---- | ------------------------------ | ------- | +| `#binding-cells` | int | Must be `<1>` | | +| `toggle-mode` | | One of `on`, `off`, and `flip` | `flip` | + +You can use the following node to tweak the default behavior: + +| Node | Behavior | +| ----- | ------------------------------------------------ | +| `&kt` | [Key toggle](../keymaps/behaviors/key-toggle.md) | + +## Momentary Layer + +Creates a custom behavior that toggles a layer on when pressed, and off when released. + +See the [momentary layer behavior](../keymaps/behaviors/layers.md#momentary-layer) documentation for more details and examples. + +### Devicetree + +Definition file: [zmk/app/dts/bindings/behaviors/zmk,behavior-momentary-layer.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/dts/bindings/behaviors/zmk%2Cbehavior-momentary-layer.yaml) + +Applies to: `compatible = "zmk,behavior-momentary-layer"` + +| Property | Type | Description | Default | +| ---------------- | ---- | --------------------------------------------------------------- | ------- | +| `#binding-cells` | int | Must be `<1>` | | +| `locking` | bool | Whether the behavior can lock and unlock layers in the on state | false | + +You can use the following node to tweak the default behavior: + +| Node | Behavior | +| ----- | ----------------------------------------------------------------- | +| `&mo` | [Momentary Layer](../keymaps/behaviors/layers.md#momentary-layer) | + +## Layer Toggle + +Creates a custom behavior that toggles a layer on, off, or switches between the two states. + +See the [layer toggle behavior](../keymaps/behaviors/layers.md#toggle-layer) documentation for more details and examples. + +### Devicetree + +Definition file: [zmk/app/dts/bindings/behaviors/zmk,behavior-layer-toggle.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/dts/bindings/behaviors/zmk%2Cbehavior-layer-toggle.yaml) + +Applies to: `compatible = "zmk,behavior-layer-toggle"` + +| Property | Type | Description | Default | +| ---------------- | ---- | --------------------------------------------------------------- | ------- | +| `#binding-cells` | int | Must be `<1>` | | +| `toggle-mode` | | One of `on`, `off`, and `flip` | `flip` | +| `locking` | bool | Whether the behavior can lock and unlock layers in the on state | false | + +You can use the following node to tweak the default behavior: + +| Node | Behavior | +| ------ | ----------------------------------------------------------- | +| `&tog` | [Layer toggle](../keymaps/behaviors/layers.md#toggle-layer) | + +## To Layer + +Creates a custom behavior that toggles a layer on and toggles all other layers off, barring the default layer. + +See the [to layer behavior](../keymaps/behaviors/layers.md#to-layer) documentation for more details and examples. + +### Devicetree + +Definition file: [zmk/app/dts/bindings/behaviors/zmk,behavior-to-layer.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/dts/bindings/behaviors/zmk%2Cbehavior-to-layer.yaml) + +Applies to: `compatible = "zmk,behavior-to-layer"` + +| Property | Type | Description | Default | +| ---------------- | ---- | --------------------------------------------------------------- | ------- | +| `#binding-cells` | int | Must be `<1>` | | +| `locking` | bool | Whether the behavior can lock and unlock layers in the on state | false | + +You can use the following node to tweak the default behavior: + +| Node | Behavior | +| ----- | --------------------------------------------------- | +| `&to` | [To Layer](../keymaps/behaviors/layers.md#to-layer) | + ## Macro Creates a custom behavior which triggers a sequence of other behaviors. @@ -270,6 +372,12 @@ Creates a custom behavior that triggers a different behavior corresponding to th See the [tap dance behavior](../keymaps/behaviors/tap-dance.mdx) documentation for more details and examples. +### Kconfig + +| Config | Type | Description | Default | +| ---------------------------------------- | ---- | ---------------------------------------------- | ------- | +| `CONFIG_ZMK_BEHAVIOR_TAP_DANCE_MAX_HELD` | int | Maximum number of simultaneous held tap-dances | 10 | + ### Devicetree Definition file: [zmk/app/dts/bindings/behaviors/zmk,behavior-tap-dance.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/dts/bindings/behaviors/zmk%2Cbehavior-tap-dance.yaml) @@ -281,3 +389,23 @@ Applies to: `compatible = "zmk,behavior-tap-dance"` | `#binding-cells` | int | Must be `<0>` | | | `bindings` | phandle array | A list of behaviors from which to select | | | `tapping-term-ms` | int | The maximum time (in milliseconds) between taps before an item from `bindings` is triggered. | 200 | + +## Two Axis Input + +This behavior is part of the core [pointing devices](../features/pointing.md) feature, and is used to generate X/Y and scroll input events. It is the underlying behavior used for the mouse [move](../keymaps/behaviors/mouse-emulation.md#mouse-move) and [scroll](../keymaps/behaviors/mouse-emulation.md#mouse-scroll) behaviors. + +### Devicetree + +Definition file: [zmk/app/dts/bindings/behaviors/zmk,behavior-input-two-axis.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/dts/bindings/behaviors/zmk%2Cbehavior-input-two-axis.yaml) + +Applies to: `compatible = "zmk,behavior-input-two-axis"` + +| Property | Type | Description | Default | +| ----------------------- | ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | +| `#binding-cells` | int | Must be `<1>` | | +| `x-input-code` | int | The [relative event code](https://github.com/zmkfirmware/zephyr/blob/v4.1.0%2Bzmk-fixes/include/zephyr/dt-bindings/input/input-event-codes.h#L258) for generated input events for the X-axis. | | +| `y-input-code` | int | The [relative event code](https://github.com/zmkfirmware/zephyr/blob/v4.1.0%2Bzmk-fixes/include/zephyr/dt-bindings/input/input-event-codes.h#L258) for generated input events for the Y-axis. | | +| `trigger-period-ms` | int | How many milliseconds between generated input events based on the current speed/direction. | 16 | +| `delay-ms` | int | How many milliseconds to delay any processing or event generation when first pressed. | 0 | +| `time-to-max-speed-ms` | int | How many milliseconds it takes to accelerate to the curren max speed. | 0 | +| `acceleration-exponent` | int | The acceleration exponent to apply: `0` - uniform speed, `1` - uniform acceleration, `2` - linear acceleration | 1 | diff --git a/docs/docs/config/bluetooth.md b/docs/docs/config/bluetooth.md index 83fb9ec0..c9b8578c 100644 --- a/docs/docs/config/bluetooth.md +++ b/docs/docs/config/bluetooth.md @@ -16,3 +16,4 @@ See [Configuration Overview](index.md) for instructions on how to change these s | `CONFIG_ZMK_BLE_EXPERIMENTAL_FEATURES` | bool | Aggregate config that enables both `CONFIG_ZMK_BLE_EXPERIMENTAL_CONN` and `CONFIG_ZMK_BLE_EXPERIMENTAL_SEC`. | n | | `CONFIG_ZMK_BLE_PASSKEY_ENTRY` | bool | Enable passkey entry during pairing for enhanced security. (Note: After enabling this, you will need to re-pair all previously paired hosts.) | n | | `CONFIG_BT_GATT_ENFORCE_SUBSCRIPTION` | bool | Low level setting for GATT subscriptions. Set to `n` to work around an annoying Windows bug with battery notifications. | y | +| `CONFIG_BT_DEVICE_APPEARANCE` | int | Bluetooth device [appearance value](https://bluetooth.com/specifications/assigned-numbers) (should be converted from hexadecimal to decimal). | 961 | diff --git a/docs/docs/config/bootloader.md b/docs/docs/config/bootloader.md new file mode 100644 index 00000000..1387bc4c --- /dev/null +++ b/docs/docs/config/bootloader.md @@ -0,0 +1,42 @@ +--- +title: Bootloader Integration Configuration +sidebar_label: Bootloader Integration +--- + +These are general settings that control the various bootloader integration features of ZMK. + +See [Configuration Overview](index.md) for instructions on how to change these settings. + +## Kconfig + +Definition file: [zmk/app/src/boot/Kconfig](https://github.com/zmkfirmware/zmk/blob/main/app/src/boot/Kconfig) + +### Double Tap To Bootloader + +Some SoCs, like RP2040 or the various STM32 offerings, require holding a certain "boot button" down to enter the bootloader, on a hardware level. To make it easier to enter the bootloader on those platforms, ZMK integrates an optional feature to allow entering the bootloader by simply double tapping reset within the configured timeout period. + +| Config | Type | Description | Default | +| ------------------------------------------ | ---- | ------------------------------------------------------------------- | --------------------------- | +| `CONFIG_ZMK_DBL_TAP_BOOTLOADER` | bool | Enable the double-tap to enter bootloader functionality | y if STM32 or RP2040/RP2350 | +| `CONFIG_ZMK_DBL_TAP_BOOTLOADER_TIMEOUT_MS` | int | Duration (in ms) to wait for a second reset to enter the bootloader | 500 | + +### STM32 nBOOT_SEL Option Byte Setup + +Some newer STM32 series SoCs, in particular stm32c0 and stm32g0, enable the `nBOOT_SEL` bit of the option bytes by default. This bit prevents entering the system ROM bootloader by holding the BOOT0 pin/button during a reset/startup. + +To ensure the BOOT button on keyboard and controllers using these SoCs works as expected after being flashed with ZMK, we check the `nBOOT_SEL` bit on startup and clear it if it is set. Should you _not_ want that functionality, for some reason, this can be disabled. + +| Config | Type | Description | Default | +| ----------------------------------------- | ---- | ------------------------------------- | ----------------------- | +| `CONFIG_ZMK_BOOT_STM32_ENFORCE_NBOOT_SEL` | bool | Ensure the `nBOOT_SEL` bit is not set | y if STM32CO or STM32G0 | + +### Bootmode Magic Value Mapper + +Some target SoCs may use the bootmode magic value mapper for [bootloader integration](docs/hardware-integration/bootloader/index.mdx). When doing so, the following configurations are used: + +| Config | Type | Description | Default | +| ---------------------------------------------------------------- | ---- | ------------------------------------------------------------------------------------- | ------- | +| `CONFIG_ZMK_BOOTMODE_BOOTLOADER_MAGIC_VALUE` | hex | The magic value to place into retained memory when the bootloader boot mode is set | none | +| `CONFIG_ZMK_BOOTMODE_MAGIC_VALUE_BOOTLOADER_TYPE_TINYUF2` | bool | Used to default the bootloader magic value for the tinyuf2 bootloader | false | +| `CONFIG_ZMK_BOOTMODE_MAGIC_VALUE_BOOTLOADER_TYPE_ADAFRUIT_BOSSA` | bool | Used to default the bootloader magic value for the Adafruit BOSSA (SAMD21) bootloader | false | +| `CONFIG_ZMK_BOOTMODE_MAGIC_VALUE_BOOTLOADER_TYPE_ADAFRUIT_NRF52` | bool | Used to default the bootloader magic value for the Adafruit nRF52 bootloader | false | diff --git a/docs/docs/config/combos.md b/docs/docs/config/combos.md index d773628d..b8203cb4 100644 --- a/docs/docs/config/combos.md +++ b/docs/docs/config/combos.md @@ -11,15 +11,9 @@ See [Configuration Overview](index.md) for instructions on how to change these s Definition file: [zmk/app/Kconfig](https://github.com/zmkfirmware/zmk/blob/main/app/Kconfig) -| Config | Type | Description | Default | -| ------------------------------------- | ---- | -------------------------------------------------------------- | ------- | -| `CONFIG_ZMK_COMBO_MAX_PRESSED_COMBOS` | int | Maximum number of combos that can be active at the same time | 4 | -| `CONFIG_ZMK_COMBO_MAX_COMBOS_PER_KEY` | int | Maximum number of active combos that use the same key position | 5 | -| `CONFIG_ZMK_COMBO_MAX_KEYS_PER_COMBO` | int | Maximum number of keys to press to activate a combo | 4 | - -If `CONFIG_ZMK_COMBO_MAX_COMBOS_PER_KEY` is 5, you can have 5 separate combos that use position `0`, 5 combos that use position `1`, and so on. - -If you want a combo that triggers when pressing 5 keys, you must set `CONFIG_ZMK_COMBO_MAX_KEYS_PER_COMBO` to 5. +| Config | Type | Description | Default | +| ------------------------------------- | ---- | ------------------------------------------------------------ | ------- | +| `CONFIG_ZMK_COMBO_MAX_PRESSED_COMBOS` | int | Maximum number of combos that can be active at the same time | 4 | ## Devicetree @@ -38,6 +32,4 @@ Each child node can have the following properties: | `timeout-ms` | int | All the keys in `key-positions` must be pressed within this time in milliseconds to trigger the combo | 50 | | `require-prior-idle-ms` | int | If any non-modifier key is pressed within `require-prior-idle-ms` before a key in the combo, the key will not be considered for the combo | -1 (disabled) | | `slow-release` | bool | Releases the combo when all keys are released instead of when any key is released | false | -| `layers` | array | A list of layers on which the combo may be triggered. `-1` allows all layers. | `<-1>` | - -The `key-positions` array must not be longer than the `CONFIG_ZMK_COMBO_MAX_KEYS_PER_COMBO` setting, which defaults to 4. If you want a combo that triggers when pressing 5 keys, then you must change the setting to 5. +| `layers` | array | A list of layers on which the combo may be triggered. Omission of this property allows all layers. | | diff --git a/docs/docs/config/displays.md b/docs/docs/config/displays.md index 96a0074a..2896b418 100644 --- a/docs/docs/config/displays.md +++ b/docs/docs/config/displays.md @@ -14,15 +14,17 @@ Definition files: - [zmk/app/src/display/Kconfig](https://github.com/zmkfirmware/zmk/blob/main/app/src/display/Kconfig) - [zmk/app/src/display/widgets/Kconfig](https://github.com/zmkfirmware/zmk/blob/main/app/src/display/widgets/Kconfig) -| Config | Type | Description | Default | -| -------------------------------------------------- | ---- | -------------------------------------------------------------- | ------- | -| `CONFIG_ZMK_DISPLAY` | bool | Enable support for displays | n | -| `CONFIG_ZMK_DISPLAY_INVERT` | bool | Invert display colors from black-on-white to white-on-black | n | -| `CONFIG_ZMK_WIDGET_LAYER_STATUS` | bool | Enable a widget to show the highest, active layer | y | -| `CONFIG_ZMK_WIDGET_BATTERY_STATUS` | bool | Enable a widget to show battery charge information | y | -| `CONFIG_ZMK_WIDGET_BATTERY_STATUS_SHOW_PERCENTAGE` | bool | If battery widget is enabled, show percentage instead of icons | n | -| `CONFIG_ZMK_WIDGET_OUTPUT_STATUS` | bool | Enable a widget to show the current output (USB/BLE) | y | -| `CONFIG_ZMK_WIDGET_WPM_STATUS` | bool | Enable a widget to show words per minute | n | +| Config | Type | Description | Default | +| -------------------------------------------------- | ---- | -------------------------------------------------------------- | ------------ | +| `CONFIG_ZMK_DISPLAY` | bool | Enable support for displays | n | +| `CONFIG_ZMK_DISPLAY_BLANK_ON_IDLE` | bool | Blank display on idle | y if SSD1306 | +| `CONFIG_ZMK_DISPLAY_TICK_PERIOD_MS` | int | Period (in ms) between display task execution | 10 | +| `CONFIG_ZMK_DISPLAY_INVERT` | bool | Invert display colors from black-on-white to white-on-black | n | +| `CONFIG_ZMK_WIDGET_LAYER_STATUS` | bool | Enable a widget to show the highest, active layer | y | +| `CONFIG_ZMK_WIDGET_BATTERY_STATUS` | bool | Enable a widget to show battery charge information | y | +| `CONFIG_ZMK_WIDGET_BATTERY_STATUS_SHOW_PERCENTAGE` | bool | If battery widget is enabled, show percentage instead of icons | n | +| `CONFIG_ZMK_WIDGET_OUTPUT_STATUS` | bool | Enable a widget to show the current output (USB/BLE) | y | +| `CONFIG_ZMK_WIDGET_WPM_STATUS` | bool | Enable a widget to show words per minute | n | Note that `CONFIG_ZMK_DISPLAY_INVERT` setting might not work as expected with custom status screens that utilize images. @@ -51,14 +53,23 @@ You must also configure the driver for your display. ZMK provides the following - [IL0323](https://github.com/zmkfirmware/zmk/blob/main/app/module/drivers/display/Kconfig.il0323) -Zephyr provides several display drivers as well. Search for the name of your display in [Zephyr's Kconfig options](https://docs.zephyrproject.org/3.5.0/kconfig.html) documentation. +Zephyr provides several display drivers as well. Search for the name of your display in [Zephyr's Kconfig options](https://docs.zephyrproject.org/4.1.0/kconfig.html) documentation. ## Devicetree See the Devicetree bindings for your display. Here are the bindings for common displays: - [IL0323](https://github.com/zmkfirmware/zmk/blob/main/app/module/dts/bindings/display/gooddisplay%2Cil0323.yaml) -- [SSD1306 (i2c)](https://docs.zephyrproject.org/3.5.0/build/dts/api/bindings/display/solomon,ssd1306fb-i2c.html) -- [SSD1306 (spi)](https://docs.zephyrproject.org/3.5.0/build/dts/api/bindings/display/solomon,ssd1306fb-spi.html) +- [SSD1306 (i2c)](https://docs.zephyrproject.org/4.1.0/build/dts/api/bindings/display/solomon,ssd1306fb-i2c.html) +- [SSD1306 (spi)](https://docs.zephyrproject.org/4.1.0/build/dts/api/bindings/display/solomon,ssd1306fb-spi.html) -A full list of drivers provided by Zephyr can be found in [Zephyr's Devicetree bindings index](https://docs.zephyrproject.org/3.5.0/build/dts/api/bindings.html). +A full list of drivers provided by Zephyr can be found in [Zephyr's Devicetree bindings index](https://docs.zephyrproject.org/4.1.0/build/dts/api/bindings.html). + +### Chosen nodes + +Applies to: [`/chosen` node](https://docs.zephyrproject.org/4.1.0/build/dts/intro-syntax-structure.html#aliases-and-chosen-nodes) + +| Property | Type | Description | +| ----------------- | ---- | -------------------------------------------------------------------------------------------------------- | +| `zephyr,display` | path | The display device to use. | +| `zmk,display-led` | path | The LED device to use for on/off blanking, if the hardware requires it. Can be a PWM or GPIO LED device. | diff --git a/docs/docs/config/encoders.md b/docs/docs/config/encoders.md index 2052fc9d..7f68a0e9 100644 --- a/docs/docs/config/encoders.md +++ b/docs/docs/config/encoders.md @@ -55,12 +55,8 @@ Per sensor overrides can be added with ordered nested nodes with the correct ove }; ``` -:::note - The names of the child nodes are not important, and are applied in order to the sensors listed in the `sensors` property of the sensors node. -::: - Applies to the node and child nodes of: `compatible = "zmk,keymap-sensors"` Definition file: [zmk/app/drivers/zephyr/dts/bindings/zmk,keymap-sensors.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/drivers/zephyr/dts/bindings/zmk%2Ckeymap-sensors.yaml) diff --git a/docs/docs/config/index.md b/docs/docs/config/index.md index 354633a1..e81f65c3 100644 --- a/docs/docs/config/index.md +++ b/docs/docs/config/index.md @@ -30,21 +30,21 @@ When using a [split keyboard](../features/split-keyboards.md), you can use a sin ZMK will search for config files in: -- [`zmk/app/boards/arm/`](https://github.com/zmkfirmware/zmk/tree/main/app/boards/arm) -- `zmk-config/boards/arm/` -- `/boards/arm/` -- `zmk-config/config/boards/arm/` (For backwards compatibility only, do not use.) +- [`zmk/app/boards//`](https://github.com/zmkfirmware/zmk/tree/main/app/boards) +- `zmk-config/boards//` +- `/boards//` +- `zmk-config/config/boards//` (For backwards compatibility only, do not use.) -...where `` is the name of the board and `` is the root directory of any [included module](../features/modules.mdx). These files describe the hardware of the board. +...where `` is the name of the creator or vendor, `` is the name of the board and `` is the root directory of any [included module](../features/modules.mdx). These files describe the hardware of the board. -ZMK will search the board folder for the following config files _in addition_ to [Zephyr board-defining files](https://docs.zephyrproject.org/3.5.0/hardware/porting/board_porting.html#create-your-board-directory): +ZMK will search the board folder for the following config files _in addition_ to [Zephyr board-defining files](https://docs.zephyrproject.org/4.1.0/hardware/porting/board_porting.html#create-your-board-directory): - `.conf` (Kconfig) - `.keymap` (Devicetree, keyboards with onboard controllers only) Shared config files (excluding any `_left` or `_right` suffix) are not currently supported in board folders. -For more documentation on creating and configuring a new board, see [Zephyr's board porting guide](https://docs.zephyrproject.org/3.5.0/hardware/porting/board_porting.html#write-kconfig-files). +For more documentation on creating and configuring a new board, see [Zephyr's board porting guide](https://docs.zephyrproject.org/4.1.0/hardware/porting/board_porting.html#write-kconfig-files). ### Shield Folder @@ -57,14 +57,14 @@ When building with a shield, ZMK will search for config files in: ...where `` is the name of the shield and `` is the root directory of any [included module](../features/modules.mdx). These files describe the hardware of the shield that the board is plugged into. -ZMK will search the shield folder for the following config files _in addition_ to [Zephyr shield-defining files](https://docs.zephyrproject.org/3.5.0/hardware/porting/shields.html#shield-porting-and-configuration): +ZMK will search the shield folder for the following config files _in addition_ to [Zephyr shield-defining files](https://docs.zephyrproject.org/4.1.0/hardware/porting/shields.html#shield-porting-and-configuration): - `.conf` (Kconfig) - `.keymap` (Devicetree) Shared config files (excluding any `_left` or `_right` suffix) are not currently supported in shield folders. -For more documentation on creating and configuring a new shield, see [Zephyr's shield documentation](https://docs.zephyrproject.org/3.5.0/hardware/porting/shields.html) and [ZMK's new keyboard shield](../development/hardware-integration/new-shield.mdx) guide. +For more documentation on creating and configuring a new shield, see [Zephyr's shield documentation](https://docs.zephyrproject.org/4.1.0/hardware/porting/shields.html) and [ZMK's new keyboard shield](../hardware-integration/new-shield.mdx) guide. ## Kconfig Files @@ -78,9 +78,17 @@ CONFIG_EC11=y CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y ``` -The list of available settings is determined by various files in ZMK whose names start with `Kconfig`. Files ending with `_defconfig` use the same syntax, but are intended for setting configuration specific to the hardware which users typically won't need to change. Note that options are _not_ prefixed with `CONFIG_` in these files. +Files ending with `_defconfig` use the same syntax as `.conf` files. They set the default configuration for the hardware, which is then overridden by anything in a `.conf` file. -See [Zephyr's Kconfig documentation](https://docs.zephyrproject.org/3.5.0/build/kconfig/index.html) for more details on Kconfig files. +The list of available settings is determined by various files in ZMK whose names start with `Kconfig`. Note that options are _not_ prefixed with `CONFIG_` in these files. + +See [Zephyr's Kconfig documentation](https://docs.zephyrproject.org/4.1.0/build/kconfig/index.html) for more details on Kconfig files. + +:::tip + +You can investigate the [final set of configuration settings](../troubleshooting/building-issues.md#configuration-setting-issues) that are in effect during a build to diagnose any issues with changing Kconfig settings. + +::: ### KConfig Value Types @@ -104,7 +112,9 @@ Example: `CONFIG_FOO="foo"` ## Devicetree Files -Various Devicetree files are combined to build a tree that describes the hardware for a keyboard. They are also used to define keymaps. +Various Devicetree files are combined to build a tree that describes the hardware for a keyboard. They are also used to define keymaps. A full primer on Devicetree can be found in the [Devicetree Overview page](../development/devicetree.md) -- a shorter summary of some of the points can be found below. + +### Devicetree Overview Devicetree files use various file extensions. These indicate the purpose of the file, but they have no effect on how the file is processed. Common file extensions for Devicetree files include: @@ -129,7 +139,13 @@ Devicetree files look like this: Devicetree properties apply to specific nodes in the tree instead of globally. The properties that can be set for each node are determined by `.yaml` files in ZMK in the various `dts/bindings` folders. -See [Zephyr's Devicetree guide](https://docs.zephyrproject.org/3.5.0/build/dts/index.html) for more details on Devicetree files. +See [Zephyr's Devicetree guide](https://docs.zephyrproject.org/4.1.0/build/dts/index.html) for more details on Devicetree files. + +:::tip + +You can investigate the [final combined Devicetree](../troubleshooting/building-issues.md#devicetree-related-issues) produced during a build to diagnose any issues with changing Devicetree nodes. + +::: ### Changing Devicetree Properties @@ -150,7 +166,7 @@ The part before the colon, `kscan0`, is a label. This is optional, and it provid The `compatible` property indicates what type of node it is. Search this documentation for the text inside the quotes to see which properties the node supports. You can also search ZMK for a file whose name is the value of the `compatible` property with a `.yaml` file extension. -To set a property, see below for examples for common property types, or see [Zephyr's Devicetree documentation](https://docs.zephyrproject.org/3.5.0/build/dts/intro-syntax-structure.html#writing-property-values) for more details on the syntax for properties. +To set a property, see below for examples for common property types, or see [Zephyr's Devicetree documentation](https://docs.zephyrproject.org/4.1.0/build/dts/intro-syntax-structure.html#writing-property-values) for more details on the syntax for properties. To change a property for an existing node, first find the node you want to change and find its label. Next, outside of any other node, write an ampersand (`&`) followed by the node's label, an opening curly brace (`{`), one or more new property values, a closing curly brace (`}`), and a semicolon (`;`). @@ -172,88 +188,3 @@ If the node you want to edit doesn't have a label, you can also write a new tree }; }; ``` - -### Devicetree Property Types - -These are some of the property types you will see most often when working with ZMK. [Zephyr's Devicetree bindings documentation](https://docs.zephyrproject.org/3.5.0/build/dts/bindings.html) provides more detailed information and a full list of types. - -#### bool - -True or false. To set the property to true, list it with no value. To set it to false, do not list it. - -Example: `property;` - -If a property has already been set to true and you need to override it to false, use the following command to delete the existing property: - -```dts -/delete-property/ the-property-name; -``` - -#### int - -A single integer surrounded by angle brackets. Also supports mathematical expressions. - -Example: `property = <42>;` - -#### string - -Text surrounded by double quotes. - -Example: `property = "foo";` - -#### array - -A list of integers surrounded by angle brackets and separated with spaces. Mathematical expressions can be used but must be surrounded by parenthesis. - -Example: `property = <1 2 3 4>;` - -Values can also be split into multiple blocks, e.g. `property = <1 2>, <3 4>;` - -#### phandle - -A single node reference surrounded by angle brackets. - -Example: `property = <&label>` - -#### phandles - -A list of node references surrounded by angle brackets. - -Example: `property = <&label1 &label2 &label3>` - -#### phandle array - -A list of node references and possibly numbers to associate with the node. Mathematical expressions can be used but must be surrounded by parenthesis. - -Example: `property = <&none &mo 1>;` - -Values can also be split into multiple blocks, e.g. `property = <&none>, <&mo 1>;` - -See the documentation for "phandle-array" in [Zephyr's Devicetree bindings documentation](https://docs.zephyrproject.org/3.5.0/build/dts/bindings.html) -for more details on how parameters are associated with nodes. - -#### GPIO array - -This is just a phandle array. The documentation lists this as a different type to make it clear which properties expect an array of GPIOs. - -Each item in the array should be a label for a GPIO node (the names of which differ between hardware platforms) followed by an index and configuration flags. See [Zephyr's GPIO documentation](https://docs.zephyrproject.org/3.5.0/hardware/peripherals/gpio.html) for a full list of flags. - -Example: - -```dts -some-gpios = - <&gpio0 0 GPIO_ACTIVE_HIGH>, - <&gpio0 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - ; -``` - -#### path - -A path to a node, either as a node reference or as a string. - -Examples: - -```dts -property = &label; -property = "/path/to/some/node"; -``` diff --git a/docs/docs/config/keymap.md b/docs/docs/config/keymap.md index bcb9e044..b20bdfe4 100644 --- a/docs/docs/config/keymap.md +++ b/docs/docs/config/keymap.md @@ -19,7 +19,7 @@ Each child node can have the following properties: | Property | Type | Description | | ----------------- | ------------- | -------------------------------------------------------------------- | -| `display-name` | string | Name for the layer on displays | +| `display-name` | string | Name for the layer in ZMK Studio and on displays | | `bindings` | phandle-array | List of [key behaviors](../keymaps/index.mdx#behaviors), one per key | | `sensor-bindings` | phandle-array | List of sensor behaviors, one per sensor | diff --git a/docs/docs/config/kscan.md b/docs/docs/config/kscan.md index b8a3660b..395342a2 100644 --- a/docs/docs/config/kscan.md +++ b/docs/docs/config/kscan.md @@ -25,12 +25,12 @@ If the debounce press/release values are set to any value other than `-1`, they ### Devicetree -Applies to: [`/chosen` node](https://docs.zephyrproject.org/3.5.0/build/dts/intro-syntax-structure.html#aliases-and-chosen-nodes) +Applies to: [`/chosen` node](https://docs.zephyrproject.org/4.1.0/build/dts/intro-syntax-structure.html#aliases-and-chosen-nodes) -| Property | Type | Description | -| ---------------------- | ---- | ------------------------------------------------------------- | -| `zmk,kscan` | path | The node for the keyboard scan driver to use | -| `zmk,matrix-transform` | path | The node for the [matrix transform](#matrix-transform) to use | +| Property | Type | Description | +| ---------------------- | ---- | ---------------------------------------------------------------------- | +| `zmk,kscan` | path | The node for the keyboard scan driver to use | +| `zmk,matrix-transform` | path | The node for the [matrix transform](layout.md#matrix-transform) to use | ## Demux Driver @@ -71,17 +71,17 @@ Applies to: `compatible = "zmk,kscan-gpio-direct"` Definition file: [zmk/app/module/dts/bindings/kscan/zmk,kscan-gpio-direct.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/module/dts/bindings/kscan/zmk%2Ckscan-gpio-direct.yaml) -| Property | Type | Description | Default | -| ------------------------- | ---------- | ----------------------------------------------------------------------------------------------------------- | ------- | -| `input-gpios` | GPIO array | Input GPIOs (one per key). Can be either direct GPIO pin or `gpio-key` references. | | -| `debounce-press-ms` | int | Debounce time for key press in milliseconds. Use 0 for eager debouncing. | 5 | -| `debounce-release-ms` | int | Debounce time for key release in milliseconds. | 5 | -| `debounce-scan-period-ms` | int | Time between reads in milliseconds when any key is pressed. | 1 | -| `poll-period-ms` | int | Time between reads in milliseconds when no key is pressed and `CONFIG_ZMK_KSCAN_DIRECT_POLLING` is enabled. | 10 | -| `toggle-mode` | bool | Use toggle switch mode. | n | -| `wakeup-source` | bool | Mark this kscan instance as able to wake the keyboard from deep sleep | n | +| Property | Type | Description | Default | +| ------------------------- | ---------- | ---------------------------------------------------------------------------------------------------------- | ------- | +| `input-gpios` | GPIO array | Input GPIOs (one per key). Can be either direct GPIO pin or `gpio-key` references | | +| `debounce-press-ms` | int | Debounce time for key press in milliseconds. Use 0 for eager debouncing | 5 | +| `debounce-release-ms` | int | Debounce time for key release in milliseconds | 5 | +| `debounce-scan-period-ms` | int | Time between reads in milliseconds when any key is pressed | 1 | +| `poll-period-ms` | int | Time between reads in milliseconds when no key is pressed and `CONFIG_ZMK_KSCAN_DIRECT_POLLING` is enabled | 10 | +| `toggle-mode` | bool | Use toggle switch mode | n | +| `wakeup-source` | bool | Mark this kscan instance as able to wake the keyboard | n | -Assuming the switches connect each GPIO pin to the ground, the [GPIO flags](https://docs.zephyrproject.org/3.5.0/hardware/peripherals/gpio.html#api-reference) for the elements in `input-gpios` should be `(GPIO_ACTIVE_LOW | GPIO_PULL_UP)`: +Assuming the switches connect each GPIO pin to the ground, the [GPIO flags](https://docs.zephyrproject.org/4.1.0/hardware/peripherals/gpio.html#api-reference) for the elements in `input-gpios` should be `(GPIO_ACTIVE_LOW | GPIO_PULL_UP)`: ```dts kscan0: kscan { @@ -94,7 +94,7 @@ Assuming the switches connect each GPIO pin to the ground, the [GPIO flags](http }; ``` -A direct pin defined in the `input-gpios` property is considered a column when used in a [matrix transform](#matrix-transform); e.g. the 5th pin on the list can be referred to using `RC(0,4)`. +A direct pin defined in the `input-gpios` property is considered a column when used in a [matrix transform](layout.md#matrix-transform); e.g. the 5th pin on the list can be referred to using `RC(0,4)`. By default, a switch will drain current through the internal pull up/down resistor whenever it is pressed. This is not ideal for a toggle switch, where the switch may be left in the "pressed" state for a long time. Enabling `toggle-mode` will make the driver enable and disable the internal pull up/down resistor as needed when the switch is toggled to minimise power draw. For `toggle-mode` to work correctly each pole of the switch needs a dedicated GPIO pin. @@ -133,16 +133,16 @@ Applies to: `compatible = "zmk,kscan-gpio-matrix"` Definition file: [zmk/app/module/dts/bindings/kscan/zmk,kscan-gpio-matrix.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/module/dts/bindings/kscan/zmk%2Ckscan-gpio-matrix.yaml) -| Property | Type | Description | Default | -| ------------------------- | ---------- | ----------------------------------------------------------------------------------------------------------- | ----------- | -| `row-gpios` | GPIO array | Matrix row GPIOs in order, starting from the top row | | -| `col-gpios` | GPIO array | Matrix column GPIOs in order, starting from the leftmost row | | -| `debounce-press-ms` | int | Debounce time for key press in milliseconds. Use 0 for eager debouncing. | 5 | -| `debounce-release-ms` | int | Debounce time for key release in milliseconds. | 5 | -| `debounce-scan-period-ms` | int | Time between reads in milliseconds when any key is pressed. | 1 | -| `diode-direction` | string | The direction of the matrix diodes | `"row2col"` | -| `poll-period-ms` | int | Time between reads in milliseconds when no key is pressed and `CONFIG_ZMK_KSCAN_MATRIX_POLLING` is enabled. | 10 | -| `wakeup-source` | bool | Mark this kscan instance as able to wake the keyboard from deep sleep | n | +| Property | Type | Description | Default | +| ------------------------- | ---------- | ---------------------------------------------------------------------------------------------------------- | ----------- | +| `row-gpios` | GPIO array | Matrix row GPIOs in order, starting from the top row | | +| `col-gpios` | GPIO array | Matrix column GPIOs in order, starting from the leftmost row | | +| `debounce-press-ms` | int | Debounce time for key press in milliseconds. Use 0 for eager debouncing | 5 | +| `debounce-release-ms` | int | Debounce time for key release in milliseconds | 5 | +| `debounce-scan-period-ms` | int | Time between reads in milliseconds when any key is pressed | 1 | +| `diode-direction` | string | The direction of the matrix diodes | `"row2col"` | +| `poll-period-ms` | int | Time between reads in milliseconds when no key is pressed and `CONFIG_ZMK_KSCAN_MATRIX_POLLING` is enabled | 10 | +| `wakeup-source` | bool | Mark this kscan instance as able to wake the keyboard | n | The `diode-direction` property must be one of: @@ -151,7 +151,7 @@ The `diode-direction` property must be one of: | `"row2col"` | Diodes point from rows to columns (cathodes are connected to columns) | | `"col2row"` | Diodes point from columns to rows (cathodes are connected to rows) | -Given the `diode-direction`, the [GPIO flags](https://docs.zephyrproject.org/3.5.0/hardware/peripherals/gpio.html#api-reference) for the elements in `row-` and `col-gpios` should be set appropriately. +Given the `diode-direction`, the [GPIO flags](https://docs.zephyrproject.org/4.1.0/hardware/peripherals/gpio.html#api-reference) for the elements in `row-` and `col-gpios` should be set appropriately. The output pins (e.g. columns for `col2row`) should have the flag `GPIO_ACTIVE_HIGH`, and input pins (e.g. rows for `col2row`) should have the flags `(GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)`: ```dts @@ -198,13 +198,13 @@ Definition file: [zmk/app/module/dts/bindings/kscan/zmk,kscan-gpio-charlieplex.y | `debounce-release-ms` | int | Debounce time for key release in milliseconds. | 5 | | `debounce-scan-period-ms` | int | Time between reads in milliseconds when any key is pressed. | 1 | | `poll-period-ms` | int | Time between reads in milliseconds when no key is pressed and `interrupt-gpois` is not set. | 10 | -| `wakeup-source` | bool | Mark this kscan instance as able to wake the keyboard from deep sleep | n | +| `wakeup-source` | bool | Mark this kscan instance as able to wake the keyboard | n | -Define the transform with a [matrix transform](#matrix-transform). The row is always the driven pin, and the column always the receiving pin (input to the controller). +Define the transform with a [matrix transform](layout.md#matrix-transform). The row is always the driven pin, and the column always the receiving pin (input to the controller). For example, in `RC(5,0)` power flows from the 6th pin in `gpios` to the 1st pin in `gpios`. Exclude all positions where the row and column are the same as these pairs will never be triggered, since no pin can be both input and output at the same time. -The [GPIO flags](https://docs.zephyrproject.org/3.5.0/hardware/peripherals/gpio.html#api-reference) for the elements in `gpios` should be `GPIO_ACTIVE_HIGH`, and interrupt pins set in `interrupt-gpios` should have the flags `(GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)`. +The [GPIO flags](https://docs.zephyrproject.org/4.1.0/hardware/peripherals/gpio.html#api-reference) for the elements in `gpios` should be `GPIO_ACTIVE_HIGH`, and interrupt pins set in `interrupt-gpios` should have the flags `(GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)`. ## Composite Driver @@ -216,18 +216,21 @@ Applies to : `compatible = "zmk,kscan-composite"` Definition file: [zmk/app/dts/bindings/zmk,kscan-composite.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/dts/bindings/zmk,kscan-composite.yaml) -| Property | Type | Description | Default | -| -------- | ---- | --------------------------------------------- | ------- | -| `rows` | int | The number of rows in the composite matrix | | -| `cols` | int | The number of columns in the composite matrix | | +| Property | Type | Description | Default | +| --------------- | ---- | ----------------------------------------------------- | ------- | +| `rows` | int | The number of rows in the composite matrix | | +| `columns` | int | The number of columns in the composite matrix | | +| `wakeup-source` | bool | Mark this kscan instance as able to wake the keyboard | n | The `zmk,kscan-composite` node should have one child node per keyboard scan driver that should be composited. Each child node can have the following properties: -| Property | Type | Description | Default | -| --------------- | ------- | ------------------------------------------------------------------------------ | ------- | -| `kscan` | phandle | Label of the kscan driver to include | | -| `row-offset` | int | Shifts row 0 of the included driver to a new row in the composite matrix | 0 | -| `column-offset` | int | Shifts column 0 of the included driver to a new column in the composite matrix | 0 | +| Property | Type | Description | Default | +| ------------ | ------- | ------------------------------------------------------------------------------ | ------- | +| `kscan` | phandle | Label of the kscan driver to include | | +| `row-offset` | int | Shifts row 0 of the included driver to a new row in the composite matrix | 0 | +| `col-offset` | int | Shifts column 0 of the included driver to a new column in the composite matrix | 0 | + +If you want one of the composited kscans to be able to wake up the keyboard, make sure to set the `wakeup-source` property in its own definition, in addition to setting it for the composite kscan node itself as listed above. ### Example Configuration @@ -313,7 +316,7 @@ One possible way to do this is a 3x4 matrix where the direct GPIO keys are shift compatible = "zmk,kscan-gpio-direct"; // define 2 direct GPIOs here... }; -} +}; ``` ## Mock Driver @@ -331,174 +334,33 @@ Definition file: [zmk/app/dts/bindings/zmk,kscan-mock.yaml](https://github.com/z | `event-period` | int | Milliseconds between each generated event | | | `events` | array | List of key events to simulate | | | `rows` | int | The number of rows in the composite matrix | | -| `cols` | int | The number of columns in the composite matrix | | +| `columns` | int | The number of columns in the composite matrix | | | `exit-after` | bool | Exit the program after running all events | false | The `events` array should be defined using the macros from [app/module/include/dt-bindings/zmk/kscan_mock.h](https://github.com/zmkfirmware/zmk/blob/main/app/module/include/dt-bindings/zmk/kscan_mock.h). -## Matrix Transform +## Kscan Sideband Behavior Driver -Defines a mapping from keymap logical positions to physical matrix positions. - -Transforms should be used any time the physical layout of a keyboard's keys does not match the layout of its electrical matrix and/or when not all positions in the matrix are used. This applies to most non-ortholinear boards. - -Transforms can also be used for keyboards with multiple layouts. You can define multiple matrix transform nodes, one for each layout, and users can select which one they want from the `/chosen` node in their keymaps. - -See the [new shield guide](../development/hardware-integration/new-shield.mdx#matrix-transform) for more documentation on how to define a matrix transform. +The Kscan sideband behaviors node can be used to assign behaviors to keys in a manner distinctly separate from the keymap. These assignments and definitions will not be affected by nor have any effect on the keymap. ### Devicetree -Applies to: `compatible = "zmk,matrix-transform"` +Applies to: `compatible = "zmk,kscan-sideband-behaviors"` -Definition file: [zmk/app/dts/bindings/zmk,matrix-transform.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/dts/bindings/zmk%2Cmatrix-transform.yaml) +Definition file: [zmk/app/dts/bindings/kscan/zmk,matrix-transform.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/dts/bindings/kscan/zmk%2Ckscan-sideband-behaviors.yaml) -| Property | Type | Description | Default | -| ------------ | ----- | --------------------------------------------------------------------- | ------- | -| `rows` | int | Number of rows in the transformed matrix | | -| `columns` | int | Number of columns in the transformed matrix | | -| `row-offset` | int | Adds an offset to all rows before looking them up in the transform | 0 | -| `col-offset` | int | Adds an offset to all columns before looking them up in the transform | 0 | -| `map` | array | A list of position transforms | | +| Property | Type | Description | +| --------------- | ------- | --------------------------------------------------------- | +| `kscan` | phandle | Phandle to a kscan containing keys to assign behaviors to | +| `auto-enable` | bool | Enables the sideband instance on startup unconditionally | +| `wakeup-source` | bool | Mark this kscan instance as able to wake the keyboard | -The `map` array should be defined using the `RC()` macro from [dt-bindings/zmk/matrix_transform.h](https://github.com/zmkfirmware/zmk/blob/main/app/include/dt-bindings/zmk/matrix_transform.h). It should have one item per logical position in the keymap. Each item should list the physical row and column that should trigger the key in that position. +If `auto-enable` is not set, then the sideband behavior will wait for an external activation source before being enabled, e.g. being assigned as the chosen `zmk,kscan`. The `kscan` can contain additional keys, which will be used by the keymap if this node is set as the chosen `zmk,kscan` and has an appropriate matrix transformation defined. -### Example: Skipping Unused Positions +Each child node should have the following properties: -Any keyboard which is not a grid of 1 unit keys will likely have some unused positions in the matrix. A matrix transform can be used to skip the unused positions so users don't have to set them to `&none` in keymaps. - -```dts -// numpad.overlay -/ { - chosen { - zmk,kscan = &kscan0; - zmk,matrix-transform = &default_transform; - }; - - kscan0: kscan { - compatible = "zmk,kscan-gpio-matrix"; - // define row-gpios with 5 elements and col-gpios with 4... - }; - - default_transform: matrix_transform { - compatible = "zmk,matrix-transform"; - rows = <5>; - columns = <4>; - // ┌───┬───┬───┬───┐ - // │NUM│ / │ * │ - │ - // ├───┼───┼───┼───┤ - // │ 7 │ 8 │ 9 │ + │ - // ├───┼───┼───┤ │ - // │ 4 │ 5 │ 6 │ │ - // ├───┼───┼───┼───┤ - // │ 1 │ 2 │ 3 │RET│ - // ├───┴───┼───┤ │ - // │ 0 │ . │ │ - // └───────┴───┴───┘ - map = < - RC(0,0) RC(0,1) RC(0,2) RC(0,3) - RC(1,0) RC(1,1) RC(1,2) RC(1,3) - RC(2,0) RC(2,1) RC(2,2) - RC(3,0) RC(3,1) RC(3,2) RC(3,3) - RC(4,0) RC(4,1) - >; - }; -}; -``` - -```dts -// numpad.keymap -/ { - keymap { - compatible = "zmk,keymap"; - default { - bindings = < - &kp KP_NUM &kp KP_DIV &kp KP_MULT &kp KP_MINUS - &kp KP_N7 &kp KP_N8 &kp KP_N9 &kp KP_PLUS - &kp KP_N4 &kp KP_N5 &kp KP_N6 - &kp KP_N1 &kp KP_N2 &kp KP_N3 &kp KP_ENTER - &kp KP_N0 &kp KP_DOT - >; - }; - } -}; -``` - -### Example: Non-standard Matrix - -Consider a keyboard with a [duplex matrix](https://wiki.ai03.com/books/pcb-design/page/matrices-and-duplex-matrix), where the matrix has twice as many rows and half as many columns as the keyboard has keys. A matrix transform can be used to correct for this so that keymaps can match the layout of the keys, not the layout of the matrix. - -```dts -/ { - chosen { - zmk,kscan = &kscan0; - zmk,matrix-transform = &default_transform; - }; - - kscan0: kscan { - compatible = "zmk,kscan-gpio-matrix"; - // define row-gpios with 12 elements and col-gpios with 8... - }; - - default_transform: matrix_transform { - compatible = "zmk,matrix-transform"; - rows = <6>; - columns = <16>; - // ESC F1 F2 F3 ... - // ` 1 2 3 ... - // Tab Q W E ... - // Caps A S D ... - // Shift Z X C ... - // Ctrl Alt ... - map = < - RC(0,0) RC(1,0) RC(0,1) RC(1,1) // ... - RC(2,0) RC(3,0) RC(2,1) RC(3,1) // ... - RC(4,0) RC(5,0) RC(4,1) RC(5,1) // ... - RC(6,0) RC(7,0) RC(6,1) RC(7,1) // ... - RC(8,0) RC(9,0) RC(8,1) RC(9,1) // ... - RC(10,0) RC(11,0) // ... - >; - }; -}; -``` - -### Example: Charlieplex - -Since a charlieplex driver will never align with a keyboard directly due to the un-addressable positions, a matrix transform should be used to map the pairs to the layout of the keys. -Note that the entire addressable space does not need to be mapped. - -```devicetree -/ { - chosen { - zmk,kscan = &kscan0; - zmk,matrix-transform = &default_transform; - }; - - kscan0: kscan { - compatible = "zmk,kscan-gpio-charlieplex"; - wakeup-source; - - interrupt-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN) >; - gpios - = <&pro_micro 16 GPIO_ACTIVE_HIGH> - , <&pro_micro 17 GPIO_ACTIVE_HIGH> - , <&pro_micro 18 GPIO_ACTIVE_HIGH> - , <&pro_micro 19 GPIO_ACTIVE_HIGH> - , <&pro_micro 20 GPIO_ACTIVE_HIGH> - ; // addressable space is 5x5, (minus paired values) - }; - - default_transform: matrix_transform { - compatible = "zmk,matrix-transform"; - rows = <3>; - columns = <5>; - // Q W E R - // A S D F - // Z X C V - map = < - RC(0,1) RC(0,2) RC(0,3) RC(0,4) - RC(1,0) RC(1,2) RC(1,3) RC(1,4) - RC(2,0) RC(2,1) RC(2,3) RC(2,4) - >; - }; -}; -``` +| Property | Type | Description | Default | +| ---------- | ------------- | ------------------------------------------------------------------------------------- | ------- | +| `row` | int | The row index of the key in the `kscan` to intercept and trigger a behavior for | 0 | +| `column` | int | The column index of the key in the `kscan` to intercept and trigger a behavior for | | +| `bindings` | phandle-array | The behavior that should be triggered when the matching row and column event triggers | | diff --git a/docs/docs/config/layout.md b/docs/docs/config/layout.md new file mode 100644 index 00000000..dafcb9cf --- /dev/null +++ b/docs/docs/config/layout.md @@ -0,0 +1,231 @@ +--- +title: Layout Configuration +sidebar_label: Layout +--- + +See [Configuration Overview](index.md) for instructions on how to change these settings. + +## Matrix Transform + +Defines a mapping from keymap logical positions to physical [kscan](./kscan.md) positions. + +You can define multiple matrix transform nodes, one for each layout, and users can select which one they want from the `/chosen` node in their keymaps. + +See the [new shield guide](../hardware-integration/new-shield.mdx#matrix-transform) for more documentation on how to define a matrix transform. + +### Devicetree + +Applies to: `compatible = "zmk,matrix-transform"` + +Definition file: [zmk/app/dts/bindings/zmk,matrix-transform.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/dts/bindings/zmk%2Cmatrix-transform.yaml) + +| Property | Type | Description | Default | +| ------------ | ----- | --------------------------------------------------------------------- | ------- | +| `rows` | int | Number of rows in the transformed matrix | | +| `columns` | int | Number of columns in the transformed matrix | | +| `row-offset` | int | Adds an offset to all rows before looking them up in the transform | 0 | +| `col-offset` | int | Adds an offset to all columns before looking them up in the transform | 0 | +| `map` | array | A list of position transforms | | + +The `map` array should be defined using the `RC()` macro from [dt-bindings/zmk/matrix_transform.h](https://github.com/zmkfirmware/zmk/blob/main/app/include/dt-bindings/zmk/matrix_transform.h). It should have one item per logical position in the keymap. Each item should list the physical row and column that should trigger the key in that position. + +### Example: Skipping Unused Positions + +Any keyboard which is not a grid of 1 unit keys will likely have some unused positions in the matrix. A matrix transform can be used to skip the unused positions so users don't have to set them to `&none` in keymaps. + +```dts +// numpad.overlay +/ { + chosen { + zmk,kscan = &kscan0; + zmk,matrix-transform = &default_transform; + }; + + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + // define row-gpios with 5 elements and col-gpios with 4... + }; + + default_transform: matrix_transform { + compatible = "zmk,matrix-transform"; + rows = <5>; + columns = <4>; + // ┌───┬───┬───┬───┐ + // │NUM│ / │ * │ - │ + // ├───┼───┼───┼───┤ + // │ 7 │ 8 │ 9 │ + │ + // ├───┼───┼───┤ │ + // │ 4 │ 5 │ 6 │ │ + // ├───┼───┼───┼───┤ + // │ 1 │ 2 │ 3 │RET│ + // ├───┴───┼───┤ │ + // │ 0 │ . │ │ + // └───────┴───┴───┘ + map = < + RC(0,0) RC(0,1) RC(0,2) RC(0,3) + RC(1,0) RC(1,1) RC(1,2) RC(1,3) + RC(2,0) RC(2,1) RC(2,2) + RC(3,0) RC(3,1) RC(3,2) RC(3,3) + RC(4,0) RC(4,1) + >; + }; +}; +``` + +```dts +// numpad.keymap +/ { + keymap { + compatible = "zmk,keymap"; + default { + bindings = < + &kp KP_NUM &kp KP_DIV &kp KP_MULT &kp KP_MINUS + &kp KP_N7 &kp KP_N8 &kp KP_N9 &kp KP_PLUS + &kp KP_N4 &kp KP_N5 &kp KP_N6 + &kp KP_N1 &kp KP_N2 &kp KP_N3 &kp KP_ENTER + &kp KP_N0 &kp KP_DOT + >; + }; + } +}; +``` + +### Example: Non-standard Matrix + +Consider a keyboard with a [duplex matrix](https://wiki.ai03.com/books/pcb-design/page/matrices-and-duplex-matrix), where the matrix has twice as many rows and half as many columns as the keyboard has keys. A matrix transform can be used to correct for this so that keymaps can match the layout of the keys, not the layout of the matrix. + +```dts +/ { + chosen { + zmk,kscan = &kscan0; + zmk,matrix-transform = &default_transform; + }; + + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + // define row-gpios with 12 elements and col-gpios with 8... + }; + + default_transform: matrix_transform { + compatible = "zmk,matrix-transform"; + rows = <6>; + columns = <16>; + // ESC F1 F2 F3 ... + // ` 1 2 3 ... + // Tab Q W E ... + // Caps A S D ... + // Shift Z X C ... + // Ctrl Alt ... + map = < + RC(0,0) RC(1,0) RC(0,1) RC(1,1) // ... + RC(2,0) RC(3,0) RC(2,1) RC(3,1) // ... + RC(4,0) RC(5,0) RC(4,1) RC(5,1) // ... + RC(6,0) RC(7,0) RC(6,1) RC(7,1) // ... + RC(8,0) RC(9,0) RC(8,1) RC(9,1) // ... + RC(10,0) RC(11,0) // ... + >; + }; +}; +``` + +### Example: Charlieplex + +Since a charlieplex driver will never align with a keyboard directly due to the un-addressable positions, a matrix transform should be used to map the pairs to the layout of the keys. +Note that the entire addressable space does not need to be mapped. + +```devicetree +/ { + chosen { + zmk,kscan = &kscan0; + zmk,matrix-transform = &default_transform; + }; + + kscan0: kscan { + compatible = "zmk,kscan-gpio-charlieplex"; + wakeup-source; + + interrupt-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN) >; + gpios + = <&pro_micro 16 GPIO_ACTIVE_HIGH> + , <&pro_micro 17 GPIO_ACTIVE_HIGH> + , <&pro_micro 18 GPIO_ACTIVE_HIGH> + , <&pro_micro 19 GPIO_ACTIVE_HIGH> + , <&pro_micro 20 GPIO_ACTIVE_HIGH> + ; // addressable space is 5x5, (minus paired values) + }; + + default_transform: matrix_transform { + compatible = "zmk,matrix-transform"; + rows = <3>; + columns = <5>; + // Q W E R + // A S D F + // Z X C V + map = < + RC(0,1) RC(0,2) RC(0,3) RC(0,4) + RC(1,0) RC(1,2) RC(1,3) RC(1,4) + RC(2,0) RC(2,1) RC(2,3) RC(2,4) + >; + }; +}; +``` + +## Physical Layout + +Defines a keyboard layout by joining together a [matrix transform](#matrix-transform), a [keyboard scan](./kscan.md), and a list of physical key properties. +Multiple physical layouts can be defined for keyboards with multiple physical key layouts. +Read through the [page on physical layouts](../hardware-integration/physical-layouts.md) for more information. + +### Devicetree + +Applies to: `compatible = zmk,physical-layout` + +Definition file: [zmk/app/dts/bindings/zmk,physical-layout.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/dts/bindings/zmk%2Cphysical-layout.yaml) + +| Property | Type | Description | Default | +| -------------- | ------------- | ---------------------------------------------------------------------------------------------------------------------- | ------- | +| `display-name` | string | The name of this layout, for display purposes | | +| `transform` | phandle | The matrix transform to use along with this layout | | +| `kscan` | phandle | The kscan to use along with this layout. The `zmk,kscan` chosen will be used as a fallback if this property is omitted | | +| `keys` | phandle-array | Array of key physical attributes. | | + +Each element of the `keys` array has the shape `<&key_physical_attrs w h x y r rx ry>`, with the following properties: + +| Property | Type | Description | Unit | +| ---------- | -------- | ------------------------------------ | ------------------------------------------------------- | +| Width | int (>0) | Key(cap) width | [centi-](https://en.wikipedia.org/wiki/Centi-)"keyunit" | +| Height | int (>0) | Key(cap) height | [centi-](https://en.wikipedia.org/wiki/Centi-)"keyunit" | +| X | uint | Key X position (top-left point) | [centi-](https://en.wikipedia.org/wiki/Centi-)"keyunit" | +| Y | uint | Key Y position (top-left point) | [centi-](https://en.wikipedia.org/wiki/Centi-)"keyunit" | +| Rotation | int | Key rotation (positive => clockwise) | [centi-](https://en.wikipedia.org/wiki/Centi-)degree | +| Rotation X | int | Rotation origin X position | [centi-](https://en.wikipedia.org/wiki/Centi-)"keyunit" | +| Rotation Y | int | Rotation origin Y position | [centi-](https://en.wikipedia.org/wiki/Centi-)"keyunit" | + +The `key_physical_attrs` node is defined in [`dts/physical_layouts.dtsi`](https://github.com/zmkfirmware/zmk/blob/main/app/dts/physical_layouts.dtsi) and is mandatory. + +## Kconfig + +| Config | Type | Description | Default | +| ----------------------------------------- | ---- | ------------------------------------------------------------- | ------- | +| `CONFIG_ZMK_PHYSICAL_LAYOUT_KEY_ROTATION` | bool | Whether to store/support key rotation information internally. | y | + +## Physical Layout Position Map + +Defines a mapping between [physical layouts](#physical-layout), allowing key mappings to be preserved in the same locations as previously when using [ZMK Studio](../features/studio.md). Read through the [page on physical layouts](../hardware-integration/physical-layouts.md) for more information. + +### Devicetree + +Applies to: `compatible = zmk,physical-layout-position-map` + +Definition file: [zmk/app/dts/bindings/zmk,physical-layout-position-map.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/dts/bindings/zmk%2Cphysical-layout-position-map.yaml) + +| Property | Type | Description | Default | +| ---------- | ------- | ------------------------------------------------------------------------------------------------ | ------- | +| `complete` | boolean | If the mapping complete describes the key mapping, and no position based mapping should be used. | | + +The `zmk,physical-layout-position-map` node should have one child node per physical layout. Each child node should have the following properties: + +| Property | Type | Description | Default | +| ----------------- | ------- | --------------------------------------------------------------------------------- | ------- | +| `physical-layout` | phandle | The physical layout that corresponds to this mapping entry | | +| `positions` | array | Array of key positions that match the same array entry in the other sibling nodes | | diff --git a/docs/docs/config/led-indicators.md b/docs/docs/config/led-indicators.md new file mode 100644 index 00000000..e745c444 --- /dev/null +++ b/docs/docs/config/led-indicators.md @@ -0,0 +1,41 @@ +--- +title: LED Indicators Configuration +sidebar_label: LED Indicators +--- + +See the [LED indicators feature page](../features/led-indicators.md) for more details. + +See [Configuration Overview](index.md) for instructions on how to change these settings. + +## Kconfig + +Definition files: + +- [zmk/app/src/indicators/Kconfig](https://github.com/zmkfirmware/zmk/blob/main/app/src/indicators/Kconfig) + +| Config | Type | Description | Default | +| ----------------------------------------- | ---- | --------------------------------------------------- | ------- | +| `CONFIG_ZMK_INDICATOR_LEDS_INIT_PRIORITY` | int | Indicator LED device driver initialization priority | 91 | + +`CONFIG_ZMK_INDICATOR_LEDS_INIT_PRIORITY` must be set to a larger value than `CONFIG_LED_INIT_PRIORITY`. + +## Indicator LED Driver + +This driver maps HID indicator states to [LED API](https://docs.zephyrproject.org/4.1.0/hardware/peripherals/led.html) devices. + +### Devicetree + +Applies to: `compatible = "zmk,indicator-leds"` + +Definition file: [zmk/app/dts/bindings/indicators/zmk,indicator-leds.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/dts/bindings/indicators/zmk%2Cindicator-leds.yaml) + +| Property | Type | Description | Default | +| ------------------------- | -------- | --------------------------------------------------------------------- | ------- | +| `indicator` | int | The `HID_INDICATOR_*` value to indicate | | +| `leds` | phandles | One or more LED devices to control | | +| `active-brightness` | int | LED brightness in percent when the indicator is active | 100 | +| `inactive-brightness` | int | LED brightness in percent when the indicator is not active | 0 | +| `disconnected-brightness` | int | LED brightness in percent when the keyboard is not connected | 0 | +| `on-while-idle` | bool | Keep LEDs enabled even when the keyboard is idle and on battery power | false | + +The `indicator` property must be one of the `HID_INDICATOR_*` values defined in [zmk/app/include/dt-bindings/zmk/hid_indicators.h](https://github.com/zmkfirmware/zmk/blob/main/app/include/dt-bindings/zmk/hid_indicators.h). You may also combine values with `|` to make the LED be lit when any of the indicator states are active. diff --git a/docs/docs/config/underglow.md b/docs/docs/config/lighting.md similarity index 50% rename from docs/docs/config/underglow.md rename to docs/docs/config/lighting.md index 952eb12b..07388b07 100644 --- a/docs/docs/config/underglow.md +++ b/docs/docs/config/lighting.md @@ -1,13 +1,17 @@ --- -title: RGB Underglow Configuration -sidebar_label: RGB Underglow +title: Lighting Configuration +sidebar_label: Lighting --- -See the [RGB Underglow feature page](../features/underglow.md) for more details, including instructions for adding underglow support to a board. +See the [Lighting feature page](../features/lighting.md) for an overview of the available lighting systems in ZMK. + +## RGB Underglow + +See the [RGB underglow section](../features/lighting.md#rgb-underglow) in the Lighting feature page for more details, and [hardware integration page](../hardware-integration/lighting/underglow.md) for adding underglow support to a board. See [Configuration Overview](index.md) for instructions on how to change these settings. -## Kconfig +### Kconfig RGB underglow depends on [Zephyr's LED strip driver](https://github.com/zephyrproject-rtos/zephyr/tree/main/drivers/led_strip), which provides additional Kconfig options. @@ -44,8 +48,46 @@ Values for `CONFIG_ZMK_RGB_UNDERGLOW_EFF_START`: The `*_START` settings only determine the initial underglow state. Any changes you make with the [underglow behavior](../keymaps/behaviors/underglow.md) are saved to flash after a one minute delay and will be used after that. ::: -## Devicetree +### Devicetree ZMK does not have any Devicetree properties of its own. See the Devicetree bindings for [Zephyr's LED strip drivers](https://github.com/zephyrproject-rtos/zephyr/tree/main/dts/bindings/led_strip). -See the [RGB underglow feature page](../features/underglow.md) for examples of the properties that must be set to enable underglow. +See the [RGB underglow hardware integration page](../hardware-integration/lighting/underglow.md) for examples of the properties that must be set to enable underglow. + +## Backlight + +See the [backlight section](../features/lighting.md#backlight) in Lighting feature page for more details, and [hardware integration page](../hardware-integration/lighting/backlight.mdx) for adding backlight support to a board. + +See [Configuration Overview](index.md) for instructions on how to change these settings. + +### Kconfig + +Definition file: [zmk/app/Kconfig](https://github.com/zmkfirmware/zmk/blob/main/app/Kconfig) + +| Option | Type | Description | Default | +| ------------------------------------ | ---- | ----------------------------------------------------- | ------- | +| `CONFIG_ZMK_BACKLIGHT` | bool | Enables LED backlight | n | +| `CONFIG_ZMK_BACKLIGHT_BRT_STEP` | int | Brightness step in percent | 20 | +| `CONFIG_ZMK_BACKLIGHT_BRT_START` | int | Default brightness in percent | 40 | +| `CONFIG_ZMK_BACKLIGHT_ON_START` | bool | Default backlight state | y | +| `CONFIG_ZMK_BACKLIGHT_AUTO_OFF_IDLE` | bool | Turn off backlight when keyboard goes into idle state | n | +| `CONFIG_ZMK_BACKLIGHT_AUTO_OFF_USB` | bool | Turn off backlight when USB is disconnected | n | + +:::note +The `*_START` settings only determine the initial backlight state. Any changes you make with the [backlight behavior](../keymaps/behaviors/backlight.md) are saved to flash after a one minute delay and will be used after that. +::: + +### Devicetree + +Applies to: [`/chosen` node](https://docs.zephyrproject.org/4.1.0/build/dts/intro-syntax-structure.html#aliases-and-chosen-nodes) + +| Property | Type | Description | +| --------------- | ---- | -------------------------------------------- | +| `zmk,backlight` | path | The node for the backlight LED driver to use | + +See the Zephyr devicetree bindings for LED drivers: + +- [gpio-leds](https://docs.zephyrproject.org/4.1.0/build/dts/api/bindings/led/gpio-leds.html) +- [pwm-leds](https://docs.zephyrproject.org/4.1.0/build/dts/api/bindings/led/pwm-leds.html) + +See the [backlight hardware integration page](../hardware-integration/lighting/backlight.mdx) for examples of the properties that must be set to enable backlighting. diff --git a/docs/docs/config/pointing.md b/docs/docs/config/pointing.md new file mode 100644 index 00000000..63565e4a --- /dev/null +++ b/docs/docs/config/pointing.md @@ -0,0 +1,67 @@ +--- +title: Pointing Device Configuration +sidebar_label: Pointing +--- + +These are settings related to the pointing device/mouse support in ZMK. + +See [Configuration Overview](index.md) for instructions on how to change these settings. + +## Kconfig + +Definition file: [zmk/app/pointing/Kconfig](https://github.com/zmkfirmware/zmk/blob/main/app/pointing/Kconfig) + +### General + +| Config | Type | Description | Default | +| -------------------------------------- | ---- | -------------------------------------------------------------------------- | ------- | +| `CONFIG_ZMK_POINTING` | bool | Enable the general pointing/mouse functionality | n | +| `CONFIG_ZMK_POINTING_SMOOTH_SCROLLING` | bool | Enable smooth scrolling HID functionality (via HID Resolution Multipliers) | n | + +### Advanced Settings + +The following settings are from Zephyr and should be defaulted to sane values, but can be adjusted if you encounter problems. + +| Config | Type | Description | Default | +| -------------------------------- | ---- | ---------------------------------------------------------- | ------------------------------- | +| `CONFIG_INPUT_THREAD_STACK_SIZE` | int | Stack size for the dedicated input event processing thread | 512 (1024 on split peripherals) | + +## Input Listener + +The following documents settings related to [input listeners](../features/pointing.md#input-listeners). + +### Devicetree + +Applies to: `compatible = "zmk,input-listener"` + +Definition file: [zmk/app/dts/bindings/zmk,input-listener.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/dts/bindings/zmk%2Cinput-listener.yaml) + +| Property | Type | Description | +| ------------------ | ------------- | ------------------------------------------------------------------- | +| `device` | phandle | Input device handle | +| `input-processors` | phandle-array | List of input processors (with parameters) to apply to input events | + +#### Child Properties + +Additional properties can be set on child nodes, which allows changing the settings when certain layers are enabled: + +| Property | Type | Description | +| ------------------ | ------------- | ------------------------------------------------------------------------------------------ | +| `layers` | array | List of layer indexes. This config will apply if any layer in the list is active. | +| `input-processors` | phandle-array | List of input processors (with parameters) to apply to input events | +| `process-next` | bool | Whether to continue applying other input processors after this override if it takes effect | + +## Input Split + +Input splits are used for [pointing devices on split peripherals](../hardware-integration/pointing.mdx#listener-and-input-split-device). + +### Devicetree + +Applies to: `compatible = "zmk,input-split"` + +Definition file: [zmk/app/dts/bindings/zmk,input-split.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/dts/bindings/zmk%2Cinput-split.yaml) + +| Property | Type | Description | +| ------------------ | ------------- | ------------------------------------------------------------------- | +| `device` | handle | Input device handle | +| `input-processors` | phandle-array | List of input processors (with parameters) to apply to input events | diff --git a/docs/docs/config/power.md b/docs/docs/config/power.md index 6e6a56e7..df889ed3 100644 --- a/docs/docs/config/power.md +++ b/docs/docs/config/power.md @@ -6,35 +6,20 @@ sidebar_label: Power Management See [Configuration Overview](index.md) for instructions on how to change these settings. -## Idle/Sleep +## Low Power States -Configuration for entering low power modes when the keyboard is idle. - -In the idle state, peripherals such as displays and lighting are disabled, but the keyboard remains connected to Bluetooth so it can immediately respond when you press a key. - -In the deep sleep state, the keyboard additionally disconnects from Bluetooth and any external power output is disabled. This state uses very little power, but it may take a few seconds to reconnect after waking. +Configuration for entering [low power states](../features/low-power-states.md) when the keyboard is idle. ### Kconfig Definition file: [zmk/app/Kconfig](https://github.com/zmkfirmware/zmk/blob/main/app/Kconfig) -| Config | Type | Description | Default | -| ------------------------------- | ---- | ----------------------------------------------------- | ------- | -| `CONFIG_ZMK_IDLE_TIMEOUT` | int | Milliseconds of inactivity before entering idle state | 30000 | -| `CONFIG_ZMK_SLEEP` | bool | Enable deep sleep support | n | -| `CONFIG_ZMK_IDLE_SLEEP_TIMEOUT` | int | Milliseconds of inactivity before entering deep sleep | 900000 | - -## Soft Off - -The [soft off feature](../features/soft-off.md) allows turning the keyboard on/off from either dedicated hardware, or using the [`&soft_off` behavior](../keymaps/behaviors/soft-off.md) to turn off and a reset button to turn back on again. - -### Kconfig - -Definition file: [zmk/app/Kconfig](https://github.com/zmkfirmware/zmk/blob/main/app/Kconfig) - -| Config | Type | Description | Default | -| ------------------------ | ---- | ------------------------------------------------------------------- | ------- | -| `CONFIG_ZMK_PM_SOFT_OFF` | bool | Enable soft off functionality from the keymap or dedicated hardware | n | +| Config | Type | Description | Default | +| ------------------------------- | ---- | ------------------------------------------------------------------- | ------- | +| `CONFIG_ZMK_IDLE_TIMEOUT` | int | Milliseconds of inactivity before entering idle state | 30000 | +| `CONFIG_ZMK_SLEEP` | bool | Enable deep sleep support | n | +| `CONFIG_ZMK_IDLE_SLEEP_TIMEOUT` | int | Milliseconds of inactivity before entering deep sleep | 900000 | +| `CONFIG_ZMK_PM_SOFT_OFF` | bool | Enable soft off functionality from the keymap or dedicated hardware | n | ## External Power Control @@ -56,3 +41,33 @@ Applies to: `compatible = "zmk,ext-power-generic"` | --------------- | ---------- | ------------------------------------------------------------- | | `control-gpios` | GPIO array | List of GPIOs which should be active to enable external power | | `init-delay-ms` | int | number of milliseconds to delay after initializing the driver | + +## GPIO Key Wakeup Trigger + +A device similar to a [kscan](./kscan.md) which will be enabled only when the keyboard is entering [soft off](../features/low-power-states.md#soft-off) state. This is used to configure a GPIO key to wake the keyboard from [soft off](../features/low-power-states.md#soft-off) once it is pressed. + +### Devicetree + +Applies to: `compatible = "zmk,gpio-key-wakeup-trigger"` + +Definition file: [zmk/app/dts/bindings/zmk,gpio-key-wakeup-trigger.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/dts/bindings/zmk%2Cgpio-key-wakeup-trigger.yaml) + +| Property | Type | Description | +| --------------- | ---------- | --------------------------------------------------------------------------------------------- | +| `trigger` | phandle | Phandle to a GPIO key to be used to wake from soft off | +| `wakeup-source` | bool | Mark this device as able to wake the keyboard | +| `extra-gpios` | GPIO array | list of GPIO pins (including the appropriate flags) to set active before going into power off | + +The `wakeup-source` property should always be present for this node to be useful. The `extra-gpios` property should be used to ensure the GPIO pin will trigger properly to wake the keyboard. For example, for a `col2row` matrix kscan, these are the column pins relevant for soft off. + +## Soft Off Wakeup Sources + +Selects a list of devices to enable during [soft off](../features/low-power-states.md#soft-off), allowing those with `wakeup-source` as a property to wake the keyboard. + +### Devicetree + +Applies to: `compatible = "zmk,soft-off-wakeup-sources"` + +| Property | Type | Description | +| ---------------- | ------------- | ------------------------------------------------------------------------------------------------- | +| `wakeup-sources` | phandle array | List of devices to enable during the shutdown process to be sure they can later wake the keyboard | diff --git a/docs/docs/config/settings.md b/docs/docs/config/settings.md new file mode 100644 index 00000000..f7b4c7b3 --- /dev/null +++ b/docs/docs/config/settings.md @@ -0,0 +1,55 @@ +--- +title: Persistent Settings +sidebar_label: Settings +--- + +ZMK uses [Zephyr's settings subsystem](https://docs.zephyrproject.org/4.1.0/services/settings/index.html) to store certain runtime settings in the "storage" partition of the controller's flash memory. +These settings will be saved after certain events and loaded on boot. +For instance, bond information for [paired Bluetooth hosts](../features/bluetooth.md) are stored in this partition so that users do not need to pair to each device again after the controller loses power. + +Persisted settings are **not** cleared by flashing regular ZMK firmware: this is by design, since modifications like keymap changes should not cause users to lose their Bluetooth pairings. +They can only be cleared by setting a special Kconfig symbol or flashing a special firmware build as documented below. + +Below is a non-comprehensive list of ZMK features that utilize persisted settings. + +- [Bluetooth](../features/bluetooth.md): Stores pairing keys and MAC addresses associated with hosts, BT profile selected through the [keymap behavior](../keymaps/behaviors/bluetooth.md)[^1] +- [Split keyboards](../features/split-keyboards.md): Stores pairing keys and MAC addresses for wireless connection between parts +- [Output selection](../keymaps/behaviors/outputs.md): Stores last selected preferred endpoint changed through the keymap behavior[^1] +- [ZMK Studio](../features/studio.md): Stores any runtime keymap modifications and selected physical layouts after they are saved to the keyboard +- [Lighting](../features/lighting.md): Stores current brightness/color/effects for [underglow](../keymaps/behaviors/underglow.md) and [backlight](../keymaps/behaviors/backlight.md) features after being changed through their keymap behaviors[^1] +- [Power management](../keymaps/behaviors/power.md): Stores the state of the external power toggle as changed through the keymap behavior[^1] + +[^1]: These are not saved immediately, but after `CONFIG_ZMK_SETTINGS_SAVE_DEBOUNCE` milliseconds in order to reduce potential wear on the flash memory. + +## Kconfig + +See [Configuration Overview](index.md) for instructions on how to change these settings. + +Definition file: [zmk/app/Kconfig](https://github.com/zmkfirmware/zmk/blob/main/app/Kconfig) + +| Config | Type | Description | Default | +| ------------------------------------ | ---- | ----------------------------------------------------------------------------- | ------- | +| `CONFIG_ZMK_SETTINGS_RESET_ON_START` | bool | Clears all persistent settings from the keyboard at startup | n | +| `CONFIG_ZMK_SETTINGS_SAVE_DEBOUNCE` | int | Milliseconds to wait after a setting change before writing it to flash memory | 60000 | + +## Clearing Persisted Settings + +While regular ZMK builds will not cause any settings to be cleared upon flashing, flashing a build with `CONFIG_ZMK_SETTINGS_RESET_ON_START` enabled as documented above will cause the firmware to run a special procedure when the controller starts that clears the settings partition. + +For end users, it is recommended to use a special [shield](../hardware-integration/index.mdx#boards--shields) named `settings_reset` to build a new firmware file, then flash that firmware. +See example for building firmware using this shield in the [troubleshooting docs](../troubleshooting/connection-issues.mdx#building-a-reset-firmware). + +In both cases, regular, non-reset firmware will need to be flashed afterwards for normal operation. + +:::warning + +Since pairing information between split keyboards are also cleared with this process, you will need to clear settings on all parts of a split keyboard. +Please follow the full procedure described in [troubleshooting](../troubleshooting/connection-issues.mdx#split-keyboard-parts-unable-to-pair) so that the parts can pair correctly after clearing. + +::: + +:::tip + +[ZMK Studio](../features/studio.md)-specific settings can be easily cleared using the "Restore Stock Settings" button in the header of the Studio client. + +::: diff --git a/docs/docs/config/split.md b/docs/docs/config/split.md new file mode 100644 index 00000000..9aab0b02 --- /dev/null +++ b/docs/docs/config/split.md @@ -0,0 +1,90 @@ +--- +title: Split Configuration +sidebar_label: Split +--- + +These are settings that control how split keyboards behave. + +See [Configuration Overview](index.md) for instructions on how to change these settings. + +## Kconfig + +Following [split keyboard](../features/split-keyboards.md) settings are defined in [zmk/app/src/split/Kconfig](https://github.com/zmkfirmware/zmk/blob/main/app/src/split/Kconfig). + +| Config | Type | Description | Default | +| -------------------------------------------- | ---- | ------------------------------------------------------------------------ | ------- | +| `CONFIG_ZMK_SPLIT` | bool | Enable split keyboard support | n | +| `CONFIG_ZMK_SPLIT_ROLE_CENTRAL` | bool | `y` for central device, `n` for peripheral | n | +| `CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS` | bool | Enable split keyboard support for passing indicator state to peripherals | n | + +### Bluetooth Splits + +Following bluetooth [split keyboard](../features/split-keyboards.md) settings are defined in [zmk/app/src/split/bluetooth/Kconfig](https://github.com/zmkfirmware/zmk/blob/main/app/src/split/bluetooth/Kconfig). + +| Config | Type | Description | Default | +| ------------------------------------------------------- | ---- | -------------------------------------------------------------------------- | ------------------------------------------ | +| `CONFIG_ZMK_SPLIT_BLE` | bool | Use BLE to communicate between split keyboard halves | y | +| `CONFIG_ZMK_SPLIT_BLE_CENTRAL_PERIPHERALS` | int | Number of peripherals that will connect to the central | 1 | +| `CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_FETCHING` | bool | Enable fetching split peripheral battery levels to the central side | n | +| `CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_PROXY` | bool | Enable central reporting of split battery levels to hosts | n | +| `CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_QUEUE_SIZE` | int | Max number of battery level events to queue when received from peripherals | `CONFIG_ZMK_SPLIT_BLE_CENTRAL_PERIPHERALS` | +| `CONFIG_ZMK_SPLIT_BLE_CENTRAL_POSITION_QUEUE_SIZE` | int | Max number of key state events to queue when received from peripherals | 5 | +| `CONFIG_ZMK_SPLIT_BLE_CENTRAL_SPLIT_RUN_STACK_SIZE` | int | Stack size of the BLE split central write thread | 512 | +| `CONFIG_ZMK_SPLIT_BLE_CENTRAL_SPLIT_RUN_QUEUE_SIZE` | int | Max number of behavior run events to queue to send to the peripheral(s) | 5 | +| `CONFIG_ZMK_SPLIT_BLE_PERIPHERAL_STACK_SIZE` | int | Stack size of the BLE split peripheral notify thread | 756 | +| `CONFIG_ZMK_SPLIT_BLE_PERIPHERAL_PRIORITY` | int | Priority of the BLE split peripheral notify thread | 5 | +| `CONFIG_ZMK_SPLIT_BLE_PERIPHERAL_POSITION_QUEUE_SIZE` | int | Max number of key state events to queue to send to the central | 10 | + +### Wired Splits + +Hardware UARTs have a few different modes/approaches to sending and receiving data, with different levels of complexity and performance. Not all hardware nor drivers support all modes, so ZMK has code to support different interaction modes with the UART as needed. The default mode should be properly selected based on the platform's report support, but you can choose to override the mode if needed. + +- Polling Mode - The least efficient mode, this requires the MCU to constantly poll the UART to see if more data has been received, taking time away from other processing. This is basic mode supported by all UART drivers. +- Interrupt Mode - This mode allows the MCU to do other processing until the UART raises an interrupt to signal new data has been received. On platforms where this is combined with a FIFO, there is even less superfluous processing, and high speeds can be achieved while allowing other processing to continue. Examples: + - RP2040 + - nRF52 +- Async (DMA) Mode - Similar to interrupt mode, data reception can occur without involving the MCU. Additionally, larger volumes can be copied directly into accessible memory without the use of the MCU, allowing even further efficiency/rates without tying up the MCU. Only some drivers support this mode (and the current Zephyr 3.5 version of the nRF52 UART has some bugs that prevent its use). Examples: + - SAM0 (e.g. SAMD21) + - STM32 (e.g. stm32f072) + +Following wired [split keyboard](../features/split-keyboards.md) settings are defined in [zmk/app/src/split/wired/Kconfig](https://github.com/zmkfirmware/zmk/blob/main/app/src/split/wired/Kconfig). + +| Config | Type | Description | Default | +| -------------------------------------------- | ---- | ----------------------------------------------------------------- | ------------------------------------------------------------- | +| `CONFIG_ZMK_SPLIT_WIRED` | bool | Use wired connection to communicate between split keyboard halves | y (if devicetree is set appropriately) | +| `CONFIG_ZMK_SPLIT_WIRED_UART_MODE_ASYNC` | bool | Async (DMA) mode | y if the driver supports it (excluding nRF52 with known bugs) | +| `CONFIG_ZMK_SPLIT_WIRED_UART_MODE_INTERRUPT` | bool | Interrupt mode | y if the hardware supports it | +| `CONFIG_ZMK_SPLIT_WIRED_UART_MODE_POLLING` | bool | Polling mode | y if neither other mode is supported | + +#### Async (DMA) Mode + +The following settings only apply when using wired split in async (DMA) mode: + +| Config | Type | Description | Default | +| ----------------------------------------- | ---- | ----------------------------------------------------------- | ------- | +| `CONFIG_ZMK_SPLIT_WIRED_ASYNC_RX_TIMEOUT` | int | RX Timeout (in microseconds) before reporting received data | 20 | + +#### Polling Mode + +The following settings only apply when using wired split in polling mode: + +| Config | Type | Description | Default | +| ------------------------------------------ | ---- | ---------------------------------------------------- | ------- | +| `CONFIG_ZMK_SPLIT_WIRED_POLLING_RX_PERIOD` | int | Number of ticks between calls to poll for split data | 10 | + +## Devicetree + +### Wired Split + +Wired splits require a properly configured UART to function. If writing a shield, you may be able to use the standard UART already provided by the board, e.g. `&pro_micro_serial`. See [predefined nodes](../hardware-integration/pinctrl.mdx#predefined-nodes) for details on the UART node labels provided by various interconnects. If you are creating your own board, or using custom pins for the UART, see the documentation on [pin control](../hardware-integration/pinctrl.mdx#additional-examples) to configure the pins for your UART. + +Once you have a properly configured UART device, it needs to be assigned in a new node with a compatible value of `"zmk,wired-split"`. For example: + +```dts +/ { + wired_split { + compatible = "zmk,wired-split"; + device = <&pro_micro_serial>; + }; +}; +``` diff --git a/docs/docs/config/studio.md b/docs/docs/config/studio.md index ddfb25df..7a65e37d 100644 --- a/docs/docs/config/studio.md +++ b/docs/docs/config/studio.md @@ -3,12 +3,6 @@ title: ZMK Studio Configuration sidebar_label: ZMK Studio --- -:::warning[Alpha Feature] - -ZMK Studio is still in active development and the below information is for development purposes only. For up to date information, join the [ZMK Discord](https://zmk.dev/community/discord/invite) server and discuss in `#studio-development`. - -::: - The following settings affect the ZMK Studio portions of ZMK. See the [ZMK Studio feature](../features/studio.md) for more information on enabling and building with ZMK Studio enabled. See [Configuration Overview](index.md) for instructions on how to change these settings. diff --git a/docs/docs/config/system.md b/docs/docs/config/system.md index 1a5306bd..1cf70a82 100644 --- a/docs/docs/config/system.md +++ b/docs/docs/config/system.md @@ -13,13 +13,19 @@ Definition file: [zmk/app/Kconfig](https://github.com/zmkfirmware/zmk/blob/main/ ### General -| Config | Type | Description | Default | -| ------------------------------------ | ------ | ----------------------------------------------------------------------------- | ------- | -| `CONFIG_ZMK_KEYBOARD_NAME` | string | The name of the keyboard (max 16 characters) | | -| `CONFIG_ZMK_SETTINGS_RESET_ON_START` | bool | Clears all persistent settings from the keyboard at startup | n | -| `CONFIG_ZMK_SETTINGS_SAVE_DEBOUNCE` | int | Milliseconds to wait after a setting change before writing it to flash memory | 60000 | -| `CONFIG_ZMK_WPM` | bool | Enable calculating words per minute | n | -| `CONFIG_HEAP_MEM_POOL_SIZE` | int | Size of the heap memory pool | 8192 | +| Config | Type | Description | Default | +| --------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------- | ------- | +| `CONFIG_ZMK_BOARD_COMPAT` | bool | A special config for boards to enable. This helps check if users have accidentally used an upstream Zephyr board without ZMK additions applied | n | +| `CONFIG_ZMK_KEYBOARD_NAME` | string | The name of the keyboard (max 16 characters) | | +| `CONFIG_ZMK_WPM` | bool | Enable calculating words per minute | n | +| `CONFIG_HEAP_MEM_POOL_SIZE` | int | Size of the heap memory pool | 8192 | + +:::info + +Because ZMK enables [the Zephyr setting](https://docs.zephyrproject.org/4.1.0/kconfig.html#CONFIG_BT_DEVICE_NAME_DYNAMIC) that allows for runtime modification of the device BT name, +changing `CONFIG_ZMK_KEYBOARD_NAME` requires [clearing the stored settings](./settings.md#clearing-persisted-settings) on the controller in order to take effect. + +::: ### HID @@ -88,7 +94,7 @@ By default USB Boot protocol support is disabled, however certain situations suc ### Bluetooth -See [Zephyr's Bluetooth stack architecture documentation](https://docs.zephyrproject.org/3.5.0/connectivity/bluetooth/bluetooth-arch.html) +See [Zephyr's Bluetooth stack architecture documentation](https://docs.zephyrproject.org/4.1.0/connectivity/bluetooth/bluetooth-arch.html) for more information on configuring Bluetooth. | Config | Type | Description | Default | @@ -103,7 +109,7 @@ for more information on configuring Bluetooth. | `CONFIG_ZMK_BLE_KEYBOARD_REPORT_QUEUE_SIZE` | int | Max number of keyboard HID reports to queue for sending over BLE | 20 | | `CONFIG_ZMK_BLE_INIT_PRIORITY` | int | BLE init priority | 50 | | `CONFIG_ZMK_BLE_THREAD_PRIORITY` | int | Priority of the BLE notify thread | 5 | -| `CONFIG_ZMK_BLE_THREAD_STACK_SIZE` | int | Stack size of the BLE notify thread | 512 | +| `CONFIG_ZMK_BLE_THREAD_STACK_SIZE` | int | Stack size of the BLE notify thread | 768 | | `CONFIG_ZMK_BLE_PASSKEY_ENTRY` | bool | Experimental: require typing passkey from host to pair BLE connection | n | Note that `CONFIG_BT_MAX_CONN` and `CONFIG_BT_MAX_PAIRED` should be set to the same value. On a split keyboard they should only be set for the central and must be set to one greater than the desired number of bluetooth profiles. @@ -115,23 +121,51 @@ Note that `CONFIG_BT_MAX_CONN` and `CONFIG_BT_MAX_PAIRED` should be set to the s | `CONFIG_ZMK_USB_LOGGING` | bool | Enable USB CDC ACM logging for debugging | n | | `CONFIG_ZMK_LOG_LEVEL` | int | Log level for ZMK debug messages | 4 | -### Split keyboards +## Snippets -Following [split keyboard](../features/split-keyboards.md) settings are defined in [zmk/app/src/split/Kconfig](https://github.com/zmkfirmware/zmk/blob/main/app/src/split/Kconfig) (generic) and [zmk/app/src/split/bluetooth/Kconfig](https://github.com/zmkfirmware/zmk/blob/main/app/src/split/bluetooth/Kconfig) (bluetooth). +:::danger +Using these snippets can erase the SoftDevice on your board. +Erasing the SoftDevice will prevent the board from using firmware built without these snippets. -| Config | Type | Description | Default | -| ------------------------------------------------------- | ---- | -------------------------------------------------------------------------- | ------------------------------------------ | -| `CONFIG_ZMK_SPLIT` | bool | Enable split keyboard support | n | -| `CONFIG_ZMK_SPLIT_ROLE_CENTRAL` | bool | `y` for central device, `n` for peripheral | | -| `CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS` | bool | Enable split keyboard support for passing indicator state to peripherals | n | -| `CONFIG_ZMK_SPLIT_BLE` | bool | Use BLE to communicate between split keyboard halves | y | -| `CONFIG_ZMK_SPLIT_BLE_CENTRAL_PERIPHERALS` | int | Number of peripherals that will connect to the central | 1 | -| `CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_FETCHING` | bool | Enable fetching split peripheral battery levels to the central side | n | -| `CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_PROXY` | bool | Enable central reporting of split battery levels to hosts | n | -| `CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_QUEUE_SIZE` | int | Max number of battery level events to queue when received from peripherals | `CONFIG_ZMK_SPLIT_BLE_CENTRAL_PERIPHERALS` | -| `CONFIG_ZMK_SPLIT_BLE_CENTRAL_POSITION_QUEUE_SIZE` | int | Max number of key state events to queue when received from peripherals | 5 | -| `CONFIG_ZMK_SPLIT_BLE_CENTRAL_SPLIT_RUN_STACK_SIZE` | int | Stack size of the BLE split central write thread | 512 | -| `CONFIG_ZMK_SPLIT_BLE_CENTRAL_SPLIT_RUN_QUEUE_SIZE` | int | Max number of behavior run events to queue to send to the peripheral(s) | 5 | -| `CONFIG_ZMK_SPLIT_BLE_PERIPHERAL_STACK_SIZE` | int | Stack size of the BLE split peripheral notify thread | 650 | -| `CONFIG_ZMK_SPLIT_BLE_PERIPHERAL_PRIORITY` | int | Priority of the BLE split peripheral notify thread | 5 | -| `CONFIG_ZMK_SPLIT_BLE_PERIPHERAL_POSITION_QUEUE_SIZE` | int | Max number of key state events to queue to send to the central | 10 | +Flashing such firmware **will** totally brick the board, disabling the USB flashing functionality. +The only way to restore functionality after that is to re-flash the bootloader. + +Re-flashing a bootloader built without the SoftDevice will require firmware built with these snippets. +::: + +[Snippets](https://docs.zephyrproject.org/4.1.0/build/snippets/index.html) are a way to save common configuration separately when it applies to multiple different applications. + +Enable snippets by adding `snippet: ` to your `build.yaml` for the appropriate board: + +```yaml +- board: nrfmicro@1.3.0/nrf52833 + snippet: nrf52833-nosd + shield: corne_left +``` + +For local builds, add `-S ` to your build command. For example: + +```sh +west build -b nrfmicro@1.3.0/nrf52833 -S nrf52833-nosd -- -DSHIELD=corne_left +``` + +ZMK implements the following system configuration snippets: + +### nrf52833-nosd + +Definition: [zmk/app/snippets/nrf52833-nosd](https://github.com/zmkfirmware/zmk/blob/main/app/snippets/nrf52833-nosd) + +On memory-constrained nRF52833 boards this snippet will extend the code partition to overwrite the Nordic SoftDevice. +This gives 428KB for the code partition as opposed to 280KB with the Nordic SoftDevice. + +The added memory allows the nRF52833 to fit displays and other memory-intensive features. + +### nrf52840-nosd + +Definition: [zmk/app/snippets/nrf52840-nosd](https://github.com/zmkfirmware/zmk/blob/main/app/snippets/nrf52840-nosd) + +On nRF52840 boards this snippet will overwrite the Nordic SoftDevice, extending both the code and storage partitions. +This gives 844KB/128KB for the code/storage partitions as opposed to 792KB/32KB with the Nordic SoftDevice. + +Firmware built with this snippet can work on boards after accidentally erasing the SoftDevice. +It can also be useful for especially memory-intensive applications. diff --git a/docs/docs/customization.md b/docs/docs/customization.md index e35bb426..db7ea935 100644 --- a/docs/docs/customization.md +++ b/docs/docs/customization.md @@ -50,21 +50,21 @@ It is also possible to build firmware locally on your computer by following the For normal keyboards, follow the same flashing instructions as before to flash your updated firmware. For [split keyboards](features/split-keyboards.md#building-and-flashing-firmware), only the central (left) side will need to be reflashed if you are just updating your keymap. -More troubleshooting information for split keyboards can be found [here](troubleshooting/connection-issues.mdx#split-keyboard-halves-unable-to-pair). +More troubleshooting information for split keyboards can be found [here](troubleshooting/connection-issues.mdx#split-keyboard-parts-unable-to-pair). ## Building Additional Keyboards -You can build additional keyboards with GitHub actions by appending them to `build.yml` in your `zmk-config` folder. For instance assume that we have set up a Corne shield with nice!nano during [initial setup](user-setup.mdx) and we want to add a Lily58 shield with nice!nano v2. The following is an example `build.yaml` file that would accomplish that: +You can build additional keyboards with GitHub actions by appending them to `build.yaml` in your `zmk-config` folder. For instance assume that we have set up a Corne shield with nice!nano during [initial setup](user-setup.mdx) and we want to add a Lily58 shield with nice!nano v2. The following is an example `build.yaml` file that would accomplish that: ```yaml include: - - board: nice_nano + - board: nice_nano@1 shield: corne_left - - board: nice_nano + - board: nice_nano@1 shield: corne_right - - board: nice_nano_v2 + - board: nice_nano shield: lily58_left - - board: nice_nano_v2 + - board: nice_nano shield: lily58_right ``` diff --git a/docs/docs/development/contributing/documentation.md b/docs/docs/development/contributing/documentation.md index 5bca6303..26ba14fe 100644 --- a/docs/docs/development/contributing/documentation.md +++ b/docs/docs/development/contributing/documentation.md @@ -11,6 +11,8 @@ This document outlines how to test your documentation changes locally and prepar The documentation is written with [Docusaurus](https://docusaurus.io/). The ZMK source code has all of the necessary Docusaurus dependencies included, but referencing their documentation can be helpful at times. +The website is built using the latest LTS version of node, which is available at . + The general process for updating the ZMK documentation is: 1. Update the documentation @@ -18,14 +20,6 @@ The general process for updating the ZMK documentation is: 3. Ensure the sources are formatted properly and linted 4. Create a Pull Request for review and inclusion into the ZMK sources -:::note -If you are working with the documentation from within VS Code+Docker please be aware the documentation will not be auto-generated when making changes while the server is running. You'll need to restart the server when saving changes to the documentation. -::: - -:::note -You will need `Node.js` and `npm` installed to update the documentation. If you're using the ZMK dev container (Docker) the necessary dependencies are already installed. Otherwise, you must install these dependencies yourself. Since `Node.js` packages in Linux distributions tend to be outdated, it's recommended to install the current version from a repository like [NodeSource](https://github.com/nodesource/distributions) to avoid build errors. -::: - ## Testing Documentation Updates Locally To verify documentation updates locally, follow the following procedure. The `npm` commands and first step will need to be run from a terminal. @@ -52,15 +46,9 @@ The check commands can be run with the following procedure in a terminal that's 3. Run `npm run lint` 4. Run `npm run build` -:::danger If any of the above steps throw an error, they need to be addressed and all of the checks re-run prior to submitting a pull request. -::: -:::note -The documentation uses American English spelling and grammar conventions. Title case is used for the first three heading levels, with sentence case used beyond that. - -Please make sure your changes conform to these conventions - prettier and lint are unfortunately unable to do this automatically. -::: +The documentation uses American English spelling and grammar conventions. Title case is used for the first three heading levels, with sentence case used beyond that. Please make sure your changes conform to these conventions. ## Submitting a Pull Request diff --git a/docs/docs/development/contributing/pull-requests.md b/docs/docs/development/contributing/pull-requests.md new file mode 100644 index 00000000..a9585475 --- /dev/null +++ b/docs/docs/development/contributing/pull-requests.md @@ -0,0 +1,103 @@ +--- +title: Pull Requests +--- + +Changes to ZMK's `main` branch are all done through pull requests, even for core committers. The following will help ensure an easier PR/review process for all involved. + +## Clean Commit History + +Before opening a PR, ensure your branch has a clean commit history, which allows our release automation to generate clean changelogs, and allows easier understanding of our commit history when investigating regressions, etc. + +A "clean" commit history satisfies the following: + +- Commit messages follow our [commit message conventions](#commit-messages). +- The sequence of commits should be well organized, with discrete commits used to break any combined work into smaller, cohesive changes if the scope of a given PR/change is larger. This allows for easier code review. You can usually accomplish this by amending (e.g. `git add foo && git commit --amend`) or by interactive rebasing (e.g. `git rebase -i upstream/main`) and squashing/rewording commits. +- Do not use merge commits to catch up with ZMK `main`, instead using rebasing to address any issues with divergence (e.g. `git rebase upstream/main`). + +### Commit Messages + +The ZMK project uses [conventional commits](https://www.conventionalcommits.org/) for their commit messages. This not only provides consistency for our commits, but also allows for release/versioning automation to determine the next version to release, generating changelogs, etc. + +Commit messages will be checked as part of our CI process by GitHub Actions. + +#### Guidelines + +Commits should have the following: + +- A first line prefix that includes a [type](#types), as well as appropriate [scope](#scopes) in parentheses as needed. +- Following the prefix, a concise summary of the change, which documents the new behavior/feature/functionality in the positive (e.g. "wake from sleep now works with charlieplex kscan", not "fixed waked from sleep bug with charlieplex kscan driver"). +- A blank line following the first line. +- A body that provides more detail of the changes. This _may_ be a bulleted list or paragraph prose. +- An optional set of [git trailers](https://git-scm.com/docs/git-interpret-trailers#_description) for things like [GitHub keywords](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests) following a blank line. + +#### Example + +Here is an example of a good commit message: + +``` +feat(boards): Add numpad layouts + +Added physical layouts for the following variants of numpads: + +- With and without extra top row +- 2U plus key or 1U plus and backspace keys +- 2U 0 key or 1U 0 and 00 keys +- Full 1U grid/macropad layout + +Other layouts exist, such as "southpaw" horizontally mirrored layouts, +and layouts with a fifth column, but those seem to be much less common. +``` + +#### Pre-Commit + +To help make sure you don't need to wait for GitHub Actions to check your commits, you can [set up pre-commit](../local-toolchain/pre-commit.md) to check your commits as you create them. + +#### Types + +The following commit types are used by ZMK: + +- `blog:` -- changes to our documentation found in the `docs/blog` directory +- `docs:` -- changes to our documentation found in the `docs/` directory, except blogs +- `feat:` -- changes that add a new feature +- `fix:` -- changes that fix existing functionality +- `refactor:` -- changes that refactor existing functionality without adding any new features +- `feat!:`/`refactor!:`/`fix!:` -- same as above, but indicates a breaking change. Examples would be changes to the public C API, renaming a board/shield, editing a board or shield to rename devicetree labels that may be used in keymaps, etc. +- `ci:` -- changes to our continuous integration setup with GitHub Actions, usually only for the files in `.github/workflows/` +- `chore:` -- grab bag type for small changes that don't fall into any of the above categories, including dependency updates for development tools and docs. + +#### Scopes + +The following scopes are frequently used to further clarify the scope of the change: + +- `hid` -- changes to our general HID code +- `usb` -- changes specific to USB +- `ble` -- changes specific to BLE +- `power` -- changes to our power management code +- `split` -- changes to our split keyboard support +- `studio` -- changes to our ZMK Studio code +- `display` -- changes to to our display code +- `underglow` -- changes to to our RGB underglow support +- `backlight` -- changes to to our simple LED backlight support +- `behaviors` -- changes to to our core behavior code +- `core` -- changes to any other area of our core code +- `boards` -- changes to the in-tree boards +- `shields` -- changes to the in-tree shields + +## Opening a PR + +Create a PR by visiting https://github.com/zmkfirmware/zmk/pulls and clicking "New pull request" and selecting your branch. GitHub should auto-populate a start of a description/body to your PR, but please make sure to supplement that with additional details about the change and make sure the check-list is complete in the PR template. + +Once created, the PR should automatically have reviewers assigned. + +## Review + +Depending on the area of change, different ZMK team members will review the PR. The ZMK project is a small team, so please be patient with the review timeline. You are welcome to send a polite request/nudge on our Discord server to draw attention to your PR if it has not gotten a response after a reasonable amount of time. + +## Merging + +Maintainers merging PRs will perform the following steps: + +1. Verify that the expected tests have all run, and are passing +1. Inspect the commits in the PR to confirm the commit messages not only are proper conventional commits, but have accurate descriptions and are using the correct type for the set of files changed by the commit(s). +1. Merge the PR using a squash-merge. If the PR includes multiple commits, then the squash message will be fixed up manually to remove the `* ` prefixes from each message section to ensure [release-please](https://github.com/googleapis/release-please) properly will parse the compound commit message. +1. Confirm the new/existing release PR is updated properly with the expected version number and changelog. diff --git a/docs/docs/development/devicetree.md b/docs/docs/development/devicetree.md new file mode 100644 index 00000000..f576b36e --- /dev/null +++ b/docs/docs/development/devicetree.md @@ -0,0 +1,322 @@ +--- +title: Devicetree Overview +sidebar_label: Devicetree Overview +--- + +ZMK makes heavy usage of a type of [tree data structure]() known as _devicetree_. +Devicetree is a _declarative_ way of describing almost everything about a Zephyr device, from the definition of keymaps and configuration of behaviors all the way to the internal storage partitions and architecture of the board's MCU. + +This page is an introduction to devicetree for ZMK users and designers. +For further reading, refer to the [devicetree spec](https://github.com/devicetree-org/devicetree-specification/releases) and [Zephyr's documentation](https://docs.zephyrproject.org/latest/build/dts/index.html#devicetree-guide). + +## Running Example + +The following segment taken from a keymap will be used as a running example: + +```dts +#include +#include + +/ { + behaviors { + spc_ul: space_underscore { + compatible = "zmk,behavior-mod-morph"; + #binding-cells = <0>; + bindings = <&kp SPACE>, <&kp UNDERSCORE>; + mods = <(MOD_LSFT|MOD_RSFT)>; + }; + }; + keymap { + compatible = "zmk,keymap"; + default_layer { + bindings = <&spc_ul &kp Z &kp M &kp K>; + }; + }; +}; +``` + +It may be helpful to open this page twice and leave one copy open at this example. +Note also that Devicetree uses C-style comments, i.e. `// ...` for line comments and `/* ... */` for block comments. + +## Structure + +A devicetree node has the general structure (parts within `[]` being optional) + +```dts +[label:] name { + [properties] + [child nodes] +}; +``` + +The root node of the devicetree always has the name `/`, i.e. is written as + +```dts + / { + [child nodes] + }; +``` + +It is also the _only_ node which has the `/` character as a name. See the devicetree spec for permitted characters for node names. + +After various preprocessing steps, all contents of the devicetree will be found within/under the root node. +If one node is found within another node, we say that the first node is a _child node_ of the second one. Similarly, one can also refer to a _grandchild node_, etc. + +In the running example, `behaviors` and `keymap` are child nodes of the root node. `space_underscore` and `default_layer` are child nodes of `behaviors` and `keymap` respectively, making them both grandchild nodes of the root node. + +### Properties + +What properties a node may have varies drastically. Of the standard properties, there are two which are of particularly relevant to users and designers: `compatible` and `status`. Additional standard properties may be found in the [devicetree spec](https://github.com/devicetree-org/devicetree-specification/releases). + +#### Property types + +These are some of the property types you will see most often when working with ZMK. [Zephyr's Devicetree bindings documentation](https://docs.zephyrproject.org/4.1.0/build/dts/bindings.html) provides more detailed information and a full list of types. + +##### bool + +True or false. To set the property to true, list it with no value. To set it to false, do not list it. + +Example: `property;` + +If a property has already been set to true and you need to override it to false, use the following command to delete the existing property: + +```dts +/delete-property/ the-property-name; +``` + +##### int + +A single integer surrounded by angle brackets. Also supports mathematical expressions. + +Example: `property = <42>;` + +##### string + +Text surrounded by double quotes. + +Example: `property = "foo";` + +##### array + +A list of integers surrounded by angle brackets and separated with spaces. Mathematical expressions can be used but must be surrounded by parenthesis. + +Example: `property = <1 2 3 4>;` + +Values can also be split into multiple blocks, e.g. `property = <1 2>, <3 4>;` + +##### phandle + +A single node reference surrounded by angle brackets. Phandles will be explained in more detail in a [later section](#labels-and-phandles). + +Example: `property = <&label>` + +##### phandles + +A list of node references surrounded by angle brackets. Phandles will be explained in more detail in a [later section](#labels-and-phandles). + +Example: `property = <&label1 &label2 &label3>` + +##### phandle array + +A list of node references and possibly numbers to associate with the node. Mathematical expressions can be used but must be surrounded by parenthesis. Phandles will be explained in more detail in a [later section](#labels-and-phandles). + +Example: `property = <&none &mo 1>;` + +Values can also be split into multiple blocks, e.g. `property = <&none>, <&mo 1>;` + +See the documentation for "phandle-array" in [Zephyr's Devicetree bindings documentation](https://docs.zephyrproject.org/4.1.0/build/dts/bindings.html) +for more details on how parameters are associated with nodes. + +##### GPIO array + +This is just a phandle array. The documentation lists this as a different type to make it clear which properties expect an array of GPIOs. + +Each item in the array should be a label for a GPIO node (the names of which differ between hardware platforms) followed by an index and configuration flags. See [Zephyr's GPIO documentation](https://docs.zephyrproject.org/4.1.0/hardware/peripherals/gpio.html) for a full list of flags. Phandles and labels will be explained in more detail in a [later section](#labels-and-phandles). + +Example: + +```dts +some-gpios = + <&gpio0 0 GPIO_ACTIVE_HIGH>, + <&gpio0 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + ; +``` + +##### path + +A path to a node, either as a node reference or as a string. This will be explained in more detail in a [later section](#labels-and-phandles). + +Examples: + +```dts +property = &label; +property = "/path/to/some/node"; +``` + +#### Compatible + +The most important property that a node has is generally the `compatible` property. This property is used to map code to nodes. There are some special cases, such as the node named `chosen`, where the node name is used rather than a `compatible` property. + +In the running example, `space_underscore` has the property `compatible = "zmk,behavior-mod-morph";`. The [ZMK's mod-morph behavior code](https://github.com/zmkfirmware/zmk/blob/main/app/src/behaviors/behavior_mod_morph.c#L7) acts on all nodes with `compatible` set to this value. The [ZMK keymap code](https://github.com/zmkfirmware/zmk/blob/main/app/src/keymap.c#L29) acts similarly for `compatible = "zmk,keymap";`. + +The `compatible` property is also used to identify what additional properties a node may have. Any properties which are not one of the standard properties must be listed in a "devicetree bindings" file. These files will sometimes also include some additional information on the usage of the node. + +ZMK keeps all of its devicetree bindings under the [`app/dts/bindings` directory](https://github.com/zmkfirmware/zmk/tree/main/app/dts/bindings). + +The bindings file for `compatible = "zmk,behavior-mod-morph";` is [`app/dts/bindings/behaviors/zmk,behavior-mod-morph.yaml`](https://github.com/zmkfirmware/zmk/blob/main/app/dts/bindings/behaviors/zmk%2Cbehavior-mod-morph.yaml). + +```dts title="zmk,behavior-mod-morph.yaml" +# Copyright (c) 2020 The ZMK Contributors +# SPDX-License-Identifier: MIT + +description: Mod Morph Behavior + +compatible: "zmk,behavior-mod-morph" + +include: zero_param.yaml + +properties: + bindings: + type: phandle-array + required: true + mods: + type: int + required: true + keep-mods: + type: int + required: false +``` + +The properties the node can have are listed under `properties`. Some additional properties are imported from [zero_param.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/dts/bindings/behaviors/zero_param.yaml). Bindings files are **the authority** on node properties, with our [documentation of said properties](https://zmk.dev/docs/config/behaviors#devicetree-7) sometimes omitting things like the `#binding-cells` property (imported from the previously mentioned file, describing the number of parameters that the behavior accepts). A full description of the bindings file syntax can be found in [Zephyr's documentation](https://docs.zephyrproject.org/4.1.0/build/dts/bindings-syntax.html). + +Note that binding files can also specify properties for children, like the [`zmk,keymap.yaml` bindings file](https://github.com/zmkfirmware/zmk/blob/main/app/dts/bindings/zmk%2Ckeymap.yaml) specifying properties for layers in the keymap. + +#### Status + +The `status` property simply describes the status of a node. For ZMK users and designers, there are only two relevant values that this could be set to: + +- `status = "disabled";` The node is disabled. Code should not take effect or make use of the node, but it can still be referenced by other parts of the devicetree. +- `status = "okay";` The default setting when not explicitly stated. The node is treated as "active". This property is generally only explicitly stated when overwriting a `status = "disabled";`. + +How this property is used in practice will become more clear after the [devicetree preprocessing](#devicetree-preprocessing) section later on. + +### Labels and Phandles + +In addition to _names_, nodes can also have _labels_. For the ZMK user/designer, labels are arguably more important than node names. Whereas node names are used within code to access individual nodes, labels are used to reference other nodes from within devicetree itself. Such a reference is called a _phandle_, and can be thought of as similar to a pointer in C. + +In the running example, `spc_ul` is the label given to the node `space_underscore`. The `bindings` property of the `default_layer` node is a "phandle-array" - an array of references to other nodes[^1]. Its first element is `&spc_ul` - a phandle to the node with label `spc_ul`, i.e. `space_underscore`. `&kp` is another example of a phandle. It points to a node [defined as below](https://github.com/zmkfirmware/zmk/blob/main/app/dts/behaviors/key_press.dtsi): + +```dts +/ { + behaviors { + kp: key_press { + compatible = "zmk,behavior-key-press"; + #binding-cells = <1>; + display-name = "Key Press"; + }; + }; +}; +``` + +This node is imported from a different file -- imports will be discussed later on. The `&kp` phandles found in the running example also show the concept of _parameters_ being passed to phandles. In this case, `Z`, `M`, and `K` are passed as parameters. + +When ZMK needs to trigger a behavior found at a location in the keymap's `binding` property, it uses the phandle to identify the behavior node which needs to be called. It then executes the code determined by the `compatible` property of said node, passing in parameters while doing so[^2]. Depending on the behavior, another behavior phandle may need to be triggered, in which case the same process is used to identify the node and thus the parts of code which need to be executed. + +Essentially, each layer in a keymap consists of an array of phandles pointing to various behaviors (alongside parameters) that were defined elsewhere. If you do not need to define the behavior node yourself, that just means ZMK has already defined it for you. + +[^1]: A phandle array by definition also includes metadata, i.e. parameters. Strictly speaking, a list of phandles without metadata has type `phandles` rather than `phandle-array`. A property with a single phandle has type `phandle`. + +[^2]: The number of parameters passed to the behavior code (and skipped over to find the next behavior phandle) is determined by the `#binding-cells` property mentioned above. + +## Devicetree Preprocessing + +Much of the complexity in `dts` files comes from preprocessing. The resulting devicetree after all preprocessing has finished [can be inspected](../troubleshooting/building-issues.md#devicetree-related-issues) for both GitHub Actions and local builds. For reasons that will make more sense later, your keymap and most of your customisations will be found near the bottom of the file. + +Preprocessing comes from two sources: + +1. The [C preprocessor](https://gcc.gnu.org/onlinedocs/cpp/) can be used within Devicetree Source (`dts`) files. +2. Devicetree has its own system for merging together, overwriting, and even deleting nodes and properties. + +### C Preprocessor + +An introduction to the C preprocessor is beyond the scope of this page. There are plenty of resources online for the unfamiliar reader to refer to. + +However, some specific methods of how the C preprocessor is used in ZMK's devicetree files can be useful, to better understand how everything fits together. + +The C preprocessor is used to import some nodes and other preprocessor definitions from other files. The lines + +```dts +#include +#include +``` + +which are found at the top of the running example import the default behavior node definitions for ZMK, along with a list of preprocessor definitions. The parameters `Z`, `M`, and `K` (passed to the `&kp` phandle in the running example) are actually C preprocessor defines. For example, during preprocessing references to `Z` get turned into the number `0x07001D`, which is the number that gets passed to the ZMK host device (e.g. your computer) for it to then re-interpret as the letter "z". + +The C preprocessor often gets leveraged by ZMK power users to reduce repetition in their keymap files. An example of this is the [macro-behavior convenience macro](../keymaps/behaviors/macros.md#convenience-c-macro). ZMK designers will also come across the `RC` macro used for matrix transformations, and make use of convenience defines such as `GPIO_ACTIVE_HIGH`. + +### Devicetree Processing + +A devicetree is almost always constructed from multiple files. These files are generally speaking: + +- `.dtsi` files, which exist exclusively to be included via the C preprocessor (their contents get "pasted" at the location of the `#include` command) and are not used by the build sytem otherwise. +- A `.dts` file, which forms the "base" of the devicetree. A single one of these is always present when a devicetree is constructed. For ZMK, the `.dts` file contains the sections of the devicetree describing the [_board_](hardware-integration/index.mdx#what-is-a-board). This includes importing a number of `.dtsi` files describing the specific SoC that the board uses. +- Any number of `.overlay` files. These files can come from various sources, such as [shields](hardware-integration/index.mdx#what-is-a-shield) or [snippets](https://docs.zephyrproject.org/4.1.0/build/snippets/index.html). An overlay is applied to a `.dts` file by appending its contents to the end of the `.dts` file, i.e. it is placed at the bottom of the file. Multiple overlays are applied by doing so repeatedly in a particular order. Without going into the details of the exact order in which overlays are applied, it is enough to know that if you specify e.g. `shield: corne_left nice_view_adapter nice_view` in your `build.yaml`, then the overlays are applied left to right. +- A single `.keymap` file. This file being included is ZMK-specific, and is treated as the "final" `.overlay` file, appended after all other overlays. + +#### Merging and overwriting nodes + +When a node appears multiple times in the devicetree (after the files are imported and merged together), it gets merged into a single node as a preprocessing step. For example: + +```dts +/ { + mn_ex: my_example_node { + property1 = <0>; + property2 = <2>; + }; +}; + +/ { + my_example_node { + property2 = <1>; + property3 = <4>; + }; + + example2 { + property; + }; +}; +``` + +The second appearance of `my_example_node` has priority, thus its `property2` value will overwrite the first appearance. The two root nodes also get merged in the process. The resulting tree after processing would be + +```dts +/ { + mn_ex: my_example_node { + property1 = <0>; + property2 = <1>; + property3 = <4>; + }; + + example2 { + property; + }; +}; +``` + +Labels do not get overwritten; a node can have multiple labels. Phandles can also be used to overwrite or add properties: + +```dts +&mn_ex { + property4 = <2>; +}; +``` + +The phandle approach is the recommended one, as one does not need to know the exact names of all the parent nodes with this approach. Crucially, when using phandles to overwrite or add properties, **the phandle must not be located within the root node**. It is instead placed outside of the tree entirely. + +#### Special devicetree directives + +Devicetree has some special directives that affect the tree. Relevant ones are: + +- Nodes can be deleted with the /delete-node/ directive: `/delete-node/ &node_label;` outside of the root node. +- Properties can be deleted with the /delete-property/ directive: `/delete-property/ node-property;` inside the relevant node. +- `/omit-if-no-ref/` causes a node to be omitted from the resulting devicetree if there are no references/phandles to the node: `/omit-if-no-ref/ &node_label;` diff --git a/docs/docs/development/events.md b/docs/docs/development/events.md new file mode 100644 index 00000000..e7de85f5 --- /dev/null +++ b/docs/docs/development/events.md @@ -0,0 +1,180 @@ +--- +title: ZMK Events +sidebar_label: ZMK Events +--- + +ZMK makes use of events to decouple individual components such as behaviors and peripherals from the core functionality. For this purpose, ZMK has implemented its own event manager. This page is a (brief) overview of the functionality and methods exposed by the event manager, documenting its API. Its purpose is to aid module developers and contributors, such as for the development of [new behaviors](./new-behavior.mdx) or [new features](./module-creation.md). There is no value in reading this page as an end-user. + +To see what events exist and what data they contain, it is best to view the corresponding [event header files](https://github.com/zmkfirmware/zmk/tree/main/app/include/zmk/events) directly. Including the event_manager header via `#include ` is required for any interaction with the event system. + +## Generic Events + +The generic event type is `struct zmk_event_t`. This struct looks like this: + +```c +typedef struct { + const struct zmk_event_type *event; + uint8_t last_listener_index; +} zmk_event_t; +``` + +In memory, the struct for a specific raised event `struct zmk_specific_thing_happened_event` **always** consists of a `zmk_event_t` struct **followed immediately afterwards** by the struct containing the data for the actual event. + +```c +struct zmk_specific_thing_happened_event { + zmk_event_t header; + struct zmk_specific_thing_happened data; +}; +``` + +The contents of `header.event` allows us to identify which type a particular event actually is, so that we may safely access its data in `data`. This is handled by the following function, which allows us to obtain the underlying data from a generic event: + +```c +struct zmk_specific_thing_happened *as_specific_thing_happened(const zmk_event_t *eh); +``` + +This method takes in a pointer to a `zmk_event_t` (which is actually a pointer to a specific event, such as `zmk_specific_thing_happened_event`), and will return the underlying `zmk_specific_thing_happened` data struct if the `zmk_event_t` header indicates that the generic event pointer is indeed a pointer to a `zmk_specific_thing_happened_event`. If the type of the event does not match the function, then the function will return `NULL`. By convention, `zmk_event_t` pointer arguments are named `eh`, short for "event header". + +This method will exist for every type of event, so for `zmk_layer_state_changed` we have `as_zmk_layer_state_changed`, etc. It is generated by a macro as part of the event declaration. + +## Subscribing To Events + +### Subscription and Listener + +To subscribe to any events, you will first need to inform the event manager that you wish to add a new listener. +This is done by calling the `ZMK_LISTENER` macro: + +```c +ZMK_LISTENER(combo, behavior_combo_listener); +``` + +This macro takes two parameters: + +1. (`combo` in the example) This gives a name to the listener, for the event manager to refer back to it. +2. (`behavior_combo_listener` in the example) This is a [callback]() that will be called whenever **any** event that the listener subscribes to occurs (if it is not handled by another listener with a higher priority). By convention, the callback should have the suffix `_listener`. + +Once you have a listener set up, you can subscribe to individual events by calling the `ZMK_SUBSCRIPTION` macro: + +```c +ZMK_SUBSCRIPTION(combo, zmk_keycode_state_changed); +``` + +The first parameter is the name of the listener created with `ZMK_LISTENER`, while the second is the name of the _struct_ that defines the event's data, which was declared in the corresponding header file. By convention the header file for an event will be named `specific_thing_happened`, with the struct named `zmk_specific_thing_happened`. + +Of course, you will also need to import the corresponding event header at the top of your file. + +### Listener Callback + +The listener will be passed a raised `zmk_event_t` pointer (as described previously) as an argument, and should have `int` as its return type. + +The listener should return one of three values (which are of type `int`) back to the event manager: + +- `ZMK_EV_EVENT_BUBBLE`: Keep propagating the event `struct` to the next listener. +- `ZMK_EV_EVENT_HANDLED`: Stop propagating the event `struct` to the next listener. The event manager still owns the `struct`'s memory, so it will be `free`d automatically. Do **not** free the memory in this function. +- `ZMK_EV_EVENT_CAPTURED`: Stop propagating the event `struct` to the next listener. The event `struct`'s memory is now owned by your code, so the event manager will not free the event `struct` memory. Make sure your code will release or free the event at some point in the future. (Use the `ZMK_EVENT_*` macros described [below](#raising-events).) + +If an error occurs during the listener call, it should return a negative value indicating the appropriate error code. + +As mentioned previously, the same callback will be called when any event that is subscribed to occurs. To obtain the underlying event from the generic event passed to the listener, the previously described `as_zmk_specific_thing_happened` function should be used: + +```c +int behavior_hold_tap_listener(const zmk_event_t *eh) { + if (as_zmk_position_state_changed(eh) != NULL) { + // it is a position_state_changed event, handle it with my_position_state_handler + return my_position_state_handler(eh); + } else if (as_zmk_keycode_state_changed(eh) != NULL) { + // it is a keycode_state_changed event, handle it with my_keycode_state_handler + return my_keycode_state_handler(eh); + } + return ZMK_EV_EVENT_BUBBLE; +} +``` + +The priority of the listeners is determined by the order in which the linker links the files. Within ZMK, this is the order of the corresponding files in `CMakeLists.txt`. External modules targeting `app` are linked prior to any files within ZMK itself, making them the highest priority. It is thus the module maintainer's responsibility to both ensure that their module does not cause issues by being first in the listener queue. For example, [hold-tap](../keymaps/behaviors/hold-tap.mdx) is the first listener to `position_state_changed`, and may behave inconsistently if a behavior defined in a module listens to `position_state_changed` and invokes a `hold-tap` (e.g. by calling `zmk_behavior_invoke_event` with a `hold-tap` as the binding). + +In addition, because modules listen to the events first, they should _never_ capture/handle an event defined in ZMK without releasing it later. Unless it is unavoidable, it is recommended to bubble events whenever possible. + +When considering multiple modules, priority is determined by the order in which the modules are present in the user's `west.yml`. Hence there should be no order dependencies between modules, only within a module. + +## Raising Events + +There are several different ways to raise events, with slight differences between them. + +- `int raise_zmk_specific_thing_happened(struct zmk_specific_thing_happened event)`: This function will take an event data structure, add a header to it, and then start handling the event with the first registered event listener. + +The following macros can also be used for advanced use cases. These will each take in an event `ev` which already consists of the header & data combination, i.e. `ev` has the type `struct zmk_specific_thing_happened_event`. + +- `ZMK_EVENT_RAISE(ev)`: Start handling this event (`ev`) with the first registered event listener. +- `ZMK_EVENT_RAISE_AFTER(ev, mod)`: Start handling this event (`ev`) after the event is captured by the named [event listener](#subscription-and-listener) (`mod`). The named event listener will be skipped as well. +- `ZMK_EVENT_RAISE_AT(ev, mod)`: Start handling this event (`ev`) at the named [event listener](#subscription-and-listener) (`mod`). The named event listener is the first handler to be invoked. +- `ZMK_EVENT_RELEASE(ev)`: Continue handling this event (`ev`) at the next registered event listener. +- `ZMK_EVENT_FREE(ev)`: Free the memory associated with the event (`ev`). + +Optionally, some events may also declare an extra function similar to `raise_zmk_specific_thing_happened` named `raise_specific_thing_happened`. This function will take in some or all of the components of the `zmk_specific_thing_happened` struct, and then create the struct (perhaps with some additional data obtained from elsewhere) before calling `raise_zmk_specific_thing_happened`. For example: + +```c +static inline int raise_layer_state_changed(uint8_t layer, bool state) { + return raise_zmk_layer_state_changed( + (struct zmk_layer_state_changed){ + .layer = layer, + .state = state, + .timestamp = k_uptime_get() + } + ); +} +``` + +## Creating New Events + +### Header File + +Your event's header file should have four things: + +- A copyright comment +- Any required header includes (along with `#pragma once`) +- The event's data struct +- The macro `ZMK_EVENT_DECLARE`, called with the name of your event's data struct. + +For example: + +```c +/* +- Copyright (c) 2021 The ZMK Contributors +- +- SPDX-License-Identifier: MIT +*/ + +#pragma once + +#include + +#include +#include + +struct zmk_endpoint_changed { + struct zmk_endpoint_instance endpoint; +}; + +ZMK_EVENT_DECLARE(zmk_endpoint_changed); +``` + +### Code File + +Your event's code file merely needs three things: + +- A copyright comment +- Any required header files (including that of your event) +- The macro `ZMK_EVENT_IMPL`, called with the name of your event's data struct. + +```c +/* + * Copyright (c) 2021 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include +#include + +ZMK_EVENT_IMPL(zmk_endpoint_changed); +``` diff --git a/docs/docs/development/hardware-integration/boards-shields-keymaps.md b/docs/docs/development/hardware-integration/boards-shields-keymaps.md deleted file mode 100644 index c6e141b9..00000000 --- a/docs/docs/development/hardware-integration/boards-shields-keymaps.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: Boards, Shields, and Keymaps ---- - -## Architecture Overview - -The foundational elements needed to get a specific keyboard working with ZMK can be broken down into: - -- A [KSCAN driver](https://docs.zephyrproject.org/3.5.0/reference/peripherals/kscan.html), which uses `compatible="zmk,kscan-gpio-matrix"` for GPIO matrix based keyboards, or uses `compatible="zmk,kscan-gpio-direct"` for small direct wires. -- An optional matrix transform, which defines how the KSCAN row/column events are translated into logical "key positions". This is required for non-rectangular keyboards/matrices, where the key positions don't naturally follow the row/columns from the GPIO matrix. -- A keymap, which binds each key position to a behavior, e.g. key press, mod-tap, momentary layer, in a set of layers. - -These three core architectural elements are defined per-keyboard, and _where_ they are defined depends on the specifics of how that -keyboard works. For an overview on the general concepts of boards and shields, please see the [FAQs on boards and shields](../../faq.md#why-boards-and-shields-why-not-just-keyboard). - -## Self-Contained Keyboard - -For a self-contained keyboard that includes the microprocessor, all of the above architecture components are included in the Zephyr _board_ definition. You can see an example for the [Planck V6](https://github.com/zmkfirmware/zmk/tree/main/app/boards/arm/planck) board directory. - -With this type of keyboard, the full ZMK definition for the keyboard exists -in the `app/boards/${arch}/${board_name}` directory, e.g. `app/boards/arm/planck/`. In that directory, you'll have the following: - -- A `Kconfig.board` file that defines the toplevel Kconfig item for the board, including which SoC Kconfig setting it depends on. -- A `Kconfig.defconfig` file that sets some initial defaults when building this keyboard. This usually includes: - - Setting `ZMK_KEYBOARD_NAME` to a value, for the product name to be used for USB/BLE info. - - Setting `ZMK_USB` and/or `ZMK_BLE` for the default values for which HID transport(s) to enable by default -- A `${board_name}_defconfig` file that forces specific Kconfig settings that are specific to this hardware configuration. Mostly this is SoC settings around the specific hardware configuration. -- `${board_name}.dts` which contains all the devicetree definitions, including: - - An `#include` line that pulls in the specific microprocessor that is used, e.g. `#include `. - - A [chosen](https://docs.zephyrproject.org/3.5.0/build/dts/intro-syntax-structure.html#aliases-and-chosen-nodes) node named `zmk,kscan` which references the configured KSCAN driver (usually a GPIO matrix) - - (Optional) A [chosen](https://docs.zephyrproject.org/3.5.0/build/dts/intro-syntax-structure.html#aliases-and-chosen-nodes) node named `zmk,matrix-transform` that defines the mapping from KSCAN row/column values to the logical key position for the keyboard. -- A `board.cmake` file with CMake directives for how to flash to the device. -- A `${board_name}.keymap` file that includes the default keymap for that keyboard. Users will be able to override this keymap in their user configs. - -## Pro Micro Compatible Keyboard - -![Labelled Pro Micro pins](../../assets/interconnects/pro_micro/pinout.png) - -For keyboards that require a (usually Pro Micro compatible) add-on board to operate, the ZMK integration pieces are places -in the _shield_ definition for that keyboard, allowing users to -swap in different Pro Micro compatible boards (e.g. Proton-C, or nice!nano) and build a firmware the matches their actual -combination of physical components. - -With this type of keyboard, the partial definition for the keyboard exists -in the `app/boards/shields/${board_name}` directory, e.g. `app/boards/shields/clueboard_california/`. In that directory, you'll have the following: - -- A `Kconfig.shield` that defines the toplevel Kconfig value for the shield, which uses a supplied utility to function to default the value based on the shield list, e.g. `def_bool $(shields_list_contains,clueboard_california)`. -- A `Kconfig.defconfig` file to set default values for things like `ZMK_KEYBOARD_NAME` -- A `${shield_name}.overlay` file, which is a devicetree overlay file, that includes: - - A [chosen](https://docs.zephyrproject.org/3.5.0/build/dts/intro-syntax-structure.html#aliases-and-chosen-nodes) node named `zmk,kscan` which references the configured KSCAN driver (usually a GPIO matrix). For these keyboards, to be compatible with any Pro Micro compatible boards, the KSCAN configuration should reference the [nexus node](https://docs.zephyrproject.org/3.5.0/hardware/porting/shields.html#gpio-nexus-nodes) that ZMK has standardized on. In particular, the `&pro_micro` aliases can be used to reference the standard digital pins of a Pro Micro for shields. - - (Optional) A [chosen](https://docs.zephyrproject.org/3.5.0/build/dts/intro-syntax-structure.html#aliases-and-chosen-nodes) node named `zmk,matrix-transform` that defines the mapping from KSCAN row/column values to the logical key position for the keyboard. -- A `keymap/keymap.overlay` file that includes the default keymap for that keyboard. Users will be able to override this keymap in their user configs. diff --git a/docs/docs/development/hardware-integration/new-shield.mdx b/docs/docs/development/hardware-integration/new-shield.mdx deleted file mode 100644 index 6d592161..00000000 --- a/docs/docs/development/hardware-integration/new-shield.mdx +++ /dev/null @@ -1,647 +0,0 @@ ---- -title: New Keyboard Shield ---- - -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; -import KeymapExampleFile from "../../keymap-example-file.md"; - -import InterconnectTabs from "@site/src/components/interconnect-tabs"; -import Metadata from "@site/src/data/hardware-metadata.json"; - -:::danger -Before reading this section, it is **vital** that you read through our [clean room policy](../contributing/clean-room.md). -::: - -## Overview - -This guide will walk through the steps necessary to add ZMK support for a keyboard that uses an add-on MCU board (e.g. Pro Micro compatible) to provide the microprocessor. - -The high level steps are: - -- From a template, create a new [Zephyr module](https://docs.zephyrproject.org/3.5.0/develop/modules.html) housed in a git repository containing one or more custom shields. -- Create a new shield directory. -- Add the base Kconfig files. -- Add the shield overlay file to define the KSCAN driver for detecting key press/release. -- Add the matrix transform for mapping KSCAN row/column values to key positions in the keymap. -- Add a physical layout definition to select the matrix transform and KSCAN instance. -- Add a default keymap, which users can override in their own configs as needed. -- Add a `.zmk.yml` metadata file to document the high level details of your shield, and the features it supports. -- Update the `build.yaml` file from the repository template to have some sample builds of the firmware to test. -- Add support for features such as encoders, OLED displays, or RGB underglow. - -It may be helpful to review the upstream [shields documentation](https://docs.zephyrproject.org/3.5.0/hardware/porting/shields.html#shields) to get a proper understanding of the underlying system before continuing. - -:::note -ZMK support for [split keyboards](../../features/split-keyboards.md) requires a few more files than single boards to ensure proper connectivity between the central and peripheral units. Check the following guides thoroughly to ensure that all the files are in place. -::: - -## New Zephyr Module Repository - -The first step to creating the shield is to create a new Zephyr module repository from a template. - -:::note -This guide assumes you already have a configured GitHub account. If you don't yet have one, go ahead and [sign up](https://github.com/join) before continuing. -::: - -Follow these steps to create your new repository: - -- Visit https://github.com/zmkfirmware/unified-zmk-config-template -- Click the green "Use this template" button -- In the drop down that opens, click "Use this template". -- In the following screen, provide the following information: - - A repository name, e.g. `my-shield-module`. - - A brief description, e.g. `ZMK Support For MyShield Keyboard`. - - Select Public or Private, depending on your preference. -- Click the green "Create repository" button - -The repository is a combination of the directories and files required of a ZMK config, and those required of a shield module. To create a shield module, the following components are needed: - -- The `boards/shields` directory, where the keyboard's files will go -- The `zephyr/module.yml` file, which identifies and describes the module. See the [Zephyr documentation](https://docs.zephyrproject.org/3.5.0/develop/modules.html#module-yaml-file-description) for details on customising this file. For the purposes of creating a shield module, the default found in the template can be left untouched. - -Neither of these should be moved out of their parent directory. The other files and directories such as `config` are not necessary for the purposes of a shield module, but rather intended to be used for user configuration and testing. - -## New Shield Directory - -Shields in Zephyr module "board root" go into the `boards/shields/` directory; that means the new shield directory in your module repository should be: - -```bash -mkdir boards/shields/ -``` - -## Base Kconfig Files - -:::tip[Example shields] -You can check out the [`shields` folder](https://github.com/zmkfirmware/zmk/tree/main/app/boards/shields) in the ZMK repo that houses [the in-tree supported shields](../../hardware.mdx) in order to copy and modify as a starting point. -::: - -There are two required Kconfig files that need to be created for your new keyboard -shield to get it picked up for ZMK, `Kconfig.shield` and `Kconfig.defconfig`. - -### Kconfig.shield - -The `Kconfig.shield` file defines any additional Kconfig settings that may be relevant when using this keyboard. For most keyboards, there is just one additional configuration value for the shield itself. - -```kconfig -config SHIELD_MY_BOARD - def_bool $(shields_list_contains,my_board) -``` - -:::warning -Kconfig uses only commas for delimiters, and keeps all whitespaces in the function call. Therefore do not add a whitespace after the comma when configuring your shield as this would be treated as  my_board (with a leading whitespace) and will cause issues. -::: - -This will make sure that a new configuration value named `SHIELD_MY_BOARD` is set to true whenever `my_board` is used as the shield name, either as the `SHIELD` variable [in a local build](../local-toolchain/build-flash.mdx) or in your `build.yaml` file [when using Github Actions](../../customization.md). Note that this configuration value will be used in `Kconfig.defconfig` to set other properties about your shield, so make sure that they match. - -**For split boards**, you will need to add configurations for the left and right sides. For example, if your split halves are named `my_board_left` and `my_board_right`, it would look like this: - -```kconfig -config SHIELD_MY_BOARD_LEFT - def_bool $(shields_list_contains,my_board_left) - -config SHIELD_MY_BOARD_RIGHT - def_bool $(shields_list_contains,my_board_right) -``` - -### Kconfig.defconfig - -The `Kconfig.defconfig` file is where overrides for various configuration settings -that make sense to have different defaults when this shield is used. One main item -that usually has a new default value set here is the `ZMK_KEYBOARD_NAME` value, -which controls the display name of the device over USB and BLE. - -The updated new default values should always be wrapped inside a conditional on the shield config name defined in the `Kconfig.shield` file. Here's the simplest example file. - -:::danger -The keyboard name must be less than or equal to 16 characters in length, otherwise the bluetooth advertising might fail and you will not be able to find your keyboard from your device. -::: - -```kconfig -if SHIELD_MY_BOARD - -config ZMK_KEYBOARD_NAME - default "My Board" - -endif -``` - -For split keyboards, `Kconfig.defconfig` needs to specify a few more options. -Which side is central (usually the left) is determined via the configuration in this file. -For that side, the keyboard name is assigned and the central config is set. -The peripheral side is typically not assigned a name since only the central will be advertising for connections to other devices. -Finally, the split config needs to be set for both sides: - -```kconfig -if SHIELD_MY_BOARD_LEFT - -config ZMK_KEYBOARD_NAME - default "My Board" - -config ZMK_SPLIT_ROLE_CENTRAL - default y - -endif - -if SHIELD_MY_BOARD_LEFT || SHIELD_MY_BOARD_RIGHT - -config ZMK_SPLIT - default y - -endif -``` - -## Shield Overlays - - - -To use GPIO pins that are not part of the interconnects as described above, you can use the GPIO labels that are specific to each controller type. -For instance, pins numbered `PX.Y` in nRF52840-based boards can be referred to via `&gpioX Y` labels. -An example is `&gpio1 7` for the `P1.07` pin that the nice!nano exposes in the middle of the board. - - - - - -The `.overlay` is the devicetree description of the keyboard shield that is merged with the primary board devicetree description before the build. For ZMK, this file at a minimum should include the chosen node named `zmk,kscan` that references a KSCAN driver instance. For a simple 3x3 macropad matrix, -this might look something like: - -```dts -/ { - chosen { - zmk,kscan = &kscan0; - }; - - kscan0: kscan_0 { - compatible = "zmk,kscan-gpio-matrix"; - diode-direction = "col2row"; - wakeup-source; - - col-gpios - = <&pro_micro 15 GPIO_ACTIVE_HIGH> - , <&pro_micro 14 GPIO_ACTIVE_HIGH> - , <&pro_micro 16 GPIO_ACTIVE_HIGH> - ; - - row-gpios - = <&pro_micro 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - ; - }; -}; -``` - -See the [Keyboard Scan configuration documentation](../../config/kscan.md) for details on configuring the KSCAN driver. - - - - - -### .dtsi files and Shield Overlays (Split Shields) - -Unlike unibody keyboards, split keyboards have a core .dtsi file with shield overlays for each half of the keyboard. -It is preferred to define only the `col-gpios` or `row-gpios` in the common shield .dtsi, depending on the `diode-direction` value. -For `col2row` directed boards like the iris, the shared .dtsi file may look like this: - -```dts -#include - -/ { - chosen { - zmk,kscan = &kscan0; - zmk,matrix-transform = &default_transform; - }; - - default_transform: keymap_transform_0 { - compatible = "zmk,matrix-transform"; - columns = <16>; - rows = <4>; -// | SW6 | SW5 | SW4 | SW3 | SW2 | SW1 | | SW1 | SW2 | SW3 | SW4 | SW5 | SW6 | -// | SW12 | SW11 | SW10 | SW9 | SW8 | SW7 | | SW7 | SW8 | SW9 | SW10 | SW11 | SW12 | -// | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 | | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 | -// | SW24 | SW23 | SW22 | SW21 | SW20 | SW19 | SW25 | | SW25 | SW19 | SW20 | SW21 | SW22 | SW23 | SW24 | -// | SW29 | SW28 | SW27 | SW26 | | SW26 | SW27 | SW28 | SW29 | - map = < -RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) -RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) -RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) -RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,2) RC(4,9) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) - RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) - >; - }; - - kscan0: kscan { - compatible = "zmk,kscan-gpio-matrix"; - diode-direction = "col2row"; - wakeup-source; - - row-gpios - = <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // Row A from the schematic file - , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // Row B from the schematic file - , <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // Row C from the schematic file - , <&pro_micro 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // Row D from the schematic file - , <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // Row E from the schematic file - ; - - }; -}; -``` - -:::note -Notice that in addition to the common `row-gpios` that are declared in the kscan, the [matrix transform](#matrix-transform) is defined in the .dtsi. -::: - -The missing `col-gpios` would be defined in your `_left.overlay` and `_right.overlay` files. -Keep in mind that the mirrored position of the GPIOs means that the `col-gpios` will appear reversed when the .overlay files are compared to one another. -Furthermore, the column offset for the [matrix transform](#matrix-transform) should be added to the right half of the keyboard's overlay -because the keyboard's switch matrix is read from left to right, top to bottom. -This is exemplified with the iris .overlay files. - -```dts title=iris_left.overlay -#include "iris.dtsi" // Notice that the main dtsi files are included in the overlay. - -&kscan0 { - col-gpios - = <&pro_micro 19 GPIO_ACTIVE_HIGH> // col1 in the schematic - , <&pro_micro 18 GPIO_ACTIVE_HIGH> // col2 in the schematic - , <&pro_micro 15 GPIO_ACTIVE_HIGH> // col3 in the schematic - , <&pro_micro 14 GPIO_ACTIVE_HIGH> // col4 in the schematic - , <&pro_micro 16 GPIO_ACTIVE_HIGH> // col5 in the schematic - , <&pro_micro 10 GPIO_ACTIVE_HIGH> // col6 in the schematic - ; -}; -``` - -```dts title=iris_right.overlay -#include "iris.dtsi" - -&default_transform { // The matrix transform for this board is 6 columns over because the left half is 6 columns wide according to the matrix. - col-offset = <6>; -}; - -&kscan0 { - col-gpios - = <&pro_micro 10 GPIO_ACTIVE_HIGH> // col6 in the schematic - , <&pro_micro 16 GPIO_ACTIVE_HIGH> // col5 in the schematic - , <&pro_micro 14 GPIO_ACTIVE_HIGH> // col4 in the schematic - , <&pro_micro 15 GPIO_ACTIVE_HIGH> // col3 in the schematic - , <&pro_micro 18 GPIO_ACTIVE_HIGH> // col2 in the schematic - , <&pro_micro 19 GPIO_ACTIVE_HIGH> // col1 in the schematic - ; -}; - -``` - -See the [Keyboard Scan configuration documentation](../../config/kscan.md) for details on configuring the KSCAN driver. - -### .conf files (Split Shields) - -While unibody boards only have one .conf file that applies configuration characteristics to the entire keyboard, -split keyboards are unique in that they contain multiple .conf files with different scopes. -For example, a split board called `my_awesome_split_board` would have the following files: - -- `my_awesome_split_board.conf` - Configuration elements affect both halves -- `my_awesome_split_board_left.conf` - Configuration elements only affect left half -- `my_awesome_split_board_right.conf` - Configuration elements only affect right half - -In most case you'll only need to use the .conf file that affects both halves of a split board. It's used for adding features like deep-sleep or rotary encoders. - -```ini title=my_awesome_split_board.conf -CONFIG_ZMK_SLEEP=y -``` - -:::note -The shared configuration in `my_awesome_split_board.conf` is only applied when you are building with a [`zmk-config` folder](../local-toolchain/build-flash.mdx#building-from-zmk-config-folder) and when it is present at `config/my_awesome_split_board.conf`. If you are not using a `zmk-config` folder, you will need to include the shared configuration in both `my_awesome_split_board_left.conf` and `my_awesome_split_board_right.conf` files. -::: - - - - -## Matrix Transform - -Internally ZMK translates all row/column events into "key position" events to maintain a consistent model that works no matter what any possible GPIO matrix may look like for a certain keyboard. This is particularly helpful when: - -1. To reduce the used pins, an "efficient" number of rows/columns for the GPIO matrix is used, that does _not_ match the physical layout of rows/columns of the actual key switches. -1. For non rectangular keyboards with thumb clusters, non `1u` locations, etc. - -A "key position" is the numeric index (zero-based) of a given key, which identifies -the logical key location as perceived by the end user. All _keymap_ mappings actually bind behaviors to _key positions_, not to row/column values. - -The `.overlay` must include a matrix transform that defines this mapping from row/column values to key positions. - -Here is an example for the [nice60](https://github.com/Nicell/nice60), which uses an efficient 8x8 GPIO matrix, and uses a transform: - -```dts -#include - -/ { - /* define kscan node with label `kscan0`... */ - - default_transform: keymap_transform_0 { - compatible = "zmk,matrix-transform"; - columns = <8>; - rows = <8>; -// | MX1 | MX2 | MX3 | MX4 | MX5 | MX6 | MX7 | MX8 | MX9 | MX10 | MX11 | MX12 | MX13 | MX14 | -// | MX15 | MX16 | MX17 | MX18 | MX19 | MX20 | MX21 | MX22 | MX23 | MX34 | MX25 | MX26 | MX27 | MX28 | -// | MX29 | MX30 | MX31 | MX32 | MX33 | MX34 | MX35 | MX36 | MX37 | MX38 | MX39 | MX40 | MX41 | -// | MX42 | MX43 | MX44 | MX45 | MX46 | MX47 | MX48 | MX49 | MX50 | MX51 | MX52 | MX53 | -// | MX54 | MX55 | MX56 | MX57 | MX58 | MX59 | MX60 | MX61 | - map = < -RC(3,0) RC(2,0) RC(1,0) RC(0,0) RC(1,1) RC(0,1) RC(0,2) RC(1,3) RC(0,3) RC(1,4) RC(0,4) RC(0,5) RC(1,6) RC(1,7) -RC(4,0) RC(4,1) RC(3,1) RC(2,1) RC(2,2) RC(1,2) RC(2,3) RC(3,4) RC(2,4) RC(2,5) RC(1,5) RC(2,6) RC(2,7) RC(3,7) -RC(5,0) RC(5,1) RC(5,2) RC(4,2) RC(3,2) RC(4,3) RC(3,3) RC(4,4) RC(4,5) RC(3,5) RC(4,6) RC(3,6) RC(4,7) -RC(6,0) RC(6,1) RC(6,2) RC(6,3) RC(5,3) RC(6,4) RC(5,4) RC(6,5) RC(5,5) RC(6,6) RC(5,6) RC(5,7) -RC(7,0) RC(7,1) RC(7,2) RC(7,3) RC(7,5) RC(7,6) RC(6,7) RC(7,7) - >; - }; - - /* potentially other overlay nodes... */ -}; -``` - -Some important things to note: - -- The `#include ` is critical. The `RC` macro is used to generate the internal storage in the matrix transform, and is actually replaced by a C preprocessor before the final devicetree is compiled into ZMK. -- `RC(row, column)` is placed sequentially to define what row and column values that position corresponds to. -- If you have a keyboard with options for `2u` keys in certain positions, ANSI vs. ISO layouts, or break away portions, define one matrix transform for each possible arrangement to be used in the physical layouts. This will allow the users to select the right layout in their keymap files. - -See the [matrix transform section](../../config/kscan.md#matrix-transform) in the Keyboard Scan configuration documentation for details and more examples of matrix transforms. - -## Physical Layout - -The physical layout is the top level entity that aggregates all details about a certain possible layout for a keyboard: the matrix transform that defines the set of key positions and what row/column they correspond to, what kscan driver is used for that layout, etc. -For keyboards that support multiple layouts, setting a `chosen` node to a defined physical layout in your keymap will allow selecting the specific layout that you've built. - -A physical layout is very basic, e.g.: - -``` -/ { - default_layout: default_layout { - compatible = "zmk,physical-layout"; - display-name = "Default Layout"; - transform = <&default_transform>; - kscan = <&kscan0>; - }; -}; -``` - -When supporting multiple layouts, define the multiple layout nodes and then set a `chosen` for the default: - -``` -/ { - chosen { - zmk,physical-layout = &default_layout; - ... - }; - - default_layout: default_layout { - compatible = "zmk,physical-layout"; - display-name = "Default Layout"; - transform = <&default_transform>; - kscan = <&kscan0>; - }; - - alt_layout: alt_layout { - compatible = "zmk,physical-layout"; - display-name = "Alternate Layout"; - transform = <&alt_transform>; - kscan = <&alt_kscan0>; - }; -}; -``` - -This way, users can select a different layout by overriding the `zmk,physical-layout` chosen node in their keymap file. - -:::note -Some keyboards use different GPIO pins for different layouts, and need different kscan nodes created for each layout. -However, if all of your physical layouts use the same `kscan` node under the hood, you can skip setting the `kscan` property on each -layout and instead assign the `zmk,kscan` chosen node to your single kscan instance. -::: - -## Default Keymap - -Each keyboard should provide a default keymap to be used when building the firmware, which can be overridden and customized by user configs. For "shield keyboards", this should be placed in the `boards/shields//.keymap` file. The keymap is configured as an additional devicetree overlay that includes the following: - -- A node with `compatible = "zmk,keymap"` where each child node is a layer with a `bindings` array that binds each key position to a given behavior (e.g. key press, momentary layer, etc). - -Here is an example simple keymap for the Kyria, with only one layer: - - - -:::note -The two `#include` lines at the top of the keymap are required in order to bring in the default set of behaviors to make them available to bind, and to import a set of defines for the key codes, so keymaps can use parameters like `N2` or `K` instead of the raw keycode numeric values. -::: - -### Keymap Behaviors - -For documentation on the available behaviors for use in keymaps, see the [overview page for behaviors](../../keymaps/behaviors/index.mdx). - -## Metadata - -ZMK makes use of an additional metadata YAML file for all boards and shields to provide high level information about the hardware to be incorporated into setup scripts/utilities, website hardware list, etc. - -The naming convention for metadata files is `{item_id}.zmk.yml`, where the `item_id` is the board/shield identifier, including version information but excluding any optional split `_left`/`_right` suffix, e.g. `corne.zmk.yml` or `nrfmicro_11.zmk.yml`. - -Here is a sample `corne.zmk.yml` file from the repository: - -```yaml -file_format: "1" -id: corne -name: Corne -type: shield -url: https://github.com/foostan/crkbd/ -requires: [pro_micro] -exposes: [i2c_oled] -features: - - keys - - display -siblings: - - corne_left - - corne_right -``` - -You should place a properly named `foo.zmk.yml` file in the directory next to your other shield values, and fill it out completely and accurately. See [Hardware Metadata Files](hardware-metadata-files.md) for the full details. - -## Build File - -To help you test/verify your firmware, update the `build.yaml` to list your particular board/shield combinations you want built whenever changes are published to GitHub. Open `build.yaml` with your editor and add a combination, e.g.: - -```yaml -# This file generates the GitHub Actions matrix -# For simple board + shield combinations, add them -# to the top level board and shield arrays, for more -# control, add individual board + shield combinations to -# the `include` property, e.g: -# -# board: [ "nice_nano_v2" ] -# shield: [ "corne_left", "corne_right" ] -# include: -# - board: bdn9_rev2 -# - board: nice_nano_v2 -# shield: reviung41 -# ---- -include: - - board: nice_nano_v2 - shield: -``` - -For split keyboards, you will need to specify the halves/siblings separately, e.g.: - -```yaml -include: - - board: mikoto_520 - shield: _left - - board: mikoto_520 - shield: _right -``` - -## Adding Features - -### Encoders - -EC11 encoder support can be added to your board or shield by adding the appropriate lines to your board/shield's configuration (.conf), device tree (.dtsi), overlay (.overlay), and keymap (.keymap) files. - - - - -In your configuration file you will need to add the following lines so that the encoders can be enabled/disabled: - -```ini -# Uncomment to enable encoder -# CONFIG_EC11=y -# CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y -``` - -These should be commented by default for encoders that are optional/can be swapped with switches, but can be uncommented if encoders are part of the default design. - -:::note -If building locally for split boards, you may need to add these lines to the specific half's configuration file as well as the combined configuration file. -::: - - - -In your device tree file you will need to add the following lines to define the encoder sensor: - -```dts - left_encoder: encoder_left { - compatible = "alps,ec11"; - a-gpios = ; - b-gpios = ; - steps = <80>; - status = "disabled"; - }; -``` - -Here you need to replace `PIN_A` and `PIN_B` with the appropriate pins that your PCB utilizes for the encoder(s). See [shield overlays section above](#shield-overlays) on the appropriate node label and pin number to use for GPIOs. - -The `steps` property should corresponded to the documented pulses per rotation for the encoders used on the keyboard, typically found on the datasheet of the component. If users use different encoders when they build, the value can be overridden in their keymap. - -Add additional encoders as necessary by duplicating the above lines, replacing `left` with whatever you would like to call your encoder, and updating the pins. Note that support for peripheral (right) side sensors over BLE is still in progress. - -Once you have defined the encoder sensors, you will have to add them to the list of sensors: - -```dts - sensors: sensors { - compatible = "zmk,keymap-sensors"; - sensors = <&left_encoder &right_encoder>; - triggers-per-rotation = <20>; - }; -``` - -In this example, a left_encoder and right_encoder are both added. Additional encoders can be added with spaces separating each, and the order they are added here determines the order in which you define their behavior in your keymap. - -In addition, a default value for the number of times the sensors trigger the bound behavior per full rotation is set via the `triggers-per-rotation` property. See [Encoders Config](../../config/encoders.md#devicetree) for more details. - - - -Add the following lines to your overlay file(s) to enable the encoder: - -```dts -&left_encoder { - status = "okay"; -}; -``` - -:::note -For split keyboards, make sure to add left hand encoders to the left .overlay file and right hand encoders to the right .overlay file. -::: - - - -Add the following line to your keymap file to add default encoder behavior bindings: - -```dts -sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; -``` - -Add additional bindings as necessary to match the default number of encoders on your board. See the [Encoders](../../features/encoders.md) and [Keymaps](../../keymaps/index.mdx) documentation pages for more details. - - - - -## Testing - -### GitHub Actions - -Using GitHub Actions to build your new firmware can save you from doing any local [development setup](../local-toolchain/setup/index.md), -at the expense of a longer feedback loop if there are issues. To push your changes and trigger a build: - -- Add all your pending changes with `git add .` -- Commit your changes with `git commit -m "Initial shield"` -- Push the changes to GitHub with `git push` - -Once pushed, click on the "Actions" tab of the repo you created in the first step, and you should see a new build running. If the build is successful, there will be a new `firmware.zip` artifact shown on the summary screen you can download that will contain the new `.uf2` files that can be flashed to the device. - -### Local Build - -:::note -To build locally, be sure you've followed the [development setup](../local-toolchain/setup/index.md) guide first. -::: - -Once you've fully created the new keyboard shield definition, -you should be able to test with a build command like: - -```sh -west build --pristine -b nice_nano_v2 -- -DSHIELD= -DZMK_EXTRA_MODULES=/full/path/to/your/module -# replace with e.g. _left for split keyboards, then repeat for _right -``` - -The above build command generates a `build/zephyr/zmk.uf2` file that you can flash using the steps from the following section. See the dedicated [building and flashing page](../local-toolchain/build-flash.mdx) for more details. - -### Flashing - -If your board -supports USB Flashing Format (UF2), copy that file onto the root of the USB mass -storage device for your board. The controller should flash your built firmware -and automatically restart once flashing is complete. If you need to flash an updated -UF2 file with fixes, you can re-enter the bootloader by double tapping the reset button. - -Alternatively, if your board supports flashing and you're not developing from -within a Dockerized environment, enable Device Firmware Upgrade (DFU) mode on -your board and run the following command to test your build: - -```sh -west flash -``` - -Please have a look at documentation specific to -[building and flashing](../local-toolchain/build-flash.mdx) for additional information. - -:::note -Further testing your keyboard shield without altering the root keymap file can be done with the use of `-DZMK_CONFIG` in your `west build` command, -shown [here](../local-toolchain/build-flash.mdx#building-from-zmk-config-folder) -::: diff --git a/docs/docs/development/hardware-integration/studio-setup.md b/docs/docs/development/hardware-integration/studio-setup.md deleted file mode 100644 index d00f7de2..00000000 --- a/docs/docs/development/hardware-integration/studio-setup.md +++ /dev/null @@ -1,140 +0,0 @@ ---- -title: ZMK Studio Setup ---- - -:::warning[Alpha Feature] - -ZMK Studio support is in alpha. Although best efforts are being made, backwards compatibility during active development is not guaranteed. - -::: - -This guide will walk you through enabling ZMK Studio support for a keyboard. - -The main additional pieces needed for ZMK Studio support involve additional metadata needed in order -to properly to display the physical layouts available for the particular keyboard. - -# Physical Layout Positions - -Physical layouts are described as part of the [new shield guide](./new-shield.mdx#physical-layouts) with the exception of the `keys` property that is required for ZMK Studio support. This is used to describe the physical attributes of each key position present in that layout and its items are listed in the same order as keymap bindings, matrix transforms, etc. The properties available are: - -| Property | Type | Description | Unit | -| ---------- | -------- | ------------------------------------ | ------------------------------------------------------- | -| Width | int (>0) | Key(cap) width | [centi-](https://en.wikipedia.org/wiki/Centi-)"keyunit" | -| Height | int (>0) | Key(cap) height | [centi-](https://en.wikipedia.org/wiki/Centi-)"keyunit" | -| X | uint | Key X position (top-left point) | [centi-](https://en.wikipedia.org/wiki/Centi-)"keyunit" | -| Y | uint | Key Y position (top-left point) | [centi-](https://en.wikipedia.org/wiki/Centi-)"keyunit" | -| Rotation | int | Key rotation (positive => clockwise) | [centi-](https://en.wikipedia.org/wiki/Centi-)degree | -| Rotation X | int | Rotation origin X position | [centi-](https://en.wikipedia.org/wiki/Centi-)"keyunit" | -| Rotation Y | int | Rotation origin Y position | [centi-](https://en.wikipedia.org/wiki/Centi-)"keyunit" | - -:::note -You can specify negative values in devicetree using parentheses around it, e.g. `(-3000)` for a 30 degree counterclockwise rotation. -::: - -## Header Include - -To pull in the necessary definition for creating physical layouts, a new include should be added to the top of the devicetree file: - -``` -#include -``` - -## Example - -Here is an example physical layout for a 2x2 macropad: - -```dts - macropad_physical_layout: macropad_physical_layout { - compatible = "zmk,physical-layout"; - display-name = "Macro Pad"; - - keys // w h x y rot rx ry - = <&key_physical_attrs 100 100 0 0 0 0 0> - , <&key_physical_attrs 100 100 100 0 0 0 0> - , <&key_physical_attrs 100 100 0 100 0 0 0> - , <&key_physical_attrs 100 100 100 100 0 0 0> - ; - }; -``` - -# Position Map - -When switching between layouts with ZMK Studio, the keymap of the previously selected layout is used to populate the keymap in the new layout. To determine which keymap entry maps to which entry in the new layout, keys between the two layouts that share the exact same physical attributes are matched. - -However, keys between layouts might not be in exactly the same positions, in which case a position map can be used. The position map includes a sequence for every relevant layout, and the corresponding entries in `positions` property will be used to determine the mapping between layouts. By default, the physical attribute matching behavior will be used as a fallback for positions not specified in the map, but the `complete` property can be added to the map to specify that no matching fallback should occur. - -:::info - -Key positions in the maps are numbered like the keys in your keymap, starting at 0. So the first position in the layout is position `0`, the next key position is `1`, etc. - -::: - -## Examples - -### Basic Map - -For example, the following position map correctly maps the 5-column and 6-column Corne keymap layouts. - -```dts - foostan_corne_position_map { - compatible = "zmk,physical-layout-position-map"; - - complete; - - twelve { - physical-layout = <&foostan_corne_6col_layout>; - positions - = < 1 2 3 4 5 6 7 8 9 10> - , <13 14 15 16 17 18 19 20 21 22> - , <25 26 27 28 29 30 31 32 33 34> - , < 36 37 38 39 40 41 >; - }; - - ten { - physical-layout = <&foostan_corne_5col_layout>; - positions - = < 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 >; - }; - }; -``` - -The first entries in the two mappings have values `1` and `0` respectively, which means that position `1` in the 6-column layout will map to position `0` in the 5-column layout, the second entries show that position `2` in the 6-column layout corresponds to position `1` in the 5-column layout, etc. - -### Full Preserving Map - -The above basic example has one major downside. Because the keys on the outer columns of the 6-column layout aren't mapped into any locations in the 5-column layout, when a user switches to the 5-column layout and then back to the 6-column layout, the bindings for those outer columns will have been lost/dropped at the first step. - -In order to preserve those bindings that are in "missing" keys in other layouts, we can include those locations in the map, but map them "off the end" of the smaller layout key positions. - -Here is a fixed up Corne mapping: - -```dts - foostan_corne_position_map { - compatible = "zmk,physical-layout-position-map"; - - complete; - - twelve { - physical-layout = <&foostan_corne_6col_layout>; - positions - = < 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 >; - }; - - ten { - physical-layout = <&foostan_corne_5col_layout>; - positions - = <36 0 1 2 3 4 5 6 7 8 9 37> - , <38 10 11 12 13 14 15 16 17 18 19 39> - , <40 20 21 22 23 24 25 26 27 28 29 41> - , < 30 31 32 33 34 35 >; - }; - }; -``` - -Notice how the outer column positions in the 6-column layout are mapped to positions 36, 37, etc. in the 5-column layout. The 5-column layout only uses key positions up to 35, so those bindings in the outer columns will get migrated into the "extra space" that is ignored by the smaller layout, preserved to get mapped back in place when the user switches back. diff --git a/docs/docs/development/local-toolchain/build-flash.mdx b/docs/docs/development/local-toolchain/build-flash.mdx index 464cf34d..a9572feb 100644 --- a/docs/docs/development/local-toolchain/build-flash.mdx +++ b/docs/docs/development/local-toolchain/build-flash.mdx @@ -3,46 +3,110 @@ title: Building and Flashing sidebar_label: Building and Flashing --- -## Building +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; -From here on, building and flashing ZMK should all be done from the `app/` subdirectory of the ZMK checkout: +From here on, building and flashing ZMK should all be done from the `app/` +subdirectory of the ZMK checkout: ```sh cd app ``` -To build for your particular keyboard, the behavior varies slightly depending on if you are building for a keyboard with -an onboard MCU, or one that uses an MCU board addon. +:::warning +If this is not done, you will encounter errors such as: `ERROR: source directory +"." does not contain a CMakeLists.txt; is this really what you want to build?` +::: -### Keyboard (Shield) + MCU Board +## Building -ZMK treats keyboards that take an MCU addon board as [shields](https://docs.zephyrproject.org/3.5.0/hardware/porting/shields.html), and treats the smaller MCU board as the true [board](https://docs.zephyrproject.org/3.5.0/hardware/porting/board_porting.html) +Building a particular keyboard is done using the +[`west build`](https://docs.zephyrproject.org/4.1.0/develop/west/build-flash-debug.html#building-west-build) +command. Its usage slightly changes depending on if your build is for a keyboard +with an onboard MCU or one that uses an MCU board add-on. -Given the following: + + + Keyboards with onboard MCU chips are simply treated as the + [board](https://docs.zephyrproject.org/4.1.0/hardware/porting/board_porting.html) + as far as Zephyr™ is concerned. -- MCU Board: Proton-C -- Keyboard PCB: kyria_left -- Keymap: default + Given the following: -You can build ZMK with the following: + - Keyboard: Planck (rev6) + - Keymap: default + + you can build ZMK with the following: + + ```sh + west build -b planck_rev6 + ``` + + + + ZMK treats keyboards that take an MCU addon board as + [shields](https://docs.zephyrproject.org/4.1.0/hardware/porting/shields.html), + and treats the smaller MCU board as the true + [board](https://docs.zephyrproject.org/4.1.0/hardware/porting/board_porting.html). + + Given the following: + + - MCU Board: Proton-C + - Keyboard PCB: kyria_left + - Keymap: default + + You can build ZMK with the following: + + ```sh + west build -b proton_c -- -DSHIELD=kyria_left + ``` + + + + +### CMake Arguments + +For creating a build system, the `west build` command uses +[CMake](https://cmake.org/). This allows for additional arguments to be added to +its invocations. + +This is done by adding `--` after the `west build` command and listing the CMake +arguments afterward. The previous section shows one example of this with +`-DSHIELD=kyria_left`. Another example use case is passing Kconfig flags: ```sh -west build -b proton_c -- -DSHIELD=kyria_left +west build -b planck_rev6 -- -DCONFIG_ZMK_SLEEP=y ``` -### Keyboard With Onboard MCU - -Keyboards with onboard MCU chips are simply treated as the [board](https://docs.zephyrproject.org/3.5.0/hardware/porting/board_porting.html) as far as Zephyr™ is concerned. - -Given the following: - -- Keyboard: Planck (rev6) -- Keymap: default - -you can build ZMK with the following: +:::tip +Once the first generation of the build directory using one-time CMake arguments +is done, you can omit the CMake arguments and board selection, instead building +with the command: ```sh -west build -b planck_rev6 +west build -d +``` + +::: + +You can also add permanent CMake arguments to `west build` by using the +[`west config`](https://docs.zephyrproject.org/4.1.0/develop/west/config.html#west-config-cmd) +command. These are invoked whenever a new build system is generated. To add +permanent arguments, set the `build.cmake-args` configuration option. + +```sh +west config build.cmake-args -- -DSHIELD=kyria_left +``` + +Multiple arguments are added by assigning a string to the configuration option: + +```sh +west config build.cmake-args \ + -- "-DSHIELD=kyria_left -DZMK_CONFIG=/absolute/path/to/zmk-config" ``` ### Pristine Building @@ -50,7 +114,7 @@ west build -b planck_rev6 When building for a new board and/or shield after having built one previously, you may need to enable the pristine build option. This option removes all existing files in the build directory before regenerating them, and can be enabled by adding either --pristine or -p to the command: ```sh -west build -p -b nice_nano_v2 -- -DSHIELD=kyria_left +west build -p -b nice_nano -- -DSHIELD=kyria_left ``` ### Building For Split Keyboards @@ -62,13 +126,13 @@ For split keyboards, you will have to build and flash each side separately the f By default, the `build` command outputs a single .uf2 file named `zmk.uf2` so building left and then right immediately after will overwrite your left firmware. In addition, you will need to pristine build each side to ensure the correct files are used. To avoid having to pristine build every time and separate the left and right build files, we recommend setting up separate build directories for each half. You can do this by using the `-d` parameter and first building left into `build/left`: ```sh -west build -d build/left -b nice_nano_v2 -- -DSHIELD=kyria_left +west build -d build/left -b nice_nano -- -DSHIELD=kyria_left ``` and then building right into `build/right`: ```sh -west build -d build/right -b nice_nano_v2 -- -DSHIELD=kyria_right +west build -d build/right -b nice_nano -- -DSHIELD=kyria_right ``` This produces `left` and `right` subfolders under the `build` directory and two separate .uf2 files. For future work on a specific half, use the `-d` parameter again to ensure you are building into the correct location. @@ -79,56 +143,42 @@ Build times can be significantly reduced after the initial build by omitting all ### Building With External Modules -ZMK supports loading additional boards, shields, code, etc. from [external Zephyr modules](https://docs.zephyrproject.org/3.5.0/develop/modules.html), facilitating out-of-tree management and versioning independent of the ZMK repository. To build with any additional modules, use the `ZMK_EXTRA_MODULES` define added to your `west build` command. +ZMK supports loading additional boards, shields, code, etc. from [external ZMK modules](../../features/modules.mdx), facilitating out-of-tree management and versioning independent of the ZMK repository. To build with any additional modules, use the `ZMK_EXTRA_MODULES` define added to your `west build` command. For instance, building with the `my-vendor-keebs-module` checked out to your documents directory, you would build like: ``` -west build -b nice_nano_v2 -- -DSHIELD=vendor_shield -DZMK_EXTRA_MODULES="C:/Users/myUser/Documents/my-vendor-keebs-module" +west build -b nice_nano -- -DSHIELD=vendor_shield -DZMK_EXTRA_MODULES="C:/Users/myUser/Documents/my-vendor-keebs-module" ``` When adding multiple modules, make sure they are separated by a semicolon, e.g.: ``` -west build -b nice_nano_v2 -- -DSHIELD=vendor_shield -DZMK_EXTRA_MODULES="C:/Users/myUser/Documents/my-vendor-keebs-module;C:/Users/myUser/Documents/my-other-keebs-module" +west build -b nice_nano -- -DSHIELD=vendor_shield -DZMK_EXTRA_MODULES="C:/Users/myUser/Documents/my-vendor-keebs-module;C:/Users/myUser/Documents/my-other-keebs-module" ``` ### Building from `zmk-config` Folder -Instead of building .uf2 files using the default keymap and config files, you can build directly from your [`zmk-config` folder](../../user-setup.mdx#github-repo) by adding -`-DZMK_CONFIG="C:/the/absolute/path/config"` to your `west build` command. **Notice that this path should point to the folder labelled `config` within your `zmk-config` folder.** +Instead of building .uf2 files using the default keymap and config files, you +can build using files from your [`zmk-config` folder](../../user-setup.mdx#config-repo-setup) +by adding `-DZMK_CONFIG="C:/the/absolute/path/config"` to your `west build` +command. **Notice that this path should point to the folder labeled `config` +within your `zmk-config` folder.** -For instance, building kyria firmware from a user `myUser`'s `zmk-config` folder on Windows 10 may look something like this: +For instance, building kyria firmware from a user `myUser`'s `zmk-config` folder +on Windows may look something like this: ```sh -west build -b nice_nano -- -DSHIELD=kyria_left -DZMK_CONFIG="C:/Users/myUser/Documents/Github/zmk-config/config" +west build -b nice_nano -- -DSHIELD=kyria_left \ + -DZMK_CONFIG="C:/Users/myUser/Documents/Github/zmk-config/config" ``` :::warning -The above command must still be invoked from the `zmk/app` directory as noted above, rather than the config directory. Otherwise, you will encounter errors such as `ERROR: source directory "." does not contain a CMakeLists.txt; is this really what you want to build?`. Alternatively you can add the `-s /path/to/zmk/app` flag to your `west` command. +If your config is also a [module](../../features/modules.mdx), then you should +also add the root (the folder in which the `zephyr` folder is found) of your +`zmk-config` as an [external module to build with](#building-with-external-modules). ::: -:::warning -If your config is also a [module](../../features/modules.mdx), then you should also add the root (the folder in which the `zephyr` folder is found) of your `zmk-config` as an [external module to build with](#building-with-external-modules). -::: - -In order to make your `zmk-config` folder available when building within the VSCode Remote Container, you need to create a docker volume named `zmk-config` -by binding it to the full path of your config directory. If you have run the VSCode Remote Container before, it is likely that docker has created this -volume automatically -- we need to delete the default volume before binding it to the correct path. Follow the following steps: - -1. Stop the container by exiting VSCode. You can verify no container is running via the command `docker ps`. -1. Remove all the containers that are not running via the command `docker container prune`. We need to remove the ZMK container before we can delete the default `zmk-config` volume referenced by it. If you do not want to delete all the containers that are not running, you can find the id of the ZMK container and use `docker rm` to delete that one only. -1. Remove the default volume via the command `docker volume rm zmk-config`. - -Then you can bind the `zmk-config` volume to the correct path pointing to your local [zmk-config](customization.md) folder: - -```sh -docker volume create --driver local -o o=bind -o type=none -o \ - device="/full/path/to/your/zmk-config/" zmk-config -``` - -Now start VSCode and rebuild the container after being prompted. You should be able to see your zmk-config mounted to `/workspaces/zmk-config` inside the container. So you can build your custom firmware with `-DZMK_CONFIG="/workspaces/zmk-config/config"`. - ## Flashing The above build commands generate a UF2 file in `build/zephyr` (or @@ -148,7 +198,7 @@ west flash ## Multi-CPU and Dual-Chip Bluetooth Boards -Zephyr supports running the Bluetooth host and controller on separate processors. In such a configuration, ZMK always runs on the host processor, but you may need to build and flash separate firmware for the controller. Zephyr provides sample code which can be used as the controller firmware for Bluetooth HCI over [RPMsg](https://docs.zephyrproject.org/3.5.0/samples/bluetooth/hci_rpmsg/README.html), [SPI](https://docs.zephyrproject.org/3.5.0/samples/bluetooth/hci_spi/README.html), [UART](https://docs.zephyrproject.org/3.5.0/samples/bluetooth/hci_uart/README.html), and [USB](https://docs.zephyrproject.org/3.5.0/samples/bluetooth/hci_usb/README.html). See [Zephyr's Bluetooth Stack Architecture documentation](https://docs.zephyrproject.org/3.5.0/connectivity/bluetooth/bluetooth-arch.html) for more details. +Zephyr supports running the Bluetooth host and controller on separate processors. In such a configuration, ZMK always runs on the host processor, but you may need to build and flash separate firmware for the controller. Zephyr provides sample code which can be used as the controller firmware for Bluetooth HCI over [RPMsg](https://docs.zephyrproject.org/4.1.0/samples/bluetooth/hci_rpmsg/README.html), [SPI](https://docs.zephyrproject.org/4.1.0/samples/bluetooth/hci_spi/README.html), [UART](https://docs.zephyrproject.org/4.1.0/samples/bluetooth/hci_uart/README.html), and [USB](https://docs.zephyrproject.org/4.1.0/samples/bluetooth/hci_usb/README.html). See [Zephyr's Bluetooth Stack Architecture documentation](https://docs.zephyrproject.org/4.1.0/connectivity/bluetooth/bluetooth-arch.html) for more details. The following documentation shows how to build and flash ZMK for boards that use a dual-chip configuration. diff --git a/docs/docs/development/local-toolchain/posix-board.md b/docs/docs/development/local-toolchain/posix-board.md index 5a809c02..37a37076 100644 --- a/docs/docs/development/local-toolchain/posix-board.md +++ b/docs/docs/development/local-toolchain/posix-board.md @@ -20,11 +20,10 @@ apt install -y gcc-multilib ## Building -To do this, you can build ZMK targeting the -`native_posix_64` board. +To do this, you can build ZMK targeting the `native_sim` board. ```sh -west build --pristine --board native_posix_64 -- -DZMK_CONFIG=tests/none/normal/ +west build --pristine --board native_sim/native/64 -- -DZMK_CONFIG=tests/none/normal/ ``` Once built, you can run the firmware locally: @@ -35,4 +34,4 @@ Once built, you can run the firmware locally: ## Virtual Key Events -The virtual key presses are hardcoded in `boards/native_posix_64.overlay` file, should you want to change the sequence to test various actions like Mod-Tap, etc. +The virtual key presses are hardcoded in `boards/extensions/native_sim/native_sim_64.overlay` file, should you want to change the sequence to test various actions like Mod-Tap, etc. diff --git a/docs/docs/development/local-toolchain/pre-commit.md b/docs/docs/development/local-toolchain/pre-commit.md index b4306fc9..fdc66513 100644 --- a/docs/docs/development/local-toolchain/pre-commit.md +++ b/docs/docs/development/local-toolchain/pre-commit.md @@ -22,12 +22,14 @@ Now that pre-commit is installed on your PC, you need to install it into the ZMK ```bash pre-commit install +pre-commit install --hook-type commit-msg ``` This should print a message such as ``` -pre-commit installed at .git\hooks\pre-commit +pre-commit installed at .git/hooks/pre-commit +pre-commit installed at .git/hooks/commit-msg ``` Pre-commit will now automatically check your changes whenever you run `git commit`. If it detects a problem, it will describe the problem and cancel the commit. For simple problems such as incorrect formatting, it will also automatically fix the files so you can just `git add` them and try again. diff --git a/docs/docs/development/local-toolchain/setup/container.mdx b/docs/docs/development/local-toolchain/setup/container.mdx new file mode 100644 index 00000000..11b04a32 --- /dev/null +++ b/docs/docs/development/local-toolchain/setup/container.mdx @@ -0,0 +1,268 @@ +--- +title: Container +sidebar_label: Container +--- + +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +## Source Code + +First, you'll need to clone the ZMK source repository into your local file system if you haven't already. +Open a terminal and navigate to the folder on your local machine where you would like to place your `zmk` +directory, then run the following command: + +```sh +git clone https://github.com/zmkfirmware/zmk.git +``` + +## Installing Development Tools + + + + :::note + This approach is documented for + [VS Code](https://github.com/microsoft/vscode) not + [Code OSS](https://github.com/microsoft/vscode/wiki/Differences-between-the-repository-and-Visual-Studio-Code). + ::: + + 1. Install [Docker Desktop](https://www.docker.com/products/docker-desktop) + for your operating system. + 2. Install [VS Code](https://code.visualstudio.com/). + 3. Install the [Remote - Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers). + + + + 1. Install [Docker Desktop](https://www.docker.com/products/docker-desktop) + for your operating system. + 2. Install the [Dev Container CLI](https://github.com/devcontainers/cli). + + + 1. Install Podman for your operating system: + - [Podman CLI](https://podman.io/docs/installation) + - [Podman Desktop](https://podman-desktop.io/docs/installation) + + :::warning + Please follow the installation instructions carefully. If you do not have + a working **Podman machine**, executing the commands below won't be + possible. + ::: + + + + +## Creating Volumes + +To build from a `zmk-config` or with additional modules, it is necessary to +first make them available by creating volumes. + + + + When setting up the container, either using + [VS Code](https://code.visualstudio.com/) or the + [Dev Container CLI](https://github.com/devcontainers/cli), the volumes will + automatically be mounted. + + #### Zmk-Config + ```sh + docker volume create --driver local -o o=bind -o type=none \ + -o device="/absolute/path/to/zmk-config/" zmk-config + ``` + + #### Modules + ```sh + docker volume create --driver local -o o=bind -o type=none \ + -o device="/absolute/path/to/zmk-modules/parent/" zmk-modules + ``` + + + + #### Zmk-Config + ```sh + podman volume create --driver local -o o=bind -o type=none \ + -o device="/absolute/path/to/zmk-config/" zmk-config + ``` + + #### Modules + ```sh + podman volume create --driver local -o o=bind -o type=none \ + -o device="/absolute/path/to/zmk-modules/parent/" zmk-modules + ``` + + + + +Once this is done, you can refer to the `zmk-config` with +`/workspaces/zmk-config` and `/workspaces/zmk-modules` to the modules instead of +using their full path like it is shown in the +[build commands](../build-flash.mdx), since these are the locations they were +mounted to in the container. + +:::note +When changing the configuration or modules directory, new volumes have to be +created and mounted. Accordingly, you first have to remove the old ones. + + + + + ```sh + docker ps # List containers + docker stop "" # Stop the container + docker rm "" # Remove the container + + docker volume ls # List volumes + docker volume rm "" # Remove volume + ``` + + + + + ```sh + podman ps # List containers + podman stop "" # Stop the container + podman rm "" # Remove the container + + podman volume ls # List volumes + podman volume rm "" # Remove volume + ``` + + + +::: + +## Initialize Container + + + + Open the `zmk` checkout directory in VS Code. The repository includes a + configuration for containerized development. Therefore, an alert will pop + up: + + ![VS Code Dev Container Configuration Alert](../../../assets/dev-setup/vscode_devcontainer.png) + + Click `Reopen in Container` to reopen the VS Code with the running + container. If the alert fails to pop up or you accidentally close it, you + can perform the same action by pressing the following keys based on your + operating system and selecting `Remote: Show Remote Menu`: + + - **Windows/Linux**: `Ctrl + Shift + P` + - **MacOs**: `Cmd + Shift + P` + + The first time you do this on your machine, it will pull down the Docker + image from the registry and build the container. **Subsequent launches are + much faster!** + + + + First, make sure that the + [Dev Container CLI](https://github.com/devcontainers/cli) is installed by + running: + + ```sh + devcontainer --version + ``` + + To be able to start the [Dev Container](https://containers.dev/), the + [Dev Container CLI](https://github.com/devcontainers/cli) has to know where + the `devcontainer.json` is located. This can be done using the + `--workspace-folder` option: + + ```sh + devcontainer up --workspace-folder "/absolute/path/to/zmk" + ``` + + The first time you do this on your machine, it will pull down the Docker + image from the registry and build the container. **Subsequent launches are + much faster!** + + Once the container is running, you can connect to it by using its container + ID. This allows you to execute commands inside the container: + + ```sh + docker ps # List containers + docker exec -w /workspaces/zmk -it /bin/bash # Connect + ``` + + + + First, make sure that Podman is installed by running: + + ```sh + podman --version + ``` + + Since Podman is largely compatible with Docker, it is possible to use the + Dockerfile provided for use with Dev Containers for building a container + image. + + ```sh + podman build -t -f Dockerfile
+ ``` + + Once this is done, the container can be started with the `podman run` + command. Depending on which volumes you are using, you might have to remove + mounting options. + + ```sh + podman run -it --rm \ + --security-opt label=disable \ + --workdir /workspaces/zmk \ + -v /path/to/zmk:/workspaces/zmk \ + -v /path/to/zmk-config:/workspaces/zmk-config \ # Removeable + -v /path/to/zmk-modules:/workspaces/zmk-modules \ # Removeable + -p 3000:3000 \ + /bin/bash + ``` + + + + +## Configure Zephyr Workspace + +:::caution +The following step and any future [build commands](../build-flash.mdx) must be +executed from the command line _inside_ the container. +::: + +```sh +west init -l app/ # Initialization +west update # Update modules +``` + +If you are using a Docker-based approach, you have to restart the container at +this point. Stopping it is possible with these commands. + +```sh +docker ps # List containers +docker stop "" # Stop the container +``` diff --git a/docs/docs/development/local-toolchain/setup/docker.md b/docs/docs/development/local-toolchain/setup/docker.md deleted file mode 100644 index 8d9f94bc..00000000 --- a/docs/docs/development/local-toolchain/setup/docker.md +++ /dev/null @@ -1,53 +0,0 @@ ---- -title: Docker -sidebar_label: Docker ---- - -:::note -Currently the Docker approach is only documented for [VS Code](https://github.com/microsoft/vscode) (not [Code OSS](https://github.com/microsoft/vscode/wiki/Differences-between-the-repository-and-Visual-Studio-Code)). While it can be replicated using [devcontainers](https://containers.dev/) this is not documented yet - contributions are welcome! -::: - -### Source Code - -First, you'll need to clone the ZMK source repository if you haven't already. Open a terminal and navigate to the folder you would like to place your `zmk` directory in, then run the following command: - -```sh -git clone https://github.com/zmkfirmware/zmk.git -``` - -### Installing Development Tools - -1. Install [Docker Desktop](https://www.docker.com/products/docker-desktop) for your operating system. -2. Install [VS Code](https://code.visualstudio.com/). -3. Install the [Remote - Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers). - -### Initialize & Update Zephyr Workspace - -Open the `zmk` checkout folder in VS Code. The repository includes a configuration for containerized development, so an alert will pop up: - -![VS Code Dev Container Configuration Alert](../../../assets/dev-setup/vscode_devcontainer.png) - -Click `Reopen in Container` in order to reopen the VS Code with the running container. If the alert fails to pop up or you accidentally close it, you can perform the same action by pressing `ctrl+shift+p` and selecting `Remote: Show Remote Menu`. - -The first time you do this on your machine, it will pull the docker image down from the registry and build the container. Subsequent launches are much faster! - -:::caution -The following step and any future [build commands](../build-flash.mdx) must be executed from the VS Code terminal _inside_ the container. -::: - -Initialize the application and update to fetch modules, including Zephyr: - -```sh -west init -l app/ -west update -``` - -:::tip -This step pulls down quite a bit of tooling, be patient! -::: - -:::info -You must restart the container at this point. The easiest way to do so is to close the VS Code window, verify that the container has stopped in Docker Dashboard, and reopen the container with VS Code. - -Your setup is complete once your container has restarted. -::: diff --git a/docs/docs/development/local-toolchain/setup/index.md b/docs/docs/development/local-toolchain/setup/index.md index 71cc051e..f56a0f82 100644 --- a/docs/docs/development/local-toolchain/setup/index.md +++ b/docs/docs/development/local-toolchain/setup/index.md @@ -4,17 +4,27 @@ sidebar_label: Getting Started --- :::tip -We recommend reading through the setup process before following it step by step, to ensure that you are happy with installing the required dependencies. +We recommend reading through the setup process before following it step by step, +to ensure that you are happy with installing the required dependencies. ::: ## Environment Setup There are two ways to set up the ZMK development environment: -- [Docker](docker.md): \ - A self-contained development environment. It uses the same [Docker image which is used by the GitHub action](https://github.com/zmkfirmware/zmk-docker) for local development. Beyond the benefits of [dev/prod parity](https://12factor.net/dev-prod-parity), this approach may be easier to set up for some operating systems. No toolchain or dependencies are necessary when using Docker; the container image has the toolchain installed and set up to use. +- [Docker or Podman](container.mdx): \ + A self-contained development environment. It uses the same + [Docker image which is used by the GitHub action](https://github.com/zmkfirmware/zmk-docker) + for local development. Beyond the benefits of + [dev/prod parity](https://12factor.net/dev-prod-parity), this approach may be + easier to set up for some operating systems. No toolchain or dependencies are + necessary when using a container; the image has the toolchain installed and + set up to use. -- [Native](native.mdx):\ - This uses your operating system directly. Usually runs slightly faster than the Docker approach, and can be preferable for users who already have the dependencies on their system. +- [Native](native.mdx): \ + This uses your operating system directly. Usually runs slightly faster than + the container approach, and can be preferable for users who already have the + dependencies on their system. -Please see the [Docker](docker.md) instructions or [native](native.mdx) instructions to continue setup. +Please see the [container](container.mdx) or [native](native.mdx) instructions +to continue the setup. diff --git a/docs/docs/development/local-toolchain/setup/native.mdx b/docs/docs/development/local-toolchain/setup/native.mdx index 40c1bbed..3c82a60e 100644 --- a/docs/docs/development/local-toolchain/setup/native.mdx +++ b/docs/docs/development/local-toolchain/setup/native.mdx @@ -9,6 +9,7 @@ import TabItem from "@theme/TabItem"; export const OsTabs = (props) => ( ( export const OsNoteTabs = (props) => ( ( export const EnvTabs = (props) => ( ( export const WinTermTabs = (props) => ( ( ## 1. Install Zephyr Dependencies -Open Zephyr's [Getting Started Guide](https://docs.zephyrproject.org/3.5.0/develop/getting_started/index.html) and follow the instructions under these sections: +Open Zephyr's [Getting Started Guide](https://docs.zephyrproject.org/4.1.0/develop/getting_started/index.html) and follow the instructions under these sections: -- [Select and Update OS](https://docs.zephyrproject.org/3.5.0/develop/getting_started/index.html#select-and-update-os) -- [Install Dependencies](https://docs.zephyrproject.org/3.5.0/develop/getting_started/index.html#install-dependencies) +- [Select and Update OS](https://docs.zephyrproject.org/4.1.0/develop/getting_started/index.html#select-and-update-os) +- [Install Dependencies](https://docs.zephyrproject.org/4.1.0/develop/getting_started/index.html#install-dependencies) :::info -Zephyr's [Install Linux Host Dependencies](https://docs.zephyrproject.org/3.5.0/develop/getting_started/installation_linux.html) page may be of use for users of Linux distributions which are not based on Ubuntu. +Zephyr's [Install Linux Host Dependencies](https://docs.zephyrproject.org/4.1.0/develop/getting_started/installation_linux.html) page may be of use for users of Linux distributions which are not based on Ubuntu. +::: + +:::warning +Some optional Zephyr modules, like `libmetal`, are not compatible with CMake v4, so we recommend installing the latest CMake v3 release when installing the Zephyr dependencies. ::: ## 2. Source Code @@ -95,12 +103,12 @@ cd zmk ## 3. Get Zephyr and install Python dependencies :::note -These steps are very similar to Zephyr's [Get Zephyr and install Python dependencies](https://docs.zephyrproject.org/3.5.0/develop/getting_started/index.html#get-zephyr-and-install-python-dependencies) instructions, but specialized for ZMK. +These steps are very similar to Zephyr's [Get Zephyr and install Python dependencies](https://docs.zephyrproject.org/4.1.0/develop/getting_started/index.html#get-zephyr-and-install-python-dependencies) instructions, but specialized for ZMK. ::: - + 1. Use `apt` to install Python `venv` package: @@ -187,21 +195,21 @@ west update This step pulls down quite a bit of tooling, be patient! ::: -6. Export a [Zephyr CMake package](https://docs.zephyrproject.org/3.5.0/build/zephyr_cmake_package.html#cmake-pkg). This allows CMake to automatically load boilerplate code required for building Zephyr applications. +6. Export a [Zephyr CMake package](https://docs.zephyrproject.org/4.1.0/build/zephyr_cmake_package.html#cmake-pkg). This allows CMake to automatically load boilerplate code required for building Zephyr applications. ```sh west zephyr-export ``` -7. Install the additional dependencies found in Zephyr's `requirements-base.txt`: +7. Install the additional Zephyr dependencies using `west`: ```sh -pip install -r zephyr/scripts/requirements-base.txt +west packages pip --install ``` - + 1. Install `west`: @@ -276,38 +284,38 @@ west update This step pulls down quite a bit of tooling, be patient! ::: -3. Export a [Zephyr CMake package](https://docs.zephyrproject.org/3.5.0/build/zephyr_cmake_package.html#cmake-pkg). This allows CMake to automatically load boilerplate code required for building Zephyr applications. +3. Export a [Zephyr CMake package](https://docs.zephyrproject.org/4.1.0/build/zephyr_cmake_package.html#cmake-pkg). This allows CMake to automatically load boilerplate code required for building Zephyr applications. ```sh west zephyr-export ``` - + -4. Install the additional dependencies found in Zephyr's `requirements-base.txt`: +4. Install the additional Zephyr dependencies using `west`: ```sh -pip3 install --user -r zephyr/scripts/requirements-base.txt +west packages pip --install ``` -4. Install the additional dependencies found in Zephyr's `requirements-base.txt`: +4. Install the additional Zephyr dependencies using `west`: ```sh -pip install -r zephyr/scripts/requirements-base.txt +west packages pip --install ``` -4. Install the additional dependencies found in Zephyr's `requirements-base.txt`. +4. Install the additional Zephyr dependencies using `west`: ```sh -pip3 install -r zephyr/scripts/requirements-base.txt +west packages pip --install ``` @@ -317,7 +325,7 @@ pip3 install -r zephyr/scripts/requirements-base.txt ## 4. Install Zephyr SDK -Return to Zephyr's Getting Started Guide and [Install Zephyr SDK](https://docs.zephyrproject.org/3.5.0/develop/getting_started/index.html#install-zephyr-sdk). +Return to Zephyr's Getting Started Guide and [Install Zephyr SDK](https://docs.zephyrproject.org/4.1.0/develop/getting_started/index.html#install-zephyr-sdk). ### OS-Specific Notes @@ -332,7 +340,7 @@ Return to Zephyr's Getting Started Guide and [Install Zephyr SDK](https://docs.z #### Install cross-compile toolchain -Because Raspberry OS runs on the same architecture (but different ABI) as ARM keyboard MCUs, the operating system's installed [cross compilers](https://docs.zephyrproject.org/3.5.0/develop/toolchains/other_x_compilers.html) can be used to target the different ABI. Building for non-ARM MCUs has not been tested. +Because Raspberry OS runs on the same architecture (but different ABI) as ARM keyboard MCUs, the operating system's installed [cross compilers](https://docs.zephyrproject.org/4.1.0/develop/toolchains/other_x_compilers.html) can be used to target the different ABI. Building for non-ARM MCUs has not been tested. First, the cross compiler should be installed: @@ -340,7 +348,7 @@ First, the cross compiler should be installed: sudo apt install gcc-arm-none-eabi ``` -Next, we'll configure Zephyr with some [environment variables](https://docs.zephyrproject.org/3.5.0/develop/env_vars.html#env-vars) needed to find the cross compiler. Create a file named `~/.zephyrrc` if it doesn't exist, and add these lines to it: +Next, we'll configure Zephyr with some [environment variables](https://docs.zephyrproject.org/4.1.0/develop/env_vars.html#env-vars) needed to find the cross compiler. Create a file named `~/.zephyrrc` if it doesn't exist, and add these lines to it: ```sh export ZEPHYR_TOOLCHAIN_VARIANT=cross-compile diff --git a/docs/docs/development/module-creation.md b/docs/docs/development/module-creation.md new file mode 100644 index 00000000..f3d351d7 --- /dev/null +++ b/docs/docs/development/module-creation.md @@ -0,0 +1,145 @@ +--- +title: Module Creation +sidebar_label: ZMK Module Creation +--- + +[ZMK modules](../features/modules.mdx) are the recommended method of adding content to ZMK, whenever it is possible. This page will guide you through creating a module for ZMK. Distinction is made between modules used for different purposes: + +- Modules containing one or more keyboard-related definitions (boards, shields, interconnects, etc.) +- Modules containing behaviors & features +- Modules containing drivers +- Modules containing other features, such as visual effects + +See also Zephyr's [page on modules](https://docs.zephyrproject.org/4.1.0/develop/modules.html). + +For open source hardware designs, it's recommended to **not** include the hardware design files in the ZMK module itself, since the module will be fetched by users during build and having design files in the module would likely make the module unnecessarily large and slow to fetch. + +## Module Setup + +ZMK has a template to make creating a module easier. Navigate to [the ZMK module template repository](https://github.com/zmkfirmware/zmk-module-template) and select "Use this template" followed by "Create a new repository" in the top right. + +The rest of this page will go through the contents of the template step by step, guiding you through the configuration of the module. + +:::tip +The [Unified ZMK Config Template](https://github.com/zmkfirmware/unified-zmk-config-template) is also a module, albeit one focused on keyboards. If you are making a module for a keyboard, you may find it useful to base the module off of the template and use GHA to help troubleshoot any errors. Later, you can extract the keyboard to a dedicated module or remove superfluous parts from your module with the help of the information on this page. +::: + +### Zephyr Module File + +This is the file that defines your module. Only when this file is configured correctly will your module function as expected. + +#### Name + +First, you will need to name your module. ZMK has a naming convention that you should follow: + +``` +zmk-- +``` + +Valid options for type are: + +| Type | Description | +| ----------- | --------------------------------------------------------------------------------------------------------------------- | +| `keyboard` | The module contains definitions for one or multiple keyboards, be they boards or shields. | +| `component` | The module contains definitions for one or multiple components, such as boards for shields to use. | +| `behavior` | The module contains a single behavior. | +| `driver` | The module contains a single driver. | +| `feature` | The module contains a single feature which doesn't fall under the other categories. | +| `vfx` | The module contains definitions for one or multiple visual effects, such as display customisations or RGB animations. | + +For each of these, you can use the singular or plural, i.e. `keyboard` and `keyboards` are both acceptable. Use your judgement to decide between the two. + +`` is your choice of name to describe the module. + +Note that your _module name_ does not have to be the same as your _repository name_. For example, if you have named your module `zmk-keyboards-corne`, you may for your own organisational purposes want to name the repository e.g. `zmk-corne-module`. + +Your module name goes in the `zephyr/module.yml` file: + +```yaml title="zephyr/module.yaml" +name: +``` + +#### Build options + +Next, you need to define the options to build your module. These also go into `zephyr/module.yml`, as children of the `build` property. Commonly used options are: + +- The `depends` child property is used to specify a list of modules which the module depends on. The dependencies are referred to by their [module name](#name). +- The `cmake` child property is used to identify a folder containing a `CMakeLists.txt` file that lists the CMake commands used to build source files. +- The `kconfig` child property is used to identify the `Kconfig` file that defines configuration settings used by the module. +- `settings` is a child property containing additional child properties, two of which are particularly relevant: + - `board_root` points to the parent directory of a `boards` directory, which contains additional board/shield definitions. + - `dts_root` points to the parent directory of a `dts` directory, which contains additional devicetree bindings. + - `snippet_root` points to the parent directory of a `snippets` directory, which contains [snippets](https://docs.zephyrproject.org/4.1.0/build/snippets/index.html). + +See the `zephyr/module.yml` found in the template for a usage example. + +### Dependencies + +If `zephyr/module.yml` has anything listed under `depends`, then you should also define a [west manifest](https://docs.zephyrproject.org/4.1.0/develop/west/manifest.html) file. While the `zephyr/module.yml` file defines _which_ modules your module depends on, the west manifest file defines _where_ said modules are found. This then allows automatic tooling to fetch the modules when building firmware. If `depends` is not present in `zephyr/module.yml`, then this file (named `west.yml` in the template) should be removed. + +It is recommended that you place the manifest file at the root of your module, though you can place it elsewhere. Be sure to note in your `README.md` that your module uses dependencies, so that users import these correctly. +Below is an example `west.yml` file for a user that would be using your module, with the necessary `import` field if the module has dependencies: + +```yaml title="west.yml" +manifest: + remotes: + - name: remote-name + url-base: https://github.com/remote-name + projects: + # Together with the above defined remote, this refers to a module located at + # https://github.com/remote-name/repository-name + - name: repository-name + remote: remote-name + # This points to a west manifest file in the remote module for further imports + import: west.yml +``` + +See the [modules feature page](../features/modules.mdx) for additional information on using west manifest files. + +### Informational Files + +Make sure to include a `README.md` file and a `LICENSE` file in your repository. + +### Predefined Files and Folders + +The repository comes with a number of files and folders already positioned for you to edit. The below table describes which files are most likely kept and which are most likely deleted, based on your module's type. Note that these aren't hard rules, merely the most common use case. + +| | `keyboard` | `component` | `behavior` | `driver` | `feature` | `vfx` | +| ---------------- | ---------- | ----------- | ---------- | -------- | --------- | ----- | +| `boards/` | ✅ | ✅ | ❌ | ❌ | ❌ | ✅ | +| `dts/` | ❌ | ❌ | ✅ | ✅ | ✅ | ❌ | +| `CMakeLists.txt` | ❌ | ❌ | ✅ | ✅ | ✅ | ✅ | +| `Kconfig` | ❌ | ❌ | ✅ | ✅ | ✅ | ✅ | +| `include/` | ❌ | ❌ | ✅ | ✅ | ✅ | ❌ | +| `src/` | ❌ | ❌ | ✅ | ✅ | ✅ | ❌ | +| `snippets/` | ❌ | ❌ | ❌ | ❌ | ✅ | ❌ | + +The below table reminds of the purpose of each of these files and folders, if you are not already familiar with them: + +| File or Folder | Description | +| ---------------- | ------------------------------------------------------------------------------------- | +| `boards/` | Folder containing definitions for boards, shields and interconnects | +| `dts/` | Folder containing devicetree bindings and includes with devicetree nodes (.dtsi) | +| `CMakeLists.txt` | CMake configuration to specify source files to build | +| `Kconfig` | Kconfig file for the module | +| `include/` | Folder for C header files | +| `src/` | Folder for C source files | +| `snippets/` | Folder for [snippets](https://docs.zephyrproject.org/4.1.0/build/snippets/index.html) | + +Note that the `include` and `src` folders are not mandated by the module system, and all of these can be positioned anywhere in your module's filetree if you adjust the `zephyr/module.yml` accordingly. The `west.yml` file is not commonly present in any of the types. + +Modules should expose all provided header files with an include path name beginning with the module-name, for example at `include/zmk__/
.h`. + +:::info +If your module requires adding drivers to existing subsystems in modules, you will need to use the `zephyr_library_amend()` CMake command, which requires you to have a specific directory structure. See [`zephyr/cmake/modules/extensions.cmake`](https://github.com/zephyrproject-rtos/zephyr/blob/main@%7B2025-Feb-15%7D/cmake/modules/extensions.cmake#L492) for the definition and some documentation in the comments, with an example in [`petejohanson/ec-support-zmk-module`](https://github.com/petejohanson/ec-support-zmk-module/tree/main/drivers/kscan). +::: + +## Examples + +Below are some examples of modules for different types. Unless under the `zmkfirmware` project, these are not endorsed officially and may not follow our conventions perfectly. For such reason, the modules chosen to be presented here may change with time. + +- Keyboard: +- Behavior: +- Driver: +- Feature: +- VFX: diff --git a/docs/docs/development/new-behavior.mdx b/docs/docs/development/new-behavior.mdx index 3d50b821..9eb66581 100644 --- a/docs/docs/development/new-behavior.mdx +++ b/docs/docs/development/new-behavior.mdx @@ -12,194 +12,517 @@ Before reading this section, it is **vital** that you read through our [clean ro ## Overview -This document outlines how to develop a [behavior](../keymaps/behaviors/index.mdx) for ZMK and prepare the changes for a pull request. +[Behaviors](../keymaps/behaviors/index.mdx) refer to the actions that are invoked when a key is pressed or released. +This guide outlines how to create a [ZMK module](../development/module-creation.md) that contains a new [behavior](../keymaps/behaviors/index.mdx). -Behaviors are assigned to key positions and determine what happens when they are pressed and released. They are implemented in Zephyr as "devices": they consist of a devicetree binding file, which specifies the properties of the behavior, and a driver written in C code. This allows for the ability to create unique instances of these behaviors in [keymaps](../keymaps/index.mdx) or devicetree-source-include files (`.dtsi`). While instances of behaviors stored in keymaps are created by end-users for their personal needs, the instances that live in the .dtsi files are stored and documented in ZMK directly, which removes the need for end-users to set up common use-cases of these behaviors in their personal keymaps. +:::info +If an out-of-tree behavior's use-case is deemed widespread enough to be merged into upstream ZMK, a new pull request may be issued instead. +While this page describes practices that maximize compatibility between module-focused development and pull-request-based workflows, we also note specific modifications required for the latter to work properly. +::: + +In the context of the Zephyr RTOS, behaviors are implemented as "devices", which consist of: + +- A devicetree binding file, which declares the behavior's properties +- A device driver written in C code +- Optionally, devicetree-source-include files (`.dtsi`), which contain predefined instances of the behavior that may be included directly in keymaps The general process for developing behaviors is: -1. [Create the behavior](#creating-the-behavior) - 1. [Create the devicetree binding (`.yaml`)](#creating-the-devicetree-binding-yaml) - 1. [Create the driver (`.c`)](#creating-the-driver-c) - 1. [Update `app/CmakeLists.txt` to include the new driver](#updating-appcmakeliststxt-to-include-the-new-driver) - 1. [Define common use-cases for the behavior (`.dtsi`) (Optional)](#defining-common-use-cases-for-the-behavior-dtsi-optional) +1. [Create a new behavior repository](#creating-a-new-behavior-repository) +1. [Develop the behavior functionality](#developing-the-behavior-functionality) 1. [Test changes locally](#testing-changes-locally) 1. [Document behavior functionality](#documenting-behavior-functionality) -1. [Create a pull request for review and inclusion into the ZMK sources](#submitting-a-pull-request) +1. [Provide licensing information](#licensing-information) :::info Before developing new behaviors, developers should have a working knowledge of the Embedded Linux Devicetree. The following resources are provided for those seeking further understanding: - [Embedded Linux Wiki - Device Tree Usage](https://elinux.org/Device_Tree_Usage) -- [Zephyr Devicetree API](https://docs.zephyrproject.org/3.5.0/build/dts/api/api.html) -- [Zephyr Device Driver Model](https://docs.zephyrproject.org/3.5.0/kernel/drivers/index.html) +- [Zephyr Devicetree API](https://docs.zephyrproject.org/4.1.0/build/dts/api/api.html) +- [Zephyr Device Driver Model](https://docs.zephyrproject.org/4.1.0/kernel/drivers/index.html) ::: -## Creating the Behavior +## Creating a new Behavior Repository -### Creating the Devicetree Binding (`.yaml`) +### Initializing a new Behavior Module -The properties of the behavior are listed in the behavior's devicetree binding, which comes in the form of a `.yaml` file. Devicetree bindings are stored in the directory `app/dts/bindings/behaviors/` and are labelled in lowercase, beginning with the prefix `zmk,behavior-`, and ending with the behavior's name, using dashes to separate multiple words. For example, the directory for the hold-tap's devicetree binding would be located at `app/dts/bindings/behaviors/zmk,behavior-hold-tap.yaml`, which is shown below as a reference: +1. Navigate to [the ZMK module template repository](https://github.com/zmkfirmware/zmk-module-template) +1. Select **"Use this template"** in the upper right corner, followed by **"Create a new repository"** +1. Choose an appropriate name for your new repository. + ZMK behavior modules should follow the naming convention, **`zmk-behavior-`**, using all lowercase letters and dashes to separate words +1. Complete the module's creation by selecting the repository's visibility, before clicking **"Create repository"** +1. Clone a copy of your module to your development environment. + The cloned repository should be easily accessible when [building and testing firmware using a local toolchain](./local-toolchain/build-flash.mdx#building-with-external-modules). -```yaml title="app/dts/bindings/behaviors/zmk,behavior-hold-tap.yaml" +Files unrelated to behavior development should be removed from your copy of the ZMK module template. +The minimum viable filesystem for a behavior follows the following structure: + +``` +zmk-behavior-/ +├── CMakeLists.txt +├── Kconfig +├── LICENSE +├── README.md +├── dts +│ ├── behaviors +// highlight-next-line +│ │ └── .dtsi (optional) +│ └── bindings +│ └── behaviors +// highlight-next-line +│ └── zmk,behavior-.yaml +├── include +│ └── dt-bindings +│ └── zmk +// highlight-next-line +│ └── .h (optional) +├── src +│ └── behaviors +// highlight-next-line +│ └── behavior_.c +// highlight-start +├── tests +│ └── +│ ├── behavior_keymap.dtsi +│ └── normal +│ ├── events.patterns +│ ├── keycode_events.snapshot +│ ├── native_posix.keymap +│ └── native_posix_64.keymap +// highlight-end +// highlight-next-line +├── west.yml (optional) +└── zephyr + └── module.yml +``` + +For more information on module preparation, such as details on the contents of `west.yml` and `zephyr/module.yml`, refer to the page on [module creation](./module-creation.md). + +Once the module's tree has been organized properly, the relevant files are now ready to be populated. +We will explain the purpose of the files listed in the tree above in order of increasing complexity. + +### Devicetree Bindings (`.yaml`) + +Devicetree bindings use `.yaml` files to declare their properties. + +They are stored in `dts/bindings/behaviors/` and follow the same naming convention as the repository itself. + +The [mod-morph](../keymaps/behaviors/mod-morph.md)'s devicetree binding is presented below as a simple example. + +```yaml title="zmk/app/dts/bindings/behaviors/zmk,behavior-mod-morph.yaml" # Copyright (c) 2020 The ZMK Contributors # SPDX-License-Identifier: MIT // highlight-next-line -description: Hold or Tap behavior +description: Mod Morph Behavior // highlight-next-line -compatible: "zmk,behavior-hold-tap" +compatible: "zmk,behavior-mod-morph" // highlight-next-line -include: two_param.yaml +include: zero_param.yaml # Additional parameters // highlight-next-line properties: bindings: - type: phandles + type: phandle-array required: true - tapping-term-ms: + mods: type: int - tapping_term_ms: # deprecated + required: true + keep-mods: type: int - quick-tap-ms: - type: int - default: -1 - quick_tap_ms: # deprecated - type: int - flavor: - type: string required: false - default: "hold-preferred" - enum: - - "hold-preferred" - - "balanced" - - "tap-preferred" - - "tap-unless-interrupted" - retro-tap: - type: boolean - hold-trigger-key-positions: - type: array - required: false - default: [] + ``` -We see that the `.yaml` files used for new behaviors' devicetree bindings consist of the following properties: +It can be seen that the `.yaml` files used for new behaviors' devicetree bindings consist of the following fields: #### `description` -A brief statement of what the behavior is. The value of this property is not seen by end-users; as such, the `description` value should be kept less than a sentence long, leaving explanations for end-users of how the behavior works for its documentation. +A brief statement of what the behavior is. +The `description` should be kept less than a sentence long because it is not a property seen by end-users. +Instead, detailed explanations of how the behavior works should be shared in the behavior's documentation. #### `compatible` -Allows ZMK to assign the correct driver to the behavior extracted from the keymap or `.dtsi`. The value of the `compatible` property is equal to the name of the [devicetree binding file](#creating-the-devicetree-binding-yaml) as a `string`. +Allows Zephyr to assign the correct devicetree node to the behavior extracted from the keymap or `.dtsi`, which is then connected to the proper driver. +The value of the `compatible` property is same as the name of the [devicetree binding file](#devicetree-bindings-yaml). -As shown in the example above, `compatible: "zmk,behavior-hold-tap"` is the value of the `compatible` property of `zmk,behavior-hold-tap.yaml`. +In the example above, `zmk,behavior-mod-morph.yaml` lists `compatible: "zmk,behavior-mod-morph"`. -#### `include` +#### `include` additional parameters -Choose between `zero_param.yaml`, `one_param.yaml`, or `two_param.yaml` depending on how many additional parameters are required to complete the behavior's binding in a keymap. For example, we `include: two_param.yaml` in `zmk,behavior-hold-tap.yaml` because any user-defined or pre-defined instances of the hold-tap behavior take in two cells as inputs: one for the hold behavior and one for the tap behavior. +Choose between `zero_param.yaml`, `one_param.yaml`, or `two_param.yaml` depending on how many additional parameters are required to complete the behavior's binding in a keymap. + +| `include` | Example keymap binding | +| ----------------- | ---------------------- | +| `zero_param.yaml` | `&sys_reset` | +| `one_param.yaml` | `&kp A` | +| `two_param.yaml` | `&mt LSHFT Z` | + +:::info +Some behaviors, like the [Bluetooth behavior](../keymaps/behaviors/bluetooth.md), use `two_param.yaml` despite their keymap usage _appearing_ to only use one extra parameter, e.g., `&bt BT_NXT` or `&bt BT_PRV`. +Expanding their C preprocessor definitions reveals the following definitions: `#define BT_NXT BT_NXT_CMD 0` and `#define BT_PRV BT_PRV_CMD 0`, respecting the use of `two_param.yaml`. +This is useful for creating behaviors that may have a primary "command", followed by a secondary parameter. + +See [Behavior Metadata](#behavior-metadata) for more information. +::: #### `properties` (Optional) -These are additional variables required to configure a particular instance of a behavior. `properties` can be of the following types: +These are additional variables required to configure a particular instance of a behavior. +More information can be found in [ZMK's Devicetree primer](./devicetree.md) or [Zephyr's own documentation on Devicetree bindings](https://docs.zephyrproject.org/4.1.0/build/dts/bindings-syntax.html#properties). -- `path` -- `compound` -- `array` -- `string` -- `string-array` -- `boolean` -- `int` -- `uint8-array` -- `phandle`. -- `phandle-array` -- `phandles` +### Behavior Source Files (`.c`) -:::info -For more information on additional `properties`, refer to [Zephyr's documentation on Devicetree bindings](https://docs.zephyrproject.org/3.5.0/build/dts/bindings-syntax.html#properties). -::: +Behavior source files are stored in in `src/behaviors/`. +They are labelled in lowercase, beginning with the prefix `behavior_`, and ending with the behavior's name, using underscores to separate multiple words. -### Creating the Driver (`.c`) +The developer may decide that there is a single global instance of a behavior, or multiple instances that act independently of one another. +Some examples of the former are layer behaviors, backlight control, or endpoint selection. +The latter includes keypresses, hold-taps, or tap-dances. -:::info -Developing drivers for behaviors in ZMK makes extensive use of the Zephyr Devicetree API and Device Driver Model. Links to the Zephyr Project Documentation for both of these concepts can be found below: +The code templates below show the differences between these categories, along with the essential components of a behavior source file. -- [Zephyr Devicetree API](https://docs.zephyrproject.org/3.5.0/build/dts/api/api.html) -- [Zephyr Device Driver Model](https://docs.zephyrproject.org/3.5.0/kernel/drivers/index.html) + + -::: +```c title="src/behaviors/behavior_.c" +/* + * Copyright (c) XXXX The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ -Driver files are stored in `app/src/behaviors/` and are labelled in lowercase, beginning with the prefix `behavior_`, and ending with the behavior's name, using underscores to separate multiple words. For example, the directory for the hold-tap's driver would be located at `app/src/behaviors/behavior_hold_tap.c`. - -The code snippet below shows the essential components of a new driver. - -```c -#define DT_DRV_COMPAT zmk_ +#define DT_DRV_COMPAT zmk_behavior_ // Dependencies #include -#include #include - -#include +#include LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); +#include + #if DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) -// Instance-Unique Data Struct (Optional) -struct behavior__data { - bool example_data_param1; - bool example_data_param2; - bool example_data_param3; +// Instance-specific Data struct (Optional) +struct behavior__data { + bool data_param1; + bool data_param2; + bool data_param3; }; -// Instance-Unique Config Struct (Optional) -struct behavior__config { - bool example_config_param1; - bool example_config_param2; - bool example_config_param3; +// Instance-specific Config struct (Optional) +struct behavior__config { + bool config_param1; + bool config_param2; + bool config_param3; }; -// Initialization Function -static int _init(const struct device *dev) { +// Initialization Function (Optional) +static int _init(const struct device *dev) { return 0; }; -// API Structure -static const struct behavior_driver_api _driver_api = { +static int on__binding_pressed(struct zmk_behavior_binding *binding, + struct zmk_behavior_binding_event event) { + return ZMK_BEHAVIOR_OPAQUE; +} +static int on__binding_released(struct zmk_behavior_binding *binding, + struct zmk_behavior_binding_event event) { + return ZMK_BEHAVIOR_OPAQUE; +} + +// API struct +static const struct behavior_driver_api _driver_api = { + .binding_pressed = on__binding_pressed, + .binding_released = on__binding_released, }; -BEHAVIOR_DT_INST_DEFINE(0, // Instance Number (Equal to 0 for behaviors that don't require multiple instances, - // Equal to n for behaviors that do make use of multiple instances) - _init, NULL, // Initialization Function, Power Management Device Pointer - &_data, &_config, // Behavior Data Pointer, Behavior Configuration Pointer (Both Optional) - POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, // Initialization Level, Device Priority - &_driver_api); // API Structure +BEHAVIOR_DT_INST_DEFINE(0, // Instance Number (0) + _init, // Initialization Function + NULL, // Power Management Device Pointer + &_data, // Behavior Data Pointer + &_config, // Behavior Configuration Pointer + POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT // Initialization Level, Device Priority + &_driver_api); // API struct #endif /* DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) */ ``` -#### `DT_DRV_COMPAT` + -Replace `zmk_` in the `#define DT_DRV_COMPAT` statement with the name of your behavior. (e.g. `zmk_behavior_caps_word`) + -#### Dependencies +```c title="src/behaviors/behavior_.c" +/* + * Copyright (c) XXXX The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#define DT_DRV_COMPAT zmk_behavior_ + +// Dependencies +#include +#include +#include + +LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); + +#include + +#if DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) + +// Instance-specific Data struct (Optional) +struct behavior__data { + bool data_param1; + bool data_param2; + bool data_param3; +}; + +// Instance-specific Config struct (Optional) +struct behavior__config { + bool config_param1; + bool config_param2; + bool config_param3; +}; + +// Initialization Function (Optional) +static int _init(const struct device *dev) { + return 0; +}; + +static int on__binding_pressed(struct zmk_behavior_binding *binding, + struct zmk_behavior_binding_event event) { + return ZMK_BEHAVIOR_OPAQUE; +} + +static int on__binding_released(struct zmk_behavior_binding *binding, + struct zmk_behavior_binding_event event) { + return ZMK_BEHAVIOR_OPAQUE; +} + +// API struct +static const struct behavior_driver_api _driver_api = { + .binding_pressed = on__binding_pressed, + .binding_released = on__binding_released, +}; + +#define _INST(n) \ + static struct behavior__data_##n { \ + .data_param1 = foo1, \ + .data_param2 = foo2, \ + .data_param3 = foo3, \ + }; \ + \ + static struct behavior__config_##n { \ + .config_param1 = bar1, \ + .config_param2 = bar2, \ + .config_param3 = bar3, \ + }; \ + \ + BEHAVIOR_DT_INST_DEFINE(n, /* Instance Number (Automatically populated by macro) */ \ + _init, /* Initialization Function */ \ + NULL, /* Power Management Device Pointer */ \ + &_data_##n, /* Behavior Data Pointer */ \ + &_config_##n, /* Behavior Configuration Pointer */ \ + POST_KERNEL, /* Initialization Level */ \ + CONFIG_KERNEL_INIT_PRIORITY_DEFAULT /* Device Priority */ \ + &_driver_api); /* API struct */ \ + +DT_INST_FOREACH_STATUS_OKAY(_INST) + +#endif /* DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) */ + +``` + + + + +A more thorough explanation of the contents of a behavior source file can be [found below](#developing-the-behavior-functionality). + +Other source files may be created as well, as is often the case when creating new features or [events](events.md) from scratch. +For parity with upstream ZMK, these files will generally be placed in the root `src/` directory, or `src/events/`. + +### Updating `Kconfig` + +Kconfig files are used to configure the system firmware at compile time. +Behaviors specifically will generally use the `DT_HAS_ZMK_BEHAVIOR__ENABLED` macro, which checks if the behavior is defined in the devicetree. +This ensures that behavior-specific properties may be accessed without explicitly enabling the behavior in a keyboard's `.conf` or `defconfig` files. + +```Kconfig title="Kconfig" +config ZMK_BEHAVIOR_ + bool + default y + depends on DT_HAS_ZMK_BEHAVIOR__ENABLED + +if ZMK_BEHAVIOR_ + +config ZMK_BEHAVIOR__PROPERTY1 + + help + +config ZMK_BEHAVIOR__PROPERTY2 + + help + +config ZMK_BEHAVIOR__PROPERTY3 + + help + +endif #ZMK_BEHAVIOR_ +``` + +:::info +For an overview on Kconfig files, see [Configuration](../config/index.md#kconfig-files). + +For more examples of behavior-specific Kconfig settings, see [Behavior Configuration](../config/behaviors.md). +::: + +### Updating `CMakeLists.txt` + +`CMakeLists.txt` files are used in Zephyr's [configuration stage](https://docs.zephyrproject.org/3.5.0/build/cmake/index.html) when building firmware. +These specify which source files are included in the build, and may depend on the Kconfig settings shown previously. + +At this point the developer should consider the behavior's [locality](../features/split-keyboards.md#behaviors-with-locality). + +Most behaviors are processed on a unibody keyboard, or the central half of a split board. +An example is shown below. + +```txt title="CMakeLists.txt" +# Copyright (c) XXXX The ZMK Contributors +# SPDX-License-Identifier: MIT + +target_include_directories(app PRIVATE include) + +if ((NOT CONFIG_ZMK_SPLIT) OR CONFIG_ZMK_SPLIT_ROLE_CENTRAL) + target_sources(app PRIVATE src/behaviors/behavior_.c) +endif() # ((NOT CONFIG_ZMK_SPLIT) OR CONFIG_ZMK_SPLIT_ROLE_CENTRAL) +``` + +Other common ways of enabling/blocking the inclusion of sources via `CMakeLists.txt` include: + +| Condition | CMakeLists.txt entry | +| --------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | +| Locality is unibody, or the central part of a split keyboard | `if ((NOT CONFIG_ZMK_SPLIT) OR CONFIG_ZMK_SPLIT_ROLE_CENTRAL)` | +| Locality is **only** on the central part of a split keyboard | `if (CONFIG_ZMK_SPLIT AND CONFIG_ZMK_SPLIT_ROLE_CENTRAL)` | +| Locality is **only** on the peripheral part of a split keyboard | `if (CONFIG_ZMK_SPLIT AND (NOT CONFIG_ZMK_SPLIT_ROLE_CENTRAL))` | +| Kconfig Requirement must be met | Use `target_sources_ifdef(CONFIG_ app PRIVATE .c)` instead of `target_sources(.c)` | + +:::info +If submitting a pull request to upstream ZMK, the `target_sources` invocation would go inside `zmk/app/CMakeLists.txt` instead. +::: + +### Optional: Defining Common Use-Cases for the Behavior (`.dtsi`) + +`.dtsi` files, stored in the directory `dts/behaviors/`, are encouraged for behaviors with more common use-cases. +One such example is the mod-tap (`&mt`), which is a predefined type of hold-tap that takes a modifier key as the hold parameter and another key as the tap parameter. + +For the purpose of this section, we will discuss the structure of `zmk/app/dts/behaviors/gresc.dtsi` below. + +```dts title="zmk/app/dts/behaviors/gresc.dtsi" +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + + +#include +#include + +/ { + behaviors { +// highlight-start +#if ZMK_BEHAVIOR_OMIT(GRESC) + /omit-if-no-ref/ +#endif +// highlight-end + gresc: grave_escape { + compatible = "zmk,behavior-mod-morph"; + #binding-cells = <0>; + bindings = <&kp ESC>, <&kp GRAVE>; + mods = <(MOD_LGUI|MOD_LSFT|MOD_RGUI|MOD_RSFT)>; + display-name = "Grave/Escape"; + }; + }; +}; + +``` + +The format of a behavior's `.dtsi` file is identical to declaring an instance of the behavior in a user's keymap. +However, a major difference is that the value `/omit-if-no-ref/` should be placed adjacent to the label and name of the behavior, as highlighted in the example. +This enables the behavior to only be compiled if it is used in the keymap. + +:::warning + +If your behavior has its [`locality`](#zmk-api-struct) property set to anything other than `BEHAVIOR_LOCALITY_CENTRAL`, then the name of the node must be at most 8 characters long. +Otherwise, it will fail to be invoked on the peripheral half of a split keyboard. + +In the above example, `grave_escape` is too long, so it would need to be shortened, e.g. + +```dts +// Behavior can be invoked on peripherals, so name must be <= 8 characters. +/omit-if-no-ref/ gresc: gresc { ... }; +``` + +::: + +After creating the `.dtsi` from above, you may `#include ` at the top of your keymap to access the new behavior definition. + +:::info +If submitting a pull request to upstream ZMK, this `#include` statement would go inside `zmk/app/dts/behaviors.dtsi`, instead of the keymap. +::: + +## Developing the Behavior Functionality + +### Overview + +This section elaborates on the contents of behavior sources that interact with ZMK directly. +We will review the components from the [behavior source templates](#behavior-source-files-c) in the order they appear and introduce new concepts that are commonly used in the development process. + +:::info +Developing drivers for behaviors in ZMK makes extensive use of the Zephyr Devicetree API and Device Driver Model. +Links to the Zephyr Project Documentation for both of these concepts can be found below: + +- [Zephyr Devicetree API](https://docs.zephyrproject.org/4.1.0/build/dts/api/api.html) +- [Zephyr Device Driver Model](https://docs.zephyrproject.org/4.1.0/kernel/drivers/index.html) + +::: + +:::warning +If submitting a pull request, any `.c` files should be formatted according to `clang-format` to ensure that automated checks run smoothly. +::: + +### Compatible: `#define DT_DRV_COMPAT` + +This field should match the [`compatible` field of your devicetree binding](#compatible), using all lowercase letters and underscores to separate words, instead of hyphens and commas. + +For example, the Caps Word behavior's devicetree binding lists `compatible: "zmk,behavior-caps-word"`, so the `DT_DRV_COMPAT` is `zmk_behavior_caps_word`. + +### Dependencies The dependencies required for any ZMK behavior are: -- `device.h`: [Zephyr Device APIs](https://docs.zephyrproject.org/apidoc/latest/group__device__model.html) -- `drivers/behavior.h`: ZMK Behavior Functions (e.g. [`locality`](#api-structure), `behavior_keymap_binding_pressed`, `behavior_keymap_binding_released`, `behavior_sensor_keymap_binding_triggered`) -- `logging/log.h`: [Zephyr Logging APIs](https://docs.zephyrproject.org/3.5.0/services/logging/index.html) (for more information on USB Logging in ZMK, see [USB Logging](usb-logging.mdx)). +- `zephyr/device.h`: [Zephyr Device APIs](https://docs.zephyrproject.org/apidoc/3.5.0/group__device__model.html) +- `drivers/behavior.h`: ZMK Behavior Functions (e.g. [locality](#zmk-api-struct), `behavior_keymap_binding_pressed`, `behavior_keymap_binding_released`, `behavior_sensor_keymap_binding_triggered`) +- `zephyr/logging/log.h`: [Zephyr Logging APIs](https://docs.zephyrproject.org/3.5.0/services/logging/index.html) (for more information on USB Logging in ZMK, see [USB Logging](usb-logging.mdx)). - `zmk/behavior.h`: ZMK Behavior Information (e.g. parameters, position and timestamp of events) - `return` values: - - `ZMK_BEHAVIOR_OPAQUE`: Used to terminate `on__binding_pressed` and `on__binding_released` functions that accept `(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event)` as parameters + - `ZMK_BEHAVIOR_OPAQUE`: Used to terminate `on__binding_pressed` and `on__binding_released` functions that accept `(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event)` as parameters - `ZMK_BEHAVIOR_TRANSPARENT`: Used in the `binding_pressed` and `binding_released` functions for the transparent (`&trans`) behavior - `struct`s: - `zmk_behavior_binding`: Stores the name of the behavior device (`char *behavior_dev`) as a `string` and up to two additional parameters (`uint32_t param1`, `uint32_t param2`) @@ -207,62 +530,160 @@ The dependencies required for any ZMK behavior are: Other common dependencies include `zmk/keymap.h`, which allows behaviors to access layer information and extract behavior bindings from keymaps, and `zmk/event_manager.h` which is detailed below. -##### ZMK event manager +### Behavior metadata -Including `zmk/event_manager.h` is required for the following dependencies to function properly. +Behavior metadata documents the possible combinations of parameters that can be used with the behavior when added to your keymap. +The metadata structure allows flexibility to specify different kinds of well known parameter types, such as a HID usage, different second parameters passed on the selected first parameter, etc. -- `zmk/events/position_state_changed.h`: Position events' state (on/off), source, position, and timestamps -- `zmk/events/keycode_state_changed.h`: Keycode events' state (on/off), usage page, keycode value, modifiers, and timestamps -- `zmk/events/modifiers_state_changed.h`: Modifier events' state (on/off) and modifier value +You can see a few examples of how the metadata is implemented in practice for the following behaviors: -Events can be used similarly to hardware interrupts, through the use of [listeners](#listeners-and-subscriptions). +- [Key press](https://github.com/zmkfirmware/zmk/blob/main/app/src/behaviors/behavior_key_press.c#L21) +- [RGB underglow](https://github.com/zmkfirmware/zmk/blob/main/app/src/behaviors/behavior_rgb_underglow.c#L23) +- [Hold-tap](https://github.com/zmkfirmware/zmk/blob/main/app/src/behaviors/behavior_hold_tap.c#L680), which is dynamic based on what behaviors are set up in the hold-tap bindings -###### Listeners and subscriptions +Behavior metadata consists of one or more metadata sets, where each metadata set has a set of values for the parameter(s) used with the behavior. -The condensed form of lines 192-225 of the tap-dance driver, shown below, does an excellent job of showcasing the function of listeners and subscriptions with respect to the [ZMK Event Manager](#zmk-event-manager). +For example, a common approach for behaviors is to have a set of possible first parameters that identify the "command" to invoke for the behavior, and the second parameter is a detail/sub-parameter to the action. +You can see an example of this with the `&bt` behavior. +In that scenario, all `&bt` "commands" that take a BT profile as a second parameter are grouped into one set, and all commands that take no arguments are grouped into another. -```c title="app/src/behaviors/behavior_tap_dance.c (Lines 192-197, 225)" -static int tap_dance_position_state_changed_listener(const zmk_event_t *eh); +This allows the ZMK Studio UI to properly show a input for a profile only when the appropriate first "command" selection is made in the UI. +Here is a snippet of that setup from the [behavior_bt.c](https://github.com/zmkfirmware/zmk/blob/main/app/src/behaviors/behavior_bt.c#L25) code: -ZMK_LISTENER(behavior_tap_dance, tap_dance_position_state_changed_listener); -ZMK_SUBSCRIPTION(behavior_tap_dance, zmk_position_state_changed); +```c -static int tap_dance_position_state_changed_listener(const zmk_event_t *eh){ - // Do stuff... -} +#if IS_ENABLED(CONFIG_ZMK_BEHAVIOR_METADATA) +// Set up the values for commands that take no additional parameter. +static const struct behavior_parameter_value_metadata no_arg_values[] = { + { + .display_name = "Next Profile", + .type = BEHAVIOR_PARAMETER_VALUE_TYPE_VALUE, + .value = BT_NXT_CMD, + }, + { + .display_name = "Previous Profile", + .type = BEHAVIOR_PARAMETER_VALUE_TYPE_VALUE, + .value = BT_PRV_CMD, + }, + { + .display_name = "Clear All Profiles", + .type = BEHAVIOR_PARAMETER_VALUE_TYPE_VALUE, + .value = BT_CLR_ALL_CMD, + }, + { + .display_name = "Clear Selected Profile", + .type = BEHAVIOR_PARAMETER_VALUE_TYPE_VALUE, + .value = BT_CLR_CMD, + }, +}; + +// Set up the "no arg" metadata set. +static const struct behavior_parameter_metadata_set no_args_set = { + .param1_values = no_arg_values, + .param1_values_len = ARRAY_SIZE(no_arg_values), +}; + +// Set up the possible param1 values for commands that take a profile index for param2 +static const struct behavior_parameter_value_metadata prof_index_param1_values[] = { + { + .display_name = "Select Profile", + .type = BEHAVIOR_PARAMETER_VALUE_TYPE_VALUE, + .value = BT_SEL_CMD, + }, + { + .display_name = "Disconnect Profile", + .type = BEHAVIOR_PARAMETER_VALUE_TYPE_VALUE, + .value = BT_DISC_CMD, + }, +}; + +// Set up the param2 value metadata for the valid range of possible profiles to pick from. +static const struct behavior_parameter_value_metadata prof_index_param2_values[] = { + { + .display_name = "Profile", + .type = BEHAVIOR_PARAMETER_VALUE_TYPE_RANGE, + .range = {.min = 0, .max = ZMK_BLE_PROFILE_COUNT}, + }, +}; + +// Set up the metadata set for the commands that take a profile for the second parameter. +static const struct behavior_parameter_metadata_set profile_index_metadata_set = { + .param1_values = prof_index_param1_values, + .param1_values_len = ARRAY_SIZE(prof_index_param1_values), + .param2_values = prof_index_param2_values, + .param2_values_len = ARRAY_SIZE(prof_index_param2_values), +}; + +// Finally, expose all the sets in the top level aggregate structure. +static const struct behavior_parameter_metadata_set metadata_sets[] = {no_args_set, + profile_index_metadata_set}; + +static const struct behavior_parameter_metadata metadata = { + .sets_len = ARRAY_SIZE(metadata_sets), + .sets = metadata_sets, +}; + +#endif // IS_ENABLED(CONFIG_ZMK_BEHAVIOR_METADATA) + +... Rest of the behavior implementation + +// Add the metadata to the driver API conditionally: + +static const struct behavior_driver_api behavior_bt_driver_api = { + .binding_pressed = on_keymap_binding_pressed, + .binding_released = on_keymap_binding_released, +#if IS_ENABLED(CONFIG_ZMK_BEHAVIOR_METADATA) + .parameter_metadata = &metadata, +#endif // IS_ENABLED(CONFIG_ZMK_BEHAVIOR_METADATA) +}; ``` -Listeners, defined by the `ZMK_LISTENER(mod, cb)` function, take in a listener name (`mod`) and a callback function (`cb`) as their parameters. On the other hand subscriptions are defined by the `ZMK_SUBSCRIPTION(mod, ev_type)`, and determine what kind of event (`ev_type`) should invoke the callback function from the listener. In the tap-dance example, this listener executes code depending on a `zmk_position_state_changed` event, or simply, a change in key position. Other types of ZMK events can be found as the name of the `struct` inside each of the files located at `app/include/zmk/events/.h`. All control paths in a listener should `return` one of the [`ZMK_EV_EVENT_*` values](#return-values), which are shown below. +### ZMK API struct -###### `return` values: +Comes in the form `static const struct behavior_driver_api _driver_api`. +The most relevant fields of `struct behavior_driver_api`, defined in `drivers/behavior.h`, are shown below. -- `ZMK_EV_EVENT_BUBBLE`: Keep propagating the event `struct` to the next listener. -- `ZMK_EV_EVENT_HANDLED`: Stop propagating the event `struct` to the next listener. The event manager still owns the `struct`'s memory, so it will be `free`d automatically. Do **not** free the memory in this function. -- `ZMK_EV_EVENT_CAPTURED`: Stop propagating the event `struct` to the next listener. The event `struct`'s memory is now owned by your code, so the event manager will not free the event `struct` memory. Make sure your code will release or free the event at some point in the future. (Use the [`ZMK_EVENT_*` macros](#macros) described below.) +| Field | Description | +| ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | +| .binding_pressed | The function called when the key is pressed. Typically reserved for a function named [`on__binding_pressed`](#dependencies) | +| .binding_released | The function called when the key is pressed. Typically reserved for a function named [`on__binding_released`](#dependencies) | +| .locality | Describes how the behavior affects parts of a _split_ keyboard. | -###### Macros: +Locality has been discussed previously at compile-time. +Locality in the context of the API struct refers to runtime locality. +The `.locality` field may take the following values. -- `ZMK_EVENT_RAISE(ev)`: Start handling this event (`ev`) with the first registered event listener. -- `ZMK_EVENT_RAISE_AFTER(ev, mod)`: Start handling this event (`ev`) after the event is captured by the named [event listener](#listeners-and-subscriptions) (`mod`). The named event listener will be skipped as well. -- `ZMK_EVENT_RAISE_AT(ev, mod)`: Start handling this event (`ev`) at the named [event listener](#listeners-and-subscriptions) (`mod`). The named event listener is the first handler to be invoked. -- `ZMK_EVENT_RELEASE(ev)`: Continue handling this event (`ev`) at the next registered event listener. -- `ZMK_EVENT_FREE(ev)`: Free the memory associated with the event (`ev`). +- `BEHAVIOR_LOCALITY_CENTRAL`: Behavior only affects the central half, which is the case for most keymap-related behavior. +- `BEHAVIOR_LOCALITY_EVENT_SOURCE`: Behavior affects only the central _or_ peripheral half depending on which side invoked the behavior binding, such as [reset behaviors](../keymaps/behaviors/reset.md). +- `BEHAVIOR_LOCALITY_GLOBAL`: Behavior affects the entire keyboard, such as [external power](../keymaps/behaviors/power.md) and lighting-related behaviors that need to be synchronized across halves. -#### `BEHAVIOR_DT_INST_DEFINE` - -`BEHAVIOR_DT_INST_DEFINE` is a special ZMK macro. It forwards all the parameters to Zephyr's `DEVICE_DT_INST_DEFINE` macro to define the driver instance, then it adds the driver to a list of ZMK behaviors so they can be found by `zmk_behavior_get_binding()`. - -:::info -For more information on this function, refer to [Zephyr's documentation on the Device Driver Model](https://docs.zephyrproject.org/3.5.0/kernel/drivers/index.html#c.DEVICE_DT_INST_DEFINE). +:::note +For unibody keyboards, all locality values perform the same as `BEHAVIOR_LOCALITY_GLOBAL`. ::: -The example `BEHAVIOR_DT_INST_DEFINE` call can be left as is with the first parameter, the instance number, equal to `0` for behaviors that only require a single instance (e.g. external power, backlighting, accessing layers). For behaviors that can have multiple instances (e.g. hold-taps, tap-dances, sticky-keys), `BEHAVIOR_DT_INST_DEFINE` can be placed inside a `#define` statement, usually formatted as `#define _INST(n)`, that sets up any [data pointers](#data-pointers-optional) and/or [configuration pointers](#configuration-pointers-optional) that are unique to each instance. +The API struct's metadata-specific fields are shown below. + +| Field | Description | +| ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| .get_parameter_metadata | Callback function that can dynamically provide/populate the metadata describing the parameters to use with the behavior so the behavior may be used with [ZMK Studio](../features/studio.md). | +| .parameter_metadata | Pointer to metadata describing the parameters to use with the behavior so the behavior may be used with [ZMK Studio](../features/studio.md). | + +### Invoking `BEHAVIOR_DT_INST_DEFINE` + +`BEHAVIOR_DT_INST_DEFINE` is a special ZMK macro which uses Zephyr's `DEVICE_DT_INST_DEFINE` macro to define the driver instance, before adding it to a list of ZMK behaviors so that can be found by the function `zmk_behavior_get_binding()`. + +:::info +For more information on this function, refer to [Zephyr's documentation on the Device Driver Model](https://docs.zephyrproject.org/4.1.0/kernel/drivers/index.html#c.DEVICE_DT_INST_DEFINE). +::: + +The example `BEHAVIOR_DT_INST_DEFINE` call can be left as is with the first parameter, the instance number, equal to `0` for behaviors that only require a single instance (e.g. external power, backlighting, accessing layers). +For behaviors that can have multiple instances (e.g. hold-taps, tap-dances, sticky-keys), `BEHAVIOR_DT_INST_DEFINE` can be placed inside a `#define` statement, usually formatted as `#define _INST(n)`, that sets up any [data pointers](#optional-data-pointers) and/or [configuration pointers](#optional-configuration-pointers) that are unique to each instance. An example of this can be seen below, taking the `#define KP_INST(n)` from the hold-tap driver. ```c #define KP_INST(n) \ - static struct behavior_hold_tap_config behavior_hold_tap_config_##n = { \ + static const struct behavior_hold_tap_config behavior_hold_tap_config_##n = { \ .tapping_term_ms = DT_INST_PROP(n, tapping_term_ms), \ .hold_behavior_dev = DT_PROP(DT_INST_PHANDLE_BY_IDX(n, bindings, 0), label), \ .tap_behavior_dev = DT_PROP(DT_INST_PHANDLE_BY_IDX(n, bindings, 1), label), \ @@ -279,156 +700,145 @@ An example of this can be seen below, taking the `#define KP_INST(n)` from the h DT_INST_FOREACH_STATUS_OKAY(KP_INST) ``` -Note that in the hold-tap example, the instance number, `0`, has been replaced by `n`, signifying the unique `node_id` of each instance of a behavior. Furthermore, the DT_INST_FOREACH_STATUS_OKAY(KP_INST) macro iterates through each compatible, non-disabled devicetree node, creating and applying the proper values to any instance-specific configurations or data by invoking the KP_INST macro for each instance of the new behavior. +Note that in the hold-tap example, the instance number, `0`, has been replaced by `n`, signifying the unique `node_id` of each instance of a behavior. +Furthermore, the DT_INST_FOREACH_STATUS_OKAY(KP_INST) macro iterates through each compatible, non-disabled devicetree node, creating and applying the proper values to any instance-specific configurations or data by invoking the KP_INST macro for each instance of the new behavior. Behaviors also require the following parameters of `BEHAVIOR_DT_INST_DEFINE` to be changed: -##### Initialization function +#### Optional: Initialization function -Comes in the form `static int _init(const struct device *dev)`. Initialization functions preconfigure any data, like resetting timers and position for hold-taps and tap-dances. All initialization functions `return 0;` once complete. +Comes in the form `static int _init(const struct device *dev)`. +Initialization functions preconfigure any data, like resetting timers and position for hold-taps and tap-dances. +All initialization functions `return 0;` once complete. -##### API structure +The **second** argument of `BEHAVIOR_DT_INST_DEFINE` can be set to `NULL` instead if an initialization function is not required. -Comes in the form `static const struct behavior_driver_api _driver_api)`. Common items to include in the API Structure are: +#### Optional: Data pointers -- `.binding_pressed`: Used for behaviors that invoke an action on its keybind press. Set `.binding_pressed` equal to the function typically named [`on__binding_pressed`](#dependencies). -- `.binding_released`: Same as above, except for activating on keybind release events. Set `.binding_released` equal to the function typically named [`on__binding_released`](#dependencies). -- `.locality`: Defined in ``. Describes how the behavior affects parts of a _split_ keyboard. - - `BEHAVIOR_LOCALITY_CENTRAL`: Behavior only affects the central half, which is the case for most keymap-related behavior. - - `BEHAVIOR_LOCALITY_EVENT_SOURCE`: Behavior affects only the central _or_ peripheral half depending on which side invoked the behavior binding, such as [reset behaviors](../keymaps/behaviors/reset.md). - - `BEHAVIOR_LOCALITY_GLOBAL`: Behavior affects the entire keyboard, such as [external power](../keymaps/behaviors/power.md) and lighting-related behaviors that need to be synchronized across halves. - :::note - For unibody keyboards, all locality values perform the same as `BEHAVIOR_LOCALITY_GLOBAL`. - ::: - -##### Data pointers (optional) - -The data `struct` stores additional data required for **each new instance** of the behavior. Regardless of the instance number, `n`, `behavior__data_##n` is typically initialized as an empty `struct`. The data respective to each instance of the behavior can be accessed in functions like [`on__binding_pressed(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event)`](#dependencies) by extracting the behavior device from the keybind like so: +The data `struct` stores additional data required for **each new instance** of the behavior. +Regardless of the instance number, `n`, `behavior__data_##n` is typically initialized as an empty `struct`. +The data respective to each instance of the behavior can be accessed in functions like [`on__binding_pressed(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event)`](#dependencies) by extracting the behavior device from the keybind like so: ```c const struct device *dev = zmk_behavior_get_binding(binding->behavior_dev); -struct behavior__data *data = dev->data; +struct behavior__data *data = dev->data; ``` The variables stored inside the data `struct`, `data`, can be then modified as necessary. -The fourth cell of `BEHAVIOR_DT_INST_DEFINE` can be set to `NULL` instead if instance-specific data is not required. +The **fourth** argument of `BEHAVIOR_DT_INST_DEFINE` can be set to `NULL` instead if instance-specific data is not required. -##### Configuration pointers (optional) +#### Optional: Configuration pointers -The configuration `struct` stores the properties declared from the behavior's `.yaml` for **each new instance** of the behavior. As seen in the `#define KP_INST(n)` of the hold-tap example, the configuration `struct`, `behavior__config_##n`, for each instance number, `n`, can be initialized using the [Zephyr Devicetree Instance-based APIs](https://docs.zephyrproject.org/3.5.0/build/dts/api/api.html#instance-based-apis), which extract the values from the `properties` of each instance of the [devicetree binding](#creating-the-devicetree-binding-yaml) from a user's keymap or [predefined use-case `.dtsi` files](#defining-common-use-cases-for-the-behavior-dtsi-optional) stored in `app/dts/behaviors/`. We illustrate this further by comparing the [`#define KP_INST(n)` from the hold-tap driver](#behavior_dt_inst_define) and the [`properties` of the hold-tap devicetree binding.](#creating-the-devicetree-binding-yaml) +The configuration `struct` stores the properties declared from the behavior's `.yaml` for **each new instance** of the behavior. +As seen in the `#define KP_INST(n)` of the hold-tap example, the configuration `struct`, `behavior__config_##n`, for each instance number, `n`, can be initialized using the [Zephyr Devicetree Instance-based APIs](https://docs.zephyrproject.org/4.1.0/build/dts/api/api.html#instance-based-apis), +which extract the values from the `properties` of each instance of the [devicetree binding](#devicetree-bindings-yaml) from a user's keymap or [predefined use-case `.dtsi` files](#optional-defining-common-use-cases-for-the-behavior-dtsi) stored in `app/dts/behaviors/`. +We illustrate this further by comparing the [`#define KP_INST(n)` from the hold-tap driver](#invoking-behavior_dt_inst_define) and the [`properties` of the hold-tap devicetree binding](#devicetree-bindings-yaml). +The config structure instances should always be declared `const` +so they are placed into flash, not RAM, by the linker. -The fifth cell of `BEHAVIOR_DT_INST_DEFINE` can be set to `NULL` instead if instance-specific configurations are not required. +The **fifth** argument of `BEHAVIOR_DT_INST_DEFINE` can be set to `NULL` instead if instance-specific configurations are not required. -:::warning -Remember that `.c` files should be formatted according to `clang-format` to ensure that checks run smoothly once the pull request is submitted. -::: +### Keycodes -### Updating `app/CmakeLists.txt` to Include the New Driver +Let us examine one of the simplest behavior actions: sending and releasing keycodes. -Most behavior drivers' are invoked according to the central half's [locality](#api-structure), and are therefore stored after the line `if ((NOT CONFIG_ZMK_SPLIT) OR CONFIG_ZMK_SPLIT_ROLE_CENTRAL)` in the form, `target_sources(app PRIVATE src/behaviors/.c)`, as shown below. +The core of the [key press behavior](../keymaps/behaviors/key-press.md) is `raise_zmk_keycode_state_changed_from_encoded()`, found in `keycode_state_changed.h`. +This function takes in three arguments: an HID usage, a boolean value to determine if the keycode is pressed or released, and a timestamp. +We present a snippet from the key press behavior source, where it is seen that the HID usage of each keycode is extracted from the keymap, before it is determined to be pressed or released. -```txt title="app/CmakeLists.txt" -if ((NOT CONFIG_ZMK_SPLIT) OR CONFIG_ZMK_SPLIT_ROLE_CENTRAL) - target_sources(app PRIVATE src/behaviors/behavior_key_press.c) - target_sources(app PRIVATE src/behaviors/behavior_hold_tap.c) - target_sources(app PRIVATE src/behaviors/behavior_sticky_key.c) - target_sources(app PRIVATE src/behaviors/behavior_caps_word.c) - target_sources(app PRIVATE src/behaviors/behavior_key_repeat.c) - target_sources(app PRIVATE src/behaviors/behavior_momentary_layer.c) - target_sources(app PRIVATE src/behaviors/behavior_mod_morph.c) - target_sources(app PRIVATE src/behaviors/behavior_outputs.c) - target_sources(app PRIVATE src/behaviors/behavior_tap_dance.c) - target_sources(app PRIVATE src/behaviors/behavior_toggle_layer.c) - target_sources(app PRIVATE src/behaviors/behavior_to_layer.c) - target_sources(app PRIVATE src/behaviors/behavior_transparent.c) - target_sources(app PRIVATE src/behaviors/behavior_none.c) - target_sources(app PRIVATE src/behaviors/behavior_sensor_rotate_key_press.c) - target_sources(app PRIVATE src/combo.c) - target_sources(app PRIVATE src/conditional_layer.c) - target_sources(app PRIVATE src/keymap.c) -endif() -``` +```c +static int on_keymap_binding_pressed(struct zmk_behavior_binding *binding, + struct zmk_behavior_binding_event event) { + LOG_DBG("position %d keycode 0x%02X", event.position, binding->param1); + return raise_zmk_keycode_state_changed_from_encoded(binding->param1, true, event.timestamp); +} -For behaviors that do not require [central locality](../features/split-keyboards.md#behaviors-with-locality), the following options for updating `app/CMakeLists.txt` also exist: +static int on_keymap_binding_released(struct zmk_behavior_binding *binding, + struct zmk_behavior_binding_event event) { + LOG_DBG("position %d keycode 0x%02X", event.position, binding->param1); + return raise_zmk_keycode_state_changed_from_encoded(binding->param1, false, event.timestamp); +} -- Behavior applies to unibody, or central or peripheral half of keyboard: place `target_sources(app PRIVATE .c)` line _before_ `if ((NOT CONFIG_ZMK_SPLIT) OR CONFIG_ZMK_SPLIT_ROLE_CENTRAL)` -- Behavior applies to _only_ central half of split keyboard: place `target_sources(app PRIVATE .c)` after `if (CONFIG_ZMK_SPLIT AND CONFIG_ZMK_SPLIT_ROLE_CENTRAL)` -- Behavior applies to _only_ peripheral half of split keyboard: place `target_sources(app PRIVATE .c)` after `if (CONFIG_ZMK_SPLIT AND (NOT CONFIG_ZMK_SPLIT_ROLE_CENTRAL))` -- Behavior requires certain condition in a keyboard's `.conf` file to be met: use `target_sources_ifdef(CONFIG_ app PRIVATE .c)` instead of `target_sources(.c)` - -### Defining Common Use-Cases for the Behavior (`.dtsi`) (Optional) - -`.dtsi` files, found in the directory `app/dts/behaviors/`, are only necessary for behaviors with more common use-cases. A common example is the mod-tap (`&mt`), which is a predefined type of hold-tap that takes a modifier key as the hold parameter and another key as the tap parameter. - -For the purpose of this section, we will discuss the structure of `app/dts/behaviors/gresc.dtsi` below. - -```dts title="app/dts/behaviors/gresc.dtsi" -/* - * Copyright (c) 2020 The ZMK Contributors - * - * SPDX-License-Identifier: MIT - */ - -#include - -/ { - behaviors { - /omit-if-no-ref/ gresc: grave_escape { - compatible = "zmk,behavior-mod-morph"; - #binding-cells = <0>; - bindings = <&kp ESC>, <&kp GRAVE>; - mods = <(MOD_LGUI|MOD_LSFT|MOD_RGUI|MOD_RSFT)>; - }; - }; +static const struct behavior_driver_api behavior_key_press_driver_api = { + .binding_pressed = on_keymap_binding_pressed, + .binding_released = on_keymap_binding_released, +#if IS_ENABLED(CONFIG_ZMK_BEHAVIOR_METADATA) + .parameter_metadata = &metadata, +#endif // IS_ENABLED(CONFIG_ZMK_BEHAVIOR_METADATA) }; ``` -The format of a behavior's `.dtsi` file is identical to declaring an instance of the behavior in a user's keymap. The only major difference is that the value `/omit-if-no-ref/` should be placed adjacent to the label and name of the behavior, as seen in line 11 of the `gresc` example. +### Layers -:::warning +All functions that interact with layers can be found in `keymap.h`. -If your behavior has its [`locality`](#api-structure) property set to anything other than `BEHAVIOR_LOCALITY_CENTRAL`, then the name of the node must be at most 8 characters long, or it will fail to be invoked on the peripheral half of a split keyboard. +Layers can be identified in two ways: an "order-independent" `zmk_keymap_layer_id_t`, and an "order-dependent" `zmk_keymap_layer_index_t`. -In the above example, `grave_escape` is too long, so it would need to be shortened, e.g. +| Function | Description | +| -------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | +| `zmk_keymap_layer_default(void)` | Returns a `zmk_keymap_layer_id_t` of the default layer. | +| `zmk_keymap_layer_state(void)` | Returns the current keyboard's layer state: a bitmask where each bit represents the state of the corresponding order-independent ID. | +| `zmk_keymap_layer_active(zmk_keymap_layer_id_t layer)` | Returns a `bool` representing if the layer with the chosen `zmk_keymap_layer_id_t` is active. | +| `zmk_keymap_highest_layer_active(void)` | Returns a `zmk_keymap_layer_index_t` the ordered layer index of the highest active layer. | +| `zmk_keymap_layer_activate(zmk_keymap_layer_id_t layer)` | Activates the chosen layer. Returns 0 if successful. Returns values < 0 if an error occurs. | +| `zmk_keymap_layer_deactivate(zmk_keymap_layer_id_t layer)` | Deactivates the chosen layer. Returns 0 if successful. Returns values < 0 if an error occurs. | +| `zmk_keymap_layer_toggle(zmk_keymap_layer_id_t layer)` | Toggles the chosen layer. Returns 0 if successful. Returns values < 0 if an error occurs. | +| `zmk_keymap_layer_to(zmk_keymap_layer_id_t layer)` | Deactivates every layer, before activating the chosen layer. Returns 0 if successful. Returns values < 0 if an error occurs. | +| `zmk_keymap_layer_name(zmk_keymap_layer_id_t layer)` | Returns a C-string containing the layer's name. | +| `zmk_keymap_layer_index_to_id(zmk_keymap_layer_index_t layer_index)` | Returns the order-independent ID for a given order-dependent layer index. | -```dts -// Behavior can be invoked on peripherals, so name must be <= 8 characters. -/omit-if-no-ref/ gresc: gresc { ... }; -``` +### ZMK Events +The event manager is a queue-based system that can be leveraged by behaviors to check for significant changes in the system's state. +Some common examples of this are determining if one or more key positions have been pressed or released, to check if a specific keycode has been sent, or registering changes between keymap layers. +All events can be found in their headers, stored in `zmk/app/include/zmk/events/`. + +To use the event manager, we `#include ` at the top of our behavior source file. + +Some examples of events that are the most relevant to behavior development can be seen below. + +| Event | Description | +| -------------------------- | ------------------------------------------------------------------------------------------------- | +| `hid_indicators_changed.h` | The current HID indicators (Num Lock, Caps Lock, Scroll Lock, Compose, Kana) as a bitmask | +| `keycode_state_changed.h` | [Keycode events' state (on/off)](#keycodes), usage page, keycode value, modifiers, and timestamps | +| `layer_state_changed.h` | [Layer events' state (bitmask)](#layers), layer index, and timestamps | +| `position_state_changed.h` | Position events' state (on/off), source, position, and timestamps | + +:::info +See the [`events` directory](https://github.com/zmkfirmware/zmk/tree/main/app/include/zmk/events) for other examples of events. +For more information on how to interact with events and the event manager, see [Events](./events.md). ::: -After creating the `.dtsi` from above, update `app/dts/behaviors.dtsi` to include your newly predefined behavior instance, making it accessible by the devicetree. +### Interacting with other behaviors and the ZMK Behavior Queue -```dts title="app/dts/behaviors.dtsi" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -// highlight-next-line -#include -``` +This section will refer to features found in `behavior.h` and `behavior_queue.h`. + +#### `#include ` + +These functions work with behaviors at a **device** level. +They are used to retrieve the device associated with a keymap binding, or invoke other behaviors, such as ones provided as a parameter to the current behavior. + +| Function | Description | +| ------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `struct zmk_behavior_binding` | A `struct` containing the behavior binding's name stored as a C-string, and its parameters. | +| `struct zmk_behavior_binding_event` | A `struct` describing where and when a behavior binding is invoked based on its the layer, key position, and timestamp. For split keyboards, this also includes which part of the keyboard invoked the binding. | +| `zmk_behavior_get_binding(const char *name)` | Get a `const struct device*` for a behavior from its name field. | +| `zmk_behavior_invoke_binding(const struct zmk_behavior_binding *src_binding, struct zmk_behavior_binding_event event, bool pressed)` | Invoke a behavior given its binding and invoking event details. | + +#### `#include ` + +The behavior queue is leveraged by [macros](../keymaps/behaviors/macros.md) and [sensor rotation](../keymaps/behaviors/sensor-rotate.md) behaviors. +This queue ensures that behaviors may be invoked sequentially using specific time-based triggers without blocking the rest of the keyboard functionality. + +| Function | Description | +| ------------------------ | ---------------------------------------- | +| `zmk_behavior_queue_add` | Adds the behavior to the behavior queue. | ## Testing Changes Locally -Create a new folder in `app/tests/` to develop virtual test sets for all common use cases of the behavior. Behaviors should be tested thoroughly on both virtual testing environments using `west test` and real hardware. +Create a new folder in `tests/` (or `app/tests/` if submitting a pull request) to develop virtual test sets for all common use cases of the behavior. +For pull requests, behaviors should be tested thoroughly on both virtual testing environments using `west test` and real hardware. :::note Zephyr currently does not support logging over Bluetooth, so any use of the serial monitor for hardware testing must be done over hardware UART or USB virtual UART. @@ -446,25 +856,52 @@ Zephyr currently does not support logging over Bluetooth, so any use of the seri Consider the following prompts when writing documentation for new behaviors: - What does it do? Describe some general use-cases for the behavior. -- Which properties included in the [devicetree binding](#creating-the-devicetree-binding-yaml) should be configured manually by the user? What do they do, and if applicable, what are their default values? +- Which properties included in the [devicetree binding](#devicetree-bindings-yaml) should be configured manually by the user? What do they do, and if applicable, what are their default values? - What does an example implementation in a keymap look like? Include a code-snippet of the example implementation in the keymap file's `behaviors` node. - - Are there any [common use-cases of the behavior](#defining-common-use-cases-for-the-behavior-dtsi-optional)? Consider making a separate documentation page for these predefined variations, like how the [mod-tap](../keymaps/behaviors/mod-tap.md) has a separate page from the [hold-tap](../keymaps/behaviors/hold-tap.mdx). - How does the behavior perform in edge cases? For example, tap-dances invoke the last binding in its list of `bindings` once the maximum number of keypresses has been reached. -Consider also including visual aids alongside written documentation if it adds clarity. +Including visual aids alongside written documentation for additional clarity may be helpful. :::info -See [Documentation](contributing/documentation.md) for more information on writing, testing, and formatting ZMK documentation. +If submitting a pull request, see [Documentation](contributing/documentation.md) for more information on writing, testing, and formatting ZMK documentation. ::: -## Submitting a Pull Request +## Licensing Information -Once the above sections are complete, the behavior is almost ready to submit as a pull request. New [devicetree bindings](#creating-the-devicetree-binding-yaml), new [drivers](#creating-the-driver-c), and [predefined use-cases](#defining-common-use-cases-for-the-behavior-dtsi-optional) of the new behavior must contain the appropriate copyright headers, which can be copied and pasted from the tabs below. +:::danger +The ZMK Project and its contributors do not claim to be legal representatives, and any material below should not considered official legal advice. +When distributing your work, please review the terms and conditions associated with any relevant licenses thoroughly. +::: + +Developers may wish to share their work with the public, which is often done by sharing a link to a GitHub repository. +However, making a repository public does **not** automatically qualify the repository as open source, or permit others to use the works as they see fit. +To qualify a codebase as open source, authors must provide a license that in addition to their source code, satisfy criteria that includes but is not limited to: + +- The source code and license must be freely accessible and redistributable +- The source code may be freely modified, which may result in the creation of derivative works under the conditions of the included license +- The license must not discriminate against any person, group of persons, or specific fields of endeavor + +:::info +For more information, consider looking at the following resources: + +- [GitHub Open Source Guides](https://opensource.guide/legal/) +- [The System Package Data Exchange (SPDX)](https://spdx.dev/learn/handling-license-info/) +- [List of licenses approved by the Open Source Initiative (OSI)](https://opensource.org/licenses) +- [The OSI Open Source Definition](https://opensource.org/osd) + +::: + +### Contributing to ZMK (MIT License) + +The [MIT License](https://github.com/zmkfirmware/zmk/blob/main/LICENSE) is used for developers submitting a pull request or those wish to make their work usable, modifiable, and distributable in its entirety to the ZMK community. +If the author's intent is to contribute their work to ZMK in these manners, especially when submitting pull requests, they should be aware of the constraints specified in our [clean room policy](./contributing/clean-room.md). + +[SPDX copyright headers](https://spdx.dev/learn/handling-license-info/) for each of the files outlined in this document can be copied and pasted from the tabs below. @@ -492,6 +929,15 @@ values={[ :::warning Remember to change the copyright year (`XXXX`) to the current year when adding the copyright headers to your newly created files. +This also applies to the **`LICENSE`** file at the repository's root. ::: -While you wait for your PR to become approved and merged into the main repository, please stay up to date for any code reviews and check in with users testing your new behavior. For more detailed information on contributing to ZMK, it is recommended to thoroughly review the [documentation for contributors](https://github.com/zmkfirmware/zmk/blob/main/CONTRIBUTING.md). +### Other licenses + +Developers may also use other licenses with their work. +Some common example are [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0) or [GNU Public Licenses (GPL)](https://www.gnu.org/licenses/licenses.html). +However, software licenses are generally treated as "one-way" compatible. +This means that code registered under a more permissive license may be used in a project with a more restrictive license, but not the other way around. + +For example, as noted in ZMK's [clean room policy](./contributing/clean-room.md), projects like QMK and TMK use GPL licenses, which are more restrictive than ZMK's MIT license. +Code from ZMK may be used as a reference when developing work for QMK/TMK, but code from QMK/TMK may **not** be used as source material when working on ZMK. diff --git a/docs/docs/development/studio-rpc-protocol.md b/docs/docs/development/studio-rpc-protocol.md index 5cfafbba..8dba4a7d 100644 --- a/docs/docs/development/studio-rpc-protocol.md +++ b/docs/docs/development/studio-rpc-protocol.md @@ -2,12 +2,6 @@ title: ZMK Studio RPC Protocol --- -:::warning[Alpha Feature] - -ZMK Studio is still in active development, and the below information is for development purposes only. For up to date information, join the [ZMK Discord](https://zmk.dev/community/discord/invite) server and discuss in `#studio-development`. - -::: - :::danger Before reading this section, it is **vital** that you read through our [clean room policy](./contributing/clean-room.md). ::: diff --git a/docs/docs/development/usb-logging.mdx b/docs/docs/development/usb-logging.mdx index b7c3d233..5a9fc868 100644 --- a/docs/docs/development/usb-logging.mdx +++ b/docs/docs/development/usb-logging.mdx @@ -28,7 +28,7 @@ requires adding a `snippet: zmk-usb-logging` to your `build.yaml` file for any b ```yaml --- include: - - board: nice_nano_v2 + - board: nice_nano shield: corne_left snippet: zmk-usb-logging ``` @@ -36,12 +36,12 @@ include: When building locally, the `-S`/`--snippet` flag can be passed to `west build` to enable the snippet, e.g. ```sh -west build -b nice_nano_v2 -S zmk-usb-logging -- -DSHIELD="corne_left" +west build -b nice_nano -S zmk-usb-logging -- -DSHIELD="corne_left" ``` ### Additional Config -Logging can be further configured using Kconfig described in [the Zephyr documentation](https://docs.zephyrproject.org/3.5.0/services/logging/index.html). +Logging can be further configured using Kconfig described in [the Zephyr documentation](https://docs.zephyrproject.org/4.1.0/services/logging/index.html). For instance, setting `CONFIG_LOG_PROCESS_THREAD_STARTUP_DELAY_MS` to a large value such as `8000` might help catch issues that happen near keyboard boot, before you can connect to view the logs. @@ -50,6 +50,7 @@ boot, before you can connect to view the logs. After flashing the updated ZMK image, the board should expose a USB CDC ACM device that you can connect to and view the logs. -On Windows, you can use [PuTTY](https://www.putty.org/). Once installed, use Device Manager to figure out which COM port your controller is communicating on (listed under 'Ports (COM & LPT)') and specify that as the 'Serial line' in PuTTY. +On Windows, you can use [PuTTY](https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html). Once installed, use Device Manager to figure out which COM port your controller is communicating on (listed under 'Ports (COM & LPT)') and specify that as the 'Serial line' in PuTTY. ![Controller COM port](../assets/usb-logging/com.jpg) @@ -85,7 +86,13 @@ You can connect to the device with [tio](https://tio.github.io/) (can be install sudo tio /dev/tty.usbmodem14401 ``` -You should see tio printing `Disconnected` or `Connected` when you disconnect or reconnect the USB cable. +Alternatively, `cu` should be preinstalled (see `man cu` for usage instructions): + +```sh +sudo cu -l /dev/tty.usbmodem14401 +``` + +You should see the console printing `Disconnected` or `Connected` when you disconnect or reconnect the USB cable. @@ -94,9 +101,9 @@ From there, you should see the various log messages from ZMK and Zephyr, dependi ## Adding USB Logging to a Board -Standard boards such as the nice!nano and Seeeduino XIAO family have the necessary configuration for logging already added, however if you are developing your own standalone board you may wish to add the ability to use USB logging in the future. +Standard boards such as the nice!nano and Seeed Studio XIAO family have the necessary configuration for logging already added, however if you are developing your own standalone board you may wish to add the ability to use USB logging in the future. -To do so, you need to follow the upstream Zephyr [`cdc-acm-console` snippet requirements](https://docs.zephyrproject.org/3.5.0/snippets/cdc-acm-console/README.html#requirements) steps. +To do so, you need to follow the upstream Zephyr [`cdc-acm-console` snippet requirements](https://docs.zephyrproject.org/4.1.0/snippets/cdc-acm-console/README.html#requirements) steps. Usually, this just requires ensuring that the USB node has been tagged with the `zephyr_udc0` label, e.g. diff --git a/docs/docs/faq.md b/docs/docs/faq.md index 901e9c96..fa9fcea5 100644 --- a/docs/docs/faq.md +++ b/docs/docs/faq.md @@ -7,10 +7,10 @@ sidebar_label: FAQs As a best-in-class RTOS, Zephyr™ brings many [benefits](https://www.zephyrproject.org/benefits) to ZMK, such as: -- A _single_ platform [supporting](https://docs.zephyrproject.org/3.5.0/boards/index.html) many architectures, processors and boards. +- A _single_ platform [supporting](https://docs.zephyrproject.org/4.1.0/boards/index.html) many architectures, processors and boards. - Optimization for low-powered, small memory footprint devices. -- Powerful hardware abstraction and configuration using [DeviceTree](https://docs.zephyrproject.org/3.5.0/build/dts/index.html) and [Kconfig](https://docs.zephyrproject.org/3.5.0/build/kconfig/index.html). -- A BLE stack that periodically obtains [qualification](https://docs.zephyrproject.org/3.5.0/connectivity/bluetooth/bluetooth-qual.html) listings, making it easier for final products to obtain qualification from the Bluetooth® SIG. +- Powerful hardware abstraction and configuration using [DeviceTree](https://docs.zephyrproject.org/4.1.0/build/dts/index.html) and [Kconfig](https://docs.zephyrproject.org/4.1.0/build/kconfig/index.html). +- A BLE stack that periodically obtains [qualification](https://docs.zephyrproject.org/4.1.0/connectivity/bluetooth/bluetooth-qual.html) listings, making it easier for final products to obtain qualification from the Bluetooth® SIG. - Multi-processor support, which is critical for power efficiency in upcoming MCUs. - Permissive licensing with its Apache 2.0 open source [license](https://www.apache.org/licenses/LICENSE-2.0). - A buzzing developer [community](https://github.com/zephyrproject-rtos/zephyr) including many leading [embedded technology](https://www.zephyrproject.org/project-members) companies. @@ -37,7 +37,7 @@ ZMK uses the MIT [license](https://github.com/zmkfirmware/zmk/blob/main/LICENSE) ZMK has the potential to run on any platform supported by Zephyr™. However, it’s impractical for the ZMK contributors to test all possible hardware. -The Zephyr™ [documentation](https://docs.zephyrproject.org/3.5.0/boards/index.html) describes which hardware is currently natively supported by the Zephyr™ platform. _Similar documentation covering which keyboards have been integrated into ZMK is currently being planned._ +The Zephyr™ [documentation](https://docs.zephyrproject.org/4.1.0/boards/index.html) describes which hardware is currently natively supported by the Zephyr™ platform. _Similar documentation covering which keyboards have been integrated into ZMK is currently being planned._ ### Does ZMK compile for AVR? @@ -47,38 +47,15 @@ Sorry, Zephyr™ only supports 32-bit and 64-bit platforms. ZMK is still in its infancy, so there’s a learning curve involved. But if you’d like to try it out, please check out the development [documentation](/docs) and the other FAQs. Please keep in mind that the project team is still small, so our support capability is limited whilst we focus on development. But we’ll try our best! Interested developers are also very welcome to contribute! -### What is a “board”? +### What are _boards_ and _shields_? Why not just "keyboard"? -In ZMK, a _board_ defines the _PCB_ that _includes the MCU_. -For keyboards, this is one of two options: - -- Complete keyboard PCBs that include the MCU (e.g. the Planck or Preonic). -- Small MCU boards (e.g. the Proton-C or nice!nano) that expose pins and are designed to be combined with larger keyboard PCBs, or hand wired to switches to create the final keyboard. - -### What is a “shield”? - -In ZMK, a _shield_ is a _PCB_ or _hardwired set of components_ that when combined with an MCU-only [board](#what-is-a-board), like the Proton-C or nice!nano, results in a complete usable keyboard. Examples would be keyboard PCBs like the Kyria or Lily58. The _shield_ is usually the big PCB containing all the keys. - -### Why _boards_ and _shields_? Why not just “keyboard”? - -If you haven't already done so, please read these FAQs first: - -- [What is a “board”?](#what-is-a-board) -- [What is a "shield"?](#what-is-a-shield) - -When a keyboard accepts a small “PCB MCU module” (e.g. _Arduino Pro Micro_) for its “brains”, then it's important to conceptually separate the hardware into a [board](#what-is-a-board) PCB and a [shield](#what-is-a-shield) PCB. - -The [shield](#what-is-a-shield) is a brainless shell containing all the keys, RGB LEDs, encoders etc. It maps all of these features to a standard pin footprint, such as the Pro Micro pinout. - -To bring this brainless [shield](#what-is-a-shield) to life, you attach any MCU [board](#what-is-a-board) matching the footprint. For instance, the _nice!nano_ is _pin-compatible_ with the _Arduino Pro Micro_, so you can substitute either [board](#what-is-a-board) onto the [shield](#what-is-a-shield). But each [board](#what-is-a-board) comes with its own features (MCU, flash, BLE, etc.) which must also be handled. - -Therefore in ZMK, [board](#what-is-a-board) and [shield](#what-is-a-shield) are considered two different (but related) entities so that it’s easier to mix and match them. They are combined during a ZMK build. - -Please note, many keyboards only have a single PCB which includes the “brains” (MCU) onboard. In ZMK, these have no [shield](#what-is-a-shield), only a [board](#what-is-a-board). +ZMK uses the Zephyr concepts of "boards" and "shields" to refer to different parts of a keyboard build, that in turn get combined during a firmware build. +This provides the modularity to be able to use composite keyboards with different compatible controllers. +Please see the [explainer on boards & shields](hardware-integration/index.mdx#boards--shields) for more details. ### Does ZMK support wired split? -Currently, ZMK only supports wireless split, but wired split is possible and we welcome contributions! +Currently, ZMK only supports wireless [split keyboards](features/split-keyboards.md). Experimental wired split support for some specific hardware designs is available for advanced users to test. ### How is the latency? @@ -86,7 +63,7 @@ The latency of ZMK is comparable to other firmware offerings. ZMK is equipped wi ### Any chance for 2.4GHz dongle implementation? -At this time, there are no current plans to implement 2.4GHz dongle mode. This is because utilizing Nordic's proprietary 2.4GHz low level protocols requires use of the Nordic Connect SDK, which is licensed with a more restrictive license than ZMK's MIT license. However, ZMK does plan to implement dongle mode using BLE (with encryption). This will result in a 3.75ms average latency from the protocol itself. +At this time, there are no current plans to implement 2.4GHz dongle mode. This is because utilizing Nordic's proprietary 2.4GHz low level protocols requires use of the Nordic Connect SDK, which is licensed with a more restrictive license than ZMK's MIT license. However, it is possible to [create a dongle](hardware-integration/dongle.mdx) for your keyboard that runs ZMK and communicates between parts using BLE (with encryption). This results in a 3.75ms average theoretical latency from the protocol itself. ### What bootloader does ZMK use? diff --git a/docs/docs/features/battery.md b/docs/docs/features/battery.md index 14dd6661..1a34c02f 100644 --- a/docs/docs/features/battery.md +++ b/docs/docs/features/battery.md @@ -15,25 +15,5 @@ Windows may not properly ask the keyboard to notify it of changes in battery lev ## Adding a Battery Sensor to a Board -To enable a battery sensor on a new board, add the driver for the sensor to your board's `.dts` file. ZMK provides two drivers for estimating the battery level using its voltage: - -- `zmk,battery-voltage-divider`: Reads the voltage on an analog input pin. -- `zmk,battery-nrf-vddh`: Reads the power supply voltage on a Nordic nRF52's VDDH pin. - -See the [battery level configuration page](../config/battery.md) for the configuration supported by each driver provided by ZMK. - -Zephyr also provides some drivers for fuel gauge ICs such as the TI bq274xx series and Maxim MAX17xxx series. If you use a battery sensor that does not have an existing driver, you will need to write a new driver that supports the `SENSOR_CHAN_GAUGE_STATE_OF_CHARGE` sensor channel and contribute it to Zephyr or ZMK. - -Once you have the sensor driver defined, add a `zmk,battery` property to the `chosen` node and set it to reference the sensor node. For example: - -```dts -/ { - chosen { - zmk,battery = &vbatt; - }; - - vbatt: vbatt { - compatible = "zmk,battery-nrf-vddh"; - }; -} -``` +If your keyboard is using one of the [boards supported in ZMK](../hardware.mdx) it will already be configured to sense and report battery levels. +If you are using a custom board, see [battery sensing hardware integration page](../hardware-integration/battery.md) to add support. diff --git a/docs/docs/features/encoders.md b/docs/docs/features/encoders.md index 046973f4..5b128556 100644 --- a/docs/docs/features/encoders.md +++ b/docs/docs/features/encoders.md @@ -41,4 +41,4 @@ Here, the left encoder is configured to control volume up and down while the rig ## Adding Encoder Support -See the [New Keyboard Shield](../development/hardware-integration/new-shield.mdx#encoders) documentation for how to add or modify additional encoders to your shield. +See the [Hardware Integration page for encoders](../hardware-integration/encoders.md) for instructions on adding them to your keyboard. diff --git a/docs/docs/features/led-indicators.md b/docs/docs/features/led-indicators.md new file mode 100644 index 00000000..f017d5cd --- /dev/null +++ b/docs/docs/features/led-indicators.md @@ -0,0 +1,63 @@ +--- +title: LED Indicators +sidebar_label: LED Indicators +--- + +ZMK supports the following five LED indicator states from the HID specification: + +- Num Lock +- Caps Lock +- Scroll Lock +- Compose +- Kana + +If your keyboard supports this feature, ZMK will display some or all of these states on LEDs. + +The default behavior for an indicator LED is as follows: + +- If the keyboard is on battery power and idle, the LED is off. +- If the keyboard is not connected to any host, the LED is off. +- If the indicator state is active, the LED is on at full brightness. +- Otherwise, the LED is off. + +If you want to change these behaviors, you can set properties on the devicetree nodes for each indicator in your `.keymap` file. The conventional node labels for indicators are as follows: + +- `num_lock_indicator` +- `caps_lock_indicator` +- `scroll_lock_indicator` +- `compose_indicator` +- `kana_indicator` + +The examples below all use `caps_lock_indicator`. To edit a different indicator, use the relevant label for that indicator instead. + +## Idle Behavior + +The `on-while-idle` property prevents the LED from turning off when the keyboard on battery power and idle: + +```dts +&caps_lock_indicator { + on-while-idle; +}; +``` + +## LED Brightness + +The `active-brightness`, `inactive-brightness`, and `disconnected-brightness` properties control the brightness of the LED when the indicator is active, indicator is not active, and the keyboard is not connected to any host, respectively. + +For example, if you want the LED to be off when the indicator is active, 100% brightness when inactive, and 50% brightness when not connected: + +```dts +&caps_lock_indicator { + active-brightness = <0>; + inactive-brightness = <100>; + disconnected-brightness = <50>; +}; +``` + +If the LED is not configured to support brightness control, any value greater than 0 will result in maximum brightness. + +For most LEDs, you can enable PWM brightness control, though this will increase power usage slightly. See the [LED indicators hardware integration page](../hardware-integration/lighting/led-indicators.md) for details on configuring the LEDs. + +## Adding LED Indicator Support to a Keyboard + +See the [LED indicators hardware integration page](../hardware-integration/lighting/led-indicators.md) for instructions to enable this feature on a keyboard. diff --git a/docs/docs/features/lighting.md b/docs/docs/features/lighting.md new file mode 100644 index 00000000..2276488e --- /dev/null +++ b/docs/docs/features/lighting.md @@ -0,0 +1,103 @@ +--- +title: Lighting +sidebar_label: Lighting +--- + +ZMK supports two distinct systems in order to control lighting hardware integrated into keyboards. +Your keyboard likely uses only one type, depending on the type of LED hardware it supports: + +- [RGB underglow](#rgb-underglow) system controls LED strips composed of addressable RGB LEDs. + Most keyboards that have multi-color lighting utilizes these. +- [Backlight](#backlight) system controls parallel-connected, non-addressable, single color LEDs. + These are found on keyboards that have a single color backlight that only allows for brightness control. + +:::info + +Although the naming of the systems might imply it, which system you use typically does _not_ depend on the physical location of the LEDs. +Instead, you should use the one that supports the LED hardware type that your keyboard has, as described above. + +::: + +## RGB Underglow + +RGB underglow is a feature used to control "strips" of RGB LEDs. Most of the time this is called underglow and creates a glow underneath the board using a ring of LEDs around the edge, hence the name. However, this can be extended to be used to control anything from a single LED to a long string of LEDs anywhere on the keyboard. + +:::info +RGB underglow can also be used for per-key lighting. If you have RGB LEDs on your keyboard, this is what you want. For PWM/single color LEDs, see [Backlight section below](#backlight). +::: + +ZMK relies on Zephyr's `led-strip` drivers for this feature. The following LEDs/LED families have been implemented: + +- WS2812 (includes WS2812B, WS2813, SK6812, and others) +- APA102 +- LPD880x (includes LPD8803, LPD8806, and others) + +The WS2812 LED family is by far the most popular of these types, so this page will primarily focus on working with it. + +Here you can see the RGB underglow feature in action using WS2812 LEDs. + +
+ +
+ +### Enabling RGB Underglow + +To enable RGB underglow on your board or shield, simply set the `CONFIG_ZMK_RGB_UNDERGLOW` configuration in the `.conf` file for your board or shield. +For example: + +```ini +CONFIG_ZMK_RGB_UNDERGLOW=y +``` + +See [Configuration Overview](../config/index.md) for more instructions on how to use Kconfig. + +If your board or shield does not have RGB underglow configured, refer to the [Adding RGB Underglow Support to a Keyboard](#adding-rgb-underglow-support-to-a-keyboard) section. + +#### Modifying the Number of LEDs + +The number of LEDs specified in the default configuration for your board or shield may not match the number you have installed. For example, the `corne` shield specifies only 10 LEDs per side while supporting up to 27. On a split keyboard, a good sign of this mismatch is if the lit LEDs on each half are symmetrical. + +The `chain-length` property of the `led_strip` node controls the number of underglow LEDs. If it is incorrect for your build, [you can change this property](../config/index.md#changing-devicetree-properties) in your `.keymap` file by adding a stanza like this one outside of any other node (i.e. above or below the `/` node): + +```dts +&led_strip { + chain-length = <21>; +}; +``` + +For split keyboards, set `chain-length` to the number of LEDs installed on each half. + +### Configuring RGB Underglow + +See [RGB underglow configuration](../config/lighting.md#rgb-underglow). + +### Adding RGB Underglow Support to a Keyboard + +See [RGB underglow hardware integration page](../hardware-integration/lighting/underglow.md) on adding underglow support to a ZMK keyboard. + +## Backlight + +Backlight is a feature used to control an array of LEDs, usually placed through or under switches. + +:::info +Unlike [RGB underglow](#rgb-underglow), backlight can only control single color LEDs. Additionally, because backlight LEDs all receive the same power, it's not possible to dim individual LEDs. +::: + +### Enabling Backlight + +To enable backlight on your board or shield, add the following line to your `.conf` file of your user config directory as such: + +```ini +CONFIG_ZMK_BACKLIGHT=y +``` + +If your board or shield does not have backlight configured, refer to [Adding Backlight to a board or a shield](#adding-backlight-to-a-board-or-a-shield). + +### Configuring Backlight + +There are various Kconfig options used to configure the backlight feature. +See [backlight configuration](../config/lighting.md#backlight) for details. + +### Adding Backlight to a Board or a Shield + +See [backlight hardware integration page](../hardware-integration/lighting/backlight.mdx) for information on adding backlight support to a ZMK keyboard. diff --git a/docs/docs/features/low-power-states.md b/docs/docs/features/low-power-states.md new file mode 100644 index 00000000..d428d0eb --- /dev/null +++ b/docs/docs/features/low-power-states.md @@ -0,0 +1,77 @@ +--- +title: Low Power States +sidebar_label: Low Power States +--- + +## Idle + +In the idle state, peripherals such as displays and lighting are disabled, but the keyboard remains connected to Bluetooth so it can immediately respond when you press a key. Idle state is entered automatically after a timeout period that is [30 seconds by default](../config/power.md#low-power-states). + +## Deep Sleep + +In the deep sleep state, the keyboard enters a software power-off state. Among others, this: + +- Disconnects the keyboard from all Bluetooth connections +- Disables any peripherals such as displays and lighting +- If possible, disables external power output +- Clears the contents of RAM, including any unsaved [Studio](studio.md) changes + +This state uses very little power, but it may take a few seconds to reconnect after waking. A [wakeup source](#wakeup-sources) is required to wake from deep sleep. + +### Config + +Deep sleep must be enabled via its corresponding [config](../config/power.md#low-power-states). + +### Wakeup Sources + +Using deep sleep requires `kscan` nodes to have the `wakeup-source` property to enable them to wake the keyboard, e.g.: + +```dts +/ { + kscan: kscan { + compatible = "zmk,kscan-gpio-matrix"; + diode-direction = "col2row"; + wakeup-source; + + ... + }; +}; +``` + +It is recommended to add the `wakeup-source` property to `kscan` devices even if the deep sleep feature is not used -- there is no downside to it. + +## Soft Off + +The soft off feature is used to turn the keyboard on and off explicitly, rather than through a timeout like the deep sleep feature. Depending on the keyboard, this may be through a dedicated on/off push button defined in hardware, or merely through an additional binding in the keymap to turn the device off and an existing reset button to turn the device back on. + +The device enters the same software power-off state as in deep sleep, but is significantly more restrictive in the sources which can wake it. Power is _not_ technically removed from the entire system, unlike a hardware switch. + +The feature is intended as an alternative to using a hardware switch to physically cut power from the battery to the keyboard. This can be useful for existing PCBs not designed for wireless that don't have a power switch, or for new designs that favor a push button on/off like found on other devices. It yields power savings comparable to the deep sleep state. + +A device can be put in the soft off state by: + +- Triggering a hardware-defined dedicated GPIO pin, if one exists; +- Triggering the [soft off behavior](../keymaps/behaviors/soft-off.md) from the keymap. + +Once in the soft off state, the device can only be woken up by: + +- Triggering any GPIO pin specified to enable waking from sleep, if one exists; +- Pressing a reset button found on the device. + +The GPIO pin used to wake from sleep can be a hardware-defined one, such as for a dedicated on-off push button, or it can be a single specific key switch reused for waking up (which may be accidentally pressed, e.g. while the device is being carried in a bag). To allow the simultaneous pressing of multiple key switches to trigger and exit soft off, some keyboards make use of additional hardware to integrate the dedicated GPIO pin into the keyboard matrix. + +### Config + +Soft off must be enabled via [its corresponding config](../config/power.md#low-power-states) before it can be used. + +### Using Soft Off + +If your keyboard has hardware designed to take advantage of soft off, refer to your keyboard's documentation. + +For keyboards which do not have such hardware, using soft off is as simple as placing the [soft off behavior](../keymaps/behaviors/soft-off.md) in your keymap and then invoking it. + +You can then wake up the keyboard by pressing the reset button once, and repeating this for each side for split keyboards. + +### Adding Soft Off to a Keyboard + +Please refer to the [corresponding page under hardware integration](../hardware-integration/soft-off-setup.mdx) for details. diff --git a/docs/docs/features/modules.mdx b/docs/docs/features/modules.mdx index 5cc6e3d1..898c294b 100644 --- a/docs/docs/features/modules.mdx +++ b/docs/docs/features/modules.mdx @@ -6,7 +6,7 @@ sidebar_label: Modules import Tabs from "@theme/Tabs"; import TabItem from "@theme/TabItem"; -ZMK makes use of [Zephyr modules](https://docs.zephyrproject.org/3.5.0/develop/modules.html) to include additional source code or configuration files into its build. You can think of them as similar to plugins or themes. The most common uses of this feature are: +ZMK makes use of [Zephyr modules](https://docs.zephyrproject.org/4.1.0/develop/modules.html) to include additional source code or configuration files into its build. You can think of them as similar to plugins or themes. The most common uses of this feature are: - Building firmware for a keyboard external to ZMK's tree - Adding functionality to ZMK, such as a driver or a behavior @@ -27,11 +27,11 @@ The shift to using modules for keyboards is a relatively recent one, and not all When [using GitHub Actions to build ZMK](../user-setup.mdx), adding modules is as simple as modifying the `west.yml` found in your `zmk-config`'s `config` directory. The recommended way of doing so is: -1. Find the URL base (the parent URL) for the module and add it as an entry to the [remotes](https://docs.zephyrproject.org/3.5.0/develop/west/manifest.html#remotes). -2. Add the module as an entry to the [projects](https://docs.zephyrproject.org/3.5.0/develop/west/manifest.html#projects). +1. Find the URL base (the parent URL) for the module and add it as an entry to the [remotes](https://docs.zephyrproject.org/4.1.0/develop/west/manifest.html#remotes). +2. Add the module as an entry to the [projects](https://docs.zephyrproject.org/4.1.0/develop/west/manifest.html#projects). Aside from the mandatory `name`, `remote`, and the commonly used `revision` properties, take note of the `import` property under `projects`. Some modules may have other modules as dependencies. This property allows the specifying of an additional west manifest file found in the tree of the module, which will automatically import all dependencies. -For more information on `west.yml`, see [West Manifests](https://docs.zephyrproject.org/3.5.0/develop/west/manifest.html). +For more information on `west.yml`, see [West Manifests](https://docs.zephyrproject.org/4.1.0/develop/west/manifest.html). #### Examples @@ -192,3 +192,7 @@ manifest: ### Building Locally When building from a pull request locally, you'll need to [perform the local user setup](../development/local-toolchain/setup/index.md), but using the repository of the pull request rather than the official ZMK repository. You can then [build and flash](../development/local-toolchain/build-flash.mdx) as usual. + +## Creating a ZMK Module + +Please see the dedicated page [here](../development/module-creation.md) for information on creating modules. diff --git a/docs/docs/features/pointing.md b/docs/docs/features/pointing.md new file mode 100644 index 00000000..92772722 --- /dev/null +++ b/docs/docs/features/pointing.md @@ -0,0 +1,39 @@ +--- +title: Pointing Devices +--- + +ZMK supports physical pointing devices, as well as [mouse emulation behaviors](../keymaps/behaviors/mouse-emulation.md) for sending HID pointing events to hosts. + +## Configuration + +To enable the pointer functionality, you must set `CONFIG_ZMK_POINTING=y` in your config. See the [pointer configuration](../config/pointing.md) for the full details. + +:::warning + +When enabling the feature, changes are made to the HID report descriptor which some hosts may not pick up automatically over BLE. Be sure to [remove and re-pair to your hosts](bluetooth.md#refreshing-the-hid-descriptor) once you enable the feature. + +::: + +## Mouse Emulation + +Mouse emulation allows you to use your keyboard as a pointing device without using dedicated pointer hardware, like an integrated trackpad, trackball, etc. By adding new bindings in your keymap like `&mmv MOVE_UP` you can make key presses send mouse HID events to your connected hosts. + +See the [mouse emulation behaviors](../keymaps/behaviors/mouse-emulation.md) for details. + +## Physical Pointing Devices + +There are a few drivers available for supporting physical pointing devices integrated into a ZMK powered device. When doing so, you can use your device as both a keyboard and a pointing device with any connected hosts. The functionality can be extended further, e.g. slow mode, scroll mode, temporary mouse layers, etc. by configuring [input processors](#input-processors) linked to the physical pointing device. + +For more information, refer to the [pointer hardware integration](../hardware-integration/pointing.mdx) documentation. + +## Input Processors + +Input processors are small pieces of functionality that process and optionally modify events generated from emulated and physical pointing devices. Processors can do things like scaling movement values to make them larger or smaller for detailed work, swapping the event types to turn movements into scroll events, or temporarily enabling an extra layer while the pointer is in use. + +For more details, see the [input processors](../keymaps/input-processors/index.md) section of the keymap documentation. + +## Input Listeners + +Listeners are the key piece that integrate the low level input devices to the rest of the ZMK system. In particular, listeners subscribe to input events from the linked device, and when a given event occurs (e.g. X/Y movement), apply any input processors before sending those events to the HID system for notification to the host. The main way to modify the way a pointer behaves is by configuring the input processors for a given listener. + +For more details on assigning processors to your listeners, see the [input processor usage](../keymaps/input-processors/usage.md) documentation. diff --git a/docs/docs/features/soft-off.md b/docs/docs/features/soft-off.md deleted file mode 100644 index 35852a58..00000000 --- a/docs/docs/features/soft-off.md +++ /dev/null @@ -1,275 +0,0 @@ ---- -title: Soft Off Feature -sidebar_label: Soft Off ---- - -Similar to the deep sleep feature that sends the keyboard into a low power state after a certain period of inactivity, the soft off feature is used to turn the keyboard on and off explicitly. Depending on the keyboard, this may be through a dedicated on/off push button, or merely through an additional binding in the keymap to turn the device off and the existing reset button to turn the device back on. - -The feature is intended as an alternative to using a hardware switch to physically cut power from the battery to the keyboard. This can be useful for existing PCBs not designed for wireless that don't have a power switch, or for new designs that favor a push button on/off like found on other devices. - -:::note - -The power off is accomplished by putting the MCU into a "soft off" state. Power is _not_ technically removed from the entire system, but the device will only be woken from the state by a few possible events. - -::: - -Once powered off, the keyboard will only wake up when: - -- You press the same button/sequence that you pressed to power off the keyboard, or -- You press a reset button found on the keyboard. - -## Config - -Refer to the [soft off config](../config/power.md#soft-off) for details on enabling soft off. - -## Soft Off With Existing Designs - -For existing designs, using soft off is as simple as placing the [Soft Off Behavior](../keymaps/behaviors/soft-off.md) in your keymap and then invoking it. - -You can then wake up the keyboard by pressing the reset button once, and repeating this for each side for split keyboards. - -## Hardware Changes For New Designs - -ZMK's dedicated soft on/off pin feature requires a dedicated GPIO pin to be used to trigger powering off, and to wake the core from the -soft off state when it goes active again later. - -### Simple Direct Pin - -The simplest way to achieve this is with a push button between a GPIO pin and ground. - -### Matrix-Integrated Hardware Combo - -Another, more complicated option is to tie two of the switch outputs in the matrix together through an AND gate and connect that to the dedicated GPIO pin. This way you can use a key combination in your existing keyboard matrix to trigger soft on/off. To make this work best, the two switches used should both be driven by the same matrix input pin so that both will be active simultaneously on the AND gate inputs. The alternative is to connect the switch to two MOSFETs that trigger both the regular matrix connect and the connect to the AND gate to ensure both pins are active/high at the same time even if scanning sets them high at different times. - -## Firmware Changes For New Designs - -Several items work together to make both triggering soft off properly, and setting up the device to _wake_ from soft off work as expected. In addition, some small changes are needed to keep the regular idle deep sleep functionality working. - -### Wakeup Sources - -Zephyr has general support for the concept of a device as a "wakeup source", which ZMK has not previously used. Adding soft off requires properly updating the existing `kscan` devices with the `wakeup-source` property to ensure they will still work to wake the device from regular inactive deep sleep, e.g.: - -``` -/ { - kscan0: kscan_0 { - compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; - diode-direction = "col2row"; - wakeup-source; - - ... - }; -}; -``` - -### GPIO Key - -Zephyr's basic GPIO Key concept is used to configure the GPIO pin that will be used for both triggering soft off and waking the device later. Here is an example for a keyboard with a dedicated on/off push button that is a direct wire between the GPIO pin and ground: - -``` -/ { - keys { - compatible = "gpio-keys"; - soft_off_key: soft_off_key { - gpios = <&gpio0 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; - }; - }; -}; -``` - -GPIO keys are defined using child nodes under the `gpio-keys` compatible node. Each child needs just one property defined: - -- The `gpios` property should be a phandle-array with a fully defined GPIO pin and with the correct pull up/down and active high/low flags set. In the above example the soft on/off would be triggered by pulling the specified pin low, typically by pressing a switch that has the other leg connected to ground. - -### Soft Off Behavior Instance - -To use the [soft off behavior](../keymaps/behaviors/soft-off.md) outside of a keymap, add an instance of the behavior to your `.overlay`/`.dts` file: - -``` -/ { - behaviors { - hw_soft_off: hw_soft_off { - compatible = "zmk,behavior-soft-off"; - #binding-cells = <0>; - hold-time-ms = <5000>; - }; - }; -}; -``` - -### KScan Sideband Behavior - -The kscan sideband behavior driver will be used to trigger the [soft off behavior](../keymaps/behaviors/soft-off.md) "out of band" from the normal keymap processing. To do so, it will decorate/wrap an underlying kscan driver. What kscan driver will vary for simple direct pin vs. matrix-integrated hardware combo. - -#### Simple direct pin - -With a simple direct pin setup, the The [direct kscan](../config/kscan.md) driver can be used with a GPIO key, to make a small "side matrix": - -``` - soft_off_direct_scan: soft_off_direct_scan { - compatible = "zmk,kscan-gpio-direct"; - input-keys = <&on_off_key>; - wakeup-source; - }; -``` - -With that in place, the kscan sideband behavior will wrap the new driver: - -``` -/ { - side_band_behavior_triggers: side_band_behavior_triggers { - compatible = "zmk,kscan-sideband-behaviors"; - - kscan = <&soft_off_direct_scan>; - auto-enable; - wakeup-source; - - soft_off { - column = <0>; - row = <0>; - bindings = <&hw_soft_off>; - }; - }; -}; -``` - -Finally, we will list the kscan instance in an additional configuration section so that the ZMK soft off process knows it needs to enable this device as part of the soft off processing so it can _also_ wake the keyboard from soft off when pressed: - -``` -/ { - soft_off_wakers { - compatible = "zmk,soft-off-wakeup-sources"; - wakeup-sources = <&soft_off_direct_scan>; - }; -}; -``` - -Here are the properties for the node: - -- The `compatible` property for the node must be `zmk,soft-off-wakeup-sources`. -- The `wakeup-sources` property is a [phandle array](../config/index.md#devicetree-property-types) pointing to all the devices that should be enabled during the shutdown process to be sure they can later wake the keyboard. - -#### Matrix-integrated hardware combo - -For this case, you will supplement the existing kscan matrix, by adding the additional pin as another entry in -the `row-gpios`/`col-gpios` for whichever pins are used to read the matrix state. For example, for an existing matrix like: - -``` - kscan: kscan { - compatible = "zmk,kscan-gpio-matrix"; - wakeup-source; - label = "KSCAN"; - debounce-press-ms = <1>; - debounce-release-ms = <5>; - - diode-direction = "col2row"; - - col-gpios - = <&gpio0 12 (GPIO_ACTIVE_HIGH)> - , <&gpio1 9 (GPIO_ACTIVE_HIGH)> - ; - row-gpios - = <&gpio0 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpio0 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - ; - }; -``` - -you would add another row value: - -``` - kscan: kscan { - compatible = "zmk,kscan-gpio-matrix"; - wakeup-source; - label = "KSCAN"; - debounce-press-ms = <1>; - debounce-release-ms = <5>; - - diode-direction = "col2row"; - - col-gpios - = <&gpio0 12 (GPIO_ACTIVE_HIGH)> - , <&gpio1 9 (GPIO_ACTIVE_HIGH)> - ; - row-gpios - = <&gpio0 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpio0 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpio0 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - ; - }; -``` - -With that in place, you would decorate the kscan driver: - -``` - side_band_behavior_triggers: side_band_behavior_triggers { - compatible = "zmk,kscan-sideband-behaviors"; - wakeup-source; - kscan = <&kscan>; - soft_off { - column = <0>; - row = <3>; - bindings = <&hw_soft_off>; - }; - }; -``` - -Critically, the `column` and `row` values would correspond to the location of the added entry. - -Lastly, which is critical, you would update the `zmk,kscan` chosen value to point to the new kscan instance: - -``` - chosen { - ... - zmk,kscan = &side_band_behavior_triggers; - ... - }; -``` - -Here are the properties for the kscan sideband behaviors node: - -- The `compatible` property for the node must be `zmk,kscan-sideband-behaviors`. -- The `kscan` property is a phandle to the inner kscan instance that will have press/release events intercepted. - -The child nodes allow setting up the behaviors to invoke directly for a certain row and column: - -- The `row` and `column` properties set the values to intercept and trigger the behavior for. -- The `bindings` property references the behavior that should be triggered when the matching row and column event triggers. - -### Soft Off Waker - -Next, we need to add another device which will be enabled only when the keyboard is going into soft off state, and will configure the previously declared GPIO key with the correct interrupt configuration to wake the device from soft off once it is pressed. - -``` -/ { - wakeup_source: wakeup_source { - compatible = "zmk,gpio-key-wakeup-trigger"; - - trigger = <&on_off_key>; - wakeup-source; - }; -}; -``` - -Here are the properties for the node: - -- The `compatible` property for the node must be `zmk,gpio-key-wakeup-trigger`. -- The `trigger` property is a phandle to the GPIO key defined earlier. -- The `wakeup-source` property signals to Zephyr this device should not be suspended during the shutdown procedure. -- An optional `extra-gpios` property contains a list of GPIO pins (including the appropriate flags) to set active before going into power off, if needed to ensure the GPIO pin will trigger properly to wake the keyboard. This is only needed for matrix integrated combos. For those keyboards, the list should include the matrix output needs needed so the combo hardware is properly "driven" when the keyboard is off. - -Once that is declared, we will list it in an additional configuration section so that the ZMK soft off process knows it needs to enable this device as part of the soft off processing: - -``` -/ { - soft_off_wakers { - compatible = "zmk,soft-off-wakeup-sources"; - wakeup-sources = <&wakeup_source>; - }; -}; -``` - -Here are the properties for the node: - -- The `compatible` property for the node must be `zmk,soft-off-wakeup-sources`. -- The `wakeup-sources` property is a [phandle array](../config/index.md#devicetree-property-types) pointing to all the devices that should be enabled during the shutdown process to be sure they can later wake the keyboard. diff --git a/docs/docs/features/split-keyboards.md b/docs/docs/features/split-keyboards.md index 8c69d51a..1f3e6675 100644 --- a/docs/docs/features/split-keyboards.md +++ b/docs/docs/features/split-keyboards.md @@ -5,17 +5,10 @@ sidebar_label: Split Keyboards ZMK supports setups where a keyboard is split into two or more physical parts (also called "sides" or "halves" when split in two), each with their own controller running ZMK. The parts communicate with each other to work as a single keyboard device. -:::note[Split communication protocols] -Currently ZMK only supports split keyboards that communicate with each other wirelessly over BLE. -As such, only controllers that support BLE can be used with ZMK split keyboards. - -Supporting split communication over wired protocols is planned, allowing for ZMK split keyboards using non-wireless controllers. -::: - ## Central and Peripheral Roles In split keyboards running ZMK, one part is assigned the "central" role which receives key position and sensor events from the other parts that are called "peripherals." -The central runs the necessary keymap logic to convert received events into HID events such as keycodes and then communicates with the connected host devices, e.g. over USB or bluetooth. +The central runs the necessary keymap logic to convert received events into HID events such as keycodes and then communicates with the connected host devices, e.g. over USB or bluetooth. If the keyboard makes use of a [dongle](../hardware-integration/dongle.mdx), then the dongle takes on the role of central. The internal keyboard state (like active layers) is handled exclusively by the central. Peripherals _cannot_ communicate with host devices on their own, since they can only communicate with the central. @@ -30,15 +23,49 @@ You can refer to the [power profiler](/power-profiler) to see battery life estim ### Configuration -The [new shield guide](../development/hardware-integration/new-shield.mdx) details how to define a split keyboard shield with two parts, enabling the split feature and setting up the necessary roles for each part. +The [new shield guide](../hardware-integration/new-shield.mdx) details how to define a split keyboard shield with two parts, enabling the split feature and setting up the necessary roles for each part. -Also see the reference section on [split keyboards configuration](../config/system.md#split-keyboards) where the relevant symbols include `CONFIG_ZMK_SPLIT` that enables the feature, `CONFIG_ZMK_SPLIT_ROLE_CENTRAL` which sets the central role and `CONFIG_ZMK_SPLIT_BLE_CENTRAL_PERIPHERALS` that sets the number of peripherals. +Also see the reference section on [split keyboards configuration](../config/split.md) where the relevant symbols include `CONFIG_ZMK_SPLIT` that enables the feature, `CONFIG_ZMK_SPLIT_ROLE_CENTRAL` which sets the central role and `CONFIG_ZMK_SPLIT_BLE_CENTRAL_PERIPHERALS` that sets the number of peripherals. ### Latency Considerations Since peripherals communicate through centrals, the key and sensor events originating from them will naturally have a larger latency, especially with a wireless split communication protocol. For the currently used BLE-based transport, split communication increases the average latency by 3.75ms with a worst case increase of 7.5ms. +## Split Transports + +ZMK supports two transports for connecting split parts: Bluetooth and full-duplex wired UART. Only one transport can be active at a time, so designs involving some portions connected via Bluetooth and others via full-duplex wired are _not_ supported. + +:::warning[Hot Plugging Cables] + +Many popular cables, in particular, TRRS/TRS cables, can cause irreparable damage to controllers if they are inserted or removed when power is already present on them. Whether or not you are using the wired split functionality or not, _never_ insert or remove such a cable when a controller is powered by USB _or_ battery. + +::: + +### Bluetooth + +[Bluetooth](./bluetooth.md) is the most well tested and flexible transport available in ZMK. Using Bluetooth, a central can connect to multiple peripherals, enabling the use of a [dongle](../hardware-integration/dongle.mdx) to improve battery life, or allowing for multi-part split keyboards. + +This transport will be enabled for designs that set `CONFIG_ZMK_SPLIT=y` and have `CONFIG_ZMK_BLE=y` set by a supported MCU/controller. + +### Full-Duplex Wired (UART) + +The full-duplex wired UART transport is a recent addition, and is intended for testing by early adopters. It allows for fully functional communication between one central and one peripheral. Unlike the Bluetooth transport, the central cannot currently have more than one peripheral connected via wired split. + +This transport will be enabled for designs that set `CONFIG_ZMK_SPLIT=y` and have a node with `compatible = "zmk,wired-split";` present in their devicetree configuration. + +:::note[Full Duplex vs Half Duplex] +Full-duplex UART requires the use of two wires connecting the halves. Future half-duplex (single-wire) UART support, which is planned, will allow using wired ZMK with designs such as the Corne, Sweep, etc. that use only a single GPIO pin for bidirectional communication between split sides. + +Until half-duplex support is completed, those particular designs will not work with the wired split transport, and can only be used with the Bluetooth transport. +::: + +### Runtime Switching + +ZMK features highly experimental support for switching between the two available transports. This requires specially designed hardware, and attempting to use this feature on a keyboard not explicitly designed for it (e.g. Corne, Sofle) _WILL_ cause permanent damage. + +Currently, there are no open source/reference designs that implement this functionality, and only experienced designers with extensive EE knowledge should attempt to implement a design with this functionality. + ## Building and Flashing Firmware ZMK split keyboards require building and flashing different firmware files for each split part. @@ -60,7 +87,7 @@ Similar to how [bluetooth profiles](bluetooth.md) are managed between the keyboa In practice, this means that your split keyboard parts will automatically pair and work the first time they are all on at the same time. However, if this process somehow went wrong or you used controllers in a different split keyboard configuration before, you will need to explicitly clear the stored bond information so that the parts can pair properly. -For this, please follow [the specified procedure](../troubleshooting/connection-issues.mdx#split-keyboard-halves-unable-to-pair) in the troubleshooting section. +For this, please follow [the specified procedure](../troubleshooting/connection-issues.mdx#split-keyboard-parts-unable-to-pair) in the troubleshooting section. :::warning If the central keyboard part is either advertising for a pairing or waiting for disconnected peripherals, it will consume more power and drain batteries faster. @@ -86,11 +113,6 @@ These behaviors only affect the keyboard part that they are invoked from: - [Reset behaviors](../keymaps/behaviors/reset.md) -:::warning[Nesting behaviors with locality] -Currently there is [an issue](https://github.com/zmkfirmware/zmk/issues/1494) preventing both global and source locality behaviors from working as expected if they are invoked from another behavior, such as a hold-tap, tap dance or a mod-morph. -For this reason it is recommended that these behaviors are placed directly on a keymap layer. -::: - :::note[Peripheral invocation] Peripherals must be paired and connected to the central in order to be able to activate these behaviors, even if it is possible to trigger the behavior using only keys on a particular peripheral. This is because the key bindings are processed on the central side which would then instruct the peripheral side to run the behavior's effect. diff --git a/docs/docs/features/studio.md b/docs/docs/features/studio.md index f8d4059b..19760245 100644 --- a/docs/docs/features/studio.md +++ b/docs/docs/features/studio.md @@ -2,13 +2,74 @@ title: ZMK Studio --- -:::warning[Alpha Feature] +ZMK Studio provides runtime update functionality to ZMK powered devices, allowing users to change their keymap layers without flashing new firmware to their keyboards. -ZMK Studio support is in alpha. Although best efforts are being made, keeping compatibility during active development is not guaranteed. +:::info + +To use ZMK Studio, a keyboard needs to be [configured appropriately](#adding-zmk-studio-support-to-a-keyboard). ZMK has updated some, but not all, of its in-tree keyboards for use with ZMK Studio, the list of which can be found in the [ZMK Studio blog post](/blog/2024/11/11/zmk-studio-mvp-ga). If your keyboard is supported by an external module/config, check with the maintainer to see if support has been added. ::: -ZMK Studio provides runtime update functionality to ZMK powered devices, allowing users to change their keymap layers without flashing new firmware to their keyboards. Studio is still under active development, and is not yet ready for casual end user use. +## Capabilities + +ZMK Studio currently has the following capabilities: + +| Legend: | ✅ Supported | 🚧 Under Development | 💡 Planned | 🕯️ Low Priority | ❌ Not Planned | +| :------ | :----------- | :------------------- | :--------- | :-------------- | -------------- | + +| Status | Feature/Capability | +| :----: | ----------------------------------------------------------------------------------------------------------------------------------------- | +| ✅ | Making keymap changes while keyboard is in use | +| ✅ | Making changes while connected via USB | +| ✅ | Native app for: Windows, Linux, MacOS | +| ✅ | Making changes while connected via BLE (Linux web-app & native apps only) | +| ✅ | Assigning [predefined behaviors](../keymaps/behaviors/index.mdx) to keys | +| ✅ | Assigning [user-defined behaviors](../keymaps/behaviors/index.mdx#user-defined-behaviors) to keys | +| 💡 | [Configuring basic behavior properties](../config/behaviors.md) | +| 💡 | Configuring advanced behavior properties, e.g. [tap dance](../keymaps/behaviors/tap-dance.mdx), [macros](../keymaps/behaviors/macros.md), | +| ❌ | Defining new behaviors not specified in devicetree | +| 💡 | Configuring [combos](../keymaps/combos.md) | +| 💡 | Configuring [conditional layers](../keymaps/conditional-layers.md) | +| 🕯️ | Assigning behaviors to encoders | +| ✅ | Selecting alternative pre-defined physical layouts for the keyboard | +| ❌ | Defining new physical layouts for the keyboard | +| ✅ | Renaming layers & enabling [extra layers](#including-extra-layers) | +| ❌ | Adding more layers than specified by devicetree | +| 💡 | Host locale selection | +| 💡 | Importing and exporting keymaps | + +Items listed as "planned", "under development", "low priority", or "not planned" can be configured using [devicetree](../config/index.md#devicetree-files) instead. + +## Keymap Changes + +To unlock your keyboard to allow ZMK Studio to make changes, you'll need to add a [`&studio_unlock`](../keymaps/behaviors/studio-unlock.md) binding to the keymap. + +:::note + +Once using ZMK Studio to manage your keymap, any future changes made to the `.keymap` file for your keyboard will not be applied unless you perform a "Restore Stock Settings" action from the ZMK Studio UI. + +Generally, if you intend to use ZMK Studio, then you should not make any further changes to the `.keymap` file (with the exception of adding new empty layers to then use within ZMK Studio). + +::: + +## Accessing ZMK Studio + +You can use ZMK Studio with Chrome/Edge at . + +To use the native app for Linux, macOS, or Windows, visit the [download page](https://zmk.studio/download). + +:::warning + +To use ZMK Studio over USB, you need permission to access the USB serial port. This most commonly occurs on Linux, with various distributions having different methods of resolving the error. For example, you may need to be added to a `uucp` or a `dialout` group. Refer to your operating system's documentation for more information. + +::: + +:::note + +If you are connected to the computer over both USB and BLE endpoints, you should set the keyboard output to the same endpoint that you connect to ZMK Studio using. +For example, if you are connecting to ZMK Studio over USB, ensure that USB output is selected by invoking the `&out OUT_USB` [behavior](../keymaps/behaviors/outputs.md). + +::: ## Building @@ -19,30 +80,27 @@ Building for ZMK Studio involves two main additional items. ### GitHub Actions -First add a `studio-rpc-usb-uart` to the `snippet` property of your build configuration. For a split keyboard, you should do this _only_ for your central/left side, e.g.: +Add a `studio-rpc-usb-uart` to the `snippet` property of your build configuration, in the `build.yaml` file at the root of your user config. Enabling the `ZMK_STUDIO` Kconfig setting can also be done from the `build.yaml` file using the `cmake-args` property. -``` +For a split keyboard, you should do this _only_ for your central/left side, e.g.: + +```yaml title="build.yaml" --- include: - - board: nice_nano_v2 + - board: nice_nano shield: corne_left snippet: studio-rpc-usb-uart - - board: nice_nano_v2 + cmake-args: -DCONFIG_ZMK_STUDIO=y + - board: nice_nano shield: corne_right ``` -Next, enable the `ZMK_STUDIO` Kconfig symbol, for example by adding the following line to your .conf file: - -``` -CONFIG_ZMK_STUDIO=y -``` - ### Local Build When building locally, use the `-S` parameter to include the `studio-rpc-usb-uart` snippet. Instead of adding it to your config file, you can also append the `ZMK_STUDIO` Kconfig as an additional CMake argument, e.g.: ```bash -west build -d build/cl_studio -b nice_nano_v2 \ +west build -d build/cl_studio -b nice_nano \ -S studio-rpc-usb-uart -- -DSHIELD=corne_left -DCONFIG_ZMK_STUDIO=y ``` @@ -109,3 +167,17 @@ By default, a build with ZMK Studio enabled will only allow as many layers as ar ``` The reserved layers will be ignored during regular ZMK builds but will become available for ZMK Studio enabled builds. + +## Adding ZMK Studio Support to a Keyboard + +To allow ZMK Studio to be used with a keyboard, the keyboard will need to have a physical layout with the `keys` property defined. The keyboard should also **not** have a `chosen` `zmk,matrix-transform`. Relevant information can be found in: + +- The [dedicated page on physical layouts](../hardware-integration/physical-layouts.md), informing you how to define one +- The [new shield guide](../hardware-integration/new-shield.mdx), informing you how to select a physical layout once defined +- The corresponding [configuration page](../config/layout.md#physical-layout), for reference + +To use the `studio-rpc-usb-uart` snippet, the keyboard also needs to be configured to allow CDC-ACM console snippets (this is also used for [USB logging](../development/usb-logging.mdx)). If your keyboard is a composite keyboard, consisting of an in-tree board and a shield, then you can skip this step as the board will already be configured properly. Relevant information on that can be found [in the Zephyr documentation](https://docs.zephyrproject.org/4.1.0/snippets/cdc-acm-console/README.html). + +Firmware with ZMK Studio enabled require significantly more RAM. Some MCUs, such as the STM32F072 series, will require fine tuning of various settings in order to reduce the RAM consumption enough for a Studio enabled build to fit. + +Finally, once you have successfully built and tested firmware with ZMK Studio enabled, add the `studio` flag to your keyboard's [metadata](../hardware-integration/hardware-metadata-files#features). diff --git a/docs/docs/features/underglow.md b/docs/docs/features/underglow.md deleted file mode 100644 index ba6c0092..00000000 --- a/docs/docs/features/underglow.md +++ /dev/null @@ -1,176 +0,0 @@ ---- -title: RGB Underglow -sidebar_label: RGB Underglow ---- - -RGB underglow is a feature used to control "strips" of RGB LEDs. Most of the time this is called underglow and creates a glow underneath the board using a ring of LEDs around the edge, hence the name. However, this can be extended to be used to control anything from a single LED to a long string of LEDs anywhere on the keyboard. - -:::info -RGB underglow can also be used for under-key lighting. If you have RGB LEDs on your keyboard, this is what you want. For PWM/single color LEDs, see [Backlight](backlight.mdx). -::: - -ZMK supports all the RGB LEDs supported by Zephyr. Here's the current list supported: - -- WS2812-ish (WS2812B, WS2813, SK6812, or compatible) -- APA102 -- LPD880x (LPD8803, LPD8806, or compatible) - -Of the compatible types, the WS2812 LED family is by far the most popular type. Currently each of these types of LEDs are expected to be run using SPI with a couple of exceptions. - -Here you can see the RGB underglow feature in action using WS2812 LEDs. - -
- -
- -## Enabling RGB Underglow - -To enable RGB underglow on your board or shield, simply enable the `CONFIG_ZMK_RGB_UNDERGLOW` and `CONFIG_*_STRIP` configuration values in the `.conf` file for your board or shield. -For example: - -```ini -CONFIG_ZMK_RGB_UNDERGLOW=y -# Use the STRIP config specific to the LEDs you're using -CONFIG_WS2812_STRIP=y -``` - -See [Configuration Overview](/docs/config) for more instructions on how to -use Kconfig. - -If your board or shield does not have RGB underglow configured, refer to [Adding RGB Underglow to a Board](#adding-rgb-underglow-to-a-board). - -### Modifying the Number of LEDs - -A common issue when enabling underglow is that some of the installed LEDs do not illuminate. This can happen when a board's default underglow configuration accounts only for either the downward facing LEDs or the upward facing LEDs under each key. On a split keyboard, a good sign that this may be the problem is that the unilluminated LEDs on each half are symmetrical. - -The number of underglow LEDs is controlled by the `chain-length` property in the `led_strip` node. You can [change the value of this property](../config/index.md#changing-devicetree-properties) in the `.keymap` file by adding a stanza like this one outside of any other node (i.e. above or below the `/` node): - -```dts -&led_strip { - chain-length = <21>; -}; -``` - -where the value is the total count of LEDs (per half, for split keyboards). - -## Configuring RGB Underglow - -See [RGB underglow configuration](/docs/config/underglow). - -## Adding RGB Underglow to a Board - -RGB underglow is always added to a board, not a shield. This is a consequence of needing to configure SPI to control the LEDs. -If you have a shield with RGB underglow, you must add a `boards/` directory within your shield folder to define the RGB underglow individually for each board that supports the shield. -Inside the `boards/` folder, you define a `.overlay` for each different board. -For example, the Kyria shield has a `boards/nice_nano.overlay` file that defines the RGB underglow for the `nice_nano` board specifically. - -### nRF52-Based Boards - -With nRF52 boards, you can just use `&spi3` and define the pins you want to use. - -Here's an example on a definition that uses P0.06: - -```dts -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; -}; - -&spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; - - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; - - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; - - /* WS2812 */ - chain-length = <10>; /* number of LEDs */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; - color-mapping = ; - }; -}; -``` - -:::info - -If you are configuring SPI for an nRF52 based board, double check that you are using pins that aren't restricted to low frequency I/O. -Ignoring these restrictions may result in poor wireless performance. You can find the list of low frequency I/O pins for the nRF52840 [here](https://infocenter.nordicsemi.com/index.jsp?topic=%2Fps_nrf52840%2Fpin.html&cp=4_0_0_6_0). - -::: - -:::note - -Standard WS2812 LEDs use a wire protocol where the bits for the colors green, red, and blue values are sent in that order. -If your board/shield uses LEDs that require the data sent in a different order, the `color-mapping` property ordering should be changed to match. - -::: - -### Other Boards - -For other boards, you must select an SPI definition that has the `MOSI` pin as your data pin going to your LED strip. - -Here's another example for a non-nRF52 board on `spi3`: - -```dts -#include - -&spi3 { - - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - - /* SPI */ - reg = <0>; - spi-max-frequency = <5250000>; - - /* WS2812 */ - chain-length = <10>; /* number of LEDs */ - spi-one-frame = <0x70>; /* make sure to configure this properly for your SOC */ - spi-zero-frame = <0x40>; /* make sure to configure this properly for your SOC */ - color-mapping = ; - }; -}; -``` - -Once you have your `led_strip` properly defined you need to add it to the root devicetree node `chosen` element: - -```dts -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; -``` - -Finally you need to enable the `CONFIG_ZMK_RGB_UNDERGLOW` and `CONFIG_*_STRIP` configuration values in the `.conf` file of your board (or set a default in the `Kconfig.defconfig`): - -```ini -CONFIG_ZMK_RGB_UNDERGLOW=y -# Use the STRIP config specific to the LEDs you're using -CONFIG_WS2812_STRIP=y -``` diff --git a/docs/docs/hardware-integration/battery.md b/docs/docs/hardware-integration/battery.md new file mode 100644 index 00000000..9b717baf --- /dev/null +++ b/docs/docs/hardware-integration/battery.md @@ -0,0 +1,30 @@ +--- +title: Battery Sensing +sidebar_label: Battery Sensing +--- + +If your keyboard is using one of the [boards supported in ZMK](../hardware.mdx) it will already be configured to [sense and report battery levels](../features/battery.md). +Below instructions are only intended for users defining and using a custom board. + +To enable a battery sensor on a new board, add the driver for the sensor to your board's `.dts` file. ZMK provides two drivers for estimating the battery level using its voltage: + +- `zmk,battery-voltage-divider`: Reads the voltage on an analog input pin. +- `zmk,battery-nrf-vddh`: Reads the power supply voltage on a Nordic nRF52's VDDH pin. + +See the [battery level configuration page](../config/battery.md) for the configuration supported by each driver provided by ZMK. + +Zephyr also provides some drivers for fuel gauge ICs such as the TI bq274xx series and Maxim MAX17xxx series. If you use a battery sensor that does not have an existing driver, you will need to write a new driver that supports the `SENSOR_CHAN_GAUGE_STATE_OF_CHARGE` sensor channel and contribute it to Zephyr or ZMK. + +Once you have the sensor driver defined, add a `zmk,battery` property to the `chosen` node and set it to reference the sensor node. For example: + +```dts +/ { + chosen { + zmk,battery = &vbatt; + }; + + vbatt: vbatt { + compatible = "zmk,battery-nrf-vddh"; + }; +} +``` diff --git a/docs/docs/hardware-integration/bootloader/_base-config.md b/docs/docs/hardware-integration/bootloader/_base-config.md new file mode 100644 index 00000000..3172ec9f --- /dev/null +++ b/docs/docs/hardware-integration/bootloader/_base-config.md @@ -0,0 +1,13 @@ +## Kconfig Symbol Enablement + +Three Kconfig symbols need to be enabled for this feature to work, namely `RETAINED_MEM`, `RETENTION`, and `RETENTION_BOOT_MODE`. Typically, this is done by `imply`ing the symbols for the board symbol in the `Kconfig.`, file, e.g.: + +```dts +config BOARD_TOFU65 + select SOC_RP2040 + imply RETAINED_MEM + imply RETENTION + imply RETENTION_BOOT_MODE +``` + +By using `imply` at the board level, users of the board can choose to override the setting and disable the feature if they so choose. diff --git a/docs/docs/hardware-integration/bootloader/adafruit-nrf52.mdx b/docs/docs/hardware-integration/bootloader/adafruit-nrf52.mdx new file mode 100644 index 00000000..0e06ea7e --- /dev/null +++ b/docs/docs/hardware-integration/bootloader/adafruit-nrf52.mdx @@ -0,0 +1,84 @@ +--- +title: Adafuit nRF52 Bootloader +sidebar_label: Adafuit nRF52 +--- + +import BaseConfig from "./_base-config.md"; + +The [Adafruit nRF52 Bootloader](https://github.com/adafruit/Adafruit_nRF52_Bootloader/) is a [magic value type bootloader](./index.mdx#magic-value-bootloaders), with some extra setup used to integrate with it. + + + +## Magic Value Type Kconfig + +In addition to the core Kconfig symbols already set up, one additional Kconfig choice needs to be set, e.g. in `Kconfig.defaults` for the board: + +``` +choice ZMK_BOOTMODE_MAGIC_VALUE_BOOTLOADER_TYPE + default ZMK_BOOTMODE_MAGIC_VALUE_BOOTLOADER_TYPE_ADAFRUIT_NRF52 + +endchoice +``` + +This ensures the correct magic value is stored in the retained memory. + +## Devicetree Simple Include + +A simple shared file can be included in your board's devicetree to set up the retained memory and retention nodes. Near the top of your file, add an include for `common/nordic/nrf52840_uf2_boot_mode.dtsi`, e.g.: + +```dts +/dts-v1/; + +#include +#include +``` + +## Devicetree Manual Changes + +### GPREGRET Setup + +Nordic nRF52840 has a dedicated register that can be used to store data to persist across resets. Zephyr has a retained mem driver over this register, so we'll add the boot mode retention to that existing node: + +```dts +&gpregret1 { + adafruit_boot_retention: retention@0 { + compatible = "zephyr,retention"; + status = "okay"; + reg = <0x0 0x1>; + }; +}; +``` + +### Magic Value Mapper + +Next, we'll set up our mapping retained mem driver, which will map from the Zephyr boot mode values to the values the bootloader is looking for: + +```dts +/ { + magic_mapper { + compatible = "zmk,bootmode-to-magic-mapper"; + status = "okay"; + + #address-cells = <1>; + #size-cells = <1>; + + boot_retention: retention@0 { + compatible = "zephyr,retention"; + status = "okay"; + reg = <0x0 0x1>; + }; + }; +}; +``` + +### Chosen Node Properties + +Finally, we'll assign two `chosen` properties for the two nodes that have been defined: + +```dts +/ { + chosen { + zephyr,boot-mode = &boot_retention; + zmk,magic-boot-mode = &adafruit_boot_retention; + }; +``` diff --git a/docs/docs/hardware-integration/bootloader/index.mdx b/docs/docs/hardware-integration/bootloader/index.mdx new file mode 100644 index 00000000..5190c04b --- /dev/null +++ b/docs/docs/hardware-integration/bootloader/index.mdx @@ -0,0 +1,31 @@ +--- +title: Bootloader Integration +sidebar_label: Bootloader +--- + +:::info +The information on this page is only relevant for **boards**, not **shields**. +::: + +The `&bootloader` behavior requires properly set up [boot mode](https://docs.zephyrproject.org/4.1.0/services/retention/index.html#boot-mode) support to function properly. The behavior operates by setting the boot mode, resetting, and then relies on an SoC/bootloader specific early init hook to enter the bootloader when the boot mode is found to have been set. + +Most of the SoCs actively supported by ZMK rely on a generic retained memory driver to store the boot mode between restarts, and additional configuration is required when using a second stage bootloader like the [Adafruit nRF52 Bootloader](https://github.com/adafruit/Adafruit_nRF52_Bootloader/) or [tinyuf2](https://github.com/adafruit/tinyuf2). + +## Magic Value Bootloaders + +Most "second stage" bootloaders will enter bootloader mode on startup when a specific magic value is found in a specific reserved location in memory. For those bootloaders, an extra mapping layer is used to map the Zephyr "bootloader mode" retained value to the magic value expected by the bootloader. + +The following bootloaders of this type are supported, see those pages for details on the additional configuration needed: + +- [Adafruit nRF52](./adafruit-nrf52.mdx) +- [TinyUF2](./tinyuf2.mdx) +- [SAMD21 UF2](./samd21-uf2.mdx) + +## Jump-To Bootloaders + +Several SoCs use bootloaders that can be directly jumped to from early init code in the firmware. For these situations, the only setup required is a a [retained mem](https://docs.zephyrproject.org/4.1.0/hardware/peripherals/retained_mem.html) instance that can retain the set boot mode after the reset, in order for the early initailization code to check the value and then jump to the bootloader. + +The following bootloaders of this type are supported, see those pages for details on the additional configuration needed: + +- [RP2040/RP2350](./rp2.mdx) +- [STM32](./stm32.mdx) diff --git a/docs/docs/hardware-integration/bootloader/rp2.mdx b/docs/docs/hardware-integration/bootloader/rp2.mdx new file mode 100644 index 00000000..fcbc65e9 --- /dev/null +++ b/docs/docs/hardware-integration/bootloader/rp2.mdx @@ -0,0 +1,70 @@ +--- +title: RP2040/RP2350 Bootloader +sidebar_label: RP2040/RP2350 +--- + +import BaseConfig from "./_base-config.md"; + +The RP2040/RP2350 Bootloader is a [jump-to type bootloader](./index.mdx#jump-to-bootloaders), with some extra setup used to integrate with it. + +By default, when integrating this bootloader, a ["double tap reset to enter the bootloader"](../../config/bootloader.md#double-tap-to-bootloader) feature will be enabled, to help with designs that do not easily expose a BOOTSEL pin. + + + +## Simple Include + +A simple shared file can be included in your board's devicetree to set up the necessary retained memory and retention nodes. Near the top of your file, add an include for `arm/raspberrypi/rp2040-boot-mode-retention.dtsi`, e.g.: + +```dts +/dts-v1/; + +#include +#include +``` + +## Manual Changes + +The include mentioned above can be performed manually, if you so choose. + +First, we'll shrink the SRAM node, from the front, to create a 4-byte area that won't have anything placed in it by the normal Zephyr linking process: + +```dts +&sram0 { + reg = <0x20000004 ((DT_SIZE_K(264)) - 4)>; +}; +``` + +Next, we'll define a _new_ 4-byte RAM region for that reserved space, and within that region, set up a Zephyr retained RAM node. Within that node, we'll create the actual retention _value_ that is used: + +```dts +/ { + sram@20000000 { + compatible = "zephyr,memory-region", "mmio-sram"; + reg = <0x20000000 0x4>; + zephyr,memory-region = "RetainedMem"; + status = "okay"; + + retainedmem { + compatible = "zephyr,retained-ram"; + status = "okay"; + #address-cells = <1>; + #size-cells = <1>; + boot_mode: retention@0 { + compatible = "zephyr,retention"; + status = "okay"; + reg = <0x0 0x1>; + }; + }; + }; +}; +``` + +Finally, we'll assign that new retention value node to the `zephyr,boot-mode` chosen property: + +```dts +/ { + chosen { + zephyr,boot-mode = &boot_mode; + }; +}; +``` diff --git a/docs/docs/hardware-integration/bootloader/samd21-uf2.mdx b/docs/docs/hardware-integration/bootloader/samd21-uf2.mdx new file mode 100644 index 00000000..1894246a --- /dev/null +++ b/docs/docs/hardware-integration/bootloader/samd21-uf2.mdx @@ -0,0 +1,102 @@ +--- +title: SAMD21 UF2 Bootloader +sidebar_label: SAMD21 +--- + +import BaseConfig from "./_base-config.md"; + +The [SAMD21 UF2 Bootloader](https://github.com/adafruit/uf2-samdx1) is a [magic value type bootloader](./index.mdx#magic-value-bootloaders), with some extra setup used to integrate with it. + + + +## Adjust The Existing RAM node + +We'll first adjust the SRAM to ensure Zephyr does not overwrite the memory location the bootloader inspect to determine if it should enter bootloader mode: + +```dts +&sram0 { + reg = <0x20000000 0x7FFC>; +}; +``` + +Note: + +- The `0x20000000` address is the address of the RAM for the target. This is nearly always `0x20000000`. +- The exact value of `0x7FFC` will depend on the total RAM on the target. The value should be the total RAM, minus 4-bytes, in hex. + +## Add a new memory region node with retainer RAM + +```dts +/ { + sram@20007FFC { + compatible = "zephyr,memory-region", "mmio-sram"; + reg = <0x20007FFC 0x4>; + zephyr,memory-region = "RetainedMem"; + status = "okay"; + + retainedmem { + compatible = "zephyr,retained-ram"; + status = "okay"; + #address-cells = <1>; + #size-cells = <1>; + + magic_retention: retention@0 { + compatible = "zephyr,retention"; + status = "okay"; + reg = <0x0 0x4>; + }; + }; + }; +}; +``` + +Note: + +- The node `sram@20007FFC` and the corresponding `reg` property values are obtained by adding the base RAM address (.e.g. `0x20000000`) to the shrunk RAM size (e.g. `0x7FFC`) to get the new start address for the area of reserved RAM. +- The magic values are 32-bits (4 bytes), so the second `reg` size value is `0x4`. + +## Magic Mapper node + +Next, we'll set up our mapping retained mem driver, which will map from the Zephyr boot mode values to the values the bootloader is looking for: + +```dts +/ { + magic_mapper { + compatible = "zmk,bootmode-to-magic-mapper"; + status = "okay"; + + #address-cells = <1>; + #size-cells = <1>; + + boot_retention: retention@0 { + compatible = "zephyr,retention"; + status = "okay"; + reg = <0x0 0x1>; + }; + }; +}; +``` + +## Assign Chosen Properties + +Finally, we'll assign two `chosen` properties for the two nodes that have been defined: + +```dts +/ { + chosen { + zephyr,boot-mode = &boot_retention; + zmk,magic-boot-mode = &magic_retention; + }; +}; +``` + +## Magic Value Type Kconfig + +Lastly, one Kconfig choice needs to be set, e.g. in `Kconfig.defaults` for the board: + +``` +choice ZMK_BOOTMODE_MAGIC_VALUE_BOOTLOADER_TYPE + default ZMK_BOOTMODE_MAGIC_VALUE_BOOTLOADER_TYPE_ADAFRUIT_BOSSA + +endchoice +``` diff --git a/docs/docs/hardware-integration/bootloader/stm32.mdx b/docs/docs/hardware-integration/bootloader/stm32.mdx new file mode 100644 index 00000000..5fcca6dd --- /dev/null +++ b/docs/docs/hardware-integration/bootloader/stm32.mdx @@ -0,0 +1,71 @@ +--- +title: STM32 ROM Bootloader +sidebar_label: STM32 ROM +toc_max_heading_level: 3 +--- + +import BaseConfig from "./_base-config.md"; + +The [STM32 ROM Bootloader](https://www.st.com/resource/en/application_note/an2606-stm32-microcontroller-system-memory-boot-mode-stmicroelectronics.pdf) is a [jump-to type bootloader](./index.mdx#jump-to-bootloaders), with some extra setup used to integrate with it. + +By default, when integrating this bootloader, a ["double tap reset to enter the bootloader"](../../config/bootloader.md#double-tap-to-bootloader) feature will be enabled, to help with designs that do not easily expose a BOOT pin. + + + +## Adjust Existing SRAM Node + +First, we'll adjust the existing SRAM node to shrink it by one byte so Zephyr will not interfere with the retained mem: + +```dts +/* Reduce SRAM0 usage by 1 byte to account for non-init area */ +&sram0 { + reg = <0x20000000 0x3FFF>; +}; +``` + +Note: + +- The `0x20000000` address is the address of the RAM for the target. This is nearly always `0x20000000` +- The exact value of `0x3FFF` will depend on the total RAM on the target. The value should be the total RAM, minus 1-bytes, in hex + +## New Memory Region & Nested Retained Mem + +```dts +/ { + sram@20003FFF { + compatible = "zephyr,memory-region", "mmio-sram"; + reg = <0x20003FFF 0x1>; + zephyr,memory-region = "RetainedMem"; + status = "okay"; + + retainedmem { + compatible = "zephyr,retained-ram"; + status = "okay"; + #address-cells = <1>; + #size-cells = <1>; + + retention0: retention@0 { + compatible = "zephyr,retention"; + status = "okay"; + reg = <0x0 0x1>; + }; + }; + }; +}; +``` + +Note: + +- The node `sram@20003FFF` and the corresponding `reg` property values are obtained by adding the base RAM address (.e.g. `0x20000000`) to the shrunk RAM size (e.g. `0x3FFF`) to get the new start address for the area of reserved RAM. + +## Chosen Boot Mode Node + +Finally, we'll set a chosen property to select the created retention node: + +```dts +/ { + chosen { + zephyr,boot-mode = &retention0; + }; +}; +``` diff --git a/docs/docs/hardware-integration/bootloader/tinyuf2.mdx b/docs/docs/hardware-integration/bootloader/tinyuf2.mdx new file mode 100644 index 00000000..85386b4d --- /dev/null +++ b/docs/docs/hardware-integration/bootloader/tinyuf2.mdx @@ -0,0 +1,102 @@ +--- +title: TinyUF2 Bootloader +sidebar_label: TinyUF2 +--- + +import BaseConfig from "./_base-config.md"; + +The [TinyUF2 Bootloader](https://github.com/adafruit/tinyuf2) is a [magic value type bootloader](./index.mdx#magic-value-bootloaders), with some extra setup used to integrate with it. + + + +## Adjust The Existing RAM node + +For TinyUF2, we'll first adjust the SRAM to ensure Zephyr does not overwrite the memory location the bootloader inspect to determine if it should enter bootloader mode: + +```dts +&sram0 { + reg = <0x20000000 0x1FFFC>; +}; +``` + +Note: + +- The `0x20000000` address is the address of the RAM for the target. This is nearly always `0x20000000` +- The exact value of `0x1FFFC` will depend on the total RAM on the target. The value should be the total RAM, minus 4-bytes, in hex + +## Add a New Memory Region Node with Retainer RAM + +```dts +/ { + sram@2001FFFC { + compatible = "zephyr,memory-region", "mmio-sram"; + reg = <0x2001FFFC 0x4>; + zephyr,memory-region = "RetainedMem"; + status = "okay"; + + retainedmem { + compatible = "zephyr,retained-ram"; + status = "okay"; + #address-cells = <1>; + #size-cells = <1>; + + magic_retention: retention@0 { + compatible = "zephyr,retention"; + status = "okay"; + reg = <0x0 0x4>; + }; + }; + }; +}; +``` + +Note: + +- The node `sram@2001FFFC` and the corresponding `reg` property values are obtained by adding the base RAM address (.e.g. `0x20000000`) to the shrunk RAM size (e.g. `0x1FFFC`) to get the new start address for the area of reserved RAM. +- The magic values in TinyUF2 are 32-bits (4 bytes), so the second `reg` size value is `0x4`. + +## Magic Mapper node + +Next, we'll set up our mapping retained mem driver, which will map from the Zephyr boot mode values to the values the bootloader is looking for: + +```dts +/ { + magic_mapper { + compatible = "zmk,bootmode-to-magic-mapper"; + status = "okay"; + + #address-cells = <1>; + #size-cells = <1>; + + boot_retention: retention@0 { + compatible = "zephyr,retention"; + status = "okay"; + reg = <0x0 0x1>; + }; + }; +}; +``` + +## Assign Chosen Properties + +Finally, we'll assign two `chosen` properties for the two nodes that have been defined: + +```dts +/ { + chosen { + zephyr,boot-mode = &boot_retention; + zmk,magic-boot-mode = &magic_retention; + }; +}; +``` + +## Magic Value Type Kconfig + +Lastly, one Kconfig choice needs to be set, e.g. in `Kconfig.defaults` for the board: + +``` +choice ZMK_BOOTMODE_MAGIC_VALUE_BOOTLOADER_TYPE + default ZMK_BOOTMODE_MAGIC_VALUE_BOOTLOADER_TYPE_TINYUF2 + +endchoice +``` diff --git a/docs/docs/hardware-integration/dongle.mdx b/docs/docs/hardware-integration/dongle.mdx new file mode 100644 index 00000000..822b6248 --- /dev/null +++ b/docs/docs/hardware-integration/dongle.mdx @@ -0,0 +1,314 @@ +--- +title: Keyboard Dongle +sidebar_label: Keyboard Dongle +--- + +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +A bluetooth dongle can be added to any wireless keyboard running ZMK. The result is a [split keyboard](../features/split-keyboards.md) with the dongle as ["central"](../features/split-keyboards.md#central-and-peripheral-roles). There are a number of advantages to adding a dongle, but also some disadvantages: + +Benefits: + +- For split keyboards, having the dongle for the "central" role results in [improved battery life](/power-profiler) for the former central part, as it is now a peripheral. +- It is easier to connect to the host device since dongles are typically connected via USB. + +Disadvantages: + +- An extra [board](index.mdx#what-is-a-board) is needed (any BLE-capable board that ZMK supports will work). +- The keyboard becomes unusable without the dongle. + +Depending on how the dongle is used, there are some additional [latency considerations](../features/split-keyboards.md#latency-considerations) to keep in mind. +The addition of the dongle adds an extra "hop" for the former central, increasing its latency to that of a peripheral. The other parts are unchanged latency-wise. There is also a commonly occurring case where the peripherals benefit. +Assuming the dongle is connected to USB and the former central would have been connected via bluetooth to the host if the dongle wasn't present: + +- The former central will have its latency increased by about 1ms from the extra USB "hop" +- The other parts will have their average latency _decreased_ by 6.5ms from the replacement of a BLE "hop" with a "USB" hop. + +As a result, for this common use case the average latency of the keyboard decreases. + +## Adding a Dongle + +The approach taken to adding a dongle is _generally_ the same[^1]. +Whether your keyboard consists of a [board and a shield](index.mdx#boards--shields) or is just a board is irrelevant. + +To add a dongle, you will create a simplified form of a [new shield](new-shield.mdx). +The approach described below assumes the dongle will not have any keys assigned to itself, so it will not work for that scenario. +If you want to understand the details of how it all works better, please read through the [new shield guide](new-shield.mdx). + +As there are a very large number of possible devices that could be used as a dongle, you will be defining your dongle as a personal shield intended for your exclusive use. + +Prior to adding a dongle to your keyboard, please test its functionality without a dongle. The below guide will assume that your keyboard is named `my_keyboard`, replace accordingly. + +### Dongle Folder + +First, make sure that your `zmk-config` matches the folder structure found in the [unified ZMK config template](https://github.com/zmkfirmware/unified-zmk-config-template) (extra files and folders are fine, but none should be missing). + +Next, navigate to the `zmk-config/boards/shields` directory. Create a subdirectory called `my_keyboard`, if one doesn't already exist. Unless otherwise specified, the below files should all be placed in said folder. + +### Kconfig Files + +#### Kconfig.shield + +Make a file called `Kconfig.shield`, if one does not exist already. Add the following lines to it, replacing `SHIELD_MY_KEYBOARD_DONGLE` and `my_keyboard_dongle` according to your keyboard: + +```kconfig title="Kconfig.shield" +# No whitespace after the comma or in the keyboard name! +config SHIELD_MY_KEYBOARD_DONGLE + def_bool $(shields_list_contains,my_keyboard_dongle) +``` + +#### Kconfig.defconfig + +Make a file called `Kconfig.defconfig`, if one does not exist already. Add the following lines to it where `SHIELD_MY_KEYBOARD_DONGLE` should match the previous section: + +```kconfig title="Kconfig.defconfig" +if SHIELD_MY_KEYBOARD_DONGLE + +# Max 16 characters in keyboard name +config ZMK_KEYBOARD_NAME + default "My Board" + +config ZMK_SPLIT_ROLE_CENTRAL + default y + +config ZMK_SPLIT + default y + +# Set this to the number of peripherals your dongle will have. +# For a unibody, this would be 1. If you have left and right halves, set it to 2, etc. +config ZMK_SPLIT_BLE_CENTRAL_PERIPHERALS + default 1 + +# Set this to ZMK_SPLIT_BLE_CENTRAL_PERIPHERALS + your desired number of BT profiles (default is 5) +config BT_MAX_CONN + default 6 + +# Set this to the same number as BT_MAX_CONN +config BT_MAX_PAIRED + default 6 + +endif +``` + +### Dongle Overlay File + +Create a file called `my_keyboard_dongle.overlay` (renamed as appropriate). +This file will include your keyboard's matrix transform and physical layout, allowing it to map key press events from the peripherals to behaviors. + +Add the following lines to the file you created, introducing a mock kscan for the dongle since it has no keys itself: + +```dts title="my_keyboard_dongle.overlay" +#include + +/ { + chosen { + zmk,kscan = &mock_kscan; + }; + + mock_kscan: mock_kscan_0 { + compatible = "zmk,kscan-mock"; + columns = <0>; + rows = <0>; + events = <0>; + }; +}; +``` + +You will now need to find and copy your keyboard's matrix transform into the `my_keyboard_dongle.overlay` file. + +#### Matrix transform + +Navigate to the directory defining your keyboard (in-tree keyboards found [here](https://github.com/zmkfirmware/zmk/tree/main/app/boards), if your keyboard is a shield look under the `shields` subdirectory) and look through the [devicetree files](../config/index.md) for nodes with `compatible = "zmk,matrix-transform";`. +This should look something like this: + +```dts + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <14>; + rows = <5>; + + map = < + // Lots of RC(r,c) macros + >; + }; +``` + +Copy this node into your `my_keyboard_dongle.overlay` file. It should be a child node of the root node (put it inside the `/ { ... };`). +If there are multiple matrix transformations, copy the one that matches your keyboard's layout. + +Make a note of the label that the transform has, it will be used later. In the example the label is `default_transform`. + +#### Physical layout + +A full physical layout is necessary to allow your dongle to be used with [ZMK Studio](../features/studio.md). +If your keyboard is not Studio-ready or you have no interest in using ZMK Studio with your dongle, then this section is simplified significantly. + + + + +You will need to find your keyboard's physical layout, much like finding the matrix transform. +Depending on your keyboard, the physical layout could be found in a variety of locations. Look for a node with `compatible = "zmk,physical-layout";`. +There are three commonly found possibilities: + +- The physical layout is found in a file called `my_keyboard-layouts.dtsi` +- The physical layout is found in the same file as the matrix transform and chosen node +- The physical layout is imported from ZMK's shared layouts - `#include .dtsi>` can be found at the top of one of the devicetree files. + + + +Copy the file into your dongle's folder. Then import the file, assign the matrix transform to it, and select it in the `chosen` node: + +```dts +#include "my_keyboard-layouts.dtsi" + +&physical_layout0 { + transform = <&default_transform>; +}; + +/ { + chosen { + zmk,kscan = &mock_kscan; + zmk,physical-layout = &physical_layout0; + }; +}; +``` + +Make sure that the labels `physical_layout0` and `default_transform` match those of the physical layout node defined in the file and the matrix transform respectively. + +:::note +If there are multiple physical layouts in the file, you will need to copy over all of the remaining matrix transformations and assign them to their corresponding physical layout. +::: + + + +Copy the physical layout node into your `my_keyboard_dongle.overlay` file. Make sure the matrix transform is assigned to it, and select it in the `chosen` node. + +```dts +/ { + chosen { + zmk,kscan = &mock_kscan; + zmk,physical-layout = &physical_layout0; + }; + + physical_layout0: physical_layout_0 { + compatible = "zmk,physical-layout"; + display-name = "Default Layout"; + transform = <&default_transform>; + keys = <...>; // Long list of key positions + }; +}; +``` + +Make sure that the labels `physical_layout0` and `default_transform` match those of the physical layout node and the matrix transform respectively. + +:::note +If there are multiple physical layouts, you need only copy the one that applies to your keyboard. +::: + + + +Include your desired layout at the top of the file. Then assign your matrix transform to it, taking care to match up the node labels correctly. + +```dts +#include .dtsi> + +&physical_layout0 { + transform = <&default_transform>; +}; +``` + +In this case your node label will _not_ be `physical_layout0`, make sure to adjust it accordingly. + +Finally, select your physical layout in the chosen node. + +```dts +/ { + chosen { + zmk,kscan = &mock_kscan; + zmk,physical-layout = &physical_layout0; + }; +}; +``` + + + + + + +Add a barebones [physical layout](physical-layouts.md) without the `keys` property to your `my_keyboard_dongle.overlay` file. + +```dts +/ { + physical_layout0: physical_layout_0 { + compatible = "zmk,physical-layout"; + display-name = "Default Layout"; + transform = <&default_transform>; + }; +}; +``` + +Make sure that the `transform` property uses the same label as your matrix transform. Then select the physical layout in the same `chosen` node that was previously created: + +```dts +/ { + chosen { + zmk,kscan = &mock_kscan; + zmk,physical-layout = &physical_layout0; // New item added + }; +}; +``` + + + + +## Building the Firmware + +Add the appropriate lines to your `build.yaml` file to build the firmware for your dongle. Also add some CMake arguments using `cmake-args` to the existing parts of your keyboard, turning them into peripherals for your dongle.[^2] + +```yaml +include: + # ----------------------------------------- + # Your other keyboard parts here + # ----------------------------------------- + # Change the board appropriately, you can use any board + - board: nice_nano + shield: my_keyboard_dongle + - board: nice_nano + shield: settings_reset + # Add these cmake-args to the peripherals you wish to use with the dongle + - board: nice_nano + shield: my_keyboard + cmake-args: -DCONFIG_ZMK_SPLIT=y -DCONFIG_ZMK_SPLIT_ROLE_CENTRAL=n +``` + +You can then flash the firmware to your device as detailed in our [user setup](../user-setup.mdx#install-the-firmware) and [split keyboard](../features/split-keyboards.md#building-and-flashing-firmware) pages. + +:::warning +Before flashing your new firmware, you need to flash `settings_reset` [firmware](../troubleshooting/connection-issues.mdx#building-a-reset-firmware) on all devices to ensure they can pair to each other. +::: + +To use your dongled keyboard with [ZMK Studio](../features/studio.md), apply the instructions for [building with Studio](../features/studio.md#building) to the dongle. + +If you ever want to "undongle" your keyboard, simply remove these CMake arguments and flash the resulting firmware (after a `settings_reset`). + +[^1]: If you have a custom dongle that uses an onboard MCU, then you will need to take a slightly different approach that isn't currently documented. + +[^2]: If you are building locally, you can append these flags to the end of the [build command](../development/local-toolchain/build-flash.mdx#cmake-arguments). diff --git a/docs/docs/hardware-integration/encoders.md b/docs/docs/hardware-integration/encoders.md new file mode 100644 index 00000000..4a9ea85f --- /dev/null +++ b/docs/docs/hardware-integration/encoders.md @@ -0,0 +1,76 @@ +--- +title: EC11 Encoders +sidebar_label: Encoders +--- + +EC11 encoder support can be added to your board or shield by adding the appropriate lines to your board/shield's configuration (.conf), devicetree (.dtsi/.overlay), and keymap (.keymap) files. + +## Configuration File + +In your configuration file you will need to add the following lines so that the encoders can be enabled/disabled: + +```ini +# Uncomment to enable encoder +# CONFIG_EC11=y +# CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y +``` + +These should be commented by default for encoders that are optional/can be swapped with switches, but can be uncommented if encoders are part of the default design. + +:::note +If building locally for split boards, you may need to add these lines to the specific half's configuration file as well as the combined configuration file, see the [configuration overview](../config/index.md) for details. +::: + +## Devicetree File + +In your devicetree file you will need to define each sensor with their properties. For split keyboards, do this in the .dtsi file that is shared by all parts; otherwise do it in the .dts (for boards) or .overlay (shields) file, see [configuration overview](../config/index.md#devicetree-files) for details. Add the following lines: + +```dts + left_encoder: encoder_left { + compatible = "alps,ec11"; + a-gpios = ; + b-gpios = ; + steps = <80>; + status = "disabled"; + }; +``` + +Here you need to replace `PIN_A` and `PIN_B` with the appropriate pins that your PCB utilizes for the encoder(s). See shield overlays section in the [new shield guide](new-shield.mdx#shield-overlays) on the appropriate node label and pin number to use for GPIOs. + +The `steps` property should corresponded to the documented pulses per rotation for the encoders used on the keyboard, typically found on the datasheet of the component. If users use different encoders when they build, the value can be overridden in their keymap. + +Add additional encoders as necessary by duplicating the above lines, replacing `left` with whatever you would like to call your encoder, and updating the pins. + +Once you have defined the encoder sensors, you will have to add them to the list of sensors: + +```dts + sensors: sensors { + compatible = "zmk,keymap-sensors"; + sensors = <&left_encoder &right_encoder>; + triggers-per-rotation = <20>; + }; +``` + +In this example, a `left_encoder` and `right_encoder` are both added. Additional encoders can be added with spaces separating each, and the order they are added here determines the order in which you define their behavior in your keymap. + +In addition, a default value for the number of times the sensors trigger the bound behavior per full rotation is set via the `triggers-per-rotation` property. See [Encoders Config](../config/encoders.md#devicetree) for more details. + +Add the following lines to the .dts/.overlay file that contains the encoder to enable it: + +```dts +&left_encoder { + status = "okay"; +}; +``` + +Make sure to add this to the .dts/.overlay file, rather than any shared (.dtsi) files. + +## Keymap + +Add the following line to your keymap file to add default encoder behavior bindings: + +```dts +sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; +``` + +Add additional bindings as necessary to match the default number of encoders on your board. See the [Encoders](../features/encoders.md) and [Keymaps](../keymaps/index.mdx) documentation pages for more details. diff --git a/docs/docs/development/hardware-integration/hardware-metadata-files.md b/docs/docs/hardware-integration/hardware-metadata-files.md similarity index 96% rename from docs/docs/development/hardware-integration/hardware-metadata-files.md rename to docs/docs/hardware-integration/hardware-metadata-files.md index 46fad411..62fdb348 100644 --- a/docs/docs/development/hardware-integration/hardware-metadata-files.md +++ b/docs/docs/hardware-integration/hardware-metadata-files.md @@ -6,7 +6,7 @@ title: Hardware Metadata Files ZMK makes use of an additional metadata YAML file for all boards and shields to provide high level information about the hardware to be incorporated into setup scripts/utilities, website hardware list, etc. -The naming convention for metadata files is `{item_id}.zmk.yml`, where the `item_id` is the board/shield identifier, including version information but excluding any optional split `_left`/`_right` suffix, e.g. `corne.zmk.yml` or `nrfmicro_11.zmk.yml`. +The naming convention for metadata files is `{item_id}.zmk.yml`, where the `item_id` is the board/shield identifier, including version information but excluding any optional split `_left`/`_right` suffix, e.g. `corne.zmk.yml` or `nrfmicro_nrf52840.zmk.yml`. ## Example File @@ -95,6 +95,7 @@ Boards and shields should document the sets of hardware features found on them u - `encoder` - Indicates the hardware contains one or more rotary encoders. - `underglow` - Indicates the hardware includes underglow LEDs. - `backlight` - Indicates the hardware includes backlight LEDs. +- `studio` - Indicates the keyboard is ready to use with [ZMK Studio](../features/studio.md). - `pointer` (future) - Used to indicate the hardware includes one or more pointer inputs, e.g. joystick, touchpad, or trackpoint. ### Siblings diff --git a/docs/docs/hardware-integration/includes/_gpio-key-direct.md b/docs/docs/hardware-integration/includes/_gpio-key-direct.md new file mode 100644 index 00000000..2e364744 --- /dev/null +++ b/docs/docs/hardware-integration/includes/_gpio-key-direct.md @@ -0,0 +1,14 @@ +Here is an example for a keyboard with a dedicated on/off push button that is a direct wire between the GPIO pin and ground: + +```dts +/ { + keys { + compatible = "gpio-keys"; + soft_off_gpio_key: soft_off_gpio_key { + gpios = <&gpio0 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + }; +}; +``` + +In the above example the soft on/off would be triggered by pulling the specified pin low, typically by pressing a switch that has the other leg connected to ground. diff --git a/docs/docs/hardware-integration/includes/_gpio-key-matrix.md b/docs/docs/hardware-integration/includes/_gpio-key-matrix.md new file mode 100644 index 00000000..affed12e --- /dev/null +++ b/docs/docs/hardware-integration/includes/_gpio-key-matrix.md @@ -0,0 +1,14 @@ +Here is an example for a keyboard with a GPIO pin that reads from the matrix: + +```dts +/ { + keys { + compatible = "gpio-keys"; + soft_off_gpio_key: soft_off_gpio_key { + gpios = <&gpio0 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; + }; + }; +}; +``` + +MCU inputs are triggered by pulling the specified pin high, typically by pressing some combination of switches which connects the MCU input to an MCU output. diff --git a/docs/docs/hardware-integration/includes/_gpio-key-wakeup.md b/docs/docs/hardware-integration/includes/_gpio-key-wakeup.md new file mode 100644 index 00000000..0a022894 --- /dev/null +++ b/docs/docs/hardware-integration/includes/_gpio-key-wakeup.md @@ -0,0 +1,15 @@ +Here is an example for a keyboard with a GPIO pin reused from a matrix kscan: + +```dts +/ { + keys { + compatible = "gpio-keys"; + soft_off_gpio_key: soft_off_gpio_key { + gpios = <&gpio0 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; + }; + }; +}; +``` + +The GPIO settings should match those in the kscan, so the above would be set to `(GPIO_ACTIVE_LOW | GPIO_PULL_UP)` for a direct kscan. +The specified pin should be the MCU input pin of the switch used for waking from soft off (for a `col2row` matrix, the MCU input pins are the row pins). diff --git a/docs/docs/hardware-integration/includes/_sideband-direct.md b/docs/docs/hardware-integration/includes/_sideband-direct.md new file mode 100644 index 00000000..e224a584 --- /dev/null +++ b/docs/docs/hardware-integration/includes/_sideband-direct.md @@ -0,0 +1,37 @@ +### KScan sideband behavior + +The kscan sideband behavior driver will be used to trigger the [soft off behavior](../../keymaps/behaviors/soft-off.md) "out of band" from the normal keymap processing. To do so, it will decorate/wrap an underlying kscan driver. + +With a simple direct pin setup, the [direct kscan](../../config/kscan.md) driver can be used with a [GPIO key](#gpio-key), to make a small "side matrix": + +```dts +/ { + wakeup_scan: wakeup_scan { + compatible = "zmk,kscan-gpio-direct"; + input-keys = <&soft_off_gpio_key>; + wakeup-source; + }; +}; +``` + +With that in place, the kscan sideband behavior will wrap the new driver: + +```dts +/ { + side_band_behavior_triggers: side_band_behavior_triggers { + compatible = "zmk,kscan-sideband-behaviors"; + + kscan = <&wakeup_scan>; + auto-enable; + wakeup-source; + + soft_off { + column = <0>; + row = <0>; + bindings = <&hw_soft_off>; + }; + }; +}; +``` + +As the kscan used only has a single key, both column and row are set to 0. The properties of the `kscan-sideband-behaviors` node can be found in the [appropriate configuration section](../../config/kscan.md#kscan-sideband-behavior-driver). diff --git a/docs/docs/hardware-integration/includes/_sideband-matrix.md b/docs/docs/hardware-integration/includes/_sideband-matrix.md new file mode 100644 index 00000000..c6de0f41 --- /dev/null +++ b/docs/docs/hardware-integration/includes/_sideband-matrix.md @@ -0,0 +1,66 @@ +### KScan sideband behavior + +The kscan sideband behavior driver will be used to trigger the [soft off behavior](../../keymaps/behaviors/soft-off.md) "out of band" from the normal keymap processing. To do so, it will decorate/wrap an underlying kscan driver. + +For the matrix-integrated approach you will supplement the existing kscan matrix by adding the additional pin as another entry in +the `row-gpios`/`col-gpios` for whichever pins are used to read the matrix state. This approach requires a matrix transform to be present. As an example, consider the following existing kscan matrix: + +```dts +/ { + kscan: kscan { + compatible = "zmk,kscan-gpio-matrix"; + diode-direction = "col2row"; + wakeup-source; + + col-gpios + = <&gpio0 12 GPIO_ACTIVE_HIGH> + , <&gpio1 9 GPIO_ACTIVE_HIGH> + ; + row-gpios + = <&gpio0 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpio0 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; + }; +}; +``` + +To supplement it with a soft off input, you would add another row value (without changing the matrix transform): + +```dts +/ { + kscan: kscan { + compatible = "zmk,kscan-gpio-matrix"; + diode-direction = "col2row"; + wakeup-source; + + col-gpios + = <&gpio0 12 GPIO_ACTIVE_HIGH> + , <&gpio1 9 GPIO_ACTIVE_HIGH> + ; + row-gpios + = <&gpio0 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpio0 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpio0 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; + }; +}; +``` + +With that in place, you would decorate the kscan driver: + +```dts +/ { + side_band_behavior_triggers: side_band_behavior_triggers { + compatible = "zmk,kscan-sideband-behaviors"; + wakeup-source; + kscan = <&kscan>; + soft_off { + column = <0>; + row = <2>; + bindings = <&hw_soft_off>; + }; + }; +}; +``` + +Critically, the `column` and `row` values would correspond to the location of the added entry. The properties of the `kscan-sideband-behaviors` node can be found in the [appropriate configuration section](../../config/kscan.md#kscan-sideband-behavior-driver). diff --git a/docs/docs/hardware-integration/includes/_sideband-wakeup-direct.md b/docs/docs/hardware-integration/includes/_sideband-wakeup-direct.md new file mode 100644 index 00000000..dc389726 --- /dev/null +++ b/docs/docs/hardware-integration/includes/_sideband-wakeup-direct.md @@ -0,0 +1,28 @@ +### KScan sideband behavior + +With a simple direct pin setup, the [direct kscan](../../config/kscan.md) driver can be used with a [GPIO key](#gpio-key), to make a small "side matrix": + +```dts +/ { + wakeup_scan: wakeup_scan { + compatible = "zmk,kscan-gpio-direct"; + input-keys = <&soft_off_gpio_key>; + wakeup-source; + }; +}; +``` + +The kscan sideband behavior needs to wrap the new driver to enable it: + +```dts +/ { + side_band_behavior_triggers: side_band_behavior_triggers { + compatible = "zmk,kscan-sideband-behaviors"; + kscan = <&wakeup_scan>; + auto-enable; + wakeup-source; + }; +}; +``` + +The properties of the `kscan-sideband-behaviors` node can be found in the [appropriate configuration section](../../config/kscan.md#kscan-sideband-behavior-driver). diff --git a/docs/docs/hardware-integration/includes/_soft-off-behavior.md b/docs/docs/hardware-integration/includes/_soft-off-behavior.md new file mode 100644 index 00000000..9f9ac021 --- /dev/null +++ b/docs/docs/hardware-integration/includes/_soft-off-behavior.md @@ -0,0 +1,16 @@ +### Soft off behavior instance + +Behind the scenes, a hardware dedicated GPIO pin utilizes the [soft off behavior](../../keymaps/behaviors/soft-off.md) to trigger entering the soft-off state. To use said behavior outside of a keymap, add an instance of the behavior to your `.overlay`/`.dts` file: + +```dts +/ { + behaviors { + hw_soft_off: hw_soft_off { + compatible = "zmk,behavior-soft-off"; + #binding-cells = <0>; + split-peripheral-off-on-press; // Turn peripheral off immediately for reliability + hold-time-ms = <2000>; // Only turn off if the key is held for 2 seconds or longer. + }; + }; +}; +``` diff --git a/docs/docs/hardware-integration/includes/_soft-off-waker.md b/docs/docs/hardware-integration/includes/_soft-off-waker.md new file mode 100644 index 00000000..d6349b46 --- /dev/null +++ b/docs/docs/hardware-integration/includes/_soft-off-waker.md @@ -0,0 +1,17 @@ +### Soft off waker + +We need to add another device which will be enabled only when the keyboard is going into soft off state, and will configure the previously declared GPIO key with the correct interrupt configuration to wake the device from soft off once it is pressed. + +```dts +/ { + wakeup_scan: wakeup_scan { + compatible = "zmk,gpio-key-wakeup-trigger"; + trigger = <&soft_off_gpio_key>; + wakeup-source; + extra-gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>; + }; +}; +``` + +The properties for the `gpio-key-wakeup-trigger` node can be found in the [appropriate configuration section](../../config/power.md#gpio-key-wakeup-trigger). +In particular, note the `extra-gpios` property containing the MCU output pins of any keys used to wake the keyboard (for a `col2row` matrix, these are your columns). diff --git a/docs/docs/hardware-integration/index.mdx b/docs/docs/hardware-integration/index.mdx new file mode 100644 index 00000000..5c7ed01b --- /dev/null +++ b/docs/docs/hardware-integration/index.mdx @@ -0,0 +1,157 @@ +--- +title: Hardware Integration +sidebar_label: Overview +--- + +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +This section of the documentation describes steps necessary to get ZMK running on a keyboard, including basic keyboard functionality as well as additional features such as encoders. +Please see pages in the sidebar for guides and reference that describe different aspects of this integration. + +The foundational elements needed to get a specific keyboard working with ZMK can be broken down into: + +- A [physical layout](physical-layouts.md) that describes the electrical and physical structure of the keyboard, referring to: + - A [kscan driver](../config/kscan.md), which most frequently uses `compatible = "zmk,kscan-gpio-matrix"` for GPIO matrix based keyboards, or `compatible = "zmk,kscan-gpio-direct"` for direct wires. + - A [matrix transform](../config/layout.md), which defines how the kscan row/column events are translated into logical "key positions". + - An [optional description](physical-layouts.md#optional-keys-property) of physical key positions and sizes, in order to visualize the keyboard accurately in [ZMK Studio](../features/studio.md). +- A [keymap](../keymaps/index.mdx), which binds each key position to a behavior, e.g. key press, mod-tap, momentary layer, in a set of layers. +- Other, optional configuration items to support features such as encoders or lighting systems. + +These core architectural elements are defined per-keyboard, and _where_ they are defined depends on the specifics of how that keyboard is structured. + +## Boards & Shields + +ZMK uses the Zephyr concepts of "boards" and "shields" to refer to different parts of a keyboard build, that in turn get combined during a firmware build. +Also see the Zephyr documentation on [boards](https://docs.zephyrproject.org/4.1.0/glossary.html#term-board) and [shields](https://docs.zephyrproject.org/4.1.0/hardware/porting/shields.html). + +### What is a "board"? + +In ZMK, a _board_ defines the _PCB_ that _includes the microcontroller unit (MCU)_. +For keyboards, this is one of two options: + +- Complete keyboard PCBs that include the MCU (e.g. the Planck or Preonic). +- Small MCU boards (e.g. the nice!nano or Seeed Studio Xiao RP2040) that expose pins and are designed to be combined with larger keyboard PCBs, or hand-wired to switches to create the final keyboard. + +### What is a "shield"? + +In ZMK, a _shield_ is a _PCB_ or _hardwired set of components_ that when combined with an MCU-only board, like the SparkFun Pro Micro RP2040 or nice!nano, results in a complete usable keyboard. +Examples would be keyboard PCBs like the Kyria or Lily58. +The shield is usually the big PCB containing all the keys. + +### Why not just "keyboard"? + +["Composite" keyboards](../hardware.mdx#composite) are keyboards which use a separate small PCB MCU module for its "brains". +In such keyboards, the [shield](#what-is-a-shield) is a brainless shell containing all the keys, RGB LEDs, encoders etc. +It typically maps all of these features to a standard pin footprint, such as the Pro Micro pinout. + +To bring this brainless shield to life, you attach any MCU [board](#what-is-a-board) matching the footprint. +For instance, the _nice!nano_ is _pin-compatible_ with the _SparkFun Pro Micro RP2040_, so you can substitute either board onto the shield. +But each board comes with its own features (MCU, flash, BLE, etc.) which must also be handled. + +Therefore in ZMK, board and shield are considered two different (but related) entities so that it is easier to mix and match them, and they are combined during a ZMK build. +This provides the modularity to be able to use composite keyboards with different compatible controllers. + +Note that ["self-contained" keyboards](../hardware.mdx#onboard) only have a single PCB which includes the "brains" (MCU) onboard. +In ZMK, these have no shield, only a board. + +## Organization Overview + + + + + +For a [self-contained keyboard](../hardware.mdx#onboard) that includes the microprocessor, all of the above architecture components are included in the Zephyr _board_ definition and no shield is defined. +You can see an example for the [Planck V6](https://github.com/zmkfirmware/zmk/tree/main/app/boards/olkb/planck) board directory. + +With this type of keyboard, the full ZMK definition for the keyboard exists in the `/boards//` directory where `` is `zmk/app` or a [module](../features/modules.mdx) root, e.g. `zmk/app/boards/olkb/planck/`. +In that directory you'll have the following files, where there can be multiples of files with ``s, corresponding to each keyboard part for [split keyboards](../features/split-keyboards.md): + +``` + +├── Kconfig.defconfig +├── Kconfig. +├── _defconfig +├── .dts +├── .keymap +├── board.cmake +├── board.yml +└── .zmk.yml +``` + +These files include [base Kconfig files](https://docs.zephyrproject.org/4.1.0/build/kconfig/index.html): + +- A `Kconfig.` file that defines the toplevel [Kconfig](https://docs.zephyrproject.org/4.1.0/build/kconfig/index.html) items for the board, including selecting the corresponding SoC Kconfig setting. +- A `Kconfig.defconfig` file that sets some initial defaults when building this keyboard. This usually includes: + - Setting [`ZMK_KEYBOARD_NAME`](../config/system.md#general) to a value, for the product name to be used for USB/BLE info + +[Configuration files](../config/index.md#kconfig-files) that set the visible Kconfig symbols: + +- A `_defconfig` file that forces specific Kconfig settings that are specific to this hardware configuration. + These tend to be settings enabling various drivers or features, e.g. GPIO, USB support, or memory settings for ZMK Studio. + +[Devicetree files](../config/index.md#devicetree-files): + +- `.dts` which contains all the devicetree definitions[^1], including but not limited to: + - An `#include` line that pulls in the specific microprocessor that is used, e.g. `#include `, + - Kscan, matrix transform and physical layout devicetree nodes as described above, + - A [chosen](https://docs.zephyrproject.org/4.1.0/build/dts/intro-syntax-structure.html#aliases-and-chosen-nodes) node including `zmk,physical-layout` property among others, where each property references the nodes defined in the file. +- A `.keymap` file that includes the default keymap for that keyboard. Users will be able to override this keymap in their user configs. + +And other miscellaneous ones: + +- A `board.cmake` file with CMake directives for how to flash to the device. +- A [`board.yml`](https://docs.zephyrproject.org/4.1.0/hardware/porting/board_porting.html#write-your-board-yaml) file containing information about the board and variants. +- A `.zmk.yml` file containing [metadata](hardware-metadata-files.md) for the keyboard. + +See Zephyr's [board porting guide](https://docs.zephyrproject.org/4.1.0/hardware/porting/board_porting.html) for information on creating a new board. +See also our [new board guide](new-board.md) for information on creating a ZMK-compatible board variant. + +[^1]: + Parts of these files can live in separate `.dtsi` files (typically in the same directory) that are then `#include`d in the files, to reduce duplication or improve organization. + For instance, a shared `.dtsi` file is used for split keyboards that contains devicetree definitions that are shared across keyboard parts. + + + + +Keyboards that require an add-on board to operate are [composite keyboards](../hardware.mdx#composite), where the ZMK integration pieces are placed in the _shield_ definition for that keyboard. +This allows users to swap in different boards that use the same interconnect (e.g. Pro Micro RP2040, or nice!nano) and build a firmware the matches their actual combination of physical components. + +With this type of keyboard, the partial definition for the keyboard exists in the `/boards/shields/` directory where `` is `zmk/app` or a [module](../features/modules.mdx) root, e.g. `zmk/app/boards/shields/clueboard_california/`. +In that directory, you'll have the following files, where there can be multiple ``s, corresponding to each keyboard part for [split keyboards](../features/split-keyboards.md): + +``` + +├── Kconfig.shield +├── Kconfig.defconfig +├── .overlay +├── .keymap +└── .zmk.yml +``` + +These files include [base Kconfig files](new-shield.mdx#base-kconfig-files): + +- A `Kconfig.shield` that defines the toplevel Kconfig value for the shield, which uses a supplied utility to function to default the value based on the shield list, e.g. `def_bool $(shields_list_contains,clueboard_california)`. +- A `Kconfig.defconfig` file to set default values for settings like `ZMK_KEYBOARD_NAME` + +[Devicetree files](../config/index.md#devicetree-files): + +- A `.overlay` file which is a devicetree overlay file[^1], containing definitions including but not limited to: + - Kscan, matrix transform and physical layout devicetree nodes as described above, where the kscan node uses the interconnect [nexus node](https://docs.zephyrproject.org/4.1.0/hardware/porting/shields.html#gpio-nexus-nodes) aliases such as `&pro_micro` for GPIO pins. + - A [chosen](https://docs.zephyrproject.org/4.1.0/build/dts/intro-syntax-structure.html#aliases-and-chosen-nodes) node including at least the `zmk,physical-layout` property, referring to the defined node. +- A `.keymap` file that includes the default keymap for that keyboard. Users will be able to override this keymap in their user configs. + +And other miscellaneous ones: + +- A `.zmk.yml` file containing [metadata](hardware-metadata-files.md) for the keyboard. + +See the [new keyboard shield guide](new-shield.mdx) for documentation that walks you through creating these files to define a new composite keyboard. + + + diff --git a/docs/docs/features/backlight.mdx b/docs/docs/hardware-integration/lighting/backlight.mdx similarity index 78% rename from docs/docs/features/backlight.mdx rename to docs/docs/hardware-integration/lighting/backlight.mdx index 5debc375..8b484d08 100644 --- a/docs/docs/features/backlight.mdx +++ b/docs/docs/hardware-integration/lighting/backlight.mdx @@ -1,45 +1,19 @@ --- title: Backlight sidebar_label: Backlight +description: Lighting system that controls an array of single-color LEDs. --- import Tabs from "@theme/Tabs"; import TabItem from "@theme/TabItem"; -Backlight is a feature used to control an array of LEDs, usually placed through or under switches. - -:::info -Unlike [RGB Underglow](underglow.md), backlight can only control single color LEDs. Additionally, because backlight LEDs all receive the same power, it's not possible to dim individual LEDs. -::: - -## Enabling Backlight - -To enable backlight on your board or shield, add the following line to your `.conf` file of your user config directory as such: - -```ini -CONFIG_ZMK_BACKLIGHT=y -``` - -If your board or shield does not have backlight configured, refer to [Adding Backlight to a board or a shield](#adding-backlight-to-a-board-or-a-shield). - -## Configuring Backlight - -There are various Kconfig options used to configure the backlight feature. These can all be set in the `.conf` file. - -| Option | Description | Default | -| ------------------------------------ | ----------------------------------------------------- | ------- | -| `CONFIG_ZMK_BACKLIGHT_BRT_STEP` | Brightness step in percent | 20 | -| `CONFIG_ZMK_BACKLIGHT_BRT_START` | Default brightness in percent | 40 | -| `CONFIG_ZMK_BACKLIGHT_ON_START` | Default backlight state | y | -| `CONFIG_ZMK_BACKLIGHT_AUTO_OFF_IDLE` | Turn off backlight when keyboard goes into idle state | n | -| `CONFIG_ZMK_BACKLIGHT_AUTO_OFF_USB` | Turn off backlight when USB is disconnected | n | - -## Adding Backlight to a Board or a Shield +Please see [lighting feature page](../../features/lighting.md#backlight) for an introduction on the feature. @@ -59,8 +33,9 @@ endif # ZMK_BACKLIGHT ``` Create a `-pinctrl.dtsi` file if it does not already exist, and include it at the beginning of the `.dts` file. `CONFIG_PINCTRL=y` must be added to `_defconfig` if it isn't already enabled. +See the documentation page on [pin control](../pinctrl.mdx) for detailed information on setting up pins for hardware protocols such as PWM that is used for controlling backlight LEDs. -The pinctrl file has a `&pinctrl` node that encompasses all pinctrl settings, including I2C or SPI peripherals (e.g. WS2812 LEDs, Battery fuel gauges): +The pinctrl file has a `&pinctrl` node that encompasses all pinctrl settings, including I2C or SPI peripherals (e.g. WS2812 LEDs, battery fuel gauges): ```dts &pinctrl { @@ -161,6 +136,8 @@ Then add the following lines to your `.overlay` file: }; ``` +See the documentation page on [pin control](../pinctrl.mdx) for detailed information on setting up pins for hardware protocols such as PWM that is used for controlling backlight LEDs. + Pin numbers are handled differently depending on the MCU. On nRF MCUs pins are configured using `(PWM_OUTX, Y, Z)`, where `X` is the PWM channel used (usually 0), `Y` is the first part of the hardware port (_PY.01_) and `Z` is the second part of the hardware port (_P1.Z_). For example, _P1.13_ would give you `(PWM_OUT0, 1, 13)` and _P0.15_ would give you `(PWM_OUT0, 0, 15)`. diff --git a/docs/docs/hardware-integration/lighting/index.mdx b/docs/docs/hardware-integration/lighting/index.mdx new file mode 100644 index 00000000..7642fe06 --- /dev/null +++ b/docs/docs/hardware-integration/lighting/index.mdx @@ -0,0 +1,17 @@ +--- +title: Lighting +sidebar_label: Lighting +--- + +import DocCardList from "@theme/DocCardList"; + +The following pages detail adding lighting support to ZMK keyboards, which currently supports two lighting systems: underglow and backlight. + +:::warning + +Although the naming of the systems might imply it, which system you use typically does _not_ depend on the physical location of the LEDs. +Instead, you should use the one that supports the LED hardware type that your keyboard has. + +::: + + diff --git a/docs/docs/hardware-integration/lighting/led-indicators.md b/docs/docs/hardware-integration/lighting/led-indicators.md new file mode 100644 index 00000000..04c194e1 --- /dev/null +++ b/docs/docs/hardware-integration/lighting/led-indicators.md @@ -0,0 +1,118 @@ +--- +title: LED Indicators +sidebar_label: LED Indicators +description: Lighting system that indicates HID states such as caps lock. +--- + +ZMK supports the following five LED indicator states from the HID specification: + +- Num Lock +- Caps Lock +- Scroll Lock +- Compose +- Kana + +To connect these indicator states to LEDs on a keyboard, you must do two things in your board or shield files: + +1. Define an LED driver and one or more LEDs to control. +2. Configure ZMK to control those LEDs. + +## LED Definitions + +The most common setup is for LEDs to be driven directly from a GPIO pin. The examples on this page show how to controls these using the `gpio-leds` or `pwm-leds` drivers, but you can also use any other [LED driver](https://docs.zephyrproject.org/4.1.0/hardware/peripherals/led.html) from Zephyr. + +:::warning +LED strip drivers (e.g. WS2812 LEDs) are not currently supported. More work is needed to support the separate API and avoid conflicts with the underglow system. +::: + +In your shield's `.overlay` file or board's `.dts` file, create a `gpio-leds` node and define any LEDs that you want to be able to control. The following example defines two LEDs on `&gpio0 1` and `&gpio0 2` which are enabled by driving the pins high: + +```dts +/ { + leds { + compatible = "gpio-leds"; + + num_lock_led: num_lock_led { + gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>; + }; + + caps_lock_led: caps_lock_led { + gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>; + }; + }; +}; +``` + +### PWM Brightness Control + +The above example only supports LEDs being off or on at full brightness. If you want to be able to reduce the brightness or use multiple brightness levels, you must use `pwm-leds` instead of `gpio-leds`. Note that this will increase power usage slightly when LEDs are enabled compared to using `gpio-leds`. + +See the [backlight hardware integration page](backlight.mdx) for an example of configuring PWM LEDs. + +## Indicator Definitions + +Now that you have some LEDs defined, you can configure ZMK to use them. + +In your shield's `.overlay` file or board's `.dts` file, add the following include to the top of the file: + +```dts +#include +``` + +Then, add a `zmk,indicator-leds` node. This node can have any number of child nodes. Each child maps an indicator state to one or more LEDs: + +```dts +/ { + leds { + compatible = "gpio-leds"; + + // LEDs as defined in the previous step + num_lock_led: num_lock_led { ... }; + caps_lock_led: caps_lock_led { ... }; + }; + + indicators { + compatible = "zmk,indicator-leds"; + + num_lock_indicator: num_lock { + indicator = ; + leds = <&num_lock_led>; + }; + + caps_lock_indicator: caps_lock { + indicator = ; + leds = <&caps_lock_led>; + }; + }; +}; +``` + +The name of each child node is unimportant, but you should give each node a label so users can change their settings in `.keymap` files. Conventionally, you should use one of the following: + +- `num_lock_indicator` +- `caps_lock_indicator` +- `scroll_lock_indicator` +- `compose_indicator` +- `kana_indicator` + +(If you have a non-standard setup and need to use different labels, you should document this somewhere so users know how to configure them.) + +Each child node must have an `indicator` property, which is set to one of the following: + +- `HID_INDICATOR_NUM_LOCK` +- `HID_INDICATOR_CAPS_LOCK` +- `HID_INDICATOR_SCROLL_LOCK` +- `HID_INDICATOR_COMPOSE` +- `HID_INDICATOR_KANA` + +Each child node must also have an `leds` property, which holds a list of LED nodes to control. In this example, the LEDs are labeled `num_lock_led` and `caps_lock_led`, so the `leds` properties refer to them with `&num_lock_led` and `&caps_lock_led`, respectively. + +You can also control multiple LEDs from the same indicator: + +```dts + leds = <&led_1 &led_2>; +``` + +## LED Behavior + +See the [feature page](../../features/led-indicators.md) and [configuration page](../../config/led-indicators.md) for details on configuring LED brightness according to the indicator state. diff --git a/docs/docs/hardware-integration/lighting/underglow.md b/docs/docs/hardware-integration/lighting/underglow.md new file mode 100644 index 00000000..61ecacf6 --- /dev/null +++ b/docs/docs/hardware-integration/lighting/underglow.md @@ -0,0 +1,136 @@ +--- +title: RGB Underglow +sidebar_label: RGB Underglow +description: Lighting system that controls strips of RGB LEDs. +--- + +Please see [lighting feature page](../../features/lighting.md#rgb-underglow) for an introduction on the feature. + +Support for RGB underglow is always added to a board, not a shield. This is because the LED strip drivers rely on hardware-specific interfaces (e.g. SPI, I2S) and configurations, which shields do not control. +See the documentation page on [pin control](../pinctrl.mdx) for detailed information on setting up pins for hardware protocols such as SPI or PIO that are used for LED strips. + +Shields written for boards which support RGB underglow should add a `boards/` folder underneath the shield folder. Inside this `boards/` folder, create a `.overlay` for any of the boards the shield can be used with. Place all hardware-specific configurations in these `.overlay` files. + +For example: the `kyria` shield has a [`boards/nice_nano_nrf52840_zmk.overlay`](https://github.com/zmkfirmware/zmk/blob/main/app/boards/shields/kyria/boards/nice_nano_nrf52840_zmk.overlay) and a [`boards/nrfmicro_nrf52840_zmk_1_3_0.overlay`](https://github.com/zmkfirmware/zmk/blob/main/app/boards/shields/kyria/boards/nrfmicro_nrf52840_zmk_1_3_0.overlay), which configure a WS2812 LED strip for the `nice_nano/nrf52840/zmk` and `nrfmicro@1.3.0/nrf52840/zmk` boards respectively. + +### nRF52-Based Boards + +Using an SPI-based LED strip driver on the `&spi3` interface is the simplest option for nRF52-based boards. + +:::info +If possible, avoid using pins which are limited to low-frequency I/O for this purpose. The resulting interference may result in poor wireless performance. The list of low frequency I/O pins for the nRF52840 can be found at . +::: + +The following example uses `P0.06` as the "Data In" pin of a WS2812-compatible LED strip: + +```dts +#include + +&pinctrl { + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; + + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + +&spi3 { + compatible = "nordic,nrf-spim"; + status = "okay"; + + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; + + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; + + /* WS2812 */ + chain-length = <10>; /* number of LEDs */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; + color-mapping = ; + }; +}; +``` + +Standard WS2812 LEDs use a wire protocol where the bits for the colors green, red, and blue values are sent in that order. +If your board/shield uses LEDs that require the data sent in a different order, the `color-mapping` property ordering should be changed to match. + +### Other Boards + +Be sure to check the Zephyr documentation for the LED strip and necessary hardware bindings. Not every board has an `spi3` node, or configures `pinctrl` the same way. Reconcile this with any hardware restrictions found in the manufacturer's datasheet. Additional hardware interfaces may need to be enabled via Kconfig. + +For example: the `sparkfun_pro_micro_rp2040` board can utilize SPI via PIO to run a WS2812 strip on `GP0`: + +```dts +#include + +&pinctrl { + pio0_spi0_default: pio0_spi0_default { + group1 { + pinmux = ; + }; + }; +}; + +&pio0 { + status = "okay"; + + pio0_spi0: pio0_spi0 { + pinctrl-0 = <&pio0_spi0_default>; + pinctrl-names = "default"; + + compatible = "raspberrypi,pico-spi-pio"; + #address-cells = <1>; + #size-cells = <0>; + clocks = <&system_clk>; + clock-frequency = <4000000>; + + clk-gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>; /* Must be defined. Select a pin that is not used elsewhere. */ + mosi-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>; /* Data In pin. */ + miso-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>; /* Must be defined. Re-using the DI pin is OK for WS2812. */ + + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; + + /* WS2812 */ + chain-length = <10>; /* number of LEDs */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; + color-mapping = ; + }; + }; +}; +``` + +### Final Steps + +Once the `led_strip` is properly defined, add it to the `chosen` node under the root devicetree node: + +```dts +/ { + chosen { + zmk,underglow = &led_strip; + }; +}; +``` diff --git a/docs/docs/hardware-integration/new-board.md b/docs/docs/hardware-integration/new-board.md new file mode 100644 index 00000000..3450cdfd --- /dev/null +++ b/docs/docs/hardware-integration/new-board.md @@ -0,0 +1,187 @@ +--- +title: New Board +--- + +This guide will walk through the necessary steps to write a [board](./index.mdx#boards--shields) suitable for use with ZMK. Boards used with ZMK fall into two categories: + +- Boards with interconnects, such as `nice_nano` or `seeed_xiao`. Such boards will (active development of ZMK aside) always be used with a shield to create a keyboard. +- Boards that are themselves keyboards, such as `bt75` or `ferris`. + +Some keyboards are boards but also have interconnects for modular add-ons. These are considered as keyboard-boards for the purpose of this guide. Details on adding an interconnect for modular add-ons are considered out of scope. + +## Boards Included in ZMK + +Boards with interconnects can be considered for inclusion to the tree of ZMK. If this is your aim, it is vital that you read through our [clean room policy](../development/contributing/clean-room.md). + +Boards with interconnects that are included with ZMK are generally: + +- Reliably commercially available as individual units +- In regular use across multiple shields (i.e. not niche) + +Popular open source designs which are not being sold can also be considered for inclusion. + +There also exist many boards in the tree of upstream Zephyr. We generally accept ZMK-variants of these boards into our tree as well. + +## New ZMK Module Repository + +Regardless of whether you aim to include the board in ZMK or not, you should first write the definition for it in a module. A new ZMK module repository can be created from a template. + +:::note +This guide assumes you already have a configured GitHub account. If you don't yet have one, go ahead and [sign up](https://github.com/join) before continuing. +::: + +Follow these steps to create your new repository: + +- Visit +- Click the green "Use this template" button +- In the drop down that opens, click "Use this template". +- In the following screen, provide the following information: + - A repository name, e.g. `my-board-module`. + - A brief description, e.g. `ZMK Support For MyBoard`. + - Select Public or Private, depending on your preference. +- Click the green "Create repository" button + +The repository is a combination of the directories and files required of a ZMK config, and those required of a shield module. +This enables the use of GitHub Actions to test that the shield is defined correctly. +See also the page on [module creation](../development/module-creation.md) for a reference on exactly which file structure and files are required for a ZMK keyboard module. + +We recommend that you take this moment to name your module according to our [convention](../development/module-creation.md), i.e. your `zephyr/module.yml` file should begin with + +```yaml title="zephyr/module.yml" +name: zmk-keyboard- +``` + +if it is a keyboard, or + +```yaml title="zephyr/module.yml" +name: zmk-component- +``` + +if it is a board with an interconnect. + +## Write a Zephyr Board Definition + +Zephyr has a guide on writing a board [here](https://docs.zephyrproject.org/4.1.0/hardware/porting/board_porting.html). Follow this guide to create a Zephyr-compatible board. Use the `boards` folder of your ZMK module as a base. + +Once your board definition has been written, we recommend flashing some [Zephyr samples](https://docs.zephyrproject.org/4.1.0/samples/basic/basic.html) to it, to verify that it is working. + +Flashing Zephyr samples can also be very helpful when troubleshooting/testing the functionality of extra features such as LED ICs, Bluetooth, or various sensor ICs. + +## Write a ZMK Variant of Zephyr Board + +To make a board fully compatible with ZMK, you will be creating a ZMK variant of the Zephyr board you made in the previous step. Perform the below actions for each board you've defined, in the case of multi-board split keyboards. + +### Add Variant to board.yml + +Edit your existing `board.yml` file to add the variant: + +```yaml title="board.yml" +board: + ... + socs: + - name: + variants: + - name: zmk +``` + +### Add Kconfig for ZMK Variant + +Add a file to your board's folder called `_zmk_defconfig`. This file will be used to set Kconfig flags specific to the ZMK variant. + +:::warning +Make sure you know what each Kconfig flag does before you enable it. Some flags may be incompatible with certain hardware, or have other adverse effects. +::: + +These flags are typically a subset of the following: + +```yaml title="_zmk_defconfig" +# SPDX-License-Identifier: + +# Enable MPU +CONFIG_ARM_MPU=y + +CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=125000000 + +# Enable reset by default +CONFIG_RESET=y + +# Enable clock control by default +CONFIG_CLOCK_CONTROL=y + +# Code partition needed to target the correct flash range +CONFIG_USE_DT_CODE_PARTITION=y + +# Output UF2 by default, native bootloader supports it. +CONFIG_BUILD_OUTPUT_UF2=y + +# USB HID +CONFIG_ZMK_USB=y + +# BLE HID +CONFIG_ZMK_BLE=y + +# Bootloader Support +CONFIG_RETAINED_MEM=y +CONFIG_RETENTION=y +CONFIG_RETENTION_BOOT_MODE=y + +# Settings Support +CONFIG_MPU_ALLOW_FLASH_WRITE=y +CONFIG_NVS=y +CONFIG_SETTINGS_NVS=y +CONFIG_FLASH=y +CONFIG_FLASH_PAGE_LAYOUT=y +CONFIG_FLASH_MAP=y + + +# Enable HW stack protection +CONFIG_HW_STACK_PROTECTION=y + +# Enable GPIO +CONFIG_GPIO=y + +# Defaults for matrix scanning to avoid interrupt issues +CONFIG_ZMK_KSCAN_MATRIX_POLLING=y +``` + +Note that none of our in-tree boards have all of the above flags set. We recommend referencing the Kconfig flags from an existing in-tree board with the same SoC as the one you are using for your initial definition, making sure you understand what each flag does. + +### Add Devicetree for ZMK Variant + +```dts title="_zmk.dts +/* + * Copyright (c) + * + * SPDX-License-Identifier: + */ + +// Include the base board definition +#include <../boards///.dts> +// Include predefined boot mode settings, e.g. +#include + +// Disable UART nodes if they are not actively in use (wired split) as they increase power draw +&uart0 { status = "disabled"; }; + +// Reduce the code partition section of the memory and add a storage partition to store ZMK Studio changes +&code_partition { + reg = <0x100 (DT_SIZE_M(2) - 0x100 - DT_SIZE_K(512))>; +}; +&flash0 { + reg = <0x10000000 DT_SIZE_M(2)>; + partitions { + storage_partition: partition@180000 { + reg = <0x180000 DT_SIZE_K(512)>; + read-only; + }; + }; +}; +``` + +See [here](./bootloader/index.mdx) for bootloader instructions for other SoCs. Depending on your SoC and design you may need to make further changes. Please refer to our in-tree boards with the same SoC as yours as examples. + +## Next Steps + +If your board is a keyboard, continue from [the `Kconfig.defconfig` step](https://zmk.dev/docs/hardware-integration/new-shield?keyboard-type=unibody#kconfigdefconfig) of the new shield guide. Use your ZMK variant's devicetree instead of the overlay file which would be used for a shield. + +If your board is a board with an interconnect, your next step should be to write a [tester shield](../troubleshooting/hardware-issues.mdx#identifying-issues). Such a shield should be the bare minimum shield to verify that your board works with ZMK. diff --git a/docs/docs/hardware-integration/new-shield.mdx b/docs/docs/hardware-integration/new-shield.mdx new file mode 100644 index 00000000..de9eca55 --- /dev/null +++ b/docs/docs/hardware-integration/new-shield.mdx @@ -0,0 +1,621 @@ +--- +title: New Keyboard Shield +--- + +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; +import InterconnectTabs from "@site/src/components/interconnect-tabs"; +import Metadata from "@site/src/data/hardware-metadata.json"; + +export const SplitTabs = (props) => ( + + {/* eslint-disable-next-line */} + {props.children} + + +); + +export const SplitInvisTabs = (props) => ( + + {/* eslint-disable-next-line */} + {props.children} + + +); + +This guide will walk through the steps necessary to add ZMK support for a keyboard that uses an add-on MCU board (e.g. Pro Micro compatible) to provide the microprocessor. + +The high level steps are: + +- Create a new [ZMK module](../development/module-creation.md) to contain your shield. +- Create a new shield directory. +- Add the base Kconfig files. +- Add the shield overlay file defining: + - The keyboard scan driver for detecting key press/release. + - The matrix transform for mapping keyboard scan row/column values to key positions in the keymap. + - The physical layout definition to select the matrix transform and keyboard scan instance. +- Add a default keymap, which users can override in their own configs as needed. +- Add a `.zmk.yml` metadata file to document the high level details of your shield, and the features it supports. + +Many of the above files will differ depending on whether your keyboard is a unibody or is [split into multiple parts](../features/split-keyboards.md). + +After adding ZMK support for a basic shield using this guide, check the sidebar for guides on adding any additional features (such as encoders) that your keyboard has. +It may be helpful to review the upstream [shields documentation](https://docs.zephyrproject.org/4.1.0/hardware/porting/shields.html#shields) to get a proper understanding of the underlying system before continuing. + +:::info +When writing your shield, please be aware of [licensing](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/licensing-a-repository): + +- If you reference code or other items that are under a copyleft license (e.g. GNU GPLv2, used by QMK) as a reference, you must license your shield under a compatible copyleft license. +- If you license anything under a copyleft license, it cannot be referenced by anyone working on ZMK (see our [clean room policy](../development/contributing/clean-room.md)). + +We generally recommend licensing your shield under MIT, if you don't have a particular incentive to do otherwise. +::: + +## New ZMK Module Repository + +The first step to creating the shield is to create a new ZMK module repository from a template. + +:::note +This guide assumes you already have a configured GitHub account. If you don't yet have one, go ahead and [sign up](https://github.com/join) before continuing. +::: + +Follow these steps to create your new repository: + +- Visit https://github.com/zmkfirmware/unified-zmk-config-template +- Click the green "Use this template" button +- In the drop down that opens, click "Use this template". +- In the following screen, provide the following information: + - A repository name, e.g. `my-shield-module`. + - A brief description, e.g. `ZMK Support For MyShield Keyboard`. + - Select Public or Private, depending on your preference. +- Click the green "Create repository" button + +The repository is a combination of the directories and files required of a ZMK config, and those required of a shield module. +This enables the use of GitHub Actions to test that the shield is defined correctly. +See also the page on [module creation](../development/module-creation.md) for a reference on exactly which file structure and files are required for a ZMK keyboard module. + +We recommend that you take this moment to name your module according to our [convention](../development/module-creation.md), i.e. your `zephyr/module.yml` file should begin with + +```yaml title="zephyr/module.yml" +name: zmk-keyboard- +``` + +## New Shield Directory + +Shields in Zephyr module "board root" go into the `boards/shields/` directory; that means the new shield directory in your module repository should be: + +```bash +mkdir boards/shields/ +``` + +## Base Kconfig Files + +:::tip[Example shields] +You can check out the [`shields` folder](https://github.com/zmkfirmware/zmk/tree/main/app/boards/shields) in the ZMK repo that houses [the in-tree supported shields](../hardware.mdx) in order to copy and modify as a starting point. +::: + +There are two required [Kconfig](https://docs.zephyrproject.org/4.1.0/build/kconfig/index.html) files that need to be created for your new keyboard shield to get it picked up for ZMK, `Kconfig.shield` and `Kconfig.defconfig`. + + + +### Kconfig.shield + +The `Kconfig.shield` file defines the shield name used to build your keyboard. + + + + +```kconfig title="Kconfig.shield" +# No whitespace after the comma or in your keyboard name! +config SHIELD_MY_KEYBOARD + def_bool $(shields_list_contains,my_keyboard) +``` + +This will set the `SHIELD_MY_KEYBOARD` flag to `y` whenever `my_keyboard` is used as the shield name. +The `SHIELD_MY_KEYBOARD` flag will be used in `Kconfig.defconfig` to set other properties about your shield, so make sure that they match. + + + + +Split keyboards have multiple shield names defined, one for each part. +For example, if your keyboard consists of two halves named `my_keyboard_left` and `my_keyboard_right`, it would look like this: + +```kconfig title="Kconfig.shield" +# No whitespace after the comma or in your part name! +config SHIELD_MY_KEYBOARD_LEFT + def_bool $(shields_list_contains,my_keyboard_left) + +# No whitespace after the comma or in your part name! +config SHIELD_MY_KEYBOARD_RIGHT + def_bool $(shields_list_contains,my_keyboard_right) +``` + +This will set the `SHIELD_MY_KEYBOARD_LEFT` flag to `y` whenever `my_keyboard_left` is used as the shield name. +Likewise, when `my_keyboard_right` is used as the shield name the `SHIELD_MY_KEYBOARD_RIGHT` flag is set to `y`. +The `SHIELD_MY_KEYBOARD_LEFT` and `SHIELD_MY_KEYBOARD_RIGHT` flags will be used in `Kconfig.defconfig` to set other properties about your shields, so make sure that they match. + + + + +### Kconfig.defconfig + +The `Kconfig.defconfig` file is used to set new defaults for configuration settings when this shield is used. +One main item that usually has a new default value set here is the `ZMK_KEYBOARD_NAME` value, which controls the display name of the device over USB and BLE. + +The updated new default values should always be wrapped inside a conditional on the shield config name defined in the `Kconfig.shield` file. + + + + +```kconfig title="Kconfig.defconfig" +if SHIELD_MY_KEYBOARD + +# Name must be less than 16 characters long! +config ZMK_KEYBOARD_NAME + default "My Keyboard" + +endif +``` + + + + +For split keyboards, a central side (usually the left) is specified via the configuration in this file. +For that side, the keyboard name is assigned and the central config is set. +The peripheral side is not assigned a name. +Finally, the split config needs to be set for both sides: + +```kconfig title="Kconfig.defconfig" +if SHIELD_MY_KEYBOARD_LEFT + +# Name must be less than 16 characters long! +config ZMK_KEYBOARD_NAME + default "My Keyboard" + +config ZMK_SPLIT_ROLE_CENTRAL + default y + +endif + +if SHIELD_MY_KEYBOARD_LEFT || SHIELD_MY_KEYBOARD_RIGHT + +config ZMK_SPLIT + default y + +endif +``` + + + + +### User Configuration Files + +In addition to the `Kconfig.shield` and `Kconfig.defconfig` files, many shields will also define a user configuration file called `my_keyboard.conf`. +This file exists to provide "suggestions" of [configuration settings](../config/index.md) for a user to select, such as enabling deep sleep. +Note that the name should match the shield/part name defined in the [Kconfig.shield file](#kconfigshield). + +:::warning +This file can also be used to set configuration options. +However, if a flag is set in this file, **the user can no longer change it**. +Though sometimes necessary, this method of setting configuration options is discouraged. +The case for which this is necessary is due to be eliminated in the future, making this method redundant. +::: + + + + + +Split keyboards can have multiple `.conf` files, one for each part. For example: + +- `my_keyboard.conf` - Configuration elements affect both halves +- `my_keyboard_left.conf` - Configuration elements only affect left half +- `my_keyboard_right.conf` - Configuration elements only affect right half + +In most case you'll only need to use the .conf file that affects both halves of a split board. + +:::note +The shared configuration in `my_keyboard.conf` is only applied when you are building with a [`zmk-config` folder](../development/local-toolchain/build-flash.mdx#building-from-zmk-config-folder) and it is present at `config/my_keyboard.conf`. +::: + + + + +## Shield Overlays + + + +Shield overlay files contain a devicetree description that is merged with the primary board devicetree description during the firmware building process. +There are three main things that need to be defined in this file: + +- Your keyboard scan (kscan) driver, which determines which GPIO pins to scan for key press events +- Your matrix transform, which acts as a "bridge" between the kscan and the keymap +- Your physical layout, which aggregates the above and (optionally) defines physical key positions so that the keyboard can be used with [ZMK Studio](../features/studio.md). + + + + +A unibody keyboard will have a single overlay file named `my_keyboard.overlay`, where `my_keyboard` is the shield name defined in the [Kconfig.shield file](#kconfigshield). + + + + +A split keyboard will have an overlay file defined for each split part. +For example, if the keyboard is split into a left and a right half, these can be named: + +- `my_keyboard_left.overlay` +- `my_keyboard_right.overlay` + +Here `my_keyboard_left` and `my_keyboard_right` are the shield names defined in the [Kconfig.shield file](#kconfigshield). + +Split keyboards often share some of their devicetree description. +The standard approach is to have a core `my_keyboard.dtsi` (devicetree include) file, which is included into each of the shield overlays. + + + + +### Kscan + +The kscan node defines the controller GPIO pins that are used to scan for key press and release events. The pins are referred to using the GPIO labels noted in the pinouts below: + + + +To use GPIO pins that are not part of the interconnects as described above, you can use the GPIO labels that are specific to each controller type. +For instance, pins numbered `PX.Y` in nRF52840-based boards can be referred to via `&gpioX Y` labels. +An example is `&gpio1 7` for the `P1.07` pin that the nice!nano exposes in the middle of the board. + +The [Keyboard Scan configuration documentation](../config/kscan.md) has the full details on configuring the kscan driver. + + + + +For a simple 3x3 macropad matrix, the kscan might look something like: + +```dts title="my_keyboard.overlay" +/ { + kscan0: kscan0 { + compatible = "zmk,kscan-gpio-matrix"; + diode-direction = "col2row"; + wakeup-source; + + col-gpios + = <&pro_micro 15 GPIO_ACTIVE_HIGH> + , <&pro_micro 14 GPIO_ACTIVE_HIGH> + , <&pro_micro 16 GPIO_ACTIVE_HIGH> + ; + + row-gpios + = <&pro_micro 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; + }; +}; +``` + + + + +For split keyboards you should define your kscan in `my_keyboard.dtsi`. +If your `row-gpios` or your `col-gpios` (or both) are identical between the parts, then they should also be defined in `my_keyboard.dtsi`. +For example, for a `col2row` 2-part split keyboard (18 keys split into a 3x3 macropad on both halves) where the "row" GPIOs used are the same for both halves: + +```dts title="my_keyboard.dtsi" +/ { + kscan0: kscan0 { + compatible = "zmk,kscan-gpio-matrix"; + diode-direction = "col2row"; + wakeup-source; + + row-gpios + = <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; + + }; +}; +``` + +The missing `col-gpios` would be defined in your `my_keyboard_left.overlay` and `my_keyboard_right.overlay` files. + +```dts title="my_keyboard_left.overlay" +#include "my_keyboard.dtsi" // The shared dtsi file is included in the overlay + +// Label of the kscan node in the dtsi +&kscan0 { + col-gpios + = <&pro_micro 19 GPIO_ACTIVE_HIGH> + , <&pro_micro 18 GPIO_ACTIVE_HIGH> + , <&pro_micro 15 GPIO_ACTIVE_HIGH> + ; +}; +``` + +```dts title="my_keyboard_right.overlay" +#include "my_keyboard.dtsi" // The shared dtsi file is included in the overlay + +// Label of the kscan node in the dtsi +&kscan0 { + col-gpios + = <&pro_micro 10 GPIO_ACTIVE_HIGH> + , <&pro_micro 11 GPIO_ACTIVE_HIGH> + , <&pro_micro 13 GPIO_ACTIVE_HIGH> + ; +}; +``` + + + + +### Matrix Transform + +The matrix transform is used to transform row/column events into "key position" events. + +When a key is pressed, a kscan event is generated from it with a `row` and a `column` value corresponding to the zero-based indices of the `row-gpios` and `col-gpios` pins that triggered the event, respectively. +Then, the "key position" triggered is the index of the `RC(row, column)` in the matrix transform where `row` and `column` are the indices as mentioned above. +This key position will in turn have a behavior binding associated with it in the keymap. + + + + +The `my_keyboard.overlay` must include a matrix transform that defines this mapping from row/column values to key positions. +Add `#include ` to the top of the file. + +Here is an example of a matrix transform for the previous 3x3 macropad: + +```dts title="my_keyboard.overlay" +#include // Put this with the other includes at the top of your overlay + +/ { + default_transform: keymap_transform0 { + compatible = "zmk,matrix-transform"; + columns = <3>; // Length of the "col-gpios" array + rows = <3>; // Length of the "row-gpios" array + map = < + // Key 1 | Key 2 | Key 3 + RC(0,0) RC(0,1) RC(0,2) + // Key 4 | Key 5 | Key 6 + RC(1,0) RC(1,1) RC(1,2) + // Key 7 | Key 8 | Key 9 + RC(2,0) RC(2,1) RC(2,2) + >; + }; +}; +``` + + + + +Split keyboards should define their matrix transform in the shared `my_keyboard.dtsi`. Add `#include ` to the top of the file. + +Here is an example of a matrix transform for the previous example (18-key double macropad): + +```dts title="my_keyboard.dtsi" +#include // Put this with the other includes at the top of your dtsi + +/ { + default_transform: keymap_transform0 { + compatible = "zmk,matrix-transform"; + columns = <6>; + rows = <3>; + map = < + // LKey 1 |LKey 2 |LKey 3 RKey 1 |RKey 2 |RKey 3 + RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) + // LKey 4 |LKey 5 |LKey 6 RKey 4 |RKey 5 |RKey 6 + RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) + // LKey 7 |LKey 8 |LKey 9 RKey 7 |RKey 8 |RKey 9 + RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) + >; + }; +}; +``` + +The above transform has 6 columns and three rows, while each half of the keyboard only has three columns and three rows. +To allow the kscan matrices to be joined in the matrix transform, an offset is applied to the matrix transform of peripherals. + +```dts title="my_keyboard_right.overlay" +&default_transform { // Offset of 3 because the left side has 3 columns + col-offset = <3>; +}; +``` + +This offset means that when the right half of the keyboard has a key event triggered by the GPIO pins at the indices `0,0` of its `row-gpios` and `col-gpios` arrays respectively, it will interpret it as an `RC(0,3)` event rather than an `RC(0,0)` event. +Additional peripherals would need their columns to be offset by an ever increasing number equal to the sum of the columns in the central + any peripherals that came before it. +You can also apply row offsets with `row-offset`. + + + + +The matrix transform is also used to "correct" pin orderings into something that more closely matches the physical order of keys. Causes of abnormal pin orderings include: + +- To reduce the used pins, an "efficient" number of rows/columns for the GPIO matrix is used, that does _not_ match the physical layout of rows/columns of the actual key switches. +- For non-rectangular keyboards with thumb clusters, non `1u` locations, etc. + +See the [in-tree keyboards](https://github.com/zmkfirmware/zmk/tree/main/app/boards/shields) that ZMK defines for examples of more complex matrix transformations. + +Also see the [matrix transform section](../config/layout.md#matrix-transform) in the Keyboard Scan configuration documentation for further details and examples of matrix transforms. + +### Physical Layout + +Your keyboard will need to have a physical layout defined. +Physical layouts organize the matrix transform, kscan and optionally the physical description of key positions in a single entity. + + + + +If you are not planning to add support for [ZMK Studio](../features/studio.md), you can add a `zmk,physical-layout`-compatible node for each physical layout your keyboard supports: + +```dts +/ { + physical_layout0: physical_layout_0 { // First physical layout, use different naming for other layouts + compatible = "zmk,physical-layout"; + display-name = "Default Layout"; + kscan = <&kscan0>; // Label of the kscan node, optional if all layouts use the same + transform = <&default_transform>; // Label of the matrix transform for this layout + }; +}; +``` + +These nodes should be placed in `my_keyboard.overlay` for unibody keyboards and the shared `my_keyboard.dtsi` for splits. + + + + +If you are planning to add support for [ZMK Studio](../features/studio.md), you should follow the [physical layouts documentation](physical-layouts.md) to create a new file `my_keyboard-layouts.dtsi` which includes the physical layout definitions. +Once you have finished defining your physical layouts, import the `my_keyboard-layouts.dtsi` file at the top of your `my_keyboard.overlay` file (unibody) or `my_keyboard.dtsi` file (split). + +```dts +#include "my_keyboard-layouts.dtsi" +``` + + + + +### Chosen Node + +Set the `chosen` node to a defined "default" physical layout. This should also be placed in the same file as the physical layout, i.e. `my_keyboard.overlay` for unibodies and `my_keyboard.dtsi` for split keyboards. + +```dts +/ { + chosen { + zmk,physical-layout = &physical_layout0; + // Other chosen items + }; +}; +``` + +If you define multiple physical layouts, users can select a different layout by overriding the `zmk,physical-layout` chosen node in their keymap file or by using [ZMK Studio](../features/studio.md) if your board is compatible with it. + +:::note +If all of your physical layouts use the same `kscan` node under the hood, you can skip setting the `kscan` property on each layout and instead assign the `zmk,kscan` chosen node to your single kscan instance: + +```dts +/ { + chosen { + zmk,kscan = &kscan0; + zmk,physical-layout = &physical_layout0; + // Other chosen items + }; +}; +``` + +::: + +### Wired Split + + +This is only required for wired split keyboards. + + +If testing the experimental [wired split](../features/split-keyboards.md) support, you should assign a [predefined](./pinctrl.mdx#predefined-nodes) or [pinctrl configured](./pinctrl.mdx) UART to the `device` property of a new node with `compatible` value of `"zmk,wired-split"`: + +```dts +/ { + wired_split { + compatible = "zmk,wired-split"; + device = <&pro_micro_serial>; + }; +}; +``` + +See the [wired split](../config/split.md#wired-split) configuration for more details. + +For wireless split keyboards, this step should be skipped, especially since the UART pins on your controller might already be in use for other functionality. + + + + +## Default Keymap + +Each keyboard should provide a default keymap to be used when building the firmware, which can be overridden and customized by user configs. +For "shield keyboards", this should be placed in the `boards/shields/my_keyboard/my_keyboard.keymap` file. + +Here is an example simple keymap for a 3x3 macropad, with only one layer: + +```dts title="my_keyboard.keymap" +#include +#include + +/ { + keymap { + compatible = "zmk,keymap"; + + default_layer { // Layer 0 + // ------------------------------------- + // | Z | M | K | + // | A | B | C | + // | D | E | F | + bindings = < + &kp Z &kp M &kp K + &kp A &kp B &kp C + &kp D &kp E &kp F + >; + }; + }; + }; +``` + +The keymap should match the order of the keys in the [matrix transform](#matrix-transform) exactly, left to right, top to bottom (they are both 1 dimensional arrays rearranged with newline characters for better legibility). +See [Keymaps](../keymaps/index.mdx) for information on defining keymaps in ZMK. +If you wish to use [ZMK Studio](../features/studio.md) with your keyboard, make sure to assign the [ZMK Studio unlocking behavior](../keymaps/behaviors/studio-unlock.md) to a key in your keymap. + +## Metadata + +ZMK makes use of an additional metadata YAML file for all boards and shields to provide high level information about the hardware to be incorporated into setup scripts/utilities, website hardware list, etc. + +Here is a sample `corne.zmk.yml` file from the repository: + +```yaml +file_format: "1" +id: corne +name: Corne +type: shield +url: https://github.com/foostan/crkbd/ +requires: [pro_micro] +exposes: [i2c_oled] +features: + - keys + - display +siblings: + - corne_left + - corne_right +``` + +You should place a properly named `my_keyboard.zmk.yml` file in the directory next to your other shield values, and fill it out completely and accurately. +See [Hardware Metadata Files](hardware-metadata-files.md) for the full details. + +## Testing + +Once you've defined everything as described above, you can build your firmware to make sure everything is working. +If you wish to test that your keyboard works with [ZMK Studio](../features/studio.md), you'll also need to follow the [instructions for enabling Studio](../features/studio.md#building). + +### GitHub Actions + +To use GitHub Actions to test, push the files defining the keyboard to GitHub. +Next, [update the `build.yaml`](../customization.md#building-additional-keyboards) of your `zmk-config` to build your keyboard. + +- If your shield is defined in your `zmk-config`, then the shield should start building. +- If the shield is defined in a separate module, you will need to [adjust your `west.yml` to reference the module](https://zmk.dev/docs/features/modules#building-with-modules). + +### Local Toolchain + +You can also use a local toolchain setup to test your keyboard. +Follow [our guide for getting set up](../development/local-toolchain/setup/index.md), then follow the [instructions for building and flashing locally](../development/local-toolchain/build-flash.mdx). +You will need to specify the module of your keyboard when building. diff --git a/docs/docs/hardware-integration/physical-layouts.md b/docs/docs/hardware-integration/physical-layouts.md new file mode 100644 index 00000000..60a29a8d --- /dev/null +++ b/docs/docs/hardware-integration/physical-layouts.md @@ -0,0 +1,418 @@ +--- +title: Physical Layouts +toc_max_heading_level: 4 +--- + +A physical layout is a devicetree entity that aggregates all details about a certain possible keyboard layout. +It contains: + +- A [keyboard scan (kscan) driver](../config/kscan.md) +- A [matrix transform](../config/layout.md#matrix-transform) +- (Optional) [Physical key positions](#optional-keys-property) + +By convention, physical layouts and any [position maps](#position-map) are defined in a separate file called `-layouts.dtsi`. +This file should then be imported by the appropriate file, such as an `.overlay`, `.dts`, or a `.dtsi` (the last of which is itself imported by one of the previous). + +## Basic Physical Layout + +A bare physical layout without the `keys` property looks like this: + +```dts title="-layouts.dtsi" +/ { + physical_layout0: physical_layout_0 { + compatible = "zmk,physical-layout"; + display-name = "Default Layout"; + }; +}; +``` + +Every physical layout needs a matrix transform, and optionally can also have a kscan. By convention, these are assigned to the physical layout in the file where the matrix transform and kscan are defined: + +```dts title=".dts | .dtsi | .overlay" +&physical_layout0 { + kscan = <&kscan0>; // Label of the kscan node this layout uses + transform = <&default_transform>; // Label of the matrix transform this layout uses +}; +``` + +The `kscan` property only needs to be assigned if some of your physical layouts use different kscans. Otherwise, it can be omitted and the `kscan` can be assigned in the [`chosen` node](./new-shield.mdx#chosen-node) instead. See the [configuration section on physical layouts](../config/layout.md#physical-layout) for reference. + +## (Optional) Keys Property + +The `keys` property is required for [ZMK Studio](../features/studio.md) support. It is used to describe the physical attributes of each key position present in that layout. + +To pull in the necessary definition for creating physical layouts with the `keys` property, a new include should be added to the top of the devicetree file: + +```dts title="-layouts.dtsi" +#include +``` + +Assigned to the `keys` property is an array of key descriptions listed in the same order as keymap bindings, matrix transforms, etc. +A key description has the shape `<&key_physical_attrs w h x y r rx ry>` with the following properties: + +| Property | Type | Description | Unit | +| ---------- | -------- | ------------------------------------ | ------------------------------------------------------- | +| Width | int (>0) | Key(cap) width | [centi-](https://en.wikipedia.org/wiki/Centi-)"keyunit" | +| Height | int (>0) | Key(cap) height | [centi-](https://en.wikipedia.org/wiki/Centi-)"keyunit" | +| X | uint | Key X position (top-left point) | [centi-](https://en.wikipedia.org/wiki/Centi-)"keyunit" | +| Y | uint | Key Y position (top-left point) | [centi-](https://en.wikipedia.org/wiki/Centi-)"keyunit" | +| Rotation | int | Key rotation (positive => clockwise) | [centi-](https://en.wikipedia.org/wiki/Centi-)degree | +| Rotation X | int | Rotation origin X position | [centi-](https://en.wikipedia.org/wiki/Centi-)"keyunit" | +| Rotation Y | int | Rotation origin Y position | [centi-](https://en.wikipedia.org/wiki/Centi-)"keyunit" | + +You can specify negative values in devicetree using parentheses around it, e.g. `(-3000)` for a 30 degree counterclockwise rotation. + +We recommend the use of for writing a physical layout or converting one from a QMK JSON definition. If your keyboard already has a physical layout defined for the use with KLE, we recommend using first to convert your existing layout into QMK JSON. The second tool can also import the position data from KiCAD, if said program was used to design the keyboard. + +### Physical Layout with Keys Example + +Here is an example of a physical layout for a 2x2 macropad: + +```dts title="macropad-layouts.dtsi" +#include + +/ { + macropad_physical_layout: macropad_physical_layout { + compatible = "zmk,physical-layout"; + display-name = "Macro Pad"; + transform = <&default_transform>; + kscan = <&kscan0>; + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 0 0 0 0> + , <&key_physical_attrs 100 100 100 0 0 0 0> + , <&key_physical_attrs 100 100 0 100 0 0 0> + , <&key_physical_attrs 100 100 100 100 0 0 0> + ; + }; +}; +``` + +## Using Predefined Layouts + +ZMK defines a number of popular physical layouts in-tree at [`app/dts/layouts`](https://github.com/zmkfirmware/zmk/tree/main/app/dts/layouts). +To use such layouts, import them and assign their `transform` and (optionally) `kscan` properties. + +Here is an example of using the predefined physical layouts for a keyboard with the same layout as the "ferris": + +```dts title="ferris.dtsi" +#include + +// Assigning suitable kscan and matrix transforms +&cuddlykeyboards_ferris_layout { + transform = <&default_transform>; + kscan = <&kscan0>; +}; +``` + +Shared physical layouts found in the same folder are defined such that they can be used together, to define [multiple physical layout](#multiple-physical-layouts) options. See below for more information on multiple physical layouts. + +Here is an example of using the predefined physical layouts for a 60% keyboard: + +```dts title="bt60_v1.dts" +#include +#include +#include +#include + + +// Assigning suitable kscan and matrix transforms +&layout_60_ansi { + transform = <&ansi_transform>; + kscan = <&ansi_kscan>; +}; + +&layout_60_iso { + transform = <&iso_transform>; + kscan = <&iso_kscan>; +}; + +&layout_60_all1u { + transform = <&all_1u_transform>; + kscan = <&all_1u_kscan>; +}; + +&layout_60_hhkb { + transform = <&hhkb_transform>; + kscan = <&hhkb_kscan>; +}; +``` + +## Multiple Physical Layouts + +If a keyboard has multiple possible layouts (e.g. you can snap off an outer column), then you should define multiple matrix transformations and multiple physical layouts, one for each possible layout. +If necessary, you can also define multiple kscan instances. + +```dts title="-layouts.dtsi" +// Needed if and only if keys property is used +#include + +/ { + default_layout: default_layout { + compatible = "zmk,physical-layout"; + display-name = "Default Layout"; + transform = <&default_transform>; + kscan = <&kscan0>; + keys = <...>; // List of key positions, optional + }; + + alt_layout: alt_layout { + compatible = "zmk,physical-layout"; + display-name = "Alternate Layout"; + transform = <&alt_transform>; + kscan = <&alt_kscan0>; + keys = <...>; // List of key positions, optional + }; +}; +``` + +### Position Map + +When switching between layouts using [ZMK Studio](../features/studio.md), an attempt is made to automatically infer bindings for the keys in the new layout from the old layout. Keys with the same physical key properties are given the same binding. This approach has some limitations, so for more accurate transference of bindings a position map is used. + +:::warning + +Keys whose positions can neither be inferred from the default layout nor have bindings in the position map cannot be assigned to. + +::: + +A position map looks something like this: + +```dts title="-layouts.dtsi" +/ { + position_map { + compatible = "zmk,physical-layout-position-map"; + complete; // Optional, see 'Example non-complete position map' + layout1: layout1 { + physical-layout = <&physical_layout1>; + positions = <...>; // List of positions to map + }; + layout2: layout2 { + physical-layout = <&physical_layout2>; + positions = <...>; // List of positions to map + }; + // Additional layout child nodes + }; +}; +``` + +A child node is defined for every layout the keyboard can have. The `positions` properties each contain an array of indices, which are used to refer to keys in the `keys` array of their corresponding physical layout. A `0` in the `positions` property refers to the first key in the `keys` array, a `1` refers to the second, and so on. + +When switching from one layout to another, say from layout 1 to layout 2, the _orderings_ found in the `positions` arrays are used. The first key in the `positions` array of layout 2 is given the binding assigned to the first key in the `positions` array of layout 1, the second key in the `positions` array of layout 2 is given the binding assigned to the second key in the `positions` array of layout 1, and so on. + +The position map should be marked as `complete` if all desired binding transfers are defined within it. Otherwise, [ZMK Studio](../features/studio.md) will continue to automatically determine assignments for keys not listed in the position map. See [this example non-complete position map](#example-non-complete-position-map) for why this could be useful. + +See also the [configuration section on position maps](../config/layout.md#physical-layout-position-map). + +We recommend the use of , distinct from the previous two mentioned, for the purposes of writing a position map. + +#### Writing a position map + +Start by creating the parent node defining the position map: + +```dts title="-layouts.dtsi" +/ { + keypad_position_map { + compatible = "zmk,physical-layout-position-map"; + complete; // Optional, see 'Example non-complete position map' + + // Child node 1 here + + // Child node 2 here + + // ... + }; +}; +``` + +It is easiest to write the position map by considering one layout to be the "reference" layout, and defining all other position maps with respect to it. The reference layout should usually be the one with the most keys, as that creates a position map where no key bindings are lost when switching to a layout with fewer keys and back. + +Create the child node for the reference layout, and fill the `positions` array by counting upwards, giving it the same order and number of keys as the `keys` property of its physical layout. For a 2x2 macropad the child node would be + +```dts title="2x2macropad-layouts.dtsi" +/ { + keypad_position_map { + // Other properties + + macropad_map: macropad { + physical-layout = <¯opad_layout>; + positions // This is equivalent to `positions = <0 1 2 3>;`, reshaped for readability + = < 0 1 > + , < 2 3 >; + }; + }; +}; +``` + +Next write the child nodes for every other layout with respect to the reference. For keys present in the reference which aren't present in the layout you're writing the child node for, count backwards: The first key that isn't present is given the highest number found in the `positions` array of the reference, the second key that isn't present is given the second highest number, and so on. The below examples show this process more clearly. + +#### Example larger position map + +Consider the following macropad/numpad with two physical layouts: + +![A 4x5 numpad/macropad](../assets/hardware-integration/numpad.svg) + +Let us first consider each side individually. The "reference" position map of the left side would look like this: + +```dts title="macropad-layouts.dtsi" +/ { + keypad_position_map { + // Other properties + + macropad_map: macropad { + physical-layout = <¯opad_layout>; + positions + = < 0 1 2 3> + , < 4 5 6 7> + , < 8 9 10 11> + , <12 13 14 15> + , <16 17 18 19>; + }; + }; +}; +``` + +Meanwhile, the "reference" position map of the right side with fewer keys would look like this: + +```dts title="macropad-layouts.dtsi" +/ { + keypad_position_map { + // Other properties + + numpad_map: numpad { + physical-layout = <&numpad_layout>; + positions + = < 0 1 2 3> + , < 4 5 6 7> + , < 8 9 10 > + , <11 12 13 14> + , <15 16 >; + }; + }; +}; +``` + +As a reminder, the `positions` property is a one-dimensional array like the `keys` property, formatted nicely through the use of whitespace and angle bracket groupings. + +If the left side with more keys was used as the reference layout, then the overall position map of the keyboard would look like this: + +```dts title="macropad-layouts.dtsi" +/ { + keypad_position_map1 { + compatible = "zmk,physical-layout-position-map"; + complete; + + macropad_map: macropad { + physical-layout = <¯opad_layout>; + positions + = < 0 1 2 3> + , < 4 5 6 7> + , < 8 9 10 11> + , <12 13 14 15> + , <16 17 18 19>; + }; + + numpad_map: numpad { + physical-layout = <&numpad_layout>; + positions + = < 0 1 2 3> + , < 4 5 6 7> + , < 8 9 10 19> + , <11 12 13 14> + , <15 18 16 17>; + }; + }; +}; +``` + +The "missing" positions are filled with the "spare" numbers of the layout with more keys. The order in which the spare keys are used is arbitrary and counting backwards is a convenient way to assign them. + +If the right side with fewer keys were used as a reference instead, then the overall position map would look like this: + +```dts title="macropad-layouts.dtsi" +/ { + keypad_position_map2 { + compatible = "zmk,physical-layout-position-map"; + complete; + + macropad_map: macropad { + physical-layout = <¯opad_layout>; + positions + = < 0 1 2 3> + , < 4 5 6 7> + , < 8 9 10 > + , <12 13 14 15> + , <16 18 >; + }; + + numpad_map: numpad { + physical-layout = <&numpad_layout>; + positions + = < 0 1 2 3> + , < 4 5 6 7> + , < 8 9 10 > + , <11 12 13 14> + , <15 16 >; + }; + }; +}; +``` + +There is functionally no difference between the two approaches, but the first approach is recommended. + +#### Example non-`complete` position map + +Consider the above device again -- most of the positions have identical `keys` properties. For example, the macropad's `12` key and the numpad's `11` key would have the same physical property, and be mapped to each other automatically. The keys whose mappings are unable to be determined automatically are those with different physical characteristics: the 2u high and 2u wide keys, and their corresponding 1u counterparts. + +A non-`complete` position map can be used to assign mappings to only these particular keys: + +```dts title="macropad-layouts.dtsi" +/ { + keypad_position_map3 { + compatible = "zmk,physical-layout-position-map"; + + macropad_map: macropad { + physical-layout = <¯opad_layout>; + positions = <7 15 16>; + }; + + numpad_map: numpad { + physical-layout = <&numpad_layout>; + positions = <7 14 15>; + }; + }; +}; +``` + +This is noticably simpler to write, and can be a useful way of saving flash space for memory-constrained devices. + +#### Additional example: corne + +The following is an example of a position map which maps the 5-column and 6-column Corne keymap layouts. The 6 column layout is the reference layout. + +```dts + foostan_corne_lossless_position_map { + compatible = "zmk,physical-layout-position-map"; + + complete; + + twelve_map: twelve { + physical-layout = <&foostan_corne_6col_layout>; + positions + = < 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 >; + }; + + ten_map: ten { + physical-layout = <&foostan_corne_5col_layout>; + positions + = <41 0 1 2 3 4 5 6 7 8 9 40> + , <39 10 11 12 13 14 15 16 17 18 19 38> + , <37 20 21 22 23 24 25 26 27 28 29 36> + , < 30 31 32 33 34 35 >; + }; + }; +``` + +The above position map is in actuality spread over [multiple files](https://github.com/zmkfirmware/zmk/tree/main/app/dts/layouts/foostan/corne), as one of our predefined layouts. diff --git a/docs/docs/hardware-integration/pinctrl.mdx b/docs/docs/hardware-integration/pinctrl.mdx new file mode 100644 index 00000000..67dec613 --- /dev/null +++ b/docs/docs/hardware-integration/pinctrl.mdx @@ -0,0 +1,573 @@ +--- +title: Board Pin Control +sidebar_label: Pin Control +--- + +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; +import InterconnectTabs from "@site/src/components/interconnect-tabs"; +import Metadata from "@site/src/data/hardware-metadata.json"; + +This page exists to provide a guide to [Pin Control](https://docs.zephyrproject.org/4.1.0/hardware/pinctrl/index.html#pin-control) for ZMK users and designers. Refer to [Zephyr's page on Pin Control](https://docs.zephyrproject.org/4.1.0/hardware/pinctrl/index.html#pin-control) for elaboration and more details on any of the points raised here. + +A basic keyboard design as introduced in the [new shield guide](./new-shield.mdx) only uses its pins for the keyboard matrix. Many keyboard designs make use of advanced components or functionality, such as displays or shift registers. This results in the keyboard making use of communication protocols such as (but not limited to) SPI, I2C, or UART. Configuring pins for the usage of advanced functionality such as drivers for the previously named protocols is referred to as "Pin Control". + +The details of pin control can vary from vendor to vendor. An attempt was made to be as general as possible, but it isn't possible to cover all possible cases. The approaches for the nRF52840 and RP2040 MCUs/SoCs are documented in their entirety below. For other MCUs/SoCs, please refer to the [Zephyr documentation](https://docs.zephyrproject.org/4.1.0/index.html) and the examples and other files found in-tree of [ZMK](https://github.com/zmkfirmware/zmk/tree/main/app/boards) and [ZMK's fork of Zephyr](https://github.com/zmkfirmware/zephyr). + +## Boards, Shields, and Modules + +Pin control is always defined for a _board_, never for a shield: + +- If you are defining a keyboard that is a _board_, then you will be editing and adding on to the files in your keyboard's folder as usual. +- If your keyboard consists of a _board and a shield_, then you should define a new folder inside of your shield's folder called `boards`. You will need to add a `.overlay` for each board to be used with said shield. Take for example the file structure of the "sofle" shield: + ```plaintext + boards/shields/sofle/ + ├── boards/ + │ ├── nice_nano_nrf52840_zmk.overlay + │ ├── nrfmicro_nrf52840_zmk_1_3_0.overlay + └── + ``` + Note that you will need to define a separate overlay _for each_ of the boards to be used with the shield. + +Assume that the shield that you are using is found in-tree of ZMK or within an external module, and _does not_ contain the overlay for the board that you wish to use. +If this is the case, then you should fork the source repository and add the overlay to the fork. Use said fork to build your firmware, and potentially submit a PR to upstream. + +## Predefined Nodes + +Many boards will already have some pins configured for particular protocols. We recommend using these pins whenever possible. + + + +Note that some boards may have these pins configured to fit the above pinouts, rather than the capabilities of the MCU. Most notably, boards using the nRF52840 often end up putting low-frequency pins at the locations of the SPI buses above. More on low-frequency pins in the next section. + +## Pin Selection + +Prior to setting up pin control, you will want to make sure that the pins you use are suitable for the driver that you are using. For this purpose, you will most likely need to consult the datasheet of your MCU/SoC directly. Different MCUs/SoCs have different restrictions in regards to this. The nRF52840 and RP2040 are excellent examples: + +- The nRF52840 has its pins marked as either low frequency or high frequency. + - Using low frequency pins at a frequency of over 10KHz can cause reliability issues with the wireless antenna, making them unideal for I2C, UART, and (most of) SPI. + - High frequency pins can be used for almost all protocols that the nRF52840 is capable of, without restrictions. The exception is QSPI, which is restricted to specific high frequency pins (QSPI is mostly irrelevant for keyboard designs). +- The RP2040 supports two SPI buses labeled SPI0 and SPI1, two I2C buses labeled I2C0 and I2C1, and two UART buses labeled UART0 and UART1. It restricts its pins to particular functions for each of these. For example, pin 0 can be used as the RX pin of SPI0, the TX pin of UART0, or the SDA pin of I2C0.

You will need to make sure that the pins you select all lie on the same bus and fulfil each of the functions necessary for the bus to function. So for a fully functioning SPI0 bus, you would need to select a SPI0 RX pin, a SPI0 TX pin, and a SPI0 SCK pin.

The RP2040 also comes with programmable input/output blocks (PIO) that can be used to emulate protocols such as (but not limited to) the previously named protocols. Using PIO adds some complexity though, and there are a limited number of PIO blocks, so it is recommended that you stick to the predefined buses where possible. + +Note that not all peripherals require all pins to be defined - for example, there are plenty of SPI devices which do not require either the MISO (Main In, Sub Out) or the MOSI (Main Out, Sub In) pin. + +## Pin Control File + +Pin control consists of two parts: + +1. Defining and grouping the pins together for a driver +2. Augmenting a driver/bus node and assigning pin groups to it + +It is standard to do this in two separate files. Create a file called `-pinctrl.dtsi`, which will be used for the first part. This file will later be imported into your board's `.dts`. If you are configuring pin control for a [shield](#boards-shields-and-modules), it is common to write the contents of both parts into the `.overlay` file directly. + +### MCU/SoC Pinctrl Bindings Files + +The specifics of pin control for a particular MCU/SoC are presented via a [devicetree bindings](https://docs.zephyrproject.org/latest/build/dts/bindings-intro.html) file, found under `zephyr/dts/bindings/pinctrl/`. + +- The nRF52840 uses the `zephyr/dts/bindings/pinctrl/nordic,nrf-pinctrl.yaml` file. +- The RP2040 uses the `zephyr/dts/bindings/pinctrl/raspberrypi,pico-pinctrl.yaml` file. + +These files often contain useful comments on pin control for their devices, and so can be worth a read in addition to this page. + +### MCU/SoC Pinctrl Bindings Headers + +MCUs/SoCs will also have pinctrl header files found under `zephyr/include/zephyr/dt-bindings/pinctrl/`. You will want to make sure that the header file corresponding to your MCU/SoC is imported into your board's `.dts`/`.overlay`. For the nRF52840, your board should already be importing a file such as `nordic/nrf52840_qiaa.dtsi`, which includes the pinctrl header via the following inclusions: + +```plaintext +nrf-pinctrl.h -> nrf_common.dtsi -> nrf52840.dtsi -> nrf52840_qiaa.dtsi +``` + +The corresponding file for the RP2040 (`rpi_pico/rp2040.dtsi`), however, does not include the pinctrl header. Hence you will need to import said header at the top of your `-pinctrl.dtsi` file: + +```dts title="-pinctrl.dtsi" +#include +``` + +If you are configuring pin control for a [shield](#boards-shields-and-modules), then this file may already be imported by the board's definition, in which case you shouldn't re-include it here. + +:::info +Some MCUs/SoCs may have their headers located in a Zephyr HAL module. See for example the [Atmel HAL module](https://github.com/zephyrproject-rtos/hal_atmel/tree/master/include/dt-bindings/pinctrl). +::: + +### Pinctrl Node + +All of your configuration will happen by adjusting the `pinctrl` node. Changes are made like so: + +```dts title="-pinctrl.dtsi" +&pinctrl { + /* your modifications go here */ +}; +``` + +Within said node, you will configure one or more child nodes for the buses. You will want to define the child nodes according to the instructions in the `pinctrl.yaml` file. +The child nodes that you define should be named appropriately. The common naming schema is `usageNumber_state`. For example, `uart0_default`. + +Child nodes are (generally, there are [exceptions](https://docs.zephyrproject.org/4.1.0/hardware/pinctrl/index.html#pin-configuration)) expected to contain one or more subnodes typically named "groupX". These are for grouping together pins that should be assigned the same state, such as enabling an internal pull-up. +Below are some examples of SPI child nodes for the nRF52840 and the RP2040. Further examples are contained within the comments of the respecting `pinctrl.yaml` files. + + + +```dts title="-pinctrl.dtsi" +&pinctrl { + /* configuration for spi0 device, default state */ + spi0_default: spi0_default { + /* node name is arbitrary */ + group1 { + /* main role: configure P0.01 as SPI clock, P0.02 as SPI MOSI, P0.03 as SPI MISO */ + psels = , + , + ; + }; + }; + + /* configuration for spi0 device, sleep state */ + spi0_sleep: spi0_sleep { + group1 { + /* main role: configure P0.01 as SPI clock, P0.02 as SPI MOSI, P0.03 as SPI MISO */ + psels = , + , + ; + low-power-enable; + }; + }; + +}; + +```` +Pins are always selected via assignments to `psels`. `NRF_PSEL` is a helper macro with the following arguments: +- Pin function configuration. This is the `name` portion of one of the `NRF_FUNC_{name}` macros found in `zephyr/include/zephyr/dt-bindings/pinctrl/nrf-pinctrl.h`. +- Port (0 or 1). +- Pin (0 to 31). + +The following pin properties can be assigned to groups: + +- `bias-disable`: Disable pull-up/down (default behavior, not required). +- `bias-pull-up`: Enable pull-up resistor. +- `bias-pull-down`: Enable pull-down resistor. +- `low-power-enable`: Configure pin as an input with input buffer disconnected. + +Note that bias options are mutually exclusive. + +There is an additional child node for the "sleep" state, configuring the pins for low power. More on states will be explained later. + + +```dts title="-pinctrl.dtsi" +&pinctrl { + /* configuration for spi0 device, default state */ + spi0_default: spi0_default { + group1 { + /* configure P18 as SPI0 clock, P19 as SPI0 MOSI */ + pinmux = , ; + }; + group2 { + /* configure P16 as SPI0 MISO */ + pinmux = ; + /* enable input on pin 1 */ + input-enable; + }; + }; + + /* configuration for an spi device using PIO0, default state */ + pio0_spi_default: pio0_spi_default { + group1 { + /* Configure P13 and P14 for PIO, to be used for MOSI and SCK */ + pinmux = , ; + }; + group2 { + /* Configure P16 for PIO to be used for MISO with input */ + pinmux = ; + input-enable; + }; + }; +}; +```` + +The values that can be listed in `pinmux` to assign functionality to pins are listed in `zephyr/include/zephyr/dt-bindings/pinctrl/rpi-pico-rp2040-pinctrl.h`. + +The following pin properties can be assigned to groups: + +- `bias-disable`: Disable pull-up/down (default, not required). +- `bias-pull-up`: Enable pull-up resistor. +- `bias-pull-down`: Enable pull-down resistor. +- `input-enable`: Enable input from the pin. +- `input-schmitt-enable`: Enable input hysteresis. +- `drive-strength`: Set the drive strength of the pin, in milliamps. Possible values are: 2, 4, 8, 12 (default: 4mA) +- `slew-rate`: If set to 0, slew rate is set to slow. If set to 1, it is set to fast. + + + + +## Driver/Bus Node + +Once pin control for a driver/bus has been defined, you'll need to adjust another node defining the driver/bus. This adjustment can be done in a number of places by convention: + +- If defining a unique board, `.dts` +- If defining boards with multiple revisions/versions that share pin control, `-common.dtsi` (which is then included by each `_.dtsi`) +- If [configuring boards for a shield](#boards-shields-and-modules), directly in the `.overlay` file + +You'll want to identify the correct node for you to be changing. The nRF52840 has nodes defined in `dts/arm/nordic/nrf52840.dtsi`, while the RP2040 has nodes defined in `dts/arm/rpi_pico/rp2040.dtsi`. Always be aware of and account for other devices on your node, there may be some which you did not add yourself. + +Adjust the node like so: + + + +```dts title=".dts" +&spi0 { + compatible = "nordic,nrf-spim"; + pinctrl-0 = <&spi0_default>; + pinctrl-1 = <&spi0_sleep>; + pinctrl-names = "default", "sleep"; +}; +``` + + +```dts title=".dts" +&spi0 { + pinctrl-0 = <&spi0_default>; + pinctrl-names = "default"; +}; +``` + + +This assigns the pins defined in the previous section's examples to the `spi0` node. + +Notice that the nRF52840 assigns two items. This is because nodes making use of pin control come with two states by default (though they can have more), a `default` state and a `sleep` state. The nRF52840 can put pins into a "low power state", to reduce power consumption while on sleep. If the RP2040 node made use of pullup or pulldown resistors which had a risk of power leakage while asleep, then it would also define an additional `pinctrl` child node and assign it like in the nRF52840 example. + +The nRF52840 example also changes the `compatible` assignment to use SPIM rather than SPI, since it is taking on the "main" role. Check the datasheet for more information about SPIM. The RP2040 makes no such distinction. + +### Alias + +You may wish to provide an alias to the node for various reasons: + +- Compatibility with other boards, if defining for a shield +- Compatibility with an interconnect +- Easier personal use + +Aliases are assigned like so: + +```dts + my_alias_spi: &spi0 {}; +``` + +### Usage + +Once you have defined your node, you make use of it by further adjusting the node. You will most likely need to enable the node, as most nodes come disabled: + +```dts +&spi0 { + status = "okay"; +}; +``` + +You would then want to make any adjustments to the node that are necessary, for example adjusting the clock speed. See the Zephyr API documentation for your `compatible` property to see the available properties for customisation. It is recommended to read through the [description of important properties](https://docs.zephyrproject.org/4.1.0/build/dts/intro-syntax-structure.html#dt-important-props), potentially with the addition of [this blog post](https://interrupt.memfault.com/blog/practical_zephyr_dt#zephyrs-dts-skeleton-and-addressing) if `#address-cells` is confusing you. + +For SPI specifically, you would create a child node within your SPI bus for each device making use of the SPI bus. + +```dts +&spi0 { + cs-gpios = <&gpio0 15 GPIO_ACTIVE_LOW>, <&gpio0 17 GPIO_ACTIVE_LOW>; + device1: device@0 { + compatible = "manufacturer,device"; + reg = <0>; + spi-max-frequency = <1000000>; /* conservatively set to 1MHz */ + }; + device2: device@1 { + compatible = "manufacturer,device"; + reg = <1>; + spi-max-frequency = <1000000>; /* conservatively set to 1MHz */ + }; +}; +``` + +Additional information on configuring specific devices for use with SPI buses or similar can be found in other pages of the ZMK documentation, or in the Zephyr documentation. + +### RP2040 PIO + +The [previous RP2040 example](#pinctrl-node) also configured pins for use with an RP2040 PIO block. To use PIO with SPI (or another purpose) you'll need to adjust the `pio0` or `pio1` nodes as follows: + +```dts title=".dts" +#include "-pinctrl.dtsi" + +&pio0 { + /* enables this PIO block */ + status = "okay"; + pio0_spi: pio0_spi { + /* Assign pinctrl to node */ + pinctrl-0 = <&pio0_spi_default>; + pinctrl-names = "default"; + compatible = "raspberrypi,pico-spi-pio"; + #address-cells = <1>; + #size-cells = <0>; + clocks = <&system_clk>; + clock-frequency = <4000000>; + /* These pins should be the same as in pinctrl */ + miso-gpios = <&gpio0 12 0>; + clk-gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>; + mosi-gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>; + + cs-gpios = <...>; // List of chip select gpios, one for each device + /* Nodes using the bus go here */ + }; +}; +``` + +Depending on the desired usage for PIO, you will want to adjust the `compatible` property and the SPI-specific properties (`miso-gpios`, `clk-gpios`, `mosi-gpios`). See the Zephyr API documentation for information about alternative PIO drivers. Once defined, SPI can be used via PIO as presented in the previous subsection, referring to `pio0_spi` (or similar) instead of `spi0`. + +### Additional examples + +Below are examples for UART and I2C, as the other two most common usages for pin control. + +#### UART nRF52840 + +In the pin control file: + +```dts +&pinctrl { + /* configuration for uart0 device, default state */ + uart0_default: uart0_default { + group1 { + /* configure P0.1 as UART_TX and P0.2 as UART_RTS */ + psels = , ; + }; + group2 { + /* configure P0.3 as UART_RX and P0.4 as UART_CTS */ + psels = , ; + /* both P0.3 and P0.4 are configured with pull-up */ + bias-pull-up; + }; + }; + + uart0_default: uart0_default { + group1 { + psels = , // EXT1 + ; // EXT2 + }; + }; + + uart0_sleep: uart0_sleep { + group1 { + /* configure P0.1 as UART_TX and P0.2 as UART_RTS */ + psels = , ; + low-power-enable; + }; + group2 { + /* configure P0.3 as UART_RX and P0.4 as UART_CTS */ + psels = , ; + /* both P0.3 and P0.4 are configured with pull-up */ + bias-pull-up; + low-power-enable; + }; + }; +}; +``` + +In the main file: + +```dts +#include "-pinctrl.dtsi" + +&uart0 { + pinctrl-0 = <&uart0_default>; + pinctrl-1 = <&uart0_sleep>; + pinctrl-names = "default", "sleep"; +}; +``` + +On designs using wired split on nRF52840, using asynchronous UART APIs with DMA will help ensure that the interrupts used to handle timing sensitive BT interactions can respond when needed. + +This can be accomplished by overwriding the `compatible` property to `"nordic,nrf-uarte"`, e.g.: + +```dts +&uart0 { + compatible = "nordic,nrf-uarte"; + pinctrl-0 = <&uart0_default>; + pinctrl-1 = <&uart0_sleep>; + pinctrl-names = "default", "sleep"; +}; +``` + +In addition to this `compatible` override, a setting needs to be tweaked to ensure that the UART isn't selected for interrupt mode when async is prefered. + +The following should be added to the board's/shield's `Kconfig.defconfig`: + +```dts +config UART_0_INTERRUPT_DRIVEN + depends on !ZMK_SPLIT_WIRED_UART_MODE_ASYNC +``` + +for the correct `UART_#` prefix matching the numbered UART being used. + +#### UART rp2040 + +In the pin control file: + +```dts +#include + +&pinctrl { + /* configuration for the usart0 "default" state */ + uart0_default: uart0_default { + group1 { + /* configure P0 as UART0 TX */ + pinmux = ; + }; + group2 { + /* configure P1 as UART0 RX */ + pinmux = ; + /* enable input on pin 1 */ + input-enable; + }; + }; +}; +``` + +In the main file: + +```dts +#include "-pinctrl.dtsi" + +&uart0 { + pinctrl-0 = <&uart0_default>; + pinctrl-names = "default"; +}; +``` + +#### UART RP2040 PIO + +In the pin control file: + +```dts +#include + +&pinctrl { + /* configuration for the uart0 "default" state */ + pio0_uart_default: pio0_uart_default { + /* tx pin, NAME IS NOT ARBITRARY */ + tx_pins { + /* configure P0 as UART0 TX */ + pinmux = ; + }; + /* rx pin, NAME IS NOT ARBITRARY */ + rx_pins { + /* configure P1 as UART0 RX */ + pinmux = ; + /* enable input on pin 1 */ + input-enable; + bias-pull-up; + }; + }; +}; +``` + +In the main file: + +```dts +#include "-pinctrl.dtsi" + +&pio0 { + status = "okay"; + + pio0_uart: serial { + status = "okay"; + compatible = "raspberrypi,pico-uart-pio"; + pinctrl-0 = <&pio0_uart_default>; + pinctrl-names = "default"; + current-speed = <115200>; + }; +}; +``` + +#### I2C nRF52840 + +Specifically for an I2C controller, aka Nordic TWIM. + +In the pin control file: + +```dts +&pinctrl { + /* configuration for i2c0 device, default state */ + i2c0_default: i2c0_default { + group1 { + psels = , + ; + }; + }; + + i2c0_sleep: i2c0_sleep { + group1 { + psels = , + ; + low-power-enable; + }; + }; +}; +``` + +In the main file: + +```dts +#include "-pinctrl.dtsi" + +&i2c0 { + compatible = "nordic,nrf-twim"; // I2C controller instead of generic + status = "okay"; + pinctrl-0 = <&i2c0_default>; + pinctrl-1 = <&i2c0_sleep>; + pinctrl-names = "default", "sleep"; + clock-frequency = ; + + /* Nodes using the bus go here */ +}; +``` + +#### I2C RP2040 + +In the pin control file: + +```dts +#include + +&pinctrl { + /* configuration for the i2c0 "default" state */ + i2c0_default: i2c0_default { + group1 { + pinmux = , ; + input-enable; + input-schmitt-enable; + }; + }; +}; +``` + +In the main file: + +```dts +#include "-pinctrl.dtsi" + +&i2c0 { + status = "okay"; + pinctrl-0 = <&i2c0_default>; + pinctrl-names = "default"; + clock-frequency = ; + + /* Nodes using the bus go here */ +}; +``` + +#### I2C RP2040 PIO + +Zephyr currently does not have support for I2C using RP2040 PIO. diff --git a/docs/docs/hardware-integration/pointing.mdx b/docs/docs/hardware-integration/pointing.mdx new file mode 100644 index 00000000..cad34272 --- /dev/null +++ b/docs/docs/hardware-integration/pointing.mdx @@ -0,0 +1,330 @@ +--- +title: Pointing Devices +toc_max_heading_level: 2 +--- + +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +ZMK's pointing device support builds upon the Zephyr [input API](https://docs.zephyrproject.org/4.1.0/services/input/index.html) to offer pointing/mouse functionality with various hardware. +A limited number of input drivers are available in the Zephyr version currently used by ZMK, but additional drivers can be found in [external modules](../features/modules.mdx) for a variety of hardware. + +Pointing devices are also supported on split peripherals, with some additional configuration using the [input split device](../config/pointing.md#input-split). +The configuration details will thus vary depending on if you are adding a pointing device to a [split peripheral](../features/split-keyboards.md#central-and-peripheral-roles) as opposed to a unibody keyboard or split central part. + +export const SplitTabs = (props) => ( + + + {/* eslint-disable-next-line */} + {props.children} + + + +); + +## Input Device + +First, we must define the pointing device itself. The specifics of where this node goes will depend on the specific hardware. +_Most_ pointing hardware uses either SPI or I2C for communication, and will be nested under a properly configured bus node, e.g. `&pro_micro_i2c` or for a complete onboard setup, `&i2c3`. +See the documentation on [pin control](./pinctrl.mdx) if you need to configure the pins for an I2C or SPI bus. + +This node should always be set up in the `.overlay`/`.dts` file for the keyboard side that has the device attached to it. + + + + +For example, if setting up an [SPI device](https://github.com/zmkfirmware/zephyr/blob/v4.1.0%2Bzmk-fixes/dts/bindings/spi/spi-device.yaml), a node like following would be added to the `.overlay`/`.dts` file for the keyboard, like `.overlay`: + + + + +For example, if setting up an [SPI device](https://github.com/zmkfirmware/zephyr/blob/v4.1.0%2Bzmk-fixes/dts/bindings/spi/spi-device.yaml) on a central part, a node like following would be added to the `.overlay`/`.dts` file for the central part of the keyboard, like `.overlay`: + + + + +For example, if setting up an [SPI device](https://github.com/zmkfirmware/zephyr/blob/v4.1.0%2Bzmk-fixes/dts/bindings/spi/spi-device.yaml) on one of the peripheral parts, a node like following would be added to the `.overlay`/`.dts` file for that peripheral part, like `.overlay`: + + + + +```dts +&pro_micro_spi { + status = "okay"; + cs-gpios = <&pro_micro 19 GPIO_ACTIVE_LOW>; + + glidepoint: glidepoint@0 { + compatible = "cirque,pinnacle"; + reg = <0>; + spi-max-frequency = <1000000>; + status = "okay"; + dr-gpios = <&pro_micro 5 (GPIO_ACTIVE_HIGH)>; + + sensitivity = "4x"; + sleep; + no-taps; + }; +}; +``` + +The specifics of the properties required to set for a given driver will vary; always consult the devicetree bindings file for the specific driver to see what properties can be set. + +## Listener and Input Split Device + +Every input device needs an associated listener added that listens for events from the device and processes them before sending the events to the host using a HID mouse report. +See [input listener configuration](../config/pointing.md#input-listener) for the full details. + +If your pointing device is on a split peripheral part, you also need to define and use an input split device on all keyboard parts. + + + + +To add a listener for the above device, add to your `.overlay`/`.dts` file for the keyboard a node like the following: + +```dts title=".overlay" +/ { + glidepoint_listener { + compatible = "zmk,input-listener"; + device = <&glidepoint>; + }; +}; +``` + + + + +### Shared Configuration + +The input listener that is used by the central side is added to the shared `.dtsi` file that is included into both central and peripheral `.overlay`/`.dts` files. + +The input listener is disabled by default, and will be enabled later in the central part's overlay. This is so that keymaps (which are included for both central and peripheral builds) can reference the listener to add input processors without failing with an undefined reference error. + +```dts title=".dtsi" +/ { + glidepoint_listener: glidepoint_listener { + compatible = "zmk,input-listener"; + status = "disabled"; + }; +}; +``` + +If users want to add [input processors](#input-processors) to the listener node, they will use the corresponding node reference (here it is `&glidepoint_listener`) in their keymaps. + +### Central Configuration + +In the central, we do the following: + +- Include the shared .dtsi file. +- Enable the input listener that is created in our shared file. +- Assign the pointing device node to the listener. + +```dts title=".overlay" +// Pull in the shared configuration +#include ".dtsi" + +// Node from the previous Input Device section +&pro_micro_spi { + /* ... */ + + glidepoint: glidepoint@0 { + /* ... */ + }; +}; + +// Overrides for the input listener node +&glidepoint_listener { + status = "okay"; + device = <&glidepoint>; +}; +``` + +### Peripheral Configuration + +Finally, we include the shared file in all peripherals so that the listener node reference is available like mentioned above: + +```dts title=".overlay" +#include ".dtsi" +``` + + + + +### Shared Configuration + +When a pointing device is on a peripheral, both peripheral and central make use of a `zmk,input-split` device, which functions differently depending on where it is used. +To avoid duplicating work, this node can be defined in the shared `.dtsi` file that is included into both central and peripheral `.overlay`/`.dts` files. + +All split pointers are identified using a unique integer value, which is specified using the `reg` property and in the `@#` suffix for the node. If adding multiple peripheral pointers, be sure that each is given a unique identifier. + +Second, the input listener that is used by the central side is added here but disabled by default. This is so that keymaps (which are included for both central and peripheral builds) can reference the listener to add input processors without failing with an undefined reference error. + +:::note + +Input splits need to be nested under a parent node that properly sets `#address-cells = <1>` and `#size-cells = <0>`. These settings are what allow us to use a single integer number for the `reg` value. + +::: + +```dts title=".dtsi" +/ { + split_inputs { + #address-cells = <1>; + #size-cells = <0>; + + glidepoint_split: glidepoint_split@0 { + compatible = "zmk,input-split"; + reg = <0>; + }; + }; + + glidepoint_listener: glidepoint_listener { + compatible = "zmk,input-listener"; + status = "disabled"; + device = <&glidepoint_split>; + }; +}; +``` + +If users want to add [input processors](#input-processors) to the listener node, they will use the corresponding node reference (here it is `&glidepoint_listener`) in their keymaps. + +### Peripheral Configuration + +In the peripheral .overlay/.dts file, we do the following: + +- Include the shared .dtsi file. +- Update the input split with a reference to the new device node that should be proxied. + +```dts title=".overlay" +// Pull in the shared configuration +#include ".dtsi" + +// Node from the previous Input Device section +&pro_micro_spi { + /* ... */ + + glidepoint: glidepoint@0 { + /* ... */ + }; +}; + +// Overrides for the input-split child node +&glidepoint_split { + device = <&glidepoint>; + + // Optional + input-processors = <&zip_xy_transform (INPUT_TRANSFORM_XY_SWAP | INPUT_TRANSFORM_X_INVERT | INPUT_TRANSFORM_Y_INVERT)>; +}; +``` + +The [`input-processors` property](#input-processors) on the input split is optional, and only necessary if the input needs to be fixed up before it is sent to the central. + +### Central Configuration + +On the central, the input split acts as an input device, receiving events from the peripheral and raising them locally. +Here we first include the shared file, and then enable the input listener that is created, but disabled, in our shared file: + +```dts title=".overlay" +#include ".dtsi" + +&glidepoint_listener { + status = "okay"; +}; +``` + + + + +## Input Processors + +Some physical pointing devices may be generating input events that need adjustment before being sent to hosts. +For example a trackpad might be integrated into a keyboard rotated 90° and need the X/Y data adjusted appropriately. +This can be accomplished with [input processors](../keymaps/input-processors/index.md). +As an example, you could enhance the listener defined in the previous section with an input processor that inverts and swaps the X/Y axes: + +```dts +#include + +/ { + glidepoint_listener { + compatible = "zmk,input-listener"; + device = <&glidepoint>; + input-processors = <&zip_xy_transform (INPUT_TRANSFORM_XY_SWAP | INPUT_TRANSFORM_X_INVERT | INPUT_TRANSFORM_Y_INVERT)>; + }; +}; +``` + +## Configuration Setting + +If your keyboard hardware includes a pointing device by default, you can enable the [`ZMK_POINTING` config](../config/pointing.md#general) in your keyboard definition. +You can do that in your [`Kconfig.defconfig` file](new-shield.mdx#kconfigdefconfig), where you can also enable the config for the communication protocol (e.g. [SPI](https://docs.zephyrproject.org/4.1.0/kconfig.html#CONFIG_SPI), [I2C](https://docs.zephyrproject.org/4.1.0/hardware/peripherals/i2c.html#configuration-options)) used by the pointing device: + + + + +```kconfig title="Kconfig.defconfig" +if SHIELD_MY_KEYBOARD + +# Other keyboard settings + +config ZMK_POINTING + default y + +# Assuming pointing device uses SPI +config SPI + default y + +endif +``` + + + + +```kconfig title="Kconfig.defconfig" +if SHIELD_MY_KEYBOARD_ + +# Other settings + +config ZMK_POINTING + default y + +# Assuming pointing device uses SPI +config SPI + default y + +endif +``` + + + + +```kconfig title="Kconfig.defconfig" +if SHIELD_MY_KEYBOARD_ || SHIELD_MY_KEYBOARD_ + +# Other keyboard settings + +config ZMK_POINTING + default y + +endif + +if SHIELD_MY_KEYBOARD_ + +# Assuming pointing device uses SPI +config SPI + default y + +endif +``` + + + + +If the hardware is optional, users should set `CONFIG_ZMK_POINTING=y` manually in their [user configuration file](new-shield.mdx#user-configuration-files), along with the config for the protocol. diff --git a/docs/docs/hardware-integration/shift-registers.md b/docs/docs/hardware-integration/shift-registers.md new file mode 100644 index 00000000..4a5f02a9 --- /dev/null +++ b/docs/docs/hardware-integration/shift-registers.md @@ -0,0 +1,82 @@ +--- +title: Configuring Shift Registers +sidebar_label: Shift Registers +--- + +Shift registers are the recommended method of adding additional GPIO pins to MCUs and boards, when a standard matrix results in an insufficient number of keys. They are recommended because they simultaneously have very low power consumption and are quite cheap. This page serves as a (brief) introduction to shift registers, how to use them in your design, and how to configure ZMK to use them correctly. + +:::note +This page assumes that you are using a SIPO shift register with the part number 74HC595. Other shift registers can work as well but this is the most commonly used one. +::: + +To understand how shift registers work, we recommend reading through ["How does the 74HC595 Shift Register work?"](https://lastminuteengineers.com/74hc595-shift-register-arduino-tutorial/#how-does-the-74hc595-shift-register-work). + +## Design Guidelines + +The shift register output pins should act as MCU outputs in your design. All MCU inputs should remain connected directly to MCU/board pins. This is to allow the inputs to trigger "interrupts" on the MCU/board, upon which it will begin scanning the keys. Using a shift register for MCU inputs is also possible, but requires you to use a PISO shift register and will harm your battery life. Note that a [direct kscan](../config/kscan.md#direct-gpio-driver) keyboard does not have any MCU output pins, but a diodeless keyboard is still possible by making use of a single row pin and using the [matrix kscan](../config/kscan.md#matrix-driver) driver. + +:::info +In a diode matrix, MCU output pins are those connected to the [anodes of your diodes](https://learn.sparkfun.com/tutorials/diodes/all#ideal-diodes). You most likely will need to rearrange your matrix to maximize the use of shift register output pins, in order to reduce the total number of GPIO pins connected to your MCU. For example, a 9 column 5 row `col2row` matrix could be rearranged to use 16 columns and 3 rows. +::: + +You will want to make sure that the data and clock pins of the shift register are connected to high frequency/SPI-capable pins on your MCU. Make sure that these lie on the same SPI bus for your microcontroller, if applicable -- for instance RP2040 controllers require this, while nRF52840 ones do not. It is generally recommended that you use the pre-defined pins for SPI, if your board comes with them. + +ZMK allows you to daisy-chain up to four shift registers. Below is a fragment of a schematic showing two shift registers that are daisy-chained. + +![A fragment of a schematic featuring two shift registers daisy chained together.](../assets/hardware-integration/shift-register-daisy.png) + +## Configuration + +In ZMK, the SPI bus of your MCU is used to communicate with shift registers, using MOSI for SIPO shift registers and MISO for PISO shift registers. See [Pin Control](./pinctrl.mdx) for information on configuring the SPI bus. Shift registers can share the SPI bus with other devices with no issues. + +Some boards, such as Seeed Studio's Xiao series, already has particular pins defined and configured for SPI (these can be changed if the MCU allows for alternative selections of SPI pins). Others, such as the nice!nano or any custom board, will need to be configured by you manually. + +### Enable SPI + +Add the following line to `.defconfig`, inside of your device's `if` block: + +```kconfig title=".defconfig" +config SPI + default y +``` + +### Shift Register SPI Device + +To add your shift register as a SPI device, you'll need to overwrite your board's SPI configuration. For example, if your SPI bus has the node label `xiao_spi`, then you would add the following to your `.overlay`: + +```dts title=".overlay" +&xiao_spi { + status = "okay"; + cs-gpios = <&xiao_d 9 GPIO_ACTIVE_LOW>; + shifter: 595@0 { + compatible = "zmk,gpio-595"; + status = "okay"; + gpio-controller; + spi-max-frequency = <200000>; + reg = <0>; + #gpio-cells = <2>; + ngpios = <8>; + }; +}; +``` + +If there is more than one device on the SPI bus, you will need to add additional pins to the `cs-gpios` phandle array - one for each device. The `@0` number marks the index of the `cs-gpios` pin used to control a device. If you have daisy chained multiple shift registers, you'll also want to increase the number of GPIOs that the shift register provides by editing the `ngpios` node - set this to your number of output pins (should be one of 8, 16, 24, 32). You may also need to increase `spi-max-frequency` to a higher value if you have daisy chained shift registers, otherwise quick key presses may on occasion not trigger. + +### Using Shift Register Pins In Kscan + +Once all of this is set up, you can refer to pins from the shift register using `&shifter X` where X is the pin number. Use this to define your kscan, for example: + +```dts title=".overlay" +kscan0: kscan_0 { + compatible = "zmk,kscan-gpio-matrix"; + diode-direction = "col2row"; + col-gpios + = <&shifter 7 GPIO_ACTIVE_HIGH> + , <&shifter 6 GPIO_ACTIVE_HIGH> + , <&shifter 5 GPIO_ACTIVE_HIGH> + , <&shifter 4 GPIO_ACTIVE_HIGH> + , <&shifter 3 GPIO_ACTIVE_HIGH> + , <&shifter 2 GPIO_ACTIVE_HIGH> + ; +}; +``` diff --git a/docs/docs/hardware-integration/soft-off-setup.mdx b/docs/docs/hardware-integration/soft-off-setup.mdx new file mode 100644 index 00000000..8ca1cbd6 --- /dev/null +++ b/docs/docs/hardware-integration/soft-off-setup.mdx @@ -0,0 +1,173 @@ +--- +title: Adding Soft Off To A Keyboard +sidebar_label: Soft Off Setup +toc_max_heading_level: 2 +--- + +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +import SoftOffBehavior from "./includes/_soft-off-behavior.md"; +import SoftOffWaker from "./includes/_soft-off-waker.md"; +import GpioKeyDirect from "./includes/_gpio-key-direct.md"; +import GpioKeyMatrix from "./includes/_gpio-key-matrix.md"; +import GpioKeyWakeup from "./includes/_gpio-key-wakeup.md"; +import SidebandDirect from "./includes/_sideband-direct.md"; +import SidebandMatrix from "./includes/_sideband-matrix.md"; +import SidebandWakeupDirect from "./includes/_sideband-wakeup-direct.md"; + +Advanced methods of adding [soft off](../features/low-power-states.md#soft-off) to a keyboard are detailed below. The first two tabs describe methods involving hardware changes, while the last describes the firmware changes necessary to define a single specific key switch for waking up. + + + + + + The exact method of reusing a key switch to wake from the soft off state + differs depending on whether said key switch is part of a direct GPIO kscan + or part of a matrix kscan. + + + + + + + +## Hardware Changes + + + + + Add a direct push button between a GPIO pin and ground. This button will act as an on/off switch. + + Alternatively, if you wish to integrate a dedicated GPIO pin into a key switch combination using a direct kscan, tie all of the MCU pins that you wish to combine to the dedicated GPIO pin through an OR gate. All firmware changes then follow identically to the direct push button. + + + + To integrate the dedicated GPIO pin into your matrix, you will need to tie multiple switch outputs in the matrix together through AND gates and connect the result to the dedicated GPIO pin. This way you can use a (hardware defined) key combination in your existing keyboard matrix to trigger soft on/off. + + Ideally the switches used should be driven by the same matrix output pin so that both will be active simultaneously on the AND gate inputs. The alternative is to connect the switch to two MOSFETs that trigger both the regular matrix connect and the connect to the AND gate to ensure both pins are active/high at the same time even if scanning sets them high at different times. + + + + No hardware changes are necessary for this approach. + + + +## Firmware Changes + +Several items work together to make both triggering soft off properly, and setting up the device to _wake_ from soft off work as expected. + + + + + + + + + + +### Soft off behavior + +For this approach, you will need to make sure that the [soft off behavior](../keymaps/behaviors/soft-off.md) is present in your keymap, to trigger soft off. + + + + +### GPIO key + +Zephyr's basic [GPIO Key](https://docs.zephyrproject.org/4.1.0/build/dts/api/bindings/input/gpio-keys.html) concept is used to configure the soft off GPIO pin. +{/* secrettabs hides this tab selector. GPIO key changes its "orientation" between simple pin and matrix integrated. */} + + + + + + + + + + + + + +GPIO keys are defined using child nodes under the `gpio-keys` compatible node. Each child needs just one property defined: + +- The `gpios` property should be a [phandle-array](https://docs.zephyrproject.org/4.1.0/build/dts/phandles.html#zero-or-more-nodes-with-metadata-phandle-array-type) with a fully defined GPIO pin and with the correct pull up/down and active high/low flags set. + + + + + + + + + + + + + + + + + + + + + + You also need to update the `zmk,kscan` chosen value to point to the new kscan instance: + +```dts +/ { + chosen { + ... + zmk,kscan = &side_band_behavior_triggers; + ... + }; +}; +``` + + + + + + + + + + + + +Finally, we will list the `wakeup_scan` device in an additional configuration section so that the ZMK soft off process knows it needs to enable this device as part of the soft off processing so it can wake the keyboard from soft off when pressed: + +```dts +/ { + soft_off_wakers { + compatible = "zmk,soft-off-wakeup-sources"; + wakeup-sources = <&wakeup_scan>; + }; +}; +``` + +Here are the properties for the node: + +- The `compatible` property for the node must be `zmk,soft-off-wakeup-sources`. +- The `wakeup-sources` property is a [phandle array](../development/devicetree.md#property-types) pointing to all the devices that should be enabled during the shutdown process to be sure they can later wake the keyboard. + +:::tip +If you add your kscan to the `wakeup-sources` array, then your keyboard will wake upon pressing any key in your kscan. Essentially, this causes `&soft_off` to behave like a behavior that puts the keyboard in deep sleep. If you choose to do so, then you can omit everything aside from the `soft_off_wakers` node. +::: diff --git a/docs/docs/hardware.mdx b/docs/docs/hardware.mdx index 09f98c84..770ef2eb 100644 --- a/docs/docs/hardware.mdx +++ b/docs/docs/hardware.mdx @@ -11,11 +11,6 @@ import Heading from "@theme/Heading"; import { groupedMetadata } from "@site/src/components/hardware-utils"; export const toc = [ - { - value: "Onboard Controller Keyboards", - id: "onboard", - level: 2, - }, { value: "Composite Keyboards", id: "composite", @@ -28,21 +23,35 @@ export const toc = [ id: interconnect.id, level: 3, })), + { + value: "Onboard Controller Keyboards", + id: "onboard", + level: 2, + }, { value: "Other Hardware", id: "other-hardware", level: 2, }, - { - value: "Contributing", - id: "contributing", - level: 2, - }, ]; -With the solid technical foundation of Zephyr™ RTOS, ZMK can support a wide diversity of hardware targets. -That being said, there are specific [boards](faq.md#what-is-a-board) / -[shields](faq.md#what-is-a-shield) that have been implemented and tested by the ZMK contributors, listed below. +With the solid technical foundation of Zephyr™ RTOS, ZMK can support a wide variety of hardware targets, +including but not limited to Nordic nRF52, Raspberry Pi RP2040/RP2350, most ST STM32 MCUs, and Microchip SAMD21. +ZMK has the potential to run on any hardware supported by Zephyr™, such as those on +the [Zephyr™ supported boards](https://docs.zephyrproject.org/4.1.0/boards/index.html) page, though you may need to do some additional work to configure them for ZMK. +That being said, there are specific boards that have been tested and pre-configured by the ZMK contributors, denoted by the `zmk` board variants below. + +Designing a new keyboard? Check out the [Hardware Integration](hardware-integration/index.mdx) section +for more information on how to configure ZMK to run on your custom hardware. + +:::info[Boards, Board Variants, and Shields] + +ZMK uses the Zephyr concepts of "boards" and "shields" to refer to different parts of a keyboard build that are then combined during a firmware build. +Please see the [explainer on boards & shields](hardware-integration/index.mdx#boards--shields) for more details. + +Zephyr boards come with minimal configuration. ZMK board variants add the necessary configuration to make the board usable out of the box with ZMK. + +::: @@ -52,7 +61,6 @@ That being said, there are specific [boards](faq.md#what-is-a-board) / In addition to the basic keyboard functionality, there is also support for additional keyboard hardware such as encoders, RGB underglow, backlight and displays. Please see pages under the "Features" header in the sidebar for details. -{/* prettier-ignore */} -Contributing - -If you'd like to add support for a new keyboard shield, head over to the [New Keyboard Shield](development/hardware-integration/new-shield.mdx) documentation and note the [clean room design requirements](development/contributing/clean-room.md). +ZMK doesn't support boards with AVR 8-bit processors, such as the ATmega32U4, because Zephyr™ only +supports 32-bit and 64-bit platforms. As a result, controllers like the SparkFun Pro Micro, Elite-C, +and Arduino Uno Rev3 are **NOT** supported by ZMK. diff --git a/docs/docs/intro.md b/docs/docs/intro.md deleted file mode 100644 index d8d992e7..00000000 --- a/docs/docs/intro.md +++ /dev/null @@ -1,53 +0,0 @@ ---- -title: Introduction to ZMK -sidebar_label: Introduction -slug: / ---- - -ZMK Firmware is an open source (MIT) keyboard -firmware built on the [Zephyr™ Project](https://zephyrproject.org/) Real Time Operating System (RTOS). ZMK's goal is to provide a modern, wireless, and powerful firmware free of licensing issues. - -## Features - -ZMK is currently missing some features found in other popular firmware. This table compares the features supported by ZMK, BlueMicro and QMK: - -| Legend: | ✅ Supported | 🚧 Under Development | 💡 Planned | -| :------ | :----------- | :------------------- | :--------- | - -| **Feature** | ZMK | BlueMicro | QMK | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------- | :-: | :-------: | :-: | -| Low Latency BLE Support | ✅ | ✅ | | -| Multi-Device BLE Support | ✅ | | | -| [USB Connectivity](keymaps/behaviors/outputs.md) | ✅ | ✅ | ✅ | -| User Configuration Repositories | ✅ | | | -| Split Keyboard Support | ✅ | ✅ | ✅ | -| [Keymaps and Layers](keymaps/behaviors/layers.md) | ✅ | ✅ | ✅ | -| [Hold-Tap](keymaps/behaviors/hold-tap.mdx) (which includes [Mod-Tap](keymaps/behaviors/mod-tap.md) and [Layer-Tap](keymaps/behaviors/layers.md#layer-tap)) | ✅ | ✅ | ✅ | -| [Tap-Dance](keymaps/behaviors/tap-dance.mdx) | ✅ | ✅[^2] | ✅ | -| [Keyboard Keycodes](keymaps/list-of-keycodes.mdx#keyboard) | ✅ | ✅ | ✅ | -| [Media](keymaps/list-of-keycodes.mdx#media-controls) & [Consumer](keymaps/list-of-keycodes.mdx#consumer-controls) Codes | ✅ | ✅ | ✅ | -| [Encoders](features/encoders.md) | ✅ | ✅ | ✅ | -| [Display Support](features/displays.md)[^1] | 🚧 | 🚧 | ✅ | -| [RGB Underglow](features/underglow.md) | ✅ | ✅ | ✅ | -| [Backlight](features/backlight.mdx) | ✅ | ✅ | ✅ | -| One Shot Keys | ✅ | ✅ | ✅ | -| [Combo Keys](keymaps/combos.md) | ✅ | | ✅ | -| [Macros](keymaps/behaviors/macros.md) | ✅ | ✅ | ✅ | -| Mouse Keys | 🚧 | ✅ | ✅ | -| Low Active Power Usage | ✅ | | | -| Low Power Sleep States | ✅ | ✅ | | -| [Low Power Mode (VCC Shutoff)](keymaps/behaviors/power.md) | ✅ | ✅ | | -| Battery Reporting | ✅ | ✅ | | -| Shell over BLE | 💡 | | | -| Realtime Keymap Updating | 💡 | | ✅ | -| AVR/8 Bit | | | ✅ | -| [Wide Range of ARM Chips Supported](https://docs.zephyrproject.org/3.5.0/boards/index.html) | ✅ | | | - -[^2]: Tap-Dances are limited to single and double-tap on BlueMicro -[^1]: OLEDs are currently proof of concept in ZMK. - -## Code of Conduct - -Please note that this project is released with a -[Contributor Code of Conduct](https://www.contributor-covenant.org/version/2/0/code_of_conduct/). -By participating in this project you agree to abide by its terms. diff --git a/docs/docs/intro.mdx b/docs/docs/intro.mdx new file mode 100644 index 00000000..f73e5b69 --- /dev/null +++ b/docs/docs/intro.mdx @@ -0,0 +1,75 @@ +--- +title: Introduction to ZMK +sidebar_label: Introduction +slug: / +--- + +import { Columns, Column } from "@site/src/components/columns"; + +ZMK Firmware is an open source (MIT) keyboard firmware built on the [Zephyr™ Project](https://zephyrproject.org/) Real Time Operating System (RTOS). +ZMK's goal is to provide a modern and powerful firmware that is designed for power-efficiency, flexibility, and broad hardware support. +ZMK is capable of being used for both wired and wireless input devices. + +## Features + +Below table lists major features/capabilities currently supported in ZMK, as well as ones that are currently under development and not planned. + + + + +| Legend: | ✅ Supported | 🚧 Under Development | ❌ Not Planned | +| :------ | :----------- | :------------------- | -------------- | + + + + + + + +| Hardware | Support | +| ------------------------------------------------------------------------------------------------------------- | :-----: | +| [Wireless Split Keyboards](features/split-keyboards.md) | ✅ | +| Wired Split Keyboards | 🚧 | +| [Low Active Power Usage](/power-profiler) | ✅ | +| [Encoders](features/encoders.md) | ✅ | +| [LED-based Lighting](features/lighting.md) | ✅ | +| [Displays](features/displays.md) | 🚧 | +| [Pointing Devices](features/pointing.md) | ✅ | +| Multitouch Touchpads (PTP) | 🚧 | +| [Low Power Sleep States](features/low-power-states.md) | ✅ | +| [Low Power Mode (VCC Shutoff) for Peripherals](keymaps/behaviors/power.md) | ✅ | +| Improved Power Handling for Multiple Peripherals | 🚧 | +| [Battery Level Reporting](features/battery.md) | ✅ | +| [Support for a Wide Range of 32-bit Microcontrollers](https://docs.zephyrproject.org/4.1.0/boards/index.html) | ✅ | +| Support for AVR/8-bit Chips | ❌ | + + + + +| Connectivity | Support | +| --------------------------------------------------------------- | :-----: | +| Low-Latency BLE Support | ✅ | +| [Multi-Device BLE Connectivity](features/bluetooth.md#profiles) | ✅ | +| [USB Connectivity](keymaps/behaviors/outputs.md) | ✅ | + +| Keymap Features | Support | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-----: | +| [User Configuration Repositories](user-setup.mdx) | ✅ | +| [Keymaps and Layers](keymaps/index.mdx) | ✅ | +| [Wide Range of Keycodes](keymaps/list-of-keycodes.mdx) | ✅ | +| [Flexible Behavior System](keymaps/behaviors/index.mdx) | ✅ | +| [Hold-Taps](keymaps/behaviors/hold-tap.mdx) (including [Mod-Tap](keymaps/behaviors/hold-tap.mdx#mod-tap) and [Layer-Tap](keymaps/behaviors/hold-tap.mdx#layer-tap)) | ✅ | +| [Tap-Dances](keymaps/behaviors/tap-dance.mdx) | ✅ | +| [Sticky (One Shot) Keys](keymaps/behaviors/sticky-key.md) | ✅ | +| [Combos](keymaps/combos.md) | ✅ | +| [Macros](keymaps/behaviors/macros.md) | ✅ | +| [Mouse Keys](keymaps/behaviors/mouse-emulation.md) | ✅ | +| [Realtime Keymap Updating](features/studio.md) | 🚧 | + + + + +## Code of Conduct + +Please note that this project is released with a [Contributor Code of Conduct](https://www.contributor-covenant.org/version/2/0/code_of_conduct/). +By participating in this project you agree to abide by its terms. diff --git a/docs/docs/keymap-example-file.md b/docs/docs/keymap-example-file.md deleted file mode 100644 index 91213f15..00000000 --- a/docs/docs/keymap-example-file.md +++ /dev/null @@ -1,26 +0,0 @@ -```dts -#include -#include - -/ { - keymap { - compatible = "zmk,keymap"; - - default_layer { -// -------------------------------------------------------------------------------------------------------------------------------------------------------------------- -// | ESC | Q | W | E | R | T | | Y | U | I | O | P | \ | -// | TAB | A | S | D | F | G | | H | J | K | L | ; | ' | -// | SHIFT | Z | X | C | V | B | CTRL+A | CTRL+C | | CTRL+V | CTRL+X | N | M | , | . | / | R CTRL | -// | GUI | DEL | RETURN | SPACE | ESCAPE | | RETURN | SPACE | TAB | BSPC | R ALT | - bindings = < - &kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSLH - &kp TAB &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT - &kp LSHIFT &kp Z &kp X &kp C &kp V &kp B &kp LC(A) &kp LC(C) &kp LC(V) &kp LC(X) &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RCTRL - &kp LGUI &kp DEL &kp RET &kp SPACE &kp ESC &kp RET &kp SPACE &kp TAB &kp BSPC &kp RALT - >; - - sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>; - }; - }; -}; -``` diff --git a/docs/docs/keymap-example.md b/docs/docs/keymap-example.md index 57f40762..1b5bdae5 100644 --- a/docs/docs/keymap-example.md +++ b/docs/docs/keymap-example.md @@ -3,6 +3,7 @@ compatible = "zmk,keymap"; default_layer { // Layer 0 + display-name = "Base"; // ---------------------------------------------- // | Z | M | K | // | &mo 1 | LEFT SHIFT | &mo 2 | @@ -12,6 +13,7 @@ >; }; abc { // Layer 1 + display-name = "ABC"; // ---------------------------------------------- // | A | B | C | // | &trans | &trans | &trans | @@ -21,6 +23,7 @@ >; }; xyz { // Layer 2 + display-name = "XYZ"; // ---------------------------------------------- // | X | Y | Z | // | LEFT CTRL | LEFT ALT | &trans | diff --git a/docs/docs/keymaps/_footnotes/macos-editing.mdx b/docs/docs/keymaps/_footnotes/macos-editing.mdx new file mode 100644 index 00000000..76c67d7f --- /dev/null +++ b/docs/docs/keymaps/_footnotes/macos-editing.mdx @@ -0,0 +1,2 @@ +On macOS, `K_CUT`, `K_COPY`, and `K_PASTE` are recognized as key presses, +but do nothing by default. diff --git a/docs/docs/keymaps/_footnotes/macos-international.mdx b/docs/docs/keymaps/_footnotes/macos-international.mdx new file mode 100644 index 00000000..b0cd7c85 --- /dev/null +++ b/docs/docs/keymaps/_footnotes/macos-international.mdx @@ -0,0 +1 @@ +On macOS in Japanese mode, `INTERNATIONAL1` is ろ (ro, bottom right on the Apple Japanese keyboard) and `INTERNATIONAL3` is ¥ (yen, top right). diff --git a/docs/docs/keymaps/_footnotes/macos-language.mdx b/docs/docs/keymaps/_footnotes/macos-language.mdx new file mode 100644 index 00000000..2d7822e3 --- /dev/null +++ b/docs/docs/keymaps/_footnotes/macos-language.mdx @@ -0,0 +1 @@ +On macOS in Japanese mode, `LANG1` is かな (kana, to turn on Japanese IME) and `LANG2` is 英数 (eisuu, to turn off the IME). diff --git a/docs/docs/keymaps/_footnotes/macos-undo-redo.mdx b/docs/docs/keymaps/_footnotes/macos-undo-redo.mdx new file mode 100644 index 00000000..0e2c1538 --- /dev/null +++ b/docs/docs/keymaps/_footnotes/macos-undo-redo.mdx @@ -0,0 +1,2 @@ +On macOS, `K_UNDO` and `K_REDO` are recognized as key presses, +but do nothing by default. diff --git a/docs/docs/keymaps/behaviors/backlight.md b/docs/docs/keymaps/behaviors/backlight.md index 88445dc9..c65b03ef 100644 --- a/docs/docs/keymaps/behaviors/backlight.md +++ b/docs/docs/keymaps/behaviors/backlight.md @@ -5,7 +5,7 @@ sidebar_label: Backlight ## Summary -This page contains [backlight](../../features/backlight.mdx) behaviors supported by ZMK. +This page contains [backlight](../../features/lighting.md#backlight) behaviors supported by ZMK. ## Backlight Action Defines @@ -37,8 +37,8 @@ Here is a table describing the action for each define: - Parameter #2: Only applies to `BL_SET`and is the brightness value :::note[Backlight settings persistence] -The backlight settings that are changed via the `&bl` behavior will be saved to flash storage and hence persist across restarts and firmware flashes. -They will also override the start values set by [`CONFIG_ZMK_BACKLIGHT_*_START` settings](../../config/backlight.md#kconfig). +The backlight settings that are changed via the `&bl` behavior will be [saved to flash storage](../../config/settings.md) and hence persist across restarts and firmware flashes. +They will also override the start values set by [`CONFIG_ZMK_BACKLIGHT_*_START` settings](../../config/lighting.md#kconfig-1). However the settings will only be saved after [`CONFIG_ZMK_SETTINGS_SAVE_DEBOUNCE`](../../config/system.md#general) milliseconds in order to reduce potential wear on the flash memory. ::: diff --git a/docs/docs/keymaps/behaviors/bluetooth.md b/docs/docs/keymaps/behaviors/bluetooth.md index 93d08428..44e38d30 100644 --- a/docs/docs/keymaps/behaviors/bluetooth.md +++ b/docs/docs/keymaps/behaviors/bluetooth.md @@ -48,7 +48,7 @@ Here is a table describing the command for each define: | `BT_DISC` | Disconnect from the 0-indexed profile by number, if it's currently connected and inactive; must include a number as an argument in the keymap to work correctly, e.g. `BT_DISC 0`. | :::note[Selected profile persistence] -The profile that is selected by the `BT_SEL`/`BT_PRV`/`BT_NXT` actions will be saved to flash storage and hence persist across restarts and firmware flashes. +The profile that is selected by the `BT_SEL`/`BT_PRV`/`BT_NXT` actions will be [saved to flash storage](../../config/settings.md) and hence persist across restarts and firmware flashes. However it will only be saved after [`CONFIG_ZMK_SETTINGS_SAVE_DEBOUNCE`](../../config/system.md#general) milliseconds in order to reduce potential wear on the flash memory. ::: diff --git a/docs/docs/keymaps/behaviors/caps-word.md b/docs/docs/keymaps/behaviors/caps-word.md index e2a2bd10..861517f2 100644 --- a/docs/docs/keymaps/behaviors/caps-word.md +++ b/docs/docs/keymaps/behaviors/caps-word.md @@ -5,7 +5,7 @@ sidebar_label: Caps Word ## Summary -The caps word behavior behaves similar to a caps lock, but will automatically deactivate when any key not in a continue list is pressed, or if the caps word key is pressed again. For smaller keyboards using [mod-taps](mod-tap.md), this can help avoid repeated alternating holds when typing words in all caps. +The caps word behavior behaves similar to a caps lock, but will automatically deactivate when any key not in a continue list is pressed, or if the caps word key is pressed again. For smaller keyboards using [mod-taps](hold-tap.mdx#mod-tap), this can help avoid repeated alternating holds when typing words in all caps. The modifiers are applied only to the alphabetic (`A` to `Z`) keycodes, to avoid automatically applying them to numeric values, etc. diff --git a/docs/docs/keymaps/behaviors/hold-tap.mdx b/docs/docs/keymaps/behaviors/hold-tap.mdx index 4e244af5..c4d27d9d 100644 --- a/docs/docs/keymaps/behaviors/hold-tap.mdx +++ b/docs/docs/keymaps/behaviors/hold-tap.mdx @@ -8,260 +8,189 @@ import TabItem from "@theme/TabItem"; ## Summary -Hold-tap is the basis for other behaviors such as layer-tap and mod-tap. +A hold-tap behavior is defined using a "hold" behavior and a "tap" behavior. +When the key is held, then it will output the hold behavior, and when it is tapped it will output the tap behavior. -Simply put, the hold-tap key will output the 'hold' behavior if it's held for a while, and output the 'tap' behavior when it's tapped quickly. +Various configuration options exist to allow fine-tuning of whether a particular key press will resolve in a hold or in a tap. +Such configuration options determine how to treat "interrupts" when one key is pressed while a hold-tap has not been released yet, or how long a key should be held before being treated as a hold instead of a tap, and so on. -### Hold-Tap +ZMK predefines two hold-tap behaviors: [mod-tap](#mod-tap) and [layer-tap](#layer-tap). -The graph below shows how the hold-tap decides between a 'tap' and a 'hold'. +## Mod-Tap + +The "mod-tap" behavior sends a different [key press](key-press.md), depending on whether it's held or tapped. + +- If you hold the key for longer than 200ms or press any other key while it is held, the first keycode ("mod") is sent. +- If you tap the key (release before 200ms), the second keycode ("tap") is sent. ![Simple behavior](../../assets/hold-tap/case1_2.svg) -By default, the hold-tap is configured to also select the 'hold' functionality if another key is tapped while it's active: +By default, mod-tap is configured with the ["hold-preferred" `flavor`](#interrupt-flavors). -![Hold preferred behavior](../../assets/hold-tap/case_hold_preferred.svg) +### Behavior Binding -We call this the 'hold-preferred' flavor of hold-taps. While this flavor may work very well for a ctrl/escape key, it's not very well suited for home-row mods or layer-taps. That's why there are two more flavors to choose from: 'tap-preferred' and 'balanced'. +- Reference: `&mt` +- Parameter #1: The keycode to be sent when held (usually a modifier), e.g. `LSHIFT` +- Parameter #2: The keycode to sent when used as a tap, e.g. `A`, `B`. -#### Flavors - -- The 'hold-preferred' flavor triggers the hold behavior when the `tapping-term-ms` has expired or another key is pressed. -- The 'balanced' flavor will trigger the hold behavior when the `tapping-term-ms` has expired or another key is pressed and released. -- The 'tap-preferred' flavor triggers the hold behavior when the `tapping-term-ms` has expired. Pressing another key within `tapping-term-ms` does not affect the decision. -- The 'tap-unless-interrupted' flavor triggers a hold behavior only when another key is pressed before `tapping-term-ms` has expired. It triggers the tap behavior in all other situations. - -When the hold-tap key is released and the hold behavior has not been triggered, the tap behavior will trigger. - -![Hold-tap comparison](../../assets/hold-tap/comparison.svg) - -### Basic Usage - -For basic usage, please see the [mod-tap](mod-tap.md) and [layer-tap](layers.md#layer-tap) pages. - -### Advanced Configuration - -#### `tapping-term-ms` - -Defines how long a key must be pressed to trigger Hold behavior. - -#### `quick-tap-ms` - -If you press a tapped hold-tap again within `quick-tap-ms` milliseconds of the first press, it will always trigger the tap behavior. This is useful for things like a backspace, where a quick tap+hold holds backspace pressed. Set this to a negative value to disable. The default is -1 (disabled). - -#### `require-prior-idle-ms` - -`require-prior-idle-ms` is like `quick-tap-ms` however it will apply for _any_ non-modifier key pressed before it. This effectively disables the hold-tap when typing quickly, which can be quite useful for homerow mods. It can also have the effect of removing the input delay when typing quickly. - -For example, the following hold-tap configuration enables `require-prior-idle-ms` with a 125 millisecond term, alongside `quick-tap-ms` with a 200 millisecond term. +Example: ```dts -rpi: require_prior_idle { - compatible = "zmk,behavior-hold-tap"; - #binding-cells = <2>; - flavor = "tap-preferred"; - tapping-term-ms = <200>; - quick-tap-ms = <200>; - require-prior-idle-ms = <125>; - bindings = <&kp>, <&kp>; -}; +&mt LSHIFT A ``` -If you press `&kp A` and then `&rpi LEFT_SHIFT B` **within** 125 ms, then `ab` will be output. Importantly, `b` will be output immediately since it was within the `require-prior-idle-ms`, without waiting for a timeout or an interrupting key. In other words, the `&rpi LEFT_SHIFT B` binding will only have its underlying hold-tap behavior if it is pressed 125 ms **after** the previous key press; otherwise it will act like `&kp B`. +### Configuration -Note that the greater the value of `require-prior-idle-ms` is, the harder it will be to invoke the hold behavior, making this feature less applicable for use-cases like capitalizing letters while typing normally. However, if the hold behavior isn't used during fast typing, then it can be an effective way to mitigate misfires. - -#### `retro-tap` - -If `retro-tap` is enabled, the tap behavior is triggered when releasing the hold-tap key if no other key was pressed in the meantime. - -For example, if you press `&mt LEFT_SHIFT A` and then release it without pressing another key, it will output `a`. +You can adjust the default [properties](#custom-hold-tap-configuration) of the mod-tap behavior using its node like so: ```dts &mt { - retro-tap; + tapping-term-ms = <200>; // This is the value already set by default }; ``` -#### `hold-while-undecided` +Note that you can also [define a custom hold-tap](#custom-hold-tap-examples) and use that, instead of adjusting the properties of the mod-tap/`&mt` behavior. -If enabled, the hold behavior will immediately be held on hold-tap press, and will release before the behavior is sent in the event the hold-tap resolves into a tap. With most modifiers this will not affect typing, and is useful for using modifiers with the mouse. +## Layer-Tap -:::info[Alt/Win/Cmd behavior] -In some applications/desktop environments, pressing Alt keycodes by itself will have its own behavior like activate a menu and Gui keycodes will bring up the start menu or an application launcher. -::: +The "layer-tap" behavior works similarly to the mod-tap behavior, but instead of outputting one of two keys, it activates a specified layer as its "hold" action. -#### `hold-while-undecided-linger` +By default, layer-tap is configured with the ["tap-preferred" `flavor`](#interrupt-flavors). -If your tap behavior activates the same modifier as the hold behavior, and you want to avoid a double tap when transitioning from the hold to the tap, you can use `hold-while-undecided-linger`. When enabled, the hold behavior will continue to be held until _after_ the tap behavior is released. For example, if the hold is `&kp LGUI` and the tap is `&sk LGUI`, then with `hold-while-undecided-linger` enabled, the host will see `LGUI` held down continuously until the sticky key is finished, instead of seeing a release and press when transitioning from hold to sticky key. +### Behavior Binding -#### Positional hold-tap and `hold-trigger-key-positions` +- Reference: `<` +- Parameter: The layer number to enable while held, e.g. `1` +- Parameter: The keycode to send when tapped, e.g. `A` -Including `hold-trigger-key-positions` in your hold-tap definition turns on the positional hold-tap feature. With positional hold-tap enabled, if you press any key **NOT** listed in `hold-trigger-key-positions` before `tapping-term-ms` expires, it will produce a tap. - -In all other situations, positional hold-tap will not modify the behavior of your hold-tap. Positional hold-tap is useful when used with home-row modifiers: for example, if you have a home-row modifier key in the left hand, by including only key positions from the right hand in `hold-trigger-key-positions`, you will only get hold behaviors during cross-hand key combinations. - -:::info -Note that `hold-trigger-key-positions` is an array of key position indexes. Key positions are numbered sequentially according to your keymap, starting with 0. So if the first key in your keymap is Q, this key is in position 0. The next key (probably W) will be in position 1, et cetera. -::: - -See the following example, which uses a hold-tap behavior definition, configured with the `hold-preferred` flavor, and with positional hold-tap enabled: +Example: ```dts -#include -#include +< 1 A +``` + +### Configuration + +You can adjust the default [properties](#custom-hold-tap-configuration) of the layer-tap behavior using its node like so: + +```dts +< { + tapping-term-ms = <200>; // This is the value already set by default +}; +``` + +Note that you can also [define a custom hold-tap](#custom-hold-tap-examples) and use that, instead of adjusting the properties of the layer-tap/`<` behavior. + +## Custom Hold-Tap Examples + +To see what specific configuration options do, please see the [configuration options](#custom-hold-tap-configuration). +The below examples are intended for you to copy-paste as desired, and then tune with the configuration options. + + + + + +The default configuration of mod-tap and layer-tap can be found below: + +```dts title="Mod-tap" +#include / { behaviors { - pht: positional_hold_tap { + mt: mod_tap { compatible = "zmk,behavior-hold-tap"; #binding-cells = <2>; flavor = "hold-preferred"; - tapping-term-ms = <400>; - quick-tap-ms = <200>; + tapping-term-ms = <200>; bindings = <&kp>, <&kp>; - hold-trigger-key-positions = <1>; // <---[[the W key]] - }; - }; - keymap { - compatible = "zmk,keymap"; - default_layer { - bindings = < - // position 0 position 1 position 2 - &pht LEFT_SHIFT Q &kp W &kp E - >; + display-name = "Mod-Tap"; }; }; }; + ``` -- The sequence `(pht_down, E_down, E_up, pht_up)` produces `qe`. The normal hold behavior (LEFT_SHIFT) **IS** modified into a tap behavior (Q) by positional hold-tap because the first key pressed after the hold-tap key is the `E key`, which is in position 2, which **is NOT** included in `hold-trigger-key-positions`. -- The sequence `(pht_down, W_down, W_up, pht_up)` produces `W`. The normal hold behavior (LEFT_SHIFT) **is NOT** modified into a tap behavior (Q) by positional hold-tap because the first key pressed after the hold-tap key is the `W key`, which is in position 1, which **IS** included in `hold-trigger-key-positions`. -- If the `LEFT_SHIFT / Q key` is held by itself for longer than `tapping-term-ms`, a hold behavior is produced. This is because positional hold-tap only modifies the behavior of a hold-tap if another key is pressed before the `tapping-term-ms` period expires. +```dts title="Layer-tap" +#include -By default, `hold-trigger-key-positions` are evaluated upon the first _key press_ after -the hold-tap. For homerow mods, this is not always ideal, because it prevents combining multiple modifiers unless they are included in `hold-trigger-key-positions`. To overwrite this behavior, one can set `hold-trigger-on-release`. If set to true, the evaluation of `hold-trigger-key-positions` gets delayed until _key release_. This allows combining multiple modifiers when the next key is _held_, while still deciding the hold-tap in favor of a tap when the next key is _tapped_. +/ { + behaviors { + lt: layer_tap { + compatible = "zmk,behavior-hold-tap"; + #binding-cells = <2>; + flavor = "tap-preferred"; + tapping-term-ms = <200>; + bindings = <&mo>, <&kp>; + display-name = "Layer-Tap"; + }; + }; +}; -#### Using different behavior types with hold-taps +``` -You can create instances of hold-taps invoking most [behavior types](../index.mdx#behaviors) for hold or tap actions, by referencing their node labels in the `bindings` value. -The two parameters that are passed to the hold-tap in your keymap will be forwarded to the referred behaviors, first one to the hold behavior and second one to the tap. +If you copy-paste these as-is, you will overwrite the predefined behaviors. +Name and label them something else, e.g. `my_mt: my_mod_tap`, to avoid this. +You'll then be able to use your new behavior with `&my_mt`. -If you use behaviors that accept no parameters such as [mod-morphs](mod-morph.md) or [macros](macros.md), you can pass a dummy parameter value such as `0` to the hold-tap when you use it in your keymap. -For instance, a hold-tap with node label `caps` and `bindings = <&kp>, <&caps_word>;` can be used in the keymap as below to send the caps lock keycode on hold and invoke the [caps word behavior](caps-word.md) on tap: + + + +The most popular form of home-row mods is known as "timeless home-row mods", configured to minimize the dependency on timing. +Timeless home-row mods define both a "left hand" and a "right hand" behavior. + +Below is an example of configuration to achieve this: ```dts -&caps CAPS 0 -``` - -:::info -You cannot use behaviors that expect more than one parameter such as [`&bt`](bluetooth.md) and [`&rgb_ug`](underglow.md) with hold-taps, due to the limitations of the [devicetree keymap format](../../config/index.md#devicetree-files). -One workaround is to create a [macro](macros.md) that invokes those behaviors and use the macro as the hold or tap action. -::: - -### Example Use-Cases - - - - - -The following are suggested hold-tap configurations that work well with home row mods: - -##### Option 1: cross-hand only modifiers, using `tap-unless-interrupted` and positional hold-tap (`hold-trigger-key-positions`) - -```dts title="Homerow Mods: Cross-hand Example" -#include -#include - / { behaviors { - lh_pht: left_positional_hold_tap { + hml: home_row_mod_left { compatible = "zmk,behavior-hold-tap"; #binding-cells = <2>; - flavor = "tap-unless-interrupted"; - tapping-term-ms = <100>; // <---[[produces tap if held longer than tapping-term-ms]] - quick-tap-ms = <200>; - bindings = <&kp>, <&kp>; - hold-trigger-key-positions = <5 6 7 8 9 10>; // <---[[right-hand keys]] - }; - }; - - keymap { - compatible = "zmk,keymap"; - default_layer { - bindings = < - // position 0 pos 1 pos 2 pos 3 pos 4 pos 5 pos 6 pos 7 pos 8 pos 9 pos 10 - &lh_pht LSFT A &lh_pht LGUI S &lh_pht LALT D &lh_pht LCTL F &kp G &kp H &kp I &kp J &kp K &kp L &kp SEMI - >; - }; - }; -}; -``` - -##### Option 2: `tap-preferred` - -```dts title="Homerow Mods: Tap-Preferred Example" -#include -#include - -/ { - behaviors { - hm: homerow_mods { - compatible = "zmk,behavior-hold-tap"; - #binding-cells = <2>; - tapping-term-ms = <150>; - quick-tap-ms = <0>; - flavor = "tap-preferred"; - bindings = <&kp>, <&kp>; - }; - }; - - keymap { - compatible = "zmk,keymap"; - default_layer { - bindings = < - &hm LCTRL A &hm LGUI S &hm LALT D &hm LSHIFT F - >; - }; - }; -}; -``` - -##### Option 3: `balanced` - -```dts title="Homerow Mods: Balanced Example" -#include -#include - -/ { - behaviors { - bhm: balanced_homerow_mods { - compatible = "zmk,behavior-hold-tap"; - #binding-cells = <2>; - tapping-term-ms = <200>; // <---[[moderate duration]] - quick-tap-ms = <0>; flavor = "balanced"; + require-prior-idle-ms = <150>; + tapping-term-ms = <280>; + quick-tap-ms = <175>; bindings = <&kp>, <&kp>; + hold-trigger-key-positions = < ... >; // List of keys on the right side of the keyboard + hold-trigger-on-release; }; - }; - - keymap { - compatible = "zmk,keymap"; - default_layer { - bindings = < - &bhm LCTRL A &bhm LGUI S &bhm LALT D &bhm LSHIFT F - >; + hmr: home_row_mod_right { + compatible = "zmk,behavior-hold-tap"; + #binding-cells = <2>; + flavor = "balanced"; + require-prior-idle-ms = <150>; + tapping-term-ms = <280>; + quick-tap-ms = <175>; + bindings = <&kp>, <&kp>; + hold-trigger-key-positions = < ... >; // List of keys on the left side of the keyboard + hold-trigger-on-release; }; }; }; ``` +If you wish to use this configuration of home-row mods, you will need to define the corresponding left and right behaviors as above, then use `&hml` for home-row keys on the left side of the keyboard, and `&hmr` for ones on the right side. + +Below is a brief overview of the options set. + +- The ["balanced" flavor](#interrupt-flavors) produces a "hold" if another key is both pressed and released within the tapping-term. + This interrupt flavor is primarily used to decide between hold and tap, rather than using [tapping-term-ms](#tapping-term-ms). + This matches how modifiers are used a majority of the time (hold shift, tap a key, release shift). +- [`require-prior-idle-ms`](#require-prior-idle-ms) is set to 125ms to resolve to taps immediately when typing at speed, which helps eliminate typing delay. +- [Positional hold taps](#positional-hold-tap-and-hold-trigger-key-positions) with [`hold-trigger-on-release`](#hold-trigger-on-release) are used to avoid accidental hold resolutions when typing sequences of letters all with the same hand. +- [`tapping-term-ms`](#tapping-term-ms) is set to a higher value of 280ms, but not unreasonably high, so that same hand modifiers can still be used with intention. +- [`quick-tap-ms`](#quick-tap-ms) is set to 175ms, for the event where a tapped key may wish to be held down. + +Depending on your typing behavior, you may wish to adjust this configuration. For example, you can adjust the specific timings used, or define another set of hold-taps for more dextrous fingers like the index with different parameters. You may even want to switch the flavor to `tap-preferred` or `tap-unless-interrupted`. + @@ -279,8 +208,8 @@ A popular method of implementing Autoshift in ZMK involves a C-preprocessor macr as: auto_shift { compatible = "zmk,behavior-hold-tap"; #binding-cells = <2>; - tapping_term_ms = <135>; - quick_tap_ms = <0>; + tapping-term-ms = <135>; + quick-tap-ms = <0>; flavor = "tap-preferred"; bindings = <&kp>, <&kp>; }; @@ -336,6 +265,204 @@ This hold-tap example implements a [momentary-layer](layers.md#momentary-layer) -### Comparison to QMK +## Custom Hold-Tap Configuration -The `hold-preferred` flavor works similar to the `HOLD_ON_OTHER_KEY_PRESS` setting in QMK. The `balanced` flavor is similar to the `PERMISSIVE_HOLD` setting, and the `tap-preferred` flavor is the QMK default. +### `tapping-term-ms` + +This value defines how long a key must be pressed to trigger the "hold" behavior, alongside other factors described in [interrupt flavors](#interrupt-flavors). The default is 200ms. + +```dts +&mt { + tapping-term-ms = <140>; +}; +``` + +### Using different behavior types with hold-taps + +You can create instances of hold-taps invoking most [behavior types](../index.mdx#behaviors) for hold or tap actions, by referencing their node labels in the `bindings` value. +The two parameters that are passed to the hold-tap in your keymap will be forwarded to the referred behaviors, first one to the hold behavior and second one to the tap. + +If you use behaviors that accept no parameters such as [mod-morphs](mod-morph.md) or [tap-dances](tap-dance.mdx), you can pass a dummy parameter value such as `0` to the hold-tap when you use it in your keymap. +For instance, a hold-tap with node label `caps` and `bindings = <&kp>, <&caps_word>;` can be used in the keymap as below to send the caps lock keycode on hold and invoke the [caps word behavior](caps-word.md) on tap: + +```dts +&caps CAPS 0 +``` + +:::info +You cannot use behaviors that expect more than one parameter such as [`&bt`](bluetooth.md) and [`&rgb_ug`](underglow.md) with hold-taps, due to the limitations of the [devicetree keymap format](../../config/index.md#devicetree-files). +One workaround is to create a [macro](macros.md) that invokes those behaviors and use the macro as the hold or tap action. +::: + +### Interrupt Flavors + +By default, when another key is pressed while a hold-tap is held, it will trigger the "hold" behavior even if `tapping-term-ms` has not been exceeded yet. +We refer to the interaction of pressing one key while another is held as the "interrupt", and the way the hold-tap resolves is referred to as its "interrupt flavor". + +This default interrupt flavor is called "hold-preferred". While this flavor may work well for a ctrl/escape key, it might not be well suited for home-row mods or layer-taps. For this reason, ZMK defines multiple interrupt flavors which hold-tap behaviors can be configured with, listed below: + +- The "hold-preferred" flavor triggers the hold behavior when the `tapping-term-ms` has expired or another key is pressed. +- The "balanced" flavor will trigger the hold behavior when the `tapping-term-ms` has expired or another key is pressed _and_ released while the hold-tap is held. +- The "tap-preferred" flavor triggers the hold behavior when the `tapping-term-ms` has expired. Pressing another key within `tapping-term-ms` does not affect the decision. +- The "tap-unless-interrupted" flavor triggers a hold behavior only when another key is pressed before `tapping-term-ms` has expired. It triggers the tap behavior in all other situations. Note that this flavor _inverts_ the decision logic with respect to the tapping term. + +When the hold-tap key is released and the hold behavior has not been triggered, the tap behavior will trigger. + +![Hold-tap comparison](../../assets/hold-tap/comparison.svg) + +#### Comparison to QMK + +The `hold-preferred` flavor works similarly to the `HOLD_ON_OTHER_KEY_PRESS` setting in QMK. +The `balanced` flavor is similar to the `PERMISSIVE_HOLD` setting, and the `tap-preferred` flavor is the QMK default. + +```dts +&mt { + flavor = "balanced"; +}; +``` + +### `quick-tap-ms` + +If you press a tapped hold-tap again within `quick-tap-ms` milliseconds of the first press, it will always trigger the tap behavior. +This is useful for keys like backspace, where a quick tap-then-hold can be used to hold it down to delete long parts of text. +By default this behavior is disabled. + +```dts +&mt { + quick-tap-ms = <150>; +}; +``` + +#### Comparison to QMK + +QMK has a parameter called `QUICK_TAP_TERM`, but its semantics are slightly different. In QMK, it is the time interval between releasing the first key and pressing the second key whereas in ZMK, it is the time interval between pressing the first and second keys. Therefore you might want to use a larger value for `quick-tap-ms` compared to the value used in QMK. + +### `require-prior-idle-ms` + +If a hold-tap is pressed within `require-prior-idle-ms` of another non-modifier _key_ (not behavior), then the hold-tap will always resolve in a tap. +This effectively disables the hold-tap when typing quickly, which can be quite useful for home-row mods. +It can also have the effect of removing the input delay when typing quickly, since the hold-tap immediately resolves to a tap on key press. + +
+ The following hold-tap configuration enables `require-prior-idle-ms` with a 125 millisecond term, alongside `quick-tap-ms` with a 200 millisecond term. +```dts +rpi: require_prior_idle { + compatible = "zmk,behavior-hold-tap"; + #binding-cells = <2>; + flavor = "tap-preferred"; + tapping-term-ms = <200>; + quick-tap-ms = <200>; + require-prior-idle-ms = <125>; + bindings = <&kp>, <&kp>; +}; +``` + +If you press `&kp A` and then `&rpi LEFT_SHIFT B` **within** 125 ms, then `ab` will be output. +Importantly, `b` will be output immediately since it was within the `require-prior-idle-ms`, without waiting for a timeout or an interrupting key. +In other words, the `&rpi LEFT_SHIFT B` binding will only have its underlying hold-tap behavior if it is pressed 125 ms **after** the previous key press; otherwise it will act like `&kp B`. + +Note that the greater the value of `require-prior-idle-ms` is, the harder it will be to invoke the hold behavior, making this feature less applicable for use-cases like capitalizing letters while typing normally. +However, if the hold behavior isn't used during fast typing, then it can be an effective way to mitigate misfires. + +
+ +### Positional hold-tap and `hold-trigger-key-positions` + +Including `hold-trigger-key-positions` in your hold-tap definition turns on the positional hold-tap feature. With positional hold-tap enabled, if you press any key **not** listed in `hold-trigger-key-positions` before `tapping-term-ms` expires, it will produce a tap. + +In all other situations, positional hold-tap will not modify the behavior of your hold-tap. Positional hold-tap is useful when used with home-row modifiers: for example, if you have a home-row modifier key in the left hand, by including only key positions from the right hand in `hold-trigger-key-positions`, you will only get hold behaviors during cross-hand key combinations unless you exceed `tapping-term-ms` when using "balanced" or "hold-preferred" flavors. + +`hold-trigger-key-positions` is an array of key position indexes. Key positions are numbered sequentially according to your keymap, starting with 0. So if the first key in your keymap is Q, this key is in position 0. The next key (probably W) will be in position 1, et cetera. + +For home-row mods, it is recommended to use this property with `hold-trigger-on-release` so that modifiers on the same hand can be combined. + +
+ The following example uses a hold-tap behavior definition configured with the `hold-preferred` flavor, and with positional hold-tap enabled: + +```dts +#include +#include + +/ { + behaviors { + pht: positional_hold_tap { + compatible = "zmk,behavior-hold-tap"; + #binding-cells = <2>; + flavor = "hold-preferred"; + tapping-term-ms = <400>; + quick-tap-ms = <200>; + bindings = <&kp>, <&kp>; + hold-trigger-key-positions = <1>; // <---[[the W key]] + }; + }; + keymap { + compatible = "zmk,keymap"; + default_layer { + bindings = < + // position 0 position 1 position 2 + &pht LEFT_SHIFT Q &kp W &kp E + >; + }; + }; +}; +``` + +- The sequence `(pht_down, E_down, E_up, pht_up)` produces `qe`. The normal hold behavior (LEFT_SHIFT) **IS** modified into a tap behavior (Q) by positional hold-tap because the first key pressed after the hold-tap key is the `E key`, which is in position 2, which **is NOT** included in `hold-trigger-key-positions`. +- The sequence `(pht_down, W_down, W_up, pht_up)` produces `W`. The normal hold behavior (LEFT_SHIFT) **is NOT** modified into a tap behavior (Q) by positional hold-tap because the first key pressed after the hold-tap key is the `W key`, which is in position 1, which **IS** included in `hold-trigger-key-positions`. +- If the `LEFT_SHIFT / Q key` is held by itself for longer than `tapping-term-ms`, a hold behavior is produced. This is because positional hold-tap only modifies the behavior of a hold-tap if another key is pressed before the `tapping-term-ms` period expires. + +By default, `hold-trigger-key-positions` are evaluated upon the first _key press_ after +the hold-tap. For home-row mods, this is not always ideal, because it prevents combining multiple modifiers unless they are included in `hold-trigger-key-positions`. To overwrite this behavior, one can set `hold-trigger-on-release`. If set to true, the evaluation of `hold-trigger-key-positions` gets delayed until _key release_. This allows combining multiple modifiers when the next key is _held_, while still deciding the hold-tap in favor of a tap when the next key is _tapped_. + +
+#### `hold-trigger-on-release` + +If set, instead of the keys **not** listed in `hold-trigger-key-positions` producing a tap when _pressed_ before `tapping-term-ms` expires, they instead produce a tap when _released_ before `tapping-term-ms` expires. + +```dts +&mt { + hold-trigger-on-release; +}; +``` + +### `hold-while-undecided` + +If enabled, the hold behavior will immediately be held on hold-tap press, and will release before the behavior is sent in the event the hold-tap resolves into a tap. With most modifiers this will not affect typing, and is useful for using modifiers with the mouse. + +```dts +&mt { + hold-while-undecided; +}; +``` + +:::warning[Interactions with combos] +If the key position that has the hold-tap assigned is _also_ used in any combos, the `hold-while-undecided` behavior isn't immediate with key-down, but waits until all those combo timeouts have expired. +::: + +#### `hold-while-undecided-linger` + +If your tap behavior activates the same modifier as the hold behavior, and you want to avoid a double tap when transitioning from the hold to the tap, you can use `hold-while-undecided-linger`. When enabled, the hold behavior will continue to be held until _after_ the tap behavior is released. + +For example, if the hold is `&kp LGUI` and the tap is `&sk LGUI`, then with `hold-while-undecided-linger` enabled, the host will see `LGUI` held down continuously until the sticky key is finished, instead of seeing a release and press when transitioning from hold to sticky key. + +```dts +&mt { + hold-while-undecided-linger; +}; +``` + +:::info[Alt/Win/Cmd behavior] +In some applications/desktop environments, pressing Alt keycodes by itself will have its own behavior like activate a menu and Gui keycodes will bring up the start menu or an application launcher. +::: + +### `retro-tap` + +If `retro-tap` is enabled, the tap behavior is triggered when releasing the hold-tap key if no other key was pressed in the meantime. The hold key does not activate until another key is pressed, meaning that it cannot be used for mouse events like Shift Click to select from your cursor position to mouse position. + +For example, if you press `&mt LEFT_SHIFT A` and then release it without pressing another key, it will output `a`. + +```dts +&mt { + retro-tap; +}; +``` diff --git a/docs/docs/keymaps/behaviors/index.mdx b/docs/docs/keymaps/behaviors/index.mdx index c9d0fbe4..5eb5668b 100644 --- a/docs/docs/keymaps/behaviors/index.mdx +++ b/docs/docs/keymaps/behaviors/index.mdx @@ -14,7 +14,7 @@ Below is a summary of pre-defined behavior bindings and user-definable behaviors | Binding | Behavior | Description | | ------------- | --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `&kp` | [Key Press](key-press.md) | Send keycodes to the connected host when a key is pressed | -| `&mt` | [Mod Tap](mod-tap.md) | Sends a different key press depending on whether a key is held or tapped | +| `&mt` | [Mod Tap](hold-tap.mdx#mod-tap) | Sends a different key press depending on whether a key is held or tapped | | `&kt` | [Key Toggle](key-toggle.md) | Toggles the press of a key. If the key is not currently pressed, key toggle will press it, holding it until the key toggle is pressed again or the key is released in some other way. If the key is currently pressed, key toggle will release it | | `&sk` | [Sticky Key](sticky-key.md) | Stays pressed until another key is pressed, then is released. It is often used for modifier keys like shift, which allows typing capital letters without holding it down | | `&gresc` | [Grave Escape](mod-morph.md#behavior-binding) | Sends Grave Accent `` ` `` keycode if shift or GUI is held, sends Escape keycode otherwise | @@ -43,6 +43,8 @@ Below is a summary of pre-defined behavior bindings and user-definable behaviors | Binding | Behavior | Description | | ------- | ----------------------------------------------------------- | ------------------------------- | | `&mkp` | [Mouse Button Press](mouse-emulation.md#mouse-button-press) | Emulates pressing mouse buttons | +| `&mmv` | [Mouse Move](mouse-emulation.md#mouse-move) | Emulates mouse movement | +| `&msc` | [Mouse Scroll](mouse-emulation.md#mouse-scroll) | Emulates mouse scrolling | ## Reset Behaviors @@ -80,10 +82,10 @@ Below is a summary of pre-defined behavior bindings and user-definable behaviors ## User-Defined Behaviors -| Behavior | Description | -| ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| [Macros](macros.md) | Allows configuring a list of other behaviors to invoke when the key is pressed and/or released | -| [Hold-Tap](hold-tap.mdx) | Invokes different behaviors depending on key press duration or interrupting keys. This is the basis for [layer-tap](layers.md#layer-tap) and [mod-tap](mod-tap.md) | -| [Tap Dance](tap-dance.mdx) | Invokes different behaviors corresponding to how many times a key is pressed | -| [Mod-Morph](mod-morph.md) | Invokes different behaviors depending on whether a specified modifier is held during a key press | -| [Sensor Rotation](sensor-rotate.md) | Invokes different behaviors depending on whether a sensor is rotated clockwise or counter-clockwise | +| Behavior | Description | +| ----------------------------------- | --------------------------------------------------------------------------------------------------- | +| [Macros](macros.md) | Allows configuring a list of other behaviors to invoke when the key is pressed and/or released | +| [Hold-Tap](hold-tap.mdx) | Invokes different behaviors depending on key press duration or interrupting keys. | +| [Tap Dance](tap-dance.mdx) | Invokes different behaviors corresponding to how many times a key is pressed | +| [Mod-Morph](mod-morph.md) | Invokes different behaviors depending on whether a specified modifier is held during a key press | +| [Sensor Rotation](sensor-rotate.md) | Invokes different behaviors depending on whether a sensor is rotated clockwise or counter-clockwise | diff --git a/docs/docs/keymaps/behaviors/key-toggle.md b/docs/docs/keymaps/behaviors/key-toggle.md index 8200b455..173087ca 100644 --- a/docs/docs/keymaps/behaviors/key-toggle.md +++ b/docs/docs/keymaps/behaviors/key-toggle.md @@ -24,3 +24,25 @@ Example: You can use any keycode that works for `&kp` as parameter to `&kt`, however, [modified keys](../modifiers.mdx#modifier-functions) such as `LA(A)` will be toggled based on the status of the base keycode (in this case `A`). In other words, modifiers are ignored when determining whether or not the key is currently pressed. + +### Configuration + +#### Toggle mode + +If you wish to ensure that a key is pressed or released, rather than merely toggling, then you can do so with the `toggle-mode` property. +Define a new behavior and assign `"on"` or `"off"` to `toggle-mode`: + +```dts +/ { + behaviors { + kt_on: key_toggle_on_only { + compatible = "zmk,behavior-key-toggle"; + #binding-cells = <1>; + display-name = "Key Toggle On"; + toggle-mode = "on"; + }; + }; +}; +``` + +You can then use `&kt_on` in place of `&kt` whenever you wish to only toggle a key on, and not toggle it off. An `"off"` version of the behavior can be defined similarly. diff --git a/docs/docs/keymaps/behaviors/layers.md b/docs/docs/keymaps/behaviors/layers.md index 0dbb0057..37b23e88 100644 --- a/docs/docs/keymaps/behaviors/layers.md +++ b/docs/docs/keymaps/behaviors/layers.md @@ -6,28 +6,15 @@ sidebar_label: Layers ## Summary Often, you may want a certain key position to alter which layers are enabled, change the default layer, etc. -Some of those behaviors are still in the works; the ones that are working now are documented here. +Below are the list of behaviors that can be used to activate and deactivate layers. :::note -Multiple layers can be active at the same time and activating a layer will not deactivate layers higher up in the "layer stack". See [Layers](../index.mdx#layers) for more information. +Multiple layers can be active at the same time and activating a layer will not deactivate layers higher up in the "layer stack". + +Layer numbers start at 0 following the order they are defined in the keymap node, for example `&mo 3` would activate the 4th layer node defined in the keymap. +See [Layers](../index.mdx#layers) for more information. ::: -## Defines to Refer to Layers - -When working with layers, you may have several different key positions with bindings that enable/disable those layers. -To make it easier to refer to those layers in your key bindings, and to change which layers are where later, you can -add a set of `#define`s at the top of your keymap file, and use those layer in your keymap. - -For example, if you have three layers, you can add the following to the top of your keymap: - -```dts -#define DEFAULT 0 -#define LOWER 1 -#define RAISE 2 -``` - -This allows you to use those defines, e.g. `LOWER` later in your keymap. - ## Momentary Layer The "momentary layer" behavior enables a layer while a certain key is pressed. Immediately upon @@ -42,49 +29,13 @@ again. Example: ```dts -&mo LOWER +&mo 3 ``` ## Layer-Tap -The "layer-tap" behavior enables a layer when a key is held, and outputs a [keypress](key-press.md) when the key is only tapped for a short time. - -### Behavior Binding - -- Reference: `<` -- Parameter: The layer number to enable while held, e.g. `1` -- Parameter: The keycode to send when tapped, e.g. `A` - -Example: - -```dts -< LOWER SPACE -``` - -### Configuration - -You can configure a different tapping term or tweak other properties noted in the [hold-tap](hold-tap.mdx#advanced-configuration) documentation page in your keymap: - -```dts -< { - tapping-term-ms = <200>; -}; - -/ { - keymap { - ... - }; -}; -``` - -:::info -Functionally, the layer-tap is a [hold-tap](hold-tap.mdx) of the ["tap-preferred" flavor](hold-tap.mdx#flavors) and a [`tapping-term-ms`](hold-tap.mdx#tapping-term-ms) of 200 that takes in a [`momentary layer`](#momentary-layer) and a [keypress](key-press.md) as its "hold" and "tap" parameters, respectively. - -For users who want to send a different [keycode](../list-of-keycodes.mdx) depending on if the same key is held or tapped, see [Mod-Tap](mod-tap.md). - -Similarly, for users looking to create a keybind like the layer-tap that depending on how long the key is held, invokes behaviors like [sticky keys](sticky-key.md) or [key toggles](key-toggle.md), see [Hold-Tap](hold-tap.mdx). - -::: +The ["layer-tap" behavior](hold-tap.mdx#layer-tap) enables a layer when a key is held, and outputs a [key press](key-press.md) when the key is only tapped for a short time. +See linked documentation for details. ## To Layer @@ -113,10 +64,61 @@ The "toggle layer" behavior enables a layer if it is currently disabled, or disa Example: ```dts -&tog LOWER +&tog 3 ``` +### Configuration + +#### Toggle mode + +If you wish to ensure that a layer is toggled on or off specifically, rather than switching between the two states, then you can do so with the `toggle-mode` property. +Define a new behavior and assign `"on"` or `"off"` to `toggle-mode`: + +```dts +/ { + behaviors { + tog_on: toggle_layer_on_only { + compatible = "zmk,behavior-toggle-layer"; + #binding-cells = <1>; + display-name = "Toggle Layer On"; + toggle-mode = "on"; + locking; + }; + }; +}; +``` + +You can then use `&tog_on` in place of `&tog` whenever you wish to only toggle a layer on, and not toggle it off. An `"off"` version of the behavior can be defined similarly. + +## Layer Locking + +When the behaviors `&to` and `&tog` toggle a layer on, they will "lock" the layer in the active state. This prevents the layer from being deactivated by any behavior which is not a `&to` or a `&tog`. + +In particular, if you activate a layer momentarily using e.g. `&mo 1`, tapping e.g. `&tog 1` as defined above will prevent the layer from deactivating after releasing `&mo 1`. You can then press `&tog 1` again to deactivate the layer. + +For custom toggle, to, and momentary layer behaviors, this can be enabled by giving your behavior the `locking;` property. + ## Conditional Layers The "conditional layers" feature enables a particular layer when all layers in a specified set are active. For more information, see [conditional layers](../conditional-layers.md). + +## Defines to Refer to Layers + +When working with layers, you may have several different key positions with bindings that enable/disable those layers. +To make it easier to refer to those layers in your key bindings, and to change which layers are where later, you can +add a set of `#define`s at the top of your keymap file, and use those defines in your keymap. + +For example, if you have three layers, you can add the following to the top of your keymap: + +```dts +#define DEFAULT 0 +#define LOWER 1 +#define RAISE 2 +``` + +This allows you to use those defines, e.g. `LOWER` later in your keymap. + +```dts +&mo LOWER // equivalent to &mo 1 +``` diff --git a/docs/docs/keymaps/behaviors/macros.md b/docs/docs/keymaps/behaviors/macros.md index a06efaf3..45780bfa 100644 --- a/docs/docs/keymaps/behaviors/macros.md +++ b/docs/docs/keymaps/behaviors/macros.md @@ -312,10 +312,6 @@ To avoid repetition or possible typos when declaring a **zero parameter macro**, ) ``` -:::note -`ZMK_MACRO()` **only supports declaring non-parameterized (zero parameter) macros**; parameterized declarations are not currently supported. -::: - This can be used instead of a complete macro definition. During the firmware build process, the example above would produce the complete macro definition below: ```dts diff --git a/docs/docs/keymaps/behaviors/mod-tap.md b/docs/docs/keymaps/behaviors/mod-tap.md deleted file mode 100644 index 5aa73f6b..00000000 --- a/docs/docs/keymaps/behaviors/mod-tap.md +++ /dev/null @@ -1,54 +0,0 @@ ---- -title: Mod-Tap Behavior -sidebar_label: Mod-Tap ---- - -## Summary - -The Mod-Tap behavior sends a different keypress, depending on whether it's held or tapped. - -- If you hold the key for longer than 200ms, the first keycode ("mod") is sent. -- If you tap the key (release before 200ms), the second keycode ("tap") is sent. - -If you press another key within the 200ms, the 'mod' behavior is also activated. - -## Mod-Tap - -The Mod-Tap behavior either acts as a held modifier, or as a tapped keycode. - -### Behavior Binding - -- Reference: `&mt` -- Parameter #1: The keycode to be sent when activating as a modifier, e.g. `LSHIFT` -- Parameter #2: The keycode to sent when used as a tap, e.g. `A`, `B`. - -Example: - -```dts -&mt LSHIFT A -``` - -### Configuration - -You can configure a different tapping term in your keymap: - -```dts -&mt { - tapping-term-ms = <400>; -}; - -/ { - keymap { - ... - }; -}; -``` - -:::info -Under the hood, the mod-tap is simply a [hold-tap](hold-tap.mdx) of the ["hold-preferred" flavor](hold-tap.mdx#flavors) with a [`tapping-term-ms`](hold-tap.mdx#tapping-term-ms) of 200 that takes in two [keypresses](key-press.md) as its "hold" and "tap" parameters. This means that the mod-tap can be used to invoke **any** [keycode](../list-of-keycodes.mdx), and is not limited to only activating [modifier keys](../modifiers.mdx) when it is held. - -For users who want to momentarily access a specific [layer](../index.mdx#layers) while a key is held and send a keycode when the same key is tapped, see [Layer-Tap](layers.md#layer-tap). - -Similarly, for users looking to create a keybind like the mod-tap that invokes behaviors _other_ than [keypresses](key-press.md), like [sticky keys](sticky-key.md) or [key toggles](key-toggle.md), see [Hold-Tap](hold-tap.mdx). - -::: diff --git a/docs/docs/keymaps/behaviors/mouse-emulation.md b/docs/docs/keymaps/behaviors/mouse-emulation.md index 26bef8cc..dcd1fb70 100644 --- a/docs/docs/keymaps/behaviors/mouse-emulation.md +++ b/docs/docs/keymaps/behaviors/mouse-emulation.md @@ -5,8 +5,7 @@ sidebar_label: Mouse Emulation ## Summary -Mouse emulation behaviors send mouse events. Currently, only mouse button presses are supported, but movement -and scroll action support is planned for the future. +Mouse emulation behaviors send mouse events, including mouse button presses, cursor movement and scrolling. :::warning[Refreshing the HID descriptor] @@ -17,22 +16,29 @@ The mouse functionality will not work over BLE until that is done. ## Configuration Option -This feature can be enabled or disabled explicitly via a config option: +To use any of the behaviors documented here, the ZMK mouse feature must be enabled explicitly via a config option: -``` -CONFIG_ZMK_MOUSE=y +```ini +CONFIG_ZMK_POINTING=y ``` -If you use the mouse key press behavior in your keymap, the feature will automatically be enabled for you. +## Mouse Emulation Defines -## Mouse Button Defines - -To make it easier to encode the HID mouse button numeric values, include -the [`dt-bindings/zmk/mouse.h`](https://github.com/zmkfirmware/zmk/blob/main/app/include/dt-bindings/zmk/mouse.h) header +To make it easier to encode the HID mouse button and move/scroll speed numeric values, include +the [`dt-bindings/zmk/pointing.h`](https://github.com/zmkfirmware/zmk/blob/main/app/include/dt-bindings/zmk/pointing.h) header provided by ZMK near the top: +```dts +#include ``` -#include + +Should you wish to override the default movement or scrolling max velocities, you can define the defaults before including the header, e.g.: + +```c +#define ZMK_POINTING_DEFAULT_MOVE_VAL 1500 // default: 600 +#define ZMK_POINTING_DEFAULT_SCRL_VAL 20 // default: 10 + +#include ``` ## Mouse Button Press @@ -60,12 +66,142 @@ Mouse buttons 4 and 5 typically map to "back" and "forward" actions in most appl The following will send a left click press when the binding is triggered: -``` +```dts &mkp LCLK ``` This example will send press of the fourth mouse button when the binding is triggered: -``` +```dts &mkp MB4 ``` + +### Input Processors + +If you want to apply any [input processors](../input-processors/index.md#input-processors-overview) to `&mkp` you can do so by referencing `&mkp_input_listener`, e.g.: + +```dts +&mkp_input_listener { + input-processors = <&zip_temp_layer 2 2000>; +} +``` + +## Mouse Move + +This behavior sends mouse X/Y movement events to the connected host. + +### Behavior Binding + +- Reference: `&mmv` +- Parameter: A `uint32` with 16-bits each used for vertical and horizontal max velocity. + +The following predefined values can be passed for the parameter: + +| Define | Action | +| :----------- | :--------- | +| `MOVE_UP` | Move up | +| `MOVE_DOWN` | Move down | +| `MOVE_LEFT` | Move left | +| `MOVE_RIGHT` | Move right | + +Additionally, if you want to pass a different max speed than the default for the `MOVE_*` defines, custom X and Y velocity values can be passed with `MOVE_X` and `MOVE_Y`, e.g. `MOVE_X(100)` or `MOVE_Y(-100)`. Positive values indicate movement directions right or down. Note that the default value of the max speed depends on [the value of `ZMK_POINTING_DEFAULT_MOVE_VAL`](#mouse-emulation-defines). + +### Examples + +The following will send a down mouse movement event to the host when pressed/held: + +```dts +&mmv MOVE_DOWN +``` + +The following will send a left mouse movement event to the host when pressed/held: + +```dts +&mmv MOVE_LEFT +``` + +### Input Processors + +If you want to apply any [input processors](../input-processors/index.md#input-processors-overview) to `&mmv` you can do so by referencing `&mmv_input_listener`, e.g.: + +```dts +&mmv_input_listener { + input-processors = <&zip_temp_layer 2 2000>; +} +``` + +## Mouse Scroll + +This behavior sends vertical and horizontal scroll events to the connected host. + +### Behavior Binding + +- Reference: `&msc` +- Parameter: A `uint32` with 16-bits each used for vertical and horizontal velocity. + +The following defines can be passed for the parameter: + +| Define | Action | +| :----------- | :----------- | +| `SCRL_UP` | Scroll up | +| `SCRL_DOWN` | Scroll down | +| `SCRL_LEFT` | Scroll left | +| `SCRL_RIGHT` | Scroll right | + +Additionally, if you want to pass a different max speed than the default for the `SCRL_*` defines, custom X and Y velocity values can be passed with `MOVE_X` and `MOVE_Y`, e.g. `MOVE_X(5)` or `MOVE_Y(-5)`. Positive values indicate scroll directions right or up. Note that the default value of the max speed depends on [the value of `ZMK_POINTING_DEFAULT_SCRL_VAL`](#mouse-emulation-defines). + +### Examples + +The following will send a scroll down event to the host when pressed/held: + +```dts +&msc SCRL_DOWN +``` + +The following will send a scroll left event to the host when pressed/held: + +```dts +&msc SCRL_LEFT +``` + +:::note + +If you enabled [smooth scrolling](../../config/pointing.md#kconfig) then you will want to use the same `MOVE_UP`, `MOVE_DOWN`, etc values instead of the smaller `SCRL_*` parameters for more sensible scroll speeds. + +::: + +### Input Processors + +If you want to apply any [input processors](../input-processors/index.md#input-processors-overview) to `&msc` you can do so by referencing `&msc_input_listener`, e.g.: + +```dts +&msc_input_listener { + input-processors = <&zip_temp_layer 2 2000>; +} +``` + +## Advanced Configuration + +Both `&mmv` and `&msc` are instances of the `"zmk,behavior-input-two-axis"` behavior and can be modified using the [two axis input behavior](../../config/behaviors.md#two-axis-input) configuration properties. The default settings are as follows: + +### Mouse Move + +```dts +&mmv { + x-input-code = ; + y-input-code = ; + time-to-max-speed-ms = <300>; + acceleration-exponent = <1>; +}; +``` + +### Mouse Scroll + +```dts +&msc { + x-input-code = ; + y-input-code = ; + time-to-max-speed-ms = <300>; + acceleration-exponent = <0>; +}; +``` diff --git a/docs/docs/keymaps/behaviors/outputs.md b/docs/docs/keymaps/behaviors/outputs.md index 20ce8a69..77090a17 100644 --- a/docs/docs/keymaps/behaviors/outputs.md +++ b/docs/docs/keymaps/behaviors/outputs.md @@ -29,11 +29,12 @@ header, which is added at the top of the keymap file: This allows you to reference the actions defined in this header: -| Define | Action | -| --------- | ----------------------------------------------- | -| `OUT_USB` | Prefer sending to USB | -| `OUT_BLE` | Prefer sending to the current bluetooth profile | -| `OUT_TOG` | Toggle between USB and BLE | +| Define | Action | +| ---------- | ----------------------------------------------- | +| `OUT_USB` | Prefer sending to USB | +| `OUT_BLE` | Prefer sending to the current bluetooth profile | +| `OUT_TOG` | Toggle between USB and BLE | +| `OUT_NONE` | Prevent from sending any output | ## Output Selection Behavior @@ -45,7 +46,7 @@ The output selection behavior changes the preferred output on press. - Parameter #1: Command, e.g. `OUT_BLE` :::note[Output selection persistence] -The endpoint that is selected by the `&out` behavior will be saved to flash storage and hence persist across restarts and firmware flashes. +The endpoint that is selected by the `&out` behavior will be [saved to flash storage](../../config/settings.md) and hence persist across restarts and firmware flashes. However it will only be saved after [`CONFIG_ZMK_SETTINGS_SAVE_DEBOUNCE`](../../config/system.md#general) milliseconds in order to reduce potential wear on the flash memory. ::: diff --git a/docs/docs/keymaps/behaviors/power.md b/docs/docs/keymaps/behaviors/power.md index 4c333080..f118d0ca 100644 --- a/docs/docs/keymaps/behaviors/power.md +++ b/docs/docs/keymaps/behaviors/power.md @@ -44,11 +44,11 @@ Here is a table describing the command for each define: - Parameter#1: Command, e.g `EP_ON` :::note[External power state persistence] -The on/off state that is set by the `&ext_power` behavior will be saved to flash storage and hence persist across restarts and firmware flashes. +The on/off state that is set by the `&ext_power` behavior will be [saved to flash storage](../../config/settings.md) and hence persist across restarts and firmware flashes. However it will only be saved after [`CONFIG_ZMK_SETTINGS_SAVE_DEBOUNCE`](../../config/system.md#general) milliseconds in order to reduce potential wear on the flash memory. ::: -### Example: +### Examples 1. Behavior binding to enable the external power diff --git a/docs/docs/keymaps/behaviors/reset.md b/docs/docs/keymaps/behaviors/reset.md index 2a177fad..5ba6e65a 100644 --- a/docs/docs/keymaps/behaviors/reset.md +++ b/docs/docs/keymaps/behaviors/reset.md @@ -45,3 +45,5 @@ Example: ## Split Keyboards Both basic and bootloader reset behaviors are [source-specific](../../features/split-keyboards.md#source-locality-behaviors): This means that it affects the side of the keyboard that contains the behavior binding for split keyboards. For example if you press a key with the `&sys_reset` binding on the left half of the keyboard, the left half will be reset. If you want to be able to reset both sides you can put the bindings on both sides of the keyboard and activate it on the side you would like to reset. + +Note that [combos](../combos.md) always invoke reset behavior bindings on the [central part](../../features/split-keyboards.md#central-and-peripheral-roles) of the split keyboard. diff --git a/docs/docs/keymaps/behaviors/soft-off.md b/docs/docs/keymaps/behaviors/soft-off.md index bb1f36dd..0b664df2 100644 --- a/docs/docs/keymaps/behaviors/soft-off.md +++ b/docs/docs/keymaps/behaviors/soft-off.md @@ -7,9 +7,9 @@ sidebar_label: Soft Off The soft off behavior is used to force the keyboard into an off state. Depending on the specific keyboard hardware, the keyboard can be turned back on again either with a dedicated on/off button that is available, or using the reset button found on the device. -Refer to the [soft off config](../../config/power.md#soft-off) for details on enabling soft off in order to use this behavior. +Refer to the [soft off config](../../config/power.md#low-power-states) for details on enabling soft off in order to use this behavior. -For more information, see the [Soft Off Feature](../../features/soft-off.md) page. +For more information, see the [soft off section](../../features/low-power-states.md) of the low power states feature page. ### Behavior Binding @@ -38,3 +38,13 @@ By default, the keyboard will be turned off as soon as the key bound to the beha }; }; ``` + +The peripheral half of a [split keyboard](../../features/split-keyboards.md) will always enter the soft off state immediately when triggering the behavior, regardless of the `hold-time-ms` setting. This is to ensure reliability, as otherwise the central may enter the soft off state before notifying the peripheral that it should also do so. + +If you wish to change this setting, and thus accept the potential for reliability issues, you may remove the `split-peripheral-off-on-press` flag from the behavior: + +```dts +&soft_off { + /delete-property/ split-peripheral-off-on-press; +}; +``` diff --git a/docs/docs/keymaps/behaviors/sticky-key.md b/docs/docs/keymaps/behaviors/sticky-key.md index cace1a6d..b71bf3e4 100644 --- a/docs/docs/keymaps/behaviors/sticky-key.md +++ b/docs/docs/keymaps/behaviors/sticky-key.md @@ -38,11 +38,11 @@ Some typists may find that using a sticky shift key interspersed with rapid typi By default, sticky keys are activated on press until another key is pressed. You can enable the `lazy` setting to instead activate the sticky key right _before_ the other key is pressed. This is useful for mouse interaction or situations where you don't want the host to see anything during a sticky-key timeout, for example `&sk LGUI`, which can trigger a menu if pressed alone. -Note that tapping a lazy sticky key will not trigger other behaviors such as the release of other sticky keys or layers. If you want to use a lazy sticky key to activate the release of a sticky layer, potential solutions include wrappping the sticky key in a simple macro which presses the sticky behavior around the sticky key press, doing the same with `&mo LAYER`, or triggering a tap of some key like `K_CANCEL` on sticky key press. +Note that tapping a lazy sticky key will not trigger other behaviors such as the release of other sticky keys or layers. If you want to use a lazy sticky key to activate the release of a sticky layer, potential solutions include wrapping the sticky key in a simple macro which presses the sticky behavior around the sticky key press, doing the same with `&mo LAYER`, or triggering a tap of some key like `K_CANCEL` on sticky key press. #### `ignore-modifiers` -This setting is enabled by default. It ensures that if a sticky key modifier is pressed before a previously pressed sticky key is released, the modifiers will get combined so you can add more sticky keys or press a regular key to apply the modifiers. This is to accommodate _callum-style mods_ where you are prone to rolling sticky keys. If you want sticky key modifiers to only chain after release, you can disable this setting. Please note that activating multiple modifiers via [modifier functions](../modifiers.mdx#modifier-functions) such as `&sk LS(LALT)`, require `ignore-modifiers` enabled in order to function properly.0 +This setting is enabled by default. It ensures that if a sticky key modifier is pressed before a previously pressed sticky key is released, the modifiers will get combined so you can add more sticky keys or press a regular key to apply the modifiers. This is to accommodate _callum-style mods_ where you are prone to rolling sticky keys. If you want sticky key modifiers to only chain after release, you can disable this setting. Please note that activating multiple modifiers via [modifier functions](../modifiers.mdx#modifier-functions) such as `&sk LS(LALT)`, require `ignore-modifiers` enabled in order to function properly. #### Example diff --git a/docs/docs/keymaps/behaviors/studio-unlock.md b/docs/docs/keymaps/behaviors/studio-unlock.md index d6e87b83..32502b7c 100644 --- a/docs/docs/keymaps/behaviors/studio-unlock.md +++ b/docs/docs/keymaps/behaviors/studio-unlock.md @@ -3,10 +3,6 @@ title: ZMK Studio Unlock Behavior sidebar_label: ZMK Studio Unlock --- -:::warning -ZMK Studio is still in active development. This behavior is documented in preparation for its general availability. -::: - ## Summary ## ZMK Studio Unlock diff --git a/docs/docs/keymaps/behaviors/tap-dance.mdx b/docs/docs/keymaps/behaviors/tap-dance.mdx index 166d7813..0cbcaaff 100644 --- a/docs/docs/keymaps/behaviors/tap-dance.mdx +++ b/docs/docs/keymaps/behaviors/tap-dance.mdx @@ -27,6 +27,7 @@ The number of bindings in this array also determines the tap-dance's maximum num ### Example Usage .keymap` file. +This declarative configuration defines the key mappings, behaviors used within them and the configuration of certain features. +These keymaps can then be updated dynamically/at runtime using the [ZMK Studio](../features/studio.md) feature, +which allows keymap modifications over USB or BLE. -:::note -For advanced users looking to implement custom behaviors for their keymaps, this will be possible -in the future by allowing user configs to add to the CMake application built by Zephyr. -::: - -## Big Picture +## Stock and User Keymaps All keyboard definitions (complete boards or shields) include the _default_ keymap for that keyboard, -so ZMK can produce a "stock" firmware for that keyboard without any further modifications. For users -looking to customize their keyboard's behavior, they can copy the stock `.keymap` file into their -user config directory, and customize the keymap to their liking. +so ZMK can produce a "stock" firmware for that keyboard without any further modifications. +When users complete the [user setup](../user-setup.mdx), the stock `.keymap` file is copied to the +user config directory, which can be used to [customize](../customization.md) the keymap to each user's liking. ## Behaviors @@ -40,7 +35,7 @@ Like many mechanical keyboard firmwares, ZMK keymaps are composed of a collectio minimum of at least one layer that is the default, usually near the bottom of the "layer stack". Each layer in ZMK contains a set of bindings that bind a certain behavior to a certain key position in that layer. -| ![Diagram of three layers](../assets/features/keymaps/layer-diagram.png) | +| ![Diagram of three layers](../assets/keymaps/layer-diagram.png) | | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | | _A simplified diagram showing three layers. The layout of each layer is the same (they all contain four keys), but the behavior bindings within each layer can be different._ | @@ -130,6 +125,7 @@ Each layer of your keymap will be nested under the keymap node. Here is an examp compatible = "zmk,keymap"; default_layer { // Layer 0 + display-name = "Base"; // ---------------------------------------------- // | Z | M | K | // | A | B | C | @@ -143,9 +139,9 @@ Each layer of your keymap will be nested under the keymap node. Here is an examp Each layer should have: -1. A `bindings` property this will be a list of [behavior bindings](behaviors/index.mdx), one for each key position for the keyboard. +1. A `bindings` property that will be a list of [behavior bindings](behaviors/index.mdx), one for each key position for the keyboard. 1. (Optional) A `sensor-bindings` property that will be a list of behavior bindings for each sensor on the keyboard. (Currently, only encoders are supported as sensor hardware, but in the future devices like trackpoints would be supported the same way) -1. (Optional) A `display-name` property that is a string used by certain features, such as the layer status display widget. +1. (Optional) A `display-name` property that is a string used by certain features, such as ZMK Studio and the layer status display widget. ### Multiple Layers diff --git a/docs/docs/keymaps/input-processors/behaviors.md b/docs/docs/keymaps/input-processors/behaviors.md new file mode 100644 index 00000000..032774c7 --- /dev/null +++ b/docs/docs/keymaps/input-processors/behaviors.md @@ -0,0 +1,77 @@ +--- +title: Behaviors Input Processor +sidebar_label: Behaviors +--- + +## Overview + +The behaviors input processor is used invoke standard behaviors when certain input events occur; most frequently this is used to trigger behaviors when certain mouse buttons are triggered by physical pointing devices. + +This input processor is primarily intended for `INPUT_EV_KEY` type of events that have a binary on/off state, not vector types for relative or absolute movements. + +:::note[Source-specific behaviors on split keyboards] +Invoking a [source-specific behavior](../../features/split-keyboards.md#source-locality-behaviors) such as one of the [reset behaviors](../behaviors/reset.md) using this input processor will always trigger it on the central side of the keyboard, regardless of the side includes the input device that originally generated the input event. +::: + +## Usage + +When used, this input processor takes no parameters, as the event code to behavior mapping is specified in the definition of the specific processor instance, e.g.: + +```dts +&zip_button_behaviors +``` + +## Pre-Defined Instances + +One pre-defined instance of the out-of-band behaviors input processor is available: + +| Reference | Description | +| ----------------------- | -------------------------------------------------- | +| `&zip_button_behaviors` | Maps left/right/middle clicks to a given behavior. | + +Should you wish to update the existing instance to trigger different behaviors for each mouse button, you can override the `bindings` property, e.g.: + +```dts +&zip_button_behaviors { + bindings = <&kp A &kp B &kp C>; +}; +``` + +By default, the `bindings` property maps all the buttons to [`&none`](../behaviors/misc.md#none), so you will want to override the `bindings` property like above if you use this processor by assigning it to an [input listener](usage.md). + +## User-Defined Instances + +Users can define new instances of the out-of-band behaviors input processor if they want to target different codes or assign different behaviors. + +### Example + +Below example maps the left mouse button code to the middle mouse button. + +```dts +#include + +/ { + input_processors { + zip_right_click_trigger_paste: zip_right_click_trigger_paste { + compatible = "zmk,input-processor-behaviors"; + #input-processor-cells = <0>; + codes = ; + bindings = <&kp LC(V) >; + }; + }; +} +``` + +### Compatible + +The behaviors input processor uses a `compatible` property of `"zmk,input-processor-behaviors"`. + +### Standard Properties + +- `#input-processor-cells` - required to be constant value of `<0>`. + +### User Properties + +- `type` - The [type](https://github.com/zmkfirmware/zephyr/blob/v4.1.0%2Bzmk-fixes/include/zephyr/dt-bindings/input/input-event-codes.h#L25) of events to scale. Usually, this is `INPUT_EV_KEY` for key/button events. The default value if omitted is `INPUT_EV_KEY`. +- `codes` - The specific codes of the given type to capture, e.g. [button event codes](https://github.com/zmkfirmware/zephyr/blob/v4.1.0%2Bzmk-fixes/include/zephyr/dt-bindings/input/input-event-codes.h#L188). This list must be the same length as the `bindings` property. +- `bindings` - The bindings to trigger when an event with the corresponding code is processed. diff --git a/docs/docs/keymaps/input-processors/code-mapper.md b/docs/docs/keymaps/input-processors/code-mapper.md new file mode 100644 index 00000000..05e0bc84 --- /dev/null +++ b/docs/docs/keymaps/input-processors/code-mapper.md @@ -0,0 +1,63 @@ +--- +title: Code Mapper Input Processor +sidebar_label: Code Mapper +--- + +## Overview + +The code mapper input processor is used to map the code of an event to a new one, e.g. changing a vertical Y movement event into a scroll event. + +## Usage + +When used, a code mapper takes no parameters, as the code mappings are specified in the definition of the specific mapper instance, e.g.: + +```dts +&zip_xy_to_scroll_mapper +``` + +## Pre-Defined Instances + +Three pre-defined instance of the code mapper input processor are available: + +| Reference | Description | +| -------------------------- | ----------------------------------------------------------------------- | +| `&zip_xy_to_scroll_mapper` | Map X/Y movement events to horizontal wheel/wheel events, respectively. | +| `&zip_xy_swap_mapper` | Map X to Y, and Y to X for movements. | + +Note that swapping X and Y movements can also be accomplished with the [transformer](transformer.md#pre-defined-instances) processors. + +## User-Defined Instances + +Users can define new instances of the code mapper input processor if they want to target different codes. + +### Example + +Below example maps the left mouse button code to the middle mouse button. + +```dts +#include + +/ { + input_processors { + zip_click_to_middle_click_mapper: zip_click_to_middle_click_mapper { + compatible = "zmk,input-processor-code-mapper"; + #input-processor-cells = <0>; + type = ; + map = ; + }; + }; +} +``` + +### Compatible + +The code mapper input processor uses a `compatible` property of `"zmk,input-processor-code-mapper"`. + +### Standard Properties + +- `#input-processor-cells` - required to be constant value of `<0>`. + +### User Properties + +- `type` - The [type](https://github.com/zmkfirmware/zephyr/blob/v4.1.0%2Bzmk-fixes/include/zephyr/dt-bindings/input/input-event-codes.h#L25) of events to scale. Usually, this is `INPUT_EV_REL` for relative events and `INPUT_EV_KEY` for key/button events. +- `map` - The specific codes of the given type to map, e.g. [relative event codes](https://github.com/zmkfirmware/zephyr/blob/v4.1.0%2Bzmk-fixes/include/zephyr/dt-bindings/input/input-event-codes.h#L258). This list must be an even number of entries which is processed as a list of pairs of codes. The first code in the pair is the source code, and the second is the code to map it to. diff --git a/docs/docs/keymaps/input-processors/index.md b/docs/docs/keymaps/input-processors/index.md new file mode 100644 index 00000000..16d774cb --- /dev/null +++ b/docs/docs/keymaps/input-processors/index.md @@ -0,0 +1,55 @@ +--- +title: Input Processor Overview +sidebar_label: Overview +--- + +## Input Processors Overview + +"Input processors" are small pieces of functionality that process and optionally modify events generated from emulated and physical pointing devices. Processors can do things like scaling movement values to make them larger or smaller for detailed work, swapping the event types to turn movements into scroll events, or temporarily enabling an extra layer while the pointer is in use. + +## Usage + +For information on using input processors with a given pointing device, see [input processor usage](usage.md). + +## Available Processors + +Below is a summary of pre-defined input processors and user-definable input processors available in ZMK, with references to documentation pages describing them. + +### Pre-Defined Processors + +A set of predefined input processors is available by adding the following at the top of your keymap/overlay file: + +```dts +#include +``` + +Once included, you can use the following: + +| Binding | Processor | Description | +| -------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `&zip_xy_scaler` | [XY Scaler](scaler.md#pre-defined-instances) | Scale the X/Y input events using a multiplier and divisor | +| `&zip_x_scaler` | [X Scaler](scaler.md#pre-defined-instances) | Scale the X input events using a multiplier and divisor | +| `&zip_y_scaler` | [Y Scaler](scaler.md#pre-defined-instances) | Scale the Y input events using a multiplier and divisor | +| `&zip_scroll_scaler` | [Scroll Scaler](scaler.md#pre-defined-instances) | Scale wheel/horizontal wheel input events using a multiplier and divisor | +| `&zip_xy_transform` | [XY Transform](transformer.md#pre-defined-instances) | Transform X/Y values, e.g. inverting or swapping | +| `&zip_scroll_transform` | [Scroll Transform](transformer.md#pre-defined-instances) | Transform wheel/horizontal wheel values, e.g. inverting or swapping | +| `&zip_xy_to_scroll_mapper` | [XY To Scroll Mapper](code-mapper.md#pre-defined-instances) | Map X/Y values to scroll wheel/horizontal wheel events | +| `&zip_xy_swap_mapper` | [XY Swap Mapper](code-mapper.md#pre-defined-instances) | Swap X/Y values | +| `&zip_temp_layer` | [Temporary Layer](temp-layer.md#pre-defined-instances) | Temporarily enable a layer during pointer use | +| `&zip_button_behaviors` | [Mouse Button Behaviors](behaviors.md#pre-defined-instances) | Trigger behaviors when certain mouse buttons are pressed | + +### User-Defined Processors + +Several of the input processors that have predefined instances, e.g. `&zip_xy_scaler` or `&zip_xy_to_scroll_mapper` can also have new instances created with custom properties around which input codes to scale, or which codes to map, etc. + +| Compatible | Processor | Description | +| --------------------------------- | ------------------------------------------------------- | --------------------------------------------------------- | +| `zmk,input-processor-scaler` | [Scaler](scaler.md#user-defined-instances) | Scale value of input events | +| `zmk,input-processor-transform` | [Transform](transformer.md#user-defined-instances) | Perform various transforms like inverting values | +| `zmk,input-processor-code-mapper` | [Code Mapper](code-mapper.md#user-defined-instances) | Map one event code to another type | +| `zmk,input-processor-behaviors` | [Behaviors](behaviors.md#user-defined-instances) | Trigger behaviors for certain matching input events | +| `zmk,input-processor-temp-layer` | [Temporary layer](temp-layer.md#user-defined-instances) | Temporarily enable a layer when input events are received | + +## External Processors + +Much like behaviors, custom input processors can also be added to [external modules](../../features/modules.mdx) to allow complete control of the processing operation. See [`input_processor.h`](https://github.com/zmkfirmware/zmk/blob/main/app/include/drivers/input_processor.h) for the definition of the driver API. diff --git a/docs/docs/keymaps/input-processors/scaler.md b/docs/docs/keymaps/input-processors/scaler.md new file mode 100644 index 00000000..2d0a30cf --- /dev/null +++ b/docs/docs/keymaps/input-processors/scaler.md @@ -0,0 +1,77 @@ +--- +title: Scaler Input Processor +sidebar_label: Scaler +--- + +## Overview + +The scaler input processor is used to scale the value of an input event that has a code matching the codes set on the scaler. Events with other codes will be ignored. Values are scaled by multiplying by the multiplier parameter, and then dividing by the divisor parameter. + +## Usage + +When used, a scaler takes two parameters that are positive integers, a multiplier and a divisor, e.g.: + +```dts +&zip_xy_scaler 2 1 +``` + +which will double all the X/Y movement, or: + +```dts +&zip_xy_scaler 1 3 +``` + +which will make movements more granular by reducing the speed to one third. + +:::warning + +A maximum value of `16` should be used for the multiplier and divisor parameters to avoid overflows. + +::: + +## Pre-Defined Instances + +Three pre-defined instance of the scaler input processor are available: + +| Reference | Description | +| -------------------- | --------------------------------------------- | +| `&zip_xy_scaler` | Scale X- and Y-axis values by the same amount | +| `&zip_x_scaler` | Scale X-axis values | +| `&zip_y_scaler` | Scale Y-axis values | +| `&zip_scroll_scaler` | Scale wheel and horizontal wheel values | + +## User-Defined Instances + +Users can define new instances of the scaler input processor if they want to target different codes. + +### Example + +```dts +#include + +/ { + input_processors { + zip_wheel_scaler: zip_wheel_scaler { + compatible = "zmk,input-processor-scaler"; + #input-processor-cells = <2>; + type = ; + codes = ; + track-remainders; + }; + }; +} +``` + +### Compatible + +The scaler input processor uses a `compatible` property of `"zmk,input-processor-scaler"`. + +### Standard Properties + +- `#input-processor-cells` - required to be constant value of `<2>`. +- `track-remainders` - boolean flag that indicates callers should allow the processor to track remainders between events. + +### User Properties + +- `type` - The [type](https://github.com/zmkfirmware/zephyr/blob/v4.1.0%2Bzmk-fixes/include/zephyr/dt-bindings/input/input-event-codes.h#L25) of events to scale. Usually, this is `INPUT_EV_REL` for relative events. +- `codes` - The specific codes within the given type to scale, e.g. [relative event codes](https://github.com/zmkfirmware/zephyr/blob/v4.1.0%2Bzmk-fixes/include/zephyr/dt-bindings/input/input-event-codes.h#L258) diff --git a/docs/docs/keymaps/input-processors/temp-layer.md b/docs/docs/keymaps/input-processors/temp-layer.md new file mode 100644 index 00000000..47f2fe6d --- /dev/null +++ b/docs/docs/keymaps/input-processors/temp-layer.md @@ -0,0 +1,58 @@ +--- +title: Temporary Layer Input Processor +sidebar_label: Temporary Layer +--- + +## Overview + +The temporary layer input processor is used to enable a layer when input events are received, and automatically disable it when no further events are received in the given timeout duration. This most frequently is used to temporarily enable a layer with a set of [mouse button emulation behaviors](../behaviors/mouse-emulation.md#mouse-button-press) on it, so you can press various mouse buttons with the normal keyboard keys while using a physical pointer device for X/Y movement. + +## Usage + +When used, the temporary layer input processor takes two parameters, the layer index to enable and a timeout value in milliseconds: + +```dts +&zip_temp_layer 2 2000 +``` + +Above example enables the third layer and automatically disables it again after 2 seconds with no events from this pointing device. + +## Pre-Defined Instances + +One pre-defined instance of the temporary layer input processor is available: + +| Reference | Description | +| ----------------- | --------------------------------------------------------------- | +| `&zip_temp_layer` | Enable a certain layer temporarily until no events are received | + +## User-Defined Instances + +Users can define new instances of the temporary layer input processor to use different settings. + +### Example + +```dts +#include + +/ { + /omit-if-no-ref/ zip_temp_layer: zip_temp_layer { + compatible = "zmk,input-processor-temp-layer"; + #input-processor-cells = <2>; + require-prior-idle-ms = <2000>; + excluded-positions = <1 2 3>; + }; +}; +``` + +### Compatible + +The temp layer input processor uses a `compatible` property of `"zmk,input-processor-temp-layer"`. + +### Standard Properties + +- `#input-processor-cells` - required to be constant value of `<2>`. + +### User Properties + +- `require-prior-idle-ms` - Only activate the layer if there have not been any key presses for at least the set number of milliseconds before the pointing device event +- `excluded-positions` - List of (zero-based) key positions to exclude from deactivating the layer once it is active. diff --git a/docs/docs/keymaps/input-processors/transformer.md b/docs/docs/keymaps/input-processors/transformer.md new file mode 100644 index 00000000..65feb920 --- /dev/null +++ b/docs/docs/keymaps/input-processors/transformer.md @@ -0,0 +1,75 @@ +--- +title: Transformer Input Processor +sidebar_label: Transformer +--- + +## Overview + +The transformer input processor is used to perform various transforms on the value of an input event that has a code matching the codes set on the transformer. Events with other codes will be ignored. + +## Available Transforms + +The following transforms are available, by including +the [`dt-bindings/zmk/input_transform.h`](https://github.com/zmkfirmware/zmk/blob/main/app/include/dt-bindings/zmk/input_transform.h) header +provided by ZMK near the top of your keymap/overlay: + +```dts +#include +``` + +- `INPUT_TRANSFORM_XY_SWAP` - When encountering a value with matching type, swap the type of the event to the other axis, e.g. change an event of type `INPUT_REL_X` to type `INPUT_REL_Y`. +- `INPUT_TRANSFORM_X_INVERT` - Invert the values of any events that match the configured `x-codes` of the processor, by multiplying by negative one. +- `INPUT_TRANSFORM_Y_INVERT` - Invert the values of any events that match the configured `y-codes` of the processor, by multiplying by negative one. + +## Usage + +When used, a transformer takes one parameter, a combination of flags indicating which transforms to apply: + +```dts +&zip_xy_transform (INPUT_TRANSFORM_X_INVERT | INPUT_TRANSFORM_Y_INVERT) +``` + +## Pre-Defined Instances + +Three pre-defined instance of the scaler input processor are available: + +| Reference | Description | +| ----------------------- | ------------------------------------------------------------- | +| `&zip_xy_transform` | Applies the given transforms to X/Y movement events | +| `&zip_scroll_transform` | Applies the given transforms to wheel/horizontal wheel events | + +## User Defined Instances + +Users can define new instances of the transform input processor if they want to target different codes. + +### Example + +```dts +#include + +/ { + input_processors { + my_rotation_event_transform: my_rotation_event_transform { + compatible = "zmk,input-processor-transform"; + #input-processor-cells = <1>; + type = ; + x-codes = ; + y-codes = ; + }; + }; +} +``` + +### Compatible + +The transform input processor uses a `compatible` property of `"zmk,input-processor-transform"`. + +### Standard Properties + +- `#input-processor-cells` - required to be constant value of `<1>`. + +### User Properties + +- `type` - The [type](https://github.com/zmkfirmware/zephyr/blob/v4.1.0%2Bzmk-fixes/include/zephyr/dt-bindings/input/input-event-codes.h#L25) of events to transform. Usually, this is `INPUT_EV_REL` for relative events. +- `x-codes` - The specific X codes within the given type to transform, e.g. [relative event codes](https://github.com/zmkfirmware/zephyr/blob/v4.1.0%2Bzmk-fixes/include/zephyr/dt-bindings/input/input-event-codes.h#L258) +- `y-codes` - The specific Y codes within the given type to transform, e.g. [relative event codes](https://github.com/zmkfirmware/zephyr/blob/v4.1.0%2Bzmk-fixes/include/zephyr/dt-bindings/input/input-event-codes.h#L258) diff --git a/docs/docs/keymaps/input-processors/usage.md b/docs/docs/keymaps/input-processors/usage.md new file mode 100644 index 00000000..907066e9 --- /dev/null +++ b/docs/docs/keymaps/input-processors/usage.md @@ -0,0 +1,59 @@ +--- +title: Input Processor Usage +sidebar_label: Usage +--- + +Input processors are used by assigning them to a given [input listener](../../features/pointing.md#input-listeners). A base set of processors is assigned to a listener, and then overrides can be set that are only active when certain [layers](../index.mdx#layers) are active. The examples in the following assume you are adding processors to the `&trackpad` device which is set up with a `&trackpad_listener`. + +### Base Processors + +Base processors are assigned in the `input-processors` property, and when events are generated, the events are process in the sequence in the order the processors are listed. For example, if you wanted your trackpad to always scale the values to increase the movements, you would assign the [scaler](scaler.md#pre-defined-instances) input processor to the property: + +```dts +#include + +&trackpad_listener { + input-processors = <&zip_xy_scaler 3 2>; +} +``` + +### Layer Specific Overrides + +Additional overrides can be added that only apply when the associated layer is active. For example, to make the trackpad work as a scroll device when your layer `1` is active, nest a child node on the listener and set the `layers` and `input-processors` properties: + +```dts +#include + +&trackpad_listener { + input-processors = <&zip_xy_scaler 3 2>; + + scroller { + layers = <1>; + input-processors = <&zip_xy_to_scroll_mapper>; + }; +} +``` + +:::note + +Overrides are processed in the order they are declared, from top to bottom, followed by the base processors in the parent node. Their application order is _not_ in any way tied to the layers specified in the `layers` property. + +::: + +By default, the first-defined override node that matches the layer specification will apply, in which case and any other overrides or the base processors will be skipped. If you add the `process-next;` property to a child node, the other processors will continue to be checked and applied even if that node's layer filter matches. + +```dts +#include + +&trackpad_listener { + input-processors = <&zip_xy_scaler 3 2>; + + scroller { + layers = <1>; + input-processors = <&zip_xy_to_scroll_mapper>; + process-next; + }; +} +``` + +For more details, see the [Input Listener configuration](../../config/pointing.md#input-listener) section. diff --git a/docs/docs/keymaps/list-of-keycodes.mdx b/docs/docs/keymaps/list-of-keycodes.mdx index c62d5875..3ee88367 100644 --- a/docs/docs/keymaps/list-of-keycodes.mdx +++ b/docs/docs/keymaps/list-of-keycodes.mdx @@ -9,11 +9,6 @@ import Table from "@site/src/components/codes/Table"; This is the reference page for keycodes used by behaviors. Use the table of contents (on the right or the top) for easy navigation. -:::warning -Take extra notice of the spelling of the keycodes, especially the shorthand spelling. -Otherwise, it will result in an elusive parsing error! -::: - :::info[Keyboard vs. Consumer keycodes] In the below tables, there are keycode pairs with similar names where one variant has a `K_` prefix and another `C_`. These variants correspond to similarly named usages from different [HID usage pages](https://usb.org/sites/default/files/hut1_2.pdf#page=16), diff --git a/docs/docs/troubleshooting/building-issues.md b/docs/docs/troubleshooting/building-issues.md index 24d389ab..ca53e9bf 100644 --- a/docs/docs/troubleshooting/building-issues.md +++ b/docs/docs/troubleshooting/building-issues.md @@ -7,7 +7,7 @@ description: Troubleshooting issues when compiling ZMK firmware. ## CMake Error An error along the lines of `CMake Error at (zmk directory)/zephyr/cmake/generic_toolchain.cmake:64 (include): include could not find load file:` during firmware compilation indicates that the Zephyr Environment Variables are not properly defined. -For more information, see [Zephyr's CMake Package](https://docs.zephyrproject.org/3.5.0/build/zephyr_cmake_package.html). +For more information, see [Zephyr's CMake Package](https://docs.zephyrproject.org/4.1.0/build/zephyr_cmake_package.html). ## West Build Errors @@ -53,10 +53,53 @@ A `devicetree_generated.h` error that follows with an "undeclared here" string i In this example, the error string `DT_N_S_keymap_S_symbol_layer_P_bindings_IDX_12_PH_P_label` indicates a problem with the key binding in position `12` in the `symbol_layer` of the keymap. -:::info Key positions are numbered starting from `0` at the top left key on the keymap, incrementing horizontally, row by row. -::: :::tip -A common mistake that leads to this error is to use [key press keycodes](keymaps/behaviors/key-press.md) without the leading `&kp` binding. That is, having entries such as `SPACE` that should have been `&kp SPACE`. +A common mistake that leads to this error is to use [key press keycodes](keymaps/behaviors/key-press.md) without the leading `&kp` binding. That is, having entries such as `&kp A SPACE &kp B` that should have been `&kp A &kp SPACE &kp B`. ::: + +## Diagnosing Unexpected Build Results + +### Configuration Setting Issues + +If you want to ensure that the [configuration settings](../config/index.md#kconfig-files) you intend to change are changed in the build, you can check the final compiled Kconfig file that the firmware build process produces. +This file will display values for all set configurations and includes user, board, shield (if used in build), ZMK, and Zephyr-level settings. + +When using GitHub Actions to build your firmware, the contents of this file are displayed in the "`` Kconfig file" step in your build job: + +![](../assets/troubleshooting/building/kconfig-step.png) + +If you are building locally, this file can be found inside the build folder at `/zephyr/.config`. + +Additionally, the build command (in "West Build (``)" step in GitHub Actions) logs what configuration files were found and used in the build: + +``` ++ west build -s zmk/app -d /tmp/tmp.8cJefinXCb -b corneish_zen_left@2 -- -DZMK_CONFIG=/tmp/zmk-config/config -DZMK_EXTRA_MODULES=/__w/zmk-config/zmk-config +... +-- ZMK Config Kconfig: /tmp/zmk-config/config/corneish_zen.conf +... +``` + +### Devicetree-related Issues + +If you want to ensure that your [devicetree files](../config/index.md#devicetree-files) are processed as you expect, you can check the final compiled devicetree file that the firmware build process produces. +This file will contain a single devicetree that combines all of user, board, and shield (if used in build) devicetree files. +Note that while it will include your keymap contents in it, [keycodes](../keymaps/list-of-keycodes.mdx) like `SPACE` will be displayed instead as hexadecimal numbers like `0x7002a`. + +When using GitHub Actions to build your firmware, the contents of this file are displayed in the "`` Devicetree file" step in your build job: + +![](../assets/troubleshooting/building/devicetree-step.png) + +If you are building locally, this file can be found inside the build folder at `/zephyr/zephyr.dts`. + +Additionally, the build command (in "West Build (``)" step in GitHub Actions) logs what devicetree files were found and used in the build: + +``` ++ west build -s zmk/app -d /tmp/tmp.8cJefinXCb -b corneish_zen_left@2 -- -DZMK_CONFIG=/tmp/zmk-config/config -DZMK_EXTRA_MODULES=/__w/zmk-config/zmk-config +... +-- Found BOARD.dts: /tmp/zmk-config/zmk/app/boards/lowprokb/corneish_zen/corneish_zen_left.dts +-- Found devicetree overlay: /tmp/zmk-config/zmk/app/boards/lowprokb/corneish_zen/corneish_zen_left_2_0_0.overlay +-- Found devicetree overlay: /tmp/zmk-config/config/corneish_zen.keymap +... +``` diff --git a/docs/docs/troubleshooting/connection-issues.mdx b/docs/docs/troubleshooting/connection-issues.mdx index a57a3d20..83cdd478 100644 --- a/docs/docs/troubleshooting/connection-issues.mdx +++ b/docs/docs/troubleshooting/connection-issues.mdx @@ -4,36 +4,19 @@ sidebar_label: Connection Issues description: Troubleshooting wireless connection issues of ZMK devices. --- -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - -export const Uf2Tabs = (props) => ( - - {/* eslint-disable-next-line */} - {props.children} - - -); - :::tip [USB logging](../development/usb-logging.mdx) can be very helpful for diagnosing issues with ZMK. However, when connected to USB your ZMK device will output to USB by default. To troubleshoot wireless connection issues using logging, you will need to [change the preferred output endpoint](../keymaps/behaviors/outputs.md). ::: -## Split Keyboard Halves Unable to Pair +## Split Keyboard Parts Unable to Pair -[Split keyboard](../features/split-keyboards.md) halves will automatically pair with one another, but there are some cases where this breaks, and the pairing needs to be reset, for example: +[Split keyboard](../features/split-keyboards.md) parts will automatically pair with one another, but there are some cases where this breaks and the pairing needs to be reset, for example: -- Switching which halves are the central/peripheral. -- Replacing the controller for one of the halves. +- Changing which part is the central. +- Replacing the controller for one of the parts. -These issues can be resolved by flashing a settings reset firmware to both controllers. +These issues can be resolved by flashing a settings reset firmware to both controllers to clear the stored pairing information. +See [persistent settings documentation](../config/settings.md) for more information. :::warning @@ -41,53 +24,38 @@ This procedure will erase all settings, such as Bluetooth profiles, output selec ::: -### Acquiring a Reset UF2 +### Building a Reset Firmware -First, acquire the reset UF2 image file with one of the following options: - - - - -Find the `build.yaml` file in your `zmk-config` folder and add an additional settings reset build for the board used by your split keyboard. For example assuming that the config repo is setup for nice!nano v2 with Corne, append the `settings_reset` shield to the `build.yaml` file as follows: +If you are using GitHub Actions to build your firmware as described in the [user setup](../user-setup.mdx), find the `build.yaml` file in your `zmk-config` folder and add an additional settings reset build for the board used by your split keyboard. For example, assuming that the config repo is setup for nice!nano v2 with Corne, append the `settings_reset` shield to the `build.yaml` file as follows: ```yml include: - - board: nice_nano_v2 + - board: nice_nano shield: corne_left - - board: nice_nano_v2 + - board: nice_nano shield: corne_right - - board: nice_nano_v2 + - board: nice_nano shield: settings_reset ``` -Save the file, commit the changes and push them to GitHub. Download the new firmware zip file build by the latest GitHub Actions job. In it you will find an additional `settings_reset` UF2 image file. +If you are building for an onboard controller keyboard that doesn't use a shield, add a new `shield:` field to its `board:` entry. - +Save the file, commit the changes and push them to GitHub. Download the new firmware zip file that is built by the latest GitHub Actions job. In it you will find an additional `settings_reset` firmware file. - -1. [Open the `Build` workflow](https://github.com/zmkfirmware/zmk/actions/workflows/build.yml?query=event%3Apush+branch%3Amain+is%3Asuccess) from the `Actions` tab of the ZMK GitHub repository. -1. Find one of the results for which the `core-coverage` job ran successfully, indicated by a green checkmark in the "core-coverage" bubble like the image example below. -1. From the next page under "Artifacts", download and unzip the `-settings_reset-zmk` zip file for the UF2 image. - -| ![Successful core-coverage Job](../../docs/assets/troubleshooting/splitpairing/corecoverage.png) | -| :----------------------------------------------------------------------------------------------: | -| An example of a successful core-coverage job which will produce a settings_reset firmware. | - - - +If you use a [local development environment](../development/local-toolchain/setup/index.md) to build firmware instead of GitHub Actions, pass the `-DSHIELD=settings_reset` argument when [building](../development/local-toolchain/build-flash.mdx), omitting all other `-DSHIELD` arguments. ### Reset Split Keyboard Procedure -Perform the following steps to reset **_both_** halves of your split keyboard: +Perform the following steps to reset **_all_** parts of your split keyboard: -1. Put each half of the split keyboard into bootloader mode. -1. Flash one of the halves of the split with the downloaded settings reset UF2 image. -1. Repeat step 2 with the other half of the split keyboard. -1. Flash the actual image for each half of the split keyboard (e.g `my_board_left.uf2` to the left half, `my_board_right.uf2` to the right half). +1. Put each part of the split keyboard into bootloader mode. +1. Flash one of the parts of the split with the settings reset firmware. +1. Repeat step 2 with the other parts of the split keyboard. +1. Flash the actual image for each part of the split keyboard (e.g `my_board_left.uf2` to the left half, `my_board_right.uf2` to the right half). -After completing these steps, pair the halves of the split keyboard together by resetting them at the same time. Most commonly, this is done by grounding the reset pins for each of your keyboard's microcontrollers or pressing the reset buttons at the same time. +If the central and a peripheral has not paired after completing these steps, it can help to reset the central and the peripheral at around the same time. Most commonly, this is done by grounding the reset pins for each of your keyboard's microcontrollers or pressing the reset buttons, or turning both off then on with a power switch. -Once this is done, you can remove/forget the keyboard on each host device and pair it again. +Once this is done, you should remove/forget the keyboard on any paired host device and pair it again, since the pairing information for them will also have been cleared from the keyboard. :::info @@ -97,11 +65,19 @@ The settings reset firmware has Bluetooth disabled to prevent the two sides from ## Unable to Connect to Device +### Bluetooth Profiles + +A very common issue is that the wrong Bluetooth profile has been selected, or the Bluetooth profile already has a saved connection. Learn more about Bluetooth profiles [here](../features/bluetooth.md), and learn how to adjust Bluetooth profiles via the `&bt` behavior [here](../keymaps/behaviors/bluetooth.md). + +### Hardware Issues + +For connectivity problems caused by hardware, please see [the appropriate section of the hardware issues page](hardware-issues.mdx#hardware-related-wireless-connectivity-issues). + ### Additional Bluetooth Options Some devices and operating systems may have additional restrictions that they require be met before allowing a bluetooth peripheral to pair with them. If your keyboard is visible to your host but you are having issues trouble connecting or no input is registered, this might be the cause. Some of ZMK's [experimental bluetooth settings](../config/bluetooth.md) may suffice to resolve the issue. In particular: -- Disabling PHY 2Mbps ([`CONFIG_BT_CTLR_PHY_2M=n`](https://docs.zephyrproject.org/3.5.0/kconfig.html#CONFIG_BT_CTLR_PHY_2M)) helps to pair and connect for certain wireless chipset firmware versions, particularly on Windows (Realtek and Intel chips) and older Intel Macs with Broadcom chipsets. +- Disabling PHY 2Mbps ([`CONFIG_BT_CTLR_PHY_2M=n`](https://docs.zephyrproject.org/4.1.0/kconfig.html#CONFIG_BT_CTLR_PHY_2M)) helps to pair and connect for certain wireless chipset firmware versions, particularly on Windows (Realtek and Intel chips) and older Intel Macs with Broadcom chipsets. - Enabling passkey entry ([`CONFIG_ZMK_BLE_PASSKEY_ENTRY=y`](../config/bluetooth.md)) helps for certain Windows computers (work-managed ones in particular). This may also manifest in not sending keystrokes. ### Issues With Dual Boot Setups @@ -119,19 +95,19 @@ For the `nRF52840`, the flag to set to use the internal oscillator is: CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y ``` -Other microcontrollers may have similar configuration options [found in the Zephyr documentation](https://docs.zephyrproject.org/3.5.0/search.html?q=CONFIG_CLOCK_CONTROL&check_keywords=yes&area=default). Do note that not all microcontrollers allow for the use of an internal oscillator, though. +Other microcontrollers may have similar configuration options [found in the Zephyr documentation](https://docs.zephyrproject.org/4.1.0/search.html?q=CONFIG_CLOCK_CONTROL&check_keywords=yes&area=default). Do note that not all microcontrollers allow for the use of an internal oscillator, though. ## Issues While Connected ### Unreliable/Weak Connection -Some users may experience a poor connection between the keyboard and the host. This might be due to poor quality BLE hardware, a metal enclosure on the keyboard or host, or the distance between them. Increasing the transmit power of the keyboard's BLE radio may reduce the severity of this problem. To do this, set the `CONFIG_BT_CTLR_TX_PWR_PLUS_8` configuration value in the `.conf` file of your user config directory as such: +Some users may experience a poor connection between the keyboard and the host. This might be due to poor quality BLE hardware, a [metal enclosure on the keyboard or host](hardware-issues.mdx#hardware-related-wireless-connectivity-issues), or the distance between them. Increasing the transmit power of the keyboard's BLE radio may reduce the severity of this problem. To do this, set the `CONFIG_BT_CTLR_TX_PWR_PLUS_8` configuration value in the `.conf` file of your user config directory as such: ```ini CONFIG_BT_CTLR_TX_PWR_PLUS_8=y ``` -For the `nRF52840`, the value `PLUS_8` can be set to any multiple of four between `MINUS_20` and `PLUS_8`. The default value for this config is `0`, but if you are having connection issues it is recommended to set it to `PLUS_8` because the power consumption difference is negligible. For more information on changing the transmit power of your BLE device, please refer to [the Zephyr docs.](https://docs.zephyrproject.org/3.5.0/kconfig.html#CONFIG_BT_CTLR_TX_PWR) +For the `nRF52840`, the value `PLUS_8` can be set to any multiple of four between `MINUS_20` and `PLUS_8`. The default value for this config is `0`, but if you are having connection issues it is recommended to set it to `PLUS_8` because the power consumption difference is negligible. For more information on changing the transmit power of your BLE device, please refer to [the Zephyr docs.](https://docs.zephyrproject.org/4.1.0/kconfig.html#CONFIG_BT_CTLR_TX_PWR) :::info This setting can also improve the connection strength between the keyboard halves for split keyboards. diff --git a/docs/docs/troubleshooting/hardware-issues.mdx b/docs/docs/troubleshooting/hardware-issues.mdx new file mode 100644 index 00000000..fc234e7c --- /dev/null +++ b/docs/docs/troubleshooting/hardware-issues.mdx @@ -0,0 +1,226 @@ +--- +title: Hardware Issues +sidebar_label: Hardware Issues +description: Troubleshooting common hardware issues. +--- + +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +export const TesterTabs = (props) => ( + + {/* eslint-disable-next-line */} + {props.children} + + +); + +export const PinTabs = (props) => ( + + {/* eslint-disable-next-line */} + {props.children} + + +); + +:::warning +This page contains _general and non-comprehensive advice_ for troubleshooting hardware issues. +ZMK is a _firmware_ project, not hardware. +Your first move should always be to reach out to the product's vendor or manufacturer. + +ZMK contributors cannot provide official support for hardware products they did not create, though the wider community may be able to help as a last resort. +::: + +## Electrical Net Connections + +Problems with your electrical net can manifest in a number of ways. The most common way is through one or more keyswitches not working, often an entire row or column. If this is the case, then (assuming you have access to it) you could use your keyboard's schematic to help identify which pins you need to check. + +### Identifying Issues + +There are three general approaches we recommend for identifying potential issues with the electrical net (pins & connections between components) of your device. + + + +ZMK's main repository currently has "tester" shields for [Pro Micro](https://cdn.sparkfun.com/assets/9/c/3/c/4/523a1765757b7f5c6e8b4567.png) and [Seeed Studio XIAO](https://files.seeedstudio.com/wiki/Seeeduino-XIAO/img/Seeeduino-XIAO-pinout-1.jpg) compatible boards. These will help you test your GPIO pins, but cannot be used to troubleshoot power pins. +#### Acquiring tester firmware + + + +Find the `build.yaml` file in your `zmk-config` folder and add an additional `tester_pro_micro` build for your board: + +```yml title="build.yaml" +include: + # ------------------- + # Your keyboards here + # ------------------- + - board: nice_nano # Replace with the Pro Micro-compatible board you're using + shield: tester_pro_micro +``` + +Save the file, commit the changes and push them to GitHub. Download the new firmware zip file build by the latest GitHub Actions job. In it you will find an additional `tester_pro_micro` UF2 image file. Flash this file to your board. + +The pinout of the pro micro interconnect is shown below: + +![Pro Micro Interconnect pinout](../assets/interconnects/pro_micro/pinout.png) + + + +Find the `build.yaml` file in your `zmk-config` folder and add an additional `tester_xiao` build for your board: + +```yml title="build.yaml" +include: + # ------------------- + # Your keyboards here + # ------------------- + - board: xiao_ble # Replace with the Xiao-compatible board you're using + shield: tester_xiao +``` + +Save the file, commit the changes and push them to GitHub. Download the new firmware zip file build by the latest GitHub Actions job. In it you will find an additional `tester_xiao` UF2 image file. Flash this file to your board. + +The pinout of the Seeed Studio XIAO interconnect is shown below: + +![Seeed Studio XIAO Interconnect pinout](../assets/interconnects/seeed_xiao/pinout.png) + + + +:::danger +Do not short a positive voltage pin (5V, RAW, 3V3, VCC, Battery+ aka B+) to ground or GPIO pins when using the tester. Doing so may permanently damage your device or even cause battery fires. +::: + +After flashing, open a text editor of your choice. Shorting a GPIO pin to ground (with e.g. a wire or tweezers, hold one end go ground and tap the pin with the other end) will now trigger the keyboard to send an informative message on which pins were triggered. + +- If one pin was triggered, then the pin is working fine. +- If two were triggered at once, then these pins are shorted together on your device. +- If no pin was triggered, try shorting a working pin to the pin you were trying to trigger to test if it is shorted to ground on your device. Otherwise, the pin is disconnected or broken. + +Once you have identified _which_ pins have issues, if any, it is recommended that you resort to visual inspection or trial and error with this shield/a multimeter to identify where the faulty connection is. + + + +A multimeter is the most reliable tool for troubleshooting hardware issues. If you're not familiar with how to use one or just need a refresher, consider reading through SparkFun's [*How to Use a Multimeter*](https://learn.sparkfun.com/tutorials/how-to-use-a-multimeter) tutorial. + +Here is a checklist for you to use while probing your device with the multimeter: + +- Are any of the pins shorted that shouldn't be shorted? +- Are all the diodes/components working and in the correct orientation? +- Does pressing a keyswitch close the affected circuit? +- When the device is plugged in, are all the pins at the expected voltage? (Typically ground or 3V3, which is where depends on the design and firmware) +- Are there any failed solder joints? + +Do note that as you need to have access to both sides of a connection, you cannot use a multimeter to troubleshoot pins which are underneath a chip. If the chip in question is your MCU, then you should use a tester shield instead. + +:::tip +To check a solder joint, it is best to probe the two points either side of it if you can. + +
+Example + +![A 3D PCB render with three circled solder joints.](../assets/troubleshooting/multimeter/schematic_probe_example.png) + +To check if the joint marked in red is faulty, measure [the forward voltage drop](https://www.fluke.com/en-us/learn/blog/digital-multimeters/how-to-test-diodes) of the diode, then take the same measurement between the joints circled in purple. If you get the same results as probing the diode directly, there is no problem with the joint. + +
+::: + +
+ +Visual inspection is generally less reliable, but a lot easier than either of the other approaches. Generally, you want to be looking for solder bridges, exposed copper, broken PCB traces, lifted pads, and similar artifacts. + +For through-hole soldering specifically, the below infographic can be quite helpful. +![A helpful soldering infographic. Source: Sparkfun](https://cdn.sparkfun.com/assets/c/d/a/a/9/523b1189757b7fb36e8b456b.jpg) + +To confirm that something you've identified is indeed a problem, you'll want to make use of a multimeter or our tester shield. +:::tip +The above image was taken from [Sparkfun's guide on soldering through-hole components](https://learn.sparkfun.com/tutorials/how-to-solder-through-hole-soldering), which may be of use if you are less experienced with soldering. +::: + + +
+ +### Resolving Issues + +Many issues can be resolved by reworking the affected solder joints (Look up a tutorial on how to do so for your component). Sometimes a pin ends up broken though, in which case you will need to "bodge" (solder) a wire from a spare GPIO pin to the connection in need of a working pin. + +Once you have done so, you will need to adjust the `kscan` of your keyboard slightly. The recommended approach to doing so is via your `zmk-config`: + +1. Search through the files defining your board/shield for the definition of the keyboard's `kscan`. This is typically a `.dts`, `.dtsi`, or an `.overlay` file. +2. Add a [phandle](https://docs.zephyrproject.org/latest/build/dts/phandles.html) to your `.keymap` pointing at your `kscan`, copying in the property of your `kscan` where the broken GPIO pin appears. Depending on your `kscan` driver this could be `input-gpios`, `row-gpios`, etc. If you are using a [split keyboard](../features/split-keyboards.md) and the issue is only affecting one part, you'll need to create separate keymap files for each part (`keyboard_left.keymap` and `keyboard_right.keymap`, for example), removing the shared one, and only edit the affected one. +3. Edit the node to replace the old GPIO key with the new. For example: + +```dts +&kscan0 { + input-gpios + = <&pro_micro 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + ; +}; +``` + +could have the pin `&pro_micro 6` (D6 in the [Pro Micro pinout](../hardware-integration/new-shield.mdx#shield-overlays)) replaced with `&gpio0 8` (P0.08 for nRF MCUs). + +```dts title=".keymap" +&kscan0 { + input-gpios + = <&pro_micro 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&gpio0 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + ; +}; +``` + +You can then build and flash using your config as usual. + +:::note +If the affected pin is not in your `kscan`, you will want to copy over and overwrite the node that it is in instead. +::: + +## Hardware-Related Wireless Connectivity Issues + +Under ideal conditions, a Bluetooth connection can be stable at even a 100 meter distance. However, there are many things which can affect the effective range of the antenna. In no particular order, the most common issues you will encounter are: + +- Solid material near an antenna or between the two communicating antennas (metal is _particularly_ bad) +- Interference from other nearby 2.4GHz connections +- The antenna makes use of malfunctioning hardware such as a [faulty oscillator](connection-issues.mdx#mitigating-a-faulty-oscillator) +- Not enough [power being provided to the antenna](connection-issues.mdx#unreliableweak-connection) +- A missing external antenna for motherboard-integrated or PCIe wireless adapters +- Interference from [USB 3 devices](https://www.bluetoothandusb3.com/the-explanation) +- Keyboard design flaws, including + - Using low frequency nRF52840 pins for high frequency purposes such as WS2812 RGB LEDs + - Improperly tuned antenna + +It is expected that your antenna will have some interference -- hence why most household devices using Bluetooth have an effective range of 5-10 meters. + +### Identifying & Resolving Issues + +Troubleshooting wireless connectivity issues caused by hardware can only really be done via trial and error. + +A good initial approach is: + +1. Make sure you have firmware flashed to your device that has BLE enabled, with at least one [Bluetooth profile](../features/bluetooth.md#profiles) free and no uncleared profiles previously paired to the host device. +2. Select the free profile. +3. Remove as many physical objects between your ZMK device and a host device as possible. +4. Switch off as many other nearby wireless devices as possible. +5. Hold the antenna as close to the host's antenna as possible, minimizing material near the ZMK antenna and between the two antennas. + +If your host cannot find the ZMK device under these conditions, then your antenna likely has a more significant problem and you should contact your vendor, manufacturer, or designer. + +If your host _can_ find the ZMK device, then you can narrow down the solution to one or more of the points above. The previously linked documentation sections may be of use for that. diff --git a/docs/docs/user-setup.mdx b/docs/docs/user-setup.mdx index 9f0dd1ce..ba96b489 100644 --- a/docs/docs/user-setup.mdx +++ b/docs/docs/user-setup.mdx @@ -6,14 +6,32 @@ sidebar_label: Installing ZMK import Tabs from "@theme/Tabs"; import TabItem from "@theme/TabItem"; +export const OsTabs = (props) => ( + + {/* eslint-disable-next-line */} + {props.children} + +); + Unlike other keyboard firmwares, ZMK Firmware has been built from the ground up to allow users to manage their own keyboard configurations, including keymaps, specific hardware details, etc. all outside of the core ZMK Firmware source repository. In addition to this, most users will not need to install any complicated toolchains or tools to build ZMK. GitHub Actions is used instead to automatically build the user's configured firmware for them. -:::info -ZMK currently has an **experimental** command line program set to replace the below steps. It is designed to automate a number of steps for you and be easier to use. Give it a try by following the instructions found [here](user-setup-cli.mdx). Feedback and bug reports are very much welcome. +:::info[Something Isn't Working?] + +If you run into any issues when following these instructions, please [file an issue on GitHub](https://github.com/zmkfirmware/zmk-cli/issues) or [join us on Discord](https://zmk.dev/community/discord/invite) and let us know what went wrong so we can improve ZMK CLI and this guide. + ::: ## Summary @@ -24,184 +42,325 @@ to build your firmware for you in the cloud, which you can then download and fla Following the steps in this guide, you will: +1. Install ZMK CLI, a command line tool for setting up ZMK. 1. Create a new repository in GitHub that will contain your user config. -1. Download and run a small shell script that will automate most of the setup. The script will: - 1. Prompt you for which board (e.g. nice!nano) and shield (e.g. Lily58 or Kyria) you want to create a configuration for. - 1. Prompt you for your GitHub username and repo where the config should be pushed. - 1. Use `git` to clone a template repository that will be the basis for your user's config repository. - 1. Use the given board and shield to update the included GitHub Action to build for the correct hardware. - 1. Commit the initial version. - 1. (If info was provided) Push the local repo to your GitHub repository. -1. Add your own keymap overlay (`keymap.overlay`) file to the repository, and change your keymap. -1. Update the configuration flags for your user config, to enable/disable any ZMK features you would like to include. -1. Commit and push the updates to trigger a new GitHub Action run. +1. Use ZMK CLI to clone the repo to your computer so you can edit the files. +1. Select a keyboard to use and update the `build.yaml` file so GitHub will build firmware for that keyboard. +1. Add your own `.keymap` and `.conf` files to customize your keymap and enable/disable other ZMK features. +1. Commit and push the updates to trigger a new GitHub Action run to build the firmware. ## Prerequisites -The remainder of this guide assumes the following prerequisites: +You will need to install a few tools before you can get started. -1. You have an active, working [GitHub](https://github.com/) account. -1. You have installed and configured the [`git`](https://git-scm.com/) version control tool. -1. You have locally configured git to access your github account. If using [personal access tokens](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token), please be sure it was created with the "workflow" scope option selected. +Many instructions in this guide use commands that need to be run in a terminal application. On most operating systems, the program is simply named "Terminal". + +On Windows, get [Windows Terminal](https://apps.microsoft.com/detail/9n0dx20hk701) from the Microsoft Store if it isn't already installed. + +### Install Git + +Open a terminal and run the following command. If Git is already installed, it will print out a version number. + +```sh +git --version +``` + +If it prints an error instead, install Git from https://git-scm.com/install/. Close and reopen your terminal and run the `git --version` command again to check if it installed correctly. :::note -If you need to, a quick read of [Learn The Basics Of Git In Under 10 Minutes](https://www.freecodecamp.org/news/learn-the-basics-of-git-in-under-10-minutes-da548267cc91/) will help you get started. +This guide will have you run several more `git` commands later. If you aren't familiar with Git, check out [Learn The Basics Of Git In Under 10 Minutes](https://www.freecodecamp.org/news/learn-the-basics-of-git-in-under-10-minutes-da548267cc91/) to help you get started. ::: -## GitHub Repo +### Set Up a GitHub Account -Before running the setup script, you will first need to create a new GitHub repository to host the config. +You will need a GitHub account. [Create an account](https://github.com/signup) if you don't have one yet. -1. Navigate to [https://github.com/new](https://github.com/new) -1. When prompted for the repo name, enter `zmk-config`. -1. The repository can be public or private -1. Do **not** check any of the options to initialize the repository with a README or other files. -1. Click "Create repository" +Next, you will need to authenticate your local Git installation with GitHub. There are several ways to do this, but the following two are the simplest. Pick whichever seems easiest to you: -## User Config Setup Script +#### Authenticate with GitHub CLI -To start the setup process, run the following from your command line prompt: +Install [GitHub CLI](https://cli.github.com/) and run the following command in a terminal. Follow the instructions it gives you, and it will open GitHub in a web browser for you to log in. - - +```sh +gh auth login +``` -```bash -bash -c "$(curl -fsSL https://zmk.dev/setup.sh)" +#### Authenticate with a Personal Access Token + +Create a [personal access token](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token) and make sure to create it with the "workflow" scope option selected. + +When running `git` commands later in this guide, Git will ask for your username and password. Enter your GitHub username, but **do not enter your password**. Instead, paste your access token where it asks for the password. You won't be able to see the token again after you create it, so keep the page open until you've done this and/or copy it to a secure location. If you lose the token, simply create another one. + +### Install uv + +[uv](https://github.com/astral-sh/uv) is a Python package manager which can install ZMK CLI and a supported version of Python if necessary. The instructions for installing uv differ depending on your operating system. Select the tab for your OS below. + +If installation fails, see [https://docs.astral.sh/uv/getting-started/installation/](https://docs.astral.sh/uv/getting-started/installation/) for more detailed instructions and alternative installation methods. + +
+ Other package managers + +ZMK CLI can also be installed with other Python package managers such as [pipx](https://pipx.pypa.io/stable/). If you have a different package manager you prefer, install the ["zmk" package](https://pypi.org/project/zmk/) and skip to [Config Repo Setup](#config-repo-setup). + +
+ + + + +Open a terminal and run the following command: + +```sh +curl -LsSf https://astral.sh/uv/install.sh | sh +``` + +If you get an error like "curl: command not found", try using wget: + +```sh +wget -qO- https://astral.sh/uv/install.sh | sh +``` + +If that doesn't work either, install [curl](https://curl.se/) and try again. For example, on Ubuntu and other Debian-based Linux distributions, run: + +```sh +sudo apt update +sudo apt install curl +curl -LsSf https://astral.sh/uv/install.sh | sh +``` + +If the install script prints the following, close and reopen your terminal. + +``` +To add $HOME/.local/bin to your PATH, either restart your shell or run: + + source $HOME/.local/bin/env (sh, bash, zsh) + source $HOME/.local/bin/env.fish (fish) ``` - + -```bash -bash -c "$(wget https://zmk.dev/setup.sh -O -)" '' --wget +Open a terminal and run the following command: + +```sh +winget install --id astral-sh.uv -e --source winget +``` + +If this prints the text that is highlighted below, close and reopen your terminal. + +``` +// highlight-next-line +Path environment variable modified; restart your shell to use the new value. +Command line alias added: "uvx" +Command line alias added: "uv" +Command line alias added: "uvm" +Successfully installed ``` - + -```powershell -powershell -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://zmk.dev/setup.ps1'))" +Open a terminal and run the following command: + +```sh +curl -LsSf https://astral.sh/uv/install.sh | sh +``` + +If the install script prints the following, close and reopen your terminal. + +``` +To add $HOME/.local/bin to your PATH, either restart your shell or run: + + source $HOME/.local/bin/env (sh, bash, zsh) + source $HOME/.local/bin/env.fish (fish) ``` -
+ -### Keyboard Selection +### Install ZMK CLI -When prompted, enter the number for the corresponding keyboard you would like to target: +Finally, we'll install ZMK CLI. Open a terminal and run: -``` -Keyboard Selection: - 1) 2% Milk 19) Ferris 0.2 37) Nibble - 2) A. Dux 20) Fourier Rev. 1 38) nice!60 - 3) BAT43 21) Helix 39) Osprette - 4) BDN9 Rev2 22) Hummingbird 40) Pancake - 5) BFO-9000 23) Iris 41) Planck Rev6 - 6) Boardsource 3x4 Macropad 24) etc... -Pick an keyboard: +```sh +uv tool install zmk ``` -:::note[For a keyboard not in the included list:] -If you are building firmware for a new keyboard that is not included in the built-in -list of keyboards, you can choose any keyboard from the list that is similar to yours -(e.g. in terms of unibody/split and [onboard controller](hardware.mdx#onboard) / -[composite](hardware.mdx#composite)) to generate the repository, -and edit / add necessary files. You can follow the [new shield guide](development/hardware-integration/new-shield.mdx) if you are adding support for a composite keyboard. -::: +
+ I get an "executable already exists" error -### MCU Board Selection - -If the keyboard selected uses an onboard controller you will skip this step. -When prompted, enter the number for the corresponding MCU board you would like to target: +Earlier versions of this guide used pipx. If you get an error like this... ``` -MCU Board Selection: -1) BlueMicro840 v1 5) nRF52840 M.2 Module 9) QMK Proton-C -2) Mikoto 5.20 6) nRFMicro 1.1 (flipped) 10) Seeeduino XIAO -3) nice!nano v1 7) nRFMicro 1.1/1.2 11) Seeeduino XIAO BLE -4) nice!nano v2 8) nRFMicro 1.3/1.4 12) Quit -Pick an MCU board: +error: Executable already exists: zmk.exe (use `--force` to overwrite) ``` -### Keymap Customization +...run the following commands to remove the pipx version and reinstall it with uv: -At the next prompt, you have an opportunity to decide if you want the stock keymap file copied in -for further customization: - -``` -Copy in the stock keymap for customization? [Yn]: +```sh +python3 -m pipx uninstall zmk +uv tool install zmk ``` -Hit `Enter` or type `yes`/`y` to accept this. If you want to keep the stock keymap, or write a keymap -from scratch, type in `no`/`n`. +
-### GitHub Details +This will likely print a message like ``warning: `/home/username/.local/bin` is not on your PATH``. To fix that, run: -In order to have your new configuration automatically pushed, and then built using GitHub Actions, enter -some information about your particular GitHub info: - -``` -GitHub Username (leave empty to skip GitHub repo creation): petejohanson -GitHub Repo Name: zmk-config -GitHub Repo: https://github.com/petejohanson/zmk-config.git +```sh +uv tool update-shell ``` -Only the GitHub username is required; if you are happy with the defaults offered in the square brackets, you can simply hit `Enter`. +Close and reopen your terminal to apply the changes, then run the following command. It should print a version number if everything installed correctly. -:::note -If you are using SSH keys for git push, change GitHub Repo field to the SSH scheme, e.g. `git@github.com:petejohanson/zmk-config.git`. -::: - -### Confirming Selections - -The setup script will confirm all of your selections one last time, before performing the setup: - -``` -Preparing a user config for: -* MCU Board: nice_nano -* Shield: kyria -* GitHub Repo To Push (please create this in GH first!): https://github.com/petejohanson/zmk-config.git - -Continue? [Yn]: +```sh +zmk --version ``` -After hitting `Enter` or typing `y`, the script will create an initial config in a directory named after the repo name, -update the GitHub Action YAML file, commit the initial version, and then push to your repo. +## Config Repo Setup -:::info +Now that ZMK CLI is installed, you can use it to initialize a repository. -If you used the default GitHub repo URL using the `https://` scheme, you may be prompted for your username + password in order to -push the initial commit. +The `zmk init` command walks you through creating a GitHub repository, then clones it to your computer so you can edit it. + +
+ I already cloned my repo + +If you have already created a repo and cloned it to your computer, for example with the old ZMK setup script, you do not need to do this. Instead, run the following command to point ZMK CLI to your repo, replacing `/path/to/zmk-config` with the actual path to the repo folder. + +```sh +zmk config user.home "/path/to/zmk-config" +``` + +Then, [skip to the next step](#add-a-keyboard). + +
+ +Open a terminal and use the `cd` command to move to a folder where you'd like to place the ZMK files (it will create a new folder in this location), then run `zmk init`. For example: + +```sh +cd ~/Documents +zmk init +``` + +Follow the instructions it gives you. If you already have a ZMK config repo on GitHub, select "Clone an existing repo" and enter its URL when prompted, for example: + +``` +Repository URL: https://github.com/myusername/zmk-config +``` + +Otherwise, select "Create a new ZMK config repo", and follow the instructions to create a new repo. + +After this finishes, you will have a copy of the repo stored on your computer. All `zmk` commands will run on this repo (unless the working directory is inside a different repo). If you ever forget where the repo is located, you can run `zmk cd` to find it. + +### Add a Keyboard + +To start building firmware for a new keyboard, run the following command: + +```sh +zmk keyboard add +``` + +Follow the instructions to select a keyboard (and controller board if necessary). It will add the keyboard to your repo's `build.yaml` file so GitHub knows to build it, and it will create `config/.keymap` and `config/.conf` files for you to edit. + +
+ My keyboard isn't listed + +If ZMK doesn't support your keyboard by default, you have two options: + +**Add a Module** + +ZMK can be extended with [modules](features/modules.mdx) to add new keyboards. If someone has already created a module for your keyboard, run the following command to add it, replacing `` with the URL of the Git repository for the module: + +```sh +zmk module add +``` + +For example, `zmk module add https://github.com/cannonkeys/zmk-cannonkeys-keyboards` would add support for CannonKeys keyboards. + +Run `zmk keyboard add` again, and the new keyboards should appear in the list. + +**Create It Yourself** + +If nobody has created a module for your keyboard yet, or if it is your own custom design, you will need to set it up yourself. Your config repo is already set up as a module, so you can define new keyboards there. See ZMK's [new keyboard shield guide](hardware-integration/new-shield.mdx) for more information. + +ZMK CLI can also help generate some of the boilerplate for defining a new keyboard: + +```sh +zmk keyboard new +``` + +
+ +### Edit Your Keymap and Configuration + +See the [customizing ZMK](customization.md) documentation for instructions on editing your keymap and configuring ZMK settings. + +As a shortcut to open your keymap in a text editor, you can run the following command, replacing `` with the ID of the keyboard you chose earlier: + +```sh +zmk code +``` + +If you have an editor like [VS Code](https://code.visualstudio.com/) that can open a folder, you can also run the command without a keyboard ID to open your config repo directly: + +```sh +zmk code +``` + +The first time you run this command, it will try to identify which text editors you have installed and ask you which one to use. If you want to change this later, change the [`core.editor`](zmk-cli.mdx#coreeditor) setting. + +### Commit and Push to GitHub + +After you've changed your keymap to your liking, you need to commit and push your changes. + +Run the following commands to go to the repo directory, mark all your changed files to be added to the commit, create the commit, and push it to GitHub. + +```sh +zmk cd +git add . +git commit -m "Initial commit" +git push +``` + +The text after `-m` is the "commit message", which gives a name to the commit. This is your first commit, so we're calling it "initial commit" here, but you can name it whatever you like. When you make more commits later, it's a good idea to use the commit message to write a description of the changes you made. + +:::warning + +If the `git push` command asks you for a username and password, enter your GitHub username, but **do not enter your password**. Instead, paste your access token where it asks for the password. (Go back to the [GitHub account setup instructions](#set-up-a-github-account) if you need to create a token.) ::: -## Installing the Firmware +## Install the Firmware ### Download the Archive -Once the setup script is complete and the new user config repository has been pushed, GitHub will automatically run the action -to build your keyboard firmware files. You can view the actions by clicking on the "Actions" tab on your GitHub repository. +Once you push a commit, GitHub will automatically run the action to build your keyboard firmware files. Run the following command to open the GitHub Actions page in your browser: + +```sh +zmk download +``` + +Or, you can manually open your GitHub repository in your browser and click the "Actions" tab at the top. ![](./assets/user-setup/github-actions-link.png) -Once you have loaded the Actions tab, select the top build from the list. Once you load it, the right side panel will include +Once you have loaded the Actions tab, select the top build from the list. If the build was successful, the right side panel will include a link to download the `firmware` upload: ![](./assets/user-setup/firmware-archive.png) -Once downloaded, extract the zip and you can verify it should contain one or more `uf2` files, which will be copied to -your keyboard. +:::info[Fixing build errors] -### Flashing UF2 Files +If you see a red X instead of a link to download the firmware, the build failed, likely due to an error in your repo. See the [troubleshooting page](./troubleshooting/building-issues.md) for help fixing the error. After making changes, [commit and push](#commit-and-push-to-github) again and GitHub will start a new build. -To flash the firmware, first put your board into bootloader mode by double clicking the reset button (either on the MCU board itself, -or the one that is part of your keyboard). The controller should appear in your OS as a new USB storage device. +::: + +Once downloaded, extract the zip and you can verify it should contain one or more `.uf2` or `.hex` files, which contain the firmware you need to write to your keyboard. + +### Flash UF2 Files + +If your firmware contains a `.uf2` file, then you flash the new firmware by putting the keyboard into bootloader mode and copying the file directly to it in file explorer. + +First, put your keyboard into bootloader mode by double clicking the reset button (either on the MCU board itself, or the one that is part of your keyboard). The controller should appear in your OS as a new USB storage device. Once this happens, copy the correct UF2 file (e.g. left or right if working on a split), and paste it onto the root of that USB mass storage device. Once the flash is complete, the controller should unmount the USB storage, automatically restart and load your newly @@ -217,6 +376,12 @@ Please refer to [split keyboards documentation](features/split-keyboards.md) for ::: +### Flash Hex Files + +If your firmware contains a `.hex` file, then you will use DFU to flash the firmware. [QMK Toolbox](https://qmk.fm/toolbox) is an easy-to-use tool with support for DFU flashing. + +Open QMK Toolbox, click the "Open" button, and select the correct `.hex` file (e.g. left or right if working on a split). Consult the documentation for your keyboard to figure out how to enter bootloader or DFU mode (often this is done by pressing a pair of buttons on the keyboard or by holding a specific key as you plug in the USB cable), and once QMK Toolbox detects the keyboard, click "Flash" to flash the firmware. + ## Wirelessly Connecting Your Keyboard ZMK will automatically advertise itself as connectable if it is not currently connected to a device. You should be able to see your keyboard from the bluetooth scanning view of your computer or phone / tablet. It is reported by some users that the connections with Android / iOS devices are generally smoother than with laptops, so if you have trouble connecting, you could try to connect from your phone or tablet first to eliminate any potential hardware issues with bluetooth receivers. @@ -231,7 +396,7 @@ Please refer to [the pairing section in the split keyboards documentation](featu :::note If you have issues connecting the halves, make sure that both sides are getting powered properly through USB or batteries, then follow the -[recommended troubleshooting procedure](troubleshooting/connection-issues.mdx#split-keyboard-halves-unable-to-pair). This is typically necessary if you +[recommended troubleshooting procedure](troubleshooting/connection-issues.mdx#split-keyboard-parts-unable-to-pair). This is typically necessary if you swapped firmware sides between controllers, like flashing left side firmware to the same controller after flashing the right, or vice versa. ::: diff --git a/docs/docs/user-setup-cli.mdx b/docs/docs/zmk-cli.mdx similarity index 51% rename from docs/docs/user-setup-cli.mdx rename to docs/docs/zmk-cli.mdx index d486d763..1e278d39 100644 --- a/docs/docs/user-setup-cli.mdx +++ b/docs/docs/zmk-cli.mdx @@ -1,167 +1,31 @@ --- -title: (EXPERIMENTAL) Installing ZMK -sidebar_label: (EXPERIMENTAL) Installing ZMK +title: ZMK CLI +sidebar_label: ZMK CLI --- -This is an **experimental** command line program to help set up ZMK. [Click here to return to the main documentation](user-setup.mdx). +ZMK CLI is a command line tool which helps with setting up a ZMK config repo and automates some common tasks such as adding new keyboards to your repository. -ZMK CLI walks you through installing ZMK and setting up a GitHub repository to store and build custom firmware. It also automates some common tasks such as adding new keyboards to your repository. +See the [ZMK installation guide](user-setup.mdx#prerequisites) for instructions on installing ZMK CLI. -The instructions below contain commands that need to be run in a terminal program. On Windows, use the [Windows Terminal](https://apps.microsoft.com/detail/9n0dx20hk701) or PowerShell. On other operating systems, the terminal program is usually just named "Terminal". +The instructions below contain commands that need to be run in a terminal program. On most operating systems, the program is simply named "Terminal". -:::info -If you use this program, any bug reports are highly appreciated. We are happy to help you fix your setup if you encounter a bug through the usage of this program. -::: +On Windows, get [Windows Terminal](https://apps.microsoft.com/detail/9n0dx20hk701) from the Microsoft Store if it isn't already installed. -## Installation +## Updating ZMK CLI -### Preliminaries - -#### Make sure you have Git installed - -The below commands should print a version number if the program is installed. +To update to the latest version of ZMK, run the following command in a terminal: ```sh -git --version +uv tool upgrade zmk ``` -
- I don't have Git installed. - -Install Git from https://git-scm.com/downloads. - -If you have Windows 11, you can instead open a terminal and run: - -```sh -winget install git.git -``` - -Re-open your terminal and test to make sure it is now installed. - -
- -#### Make sure you have Python installed - -ZMK CLI requires Python 3.10 or newer. - -```sh -python3 --version -``` - -Note that some operating systems may use `python` in place of `python3`. - -
- I don't have Python 3.10 or newer installed. - -##### On Windows and macOS - -Install the latest version of Python from https://www.python.org/downloads/. - -If you have Windows 11, you can instead open a terminal and run: - -```sh -winget install python3 -``` - -Re-open your terminal and test to make sure it is now installed. - -##### On Linux - -Install `python3` with your package manager. - -If the version is older than 3.10, you will need to find and install a package for a newer version of Python. On Ubuntu 20.04 and older, you can get Python 3.10 from the deadsnakes PPA with the following commands: - -```sh -sudo add-apt-repository ppa:deadsnakes/ppa -sudo apt install python3.10 -``` - -You will then need to replace `python3` with `python3.10` in the rest of the installation instructions. - -Re-open your terminal and test to make sure it is now installed. - -
- -#### (Recommended) Make sure you have pipx installed - -ZMK CLI can be installed with pip, but using [pipx](https://github.com/pypa/pipx) is recommended to avoid conflicts between Python packages. - -```sh -pipx --version -``` - -
- I don't have pipx installed. - -### On Windows and Linux - -Open a terminal and run: - -```sh -python3 -m pip install --user pipx -python3 -m pipx ensurepath -``` - -Some Linux distributions may disallow installing packages with pip. If this gives you an error, see the [install instructions](https://github.com/pypa/pipx?tab=readme-ov-file#on-linux) specific to your distribution. - -Re-open your terminal and test to make sure it is now installed. - -### On macOS - -Open Terminal and run: - -```sh -brew install pipx -pipx ensurepath -``` - -Re-open your terminal and test to make sure it is now installed. - -
- -### Install ZMK CLI - -Run the following commands: - -```sh -pipx install zmk -zmk --help -``` - -It should print a help message if everything installed correctly. - -On Linux, you may get an error saying you need to install another package such as `python3.10-venv`. If so, follow the instructions in the error message, then try the above commands again. - ## Using ZMK CLI All ZMK CLI commands start with `zmk`. Run `zmk --help` for general usage instructions. For help with a specific subcommand, add `--help` after the subcommand, e.g. `zmk init --help`. ### Initialize a Repository -:::warning -If you have already created a repo and cloned it to your computer, you do not need to run this command. Set the [user.home](#userhome) setting to point to the existing repo instead. -::: - -The `zmk init` command walks you through creating a GitHub repository, then clones it to your computer so you can edit it. - -Open a terminal and use the `cd` command to move to a directory where you'd like to place the ZMK files, then run `zmk init`. For example: - -```sh -cd ~/Documents -zmk init -``` - -Follow the instructions it gives you. If you already have a ZMK config repo, you can enter its URL when prompted, for example: - -``` -Repository URL: https://github.com/myusername/zmk-config -``` - -Otherwise, leave this first prompt blank and press Enter, and it will walk you through creating a new repo. - -Once you finish following all the instructions, you will have a copy of the repo stored on your computer. All `zmk` commands will run on this repo (unless the working directory is inside a different repo). If you ever forget where the repo is located, you can run `zmk cd` to find it. - -Now that you have a repo created, see the instructions below for how ZMK CLI can automate some common tasks, or see [Customizing ZMK](customization.md) for more hands-on customization information. +The `zmk init` command walks you through creating a GitHub repository, then clones it to your computer so you can edit it. See the [ZMK installation guide](user-setup.mdx#config-repo-setup) for more details on this command. ### Keyboard Management @@ -187,19 +51,26 @@ Run `zmk keyboard list` to print a list of supported keyboard hardware. If ZMK doesn't support your keyboard yet, you can run `zmk keyboard new` to create a new keyboard from a template. -This won't walk you through all of the details of adding support for a new keyboard, but it will generate most of the boilerplate for you. See the [New Keyboard Shield](development/hardware-integration/new-shield.mdx) guide for how to finish writing the keyboard files. +This won't walk you through all of the details of adding support for a new keyboard, but it will generate most of the boilerplate for you. See the [New Keyboard Shield](hardware-integration/new-shield.mdx) guide for how to finish writing the keyboard files. ### Module Management [Modules](features/modules.mdx) can add support for new keyboards, behaviors, and other features to ZMK. Use the `zmk module` command to install modules into your repo: ```sh -zmk module add # Add a module -zmk module remove # Remove an installed module -zmk module list # List the installed modules -zmk update # Update the local copies of ZMK and modules to their latest versions +zmk module add # Add a module +zmk module add # Add a module given the URL of the repo +zmk module remove # Remove an installed module +zmk module list # List the installed modules +zmk update # Update the local copies of ZMK and modules to their latest versions ``` +:::note + +ZMK CLI stores a copy of ZMK and any modules in a `.zmk` folder so it can read board and shield information from them. This folder is only used by ZMK CLI and is not necessary for building firmware, therefore ZMK CLI will automatically add it to your repo's `.gitignore` file. + +::: + ### Edit Keymap and Config Files The `zmk code` command will open ZMK files in a text editor: diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index 57528240..535e3e49 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -1,6 +1,34 @@ +const { execSync } = require("child_process"); const path = require("path"); const theme = require("./src/theme/prism/themes/github"); const darkTheme = require("./src/theme/prism/themes/github-dark-dimmed"); +const { releaseVersions } = require("./zmk-release-versions.json"); + +const gitBranch = + process.env.BRANCH || + execSync("git branch --show-current", { encoding: "utf-8" }).trim(); +const isDevelopmentVersion = + gitBranch === "main" || !/^v\d+\.\d+-branch$/.test(gitBranch); +const versionNavbarItems = [ + { + label: "Pre-Release", + description: "Current active development branch (main)", + href: "https://zmk.dev/docs/", + }, + ...releaseVersions.map((r) => ({ + label: "v" + r, + description: "Stable release v" + r, + href: `https://v${r.replaceAll(".", "-")}-branch.zmk.dev/docs/`, + })), +]; + +const versionDropDownLabel = ( + isDevelopmentVersion + ? versionNavbarItems[0] + : versionNavbarItems.find((item) => { + return item.label === gitBranch.replace("-branch", ""); + }) +).label; module.exports = { title: "ZMK Firmware", @@ -11,13 +39,16 @@ module.exports = { trailingSlash: "false", organizationName: "zmkfirmware", // Usually your GitHub org/user name. projectName: "zmk", // Usually your repo name. + customFields: { + isDevelopmentVersion, + releaseVersions, + }, plugins: [ "@docusaurus/theme-mermaid", path.resolve(__dirname, "src/docusaurus-tree-sitter-plugin"), path.resolve(__dirname, "src/hardware-metadata-collection-plugin"), path.resolve(__dirname, "src/hardware-metadata-static-plugin"), path.resolve(__dirname, "src/hardware-schema-typescript-plugin"), - path.resolve(__dirname, "src/setup-script-generation-plugin"), ], themeConfig: { colorMode: { @@ -51,20 +82,39 @@ module.exports = { label: "Docs", position: "left", }, - { to: "blog", label: "Blog", position: "left" }, + isDevelopmentVersion + ? { to: "blog", label: "Blog", position: "left" } + : { href: "https://zmk.dev/blog", label: "Blog", position: "left" }, { - to: "power-profiler", - label: "Power Profiler", + type: "dropdown", + label: "Tools", position: "left", + items: [ + { + to: "power-profiler", + label: "Power Profiler", + }, + { + to: "keymap-upgrader", + label: "Keymap Upgrader", + }, + ], }, { - to: "keymap-upgrader", - label: "Keymap Upgrader", - position: "left", + type: "dropdown", + label: versionDropDownLabel, + position: "right", + items: versionNavbarItems, + }, + { + href: "https://zmk.studio/", + label: "ZMK Studio", + position: "right", }, { href: "https://github.com/zmkfirmware/zmk", - label: "GitHub", + "aria-label": "ZMK GitHub Repository", + className: "header-github-link", position: "right", }, ], @@ -99,8 +149,8 @@ module.exports = { "/community/discord/invite", }, { - label: "Twitter", - href: "https://twitter.com/ZMKFirmware", + label: "Mastodon", + href: "https://fosstodon.org/@zmk", }, ], }, diff --git a/docs/eslint.config.mjs b/docs/eslint.config.mjs new file mode 100644 index 00000000..c4497075 --- /dev/null +++ b/docs/eslint.config.mjs @@ -0,0 +1,35 @@ +import { defineConfig, globalIgnores } from "eslint/config"; +import globals from "globals"; +import jseslint from "@eslint/js"; +import tseslint from "typescript-eslint"; +import pluginReact from "eslint-plugin-react"; +import * as mdx from "eslint-plugin-mdx"; + +export default defineConfig([ + globalIgnores([ + ".cache-loader/", + ".docusaurus/", + "build/", + "src/hardware-metadata.d.ts", + ]), + { files: ["**/*.{js,jsx,ts,tsx,md,mdx}"] }, + jseslint.configs.recommended, + tseslint.configs.strict, + mdx.flat, + pluginReact.configs.flat.recommended, + pluginReact.configs.flat["jsx-runtime"], + { + languageOptions: { + globals: { ...globals.browser, ...globals.commonjs, ...globals.node }, + }, + rules: { + "react/no-unescaped-entities": "off", + "@typescript-eslint/no-require-imports": "off", + }, + settings: { + react: { + version: "detect", + }, + }, + }, +]); diff --git a/docs/netlify-ignore-command.sh b/docs/netlify-ignore-command.sh new file mode 100755 index 00000000..aaf44022 --- /dev/null +++ b/docs/netlify-ignore-command.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +# We deploy main, version branches and deploy previews only +if echo $HEAD | grep -E '^(main|v[[:digit:]]+\.([[:digit:]])+-branch)$' || echo $CONTEXT | grep '^deploy-preview$' +then + echo "Head '$HEAD' matches a deployed branch, or context is deploy preview, checking for git changes." + git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF . ../app/boards/ +else + echo "Head '$HEAD' does not match a deployed branch and is not a deploy preview" + exit 0 +fi \ No newline at end of file diff --git a/docs/netlify.toml b/docs/netlify.toml index 87462006..b656b9e8 100644 --- a/docs/netlify.toml +++ b/docs/netlify.toml @@ -1,5 +1,5 @@ [build] - ignore = "git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF . ../app/boards/" + ignore = "bash ./netlify-ignore-command.sh" [[redirects]] from = "/community/discord/invite" diff --git a/docs/package-lock.json b/docs/package-lock.json index cc4ebcc0..f046e505 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -8,219 +8,189 @@ "name": "docs", "version": "0.0.0", "dependencies": { - "@docusaurus/core": "^3.0.0", - "@docusaurus/preset-classic": "^3.0.0", - "@docusaurus/theme-mermaid": "^3.0.0", - "@fortawesome/fontawesome-svg-core": "^6.4.2", - "@fortawesome/free-solid-svg-icons": "^6.4.0", + "@docusaurus/core": "^3.10.1", + "@docusaurus/preset-classic": "^3.10.1", + "@docusaurus/theme-mermaid": "^3.10.1", + "@fortawesome/fontawesome-svg-core": "^6.7.1", + "@fortawesome/free-solid-svg-icons": "^6.7.1", "@fortawesome/react-fontawesome": "^0.2.0", - "@mdx-js/react": "^3.0.0", + "@mdx-js/react": "^3.1.0", "classnames": "^2.2.6", - "js-yaml": "^4.1.0", + "js-yaml": "^4.1.1", "react": "^18.0.0", "react-async": "^10.0.1", "react-copy-to-clipboard": "^5.0.3", "react-dom": "^18.0.0", - "react-toastify": "^10.0.5", - "web-tree-sitter": "^0.23.0" + "react-toastify": "^10.0.6", + "tree-sitter-devicetree": "^0.12.1", + "web-tree-sitter": "^0.24.3" }, "devDependencies": { - "@docusaurus/module-type-aliases": "^3.0.0", - "@docusaurus/tsconfig": "^3.0.0", - "@docusaurus/types": "^3.0.0", + "@docusaurus/module-type-aliases": "^3.9.2", + "@docusaurus/tsconfig": "^3.9.2", + "@docusaurus/types": "^3.9.2", + "@eslint/js": "^9.39.2", + "@types/glob": "^8.1.0", "@types/js-yaml": "^4.0.5", - "@types/react": "^18.2.29", + "@types/react": "^18.3.12", "@types/react-helmet": "^6.1.6", "@types/react-router-dom": "^5.1.7", - "eslint": "^8.39.0", - "eslint-config-prettier": "^8.8.0", - "eslint-plugin-mdx": "^3.1.5", - "eslint-plugin-react": "^7.33.2", - "json-schema-to-typescript": "^13.1.1", + "eslint": "^9.39.2", + "eslint-plugin-mdx": "^3.6.2", + "eslint-plugin-react": "^7.37.5", + "globals": "^17.6.0", + "json-schema-to-typescript": "^15.0.3", "mustache": "^4.2.0", "null-loader": "^4.0.0", "prebuild-webpack-plugin": "^1.1.1", - "prettier": "^2.8.7", - "string-replace-loader": "^3.1.0", - "typescript": "^5.0.4", - "webpack": "^5.94.0" + "prettier": "^3.7.4", + "string-replace-loader": "^3.3.0", + "typescript": "^5.9.3", + "typescript-eslint": "^8.52.0", + "webpack": "^5.104.1" + } + }, + "node_modules/@algolia/abtesting": { + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/@algolia/abtesting/-/abtesting-1.18.1.tgz", + "integrity": "sha512-aehCadlWOGvrT91KUIZpC0MbB8KBW9yUuvTJFd2xesR7le/IsT4nJUnjCCZ4ZqZCeTcPHPV5mo//fZ5oxcSVYw==", + "license": "MIT", + "dependencies": { + "@algolia/client-common": "5.52.1", + "@algolia/requester-browser-xhr": "5.52.1", + "@algolia/requester-fetch": "5.52.1", + "@algolia/requester-node-http": "5.52.1" + }, + "engines": { + "node": ">= 14.0.0" } }, "node_modules/@algolia/autocomplete-core": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/@algolia/autocomplete-core/-/autocomplete-core-1.9.3.tgz", - "integrity": "sha512-009HdfugtGCdC4JdXUbVJClA0q0zh24yyePn+KUGk3rP7j8FEe/m5Yo/z65gn6nP/cM39PxpzqKrL7A6fP6PPw==", + "version": "1.19.8", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-core/-/autocomplete-core-1.19.8.tgz", + "integrity": "sha512-3YEorYg44niXcm7gkft3nXYItHd44e8tmh4D33CTszPgP0QWkaLEaFywiNyJBo7UL/mqObA/G9RYuU7R8tN1IA==", "license": "MIT", "dependencies": { - "@algolia/autocomplete-plugin-algolia-insights": "1.9.3", - "@algolia/autocomplete-shared": "1.9.3" + "@algolia/autocomplete-plugin-algolia-insights": "1.19.8", + "@algolia/autocomplete-shared": "1.19.8" } }, "node_modules/@algolia/autocomplete-plugin-algolia-insights": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/@algolia/autocomplete-plugin-algolia-insights/-/autocomplete-plugin-algolia-insights-1.9.3.tgz", - "integrity": "sha512-a/yTUkcO/Vyy+JffmAnTWbr4/90cLzw+CC3bRbhnULr/EM0fGNvM13oQQ14f2moLMcVDyAx/leczLlAOovhSZg==", + "version": "1.19.8", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-plugin-algolia-insights/-/autocomplete-plugin-algolia-insights-1.19.8.tgz", + "integrity": "sha512-ZvJWO8ZZJDpc1LNM2TTBdmQsZBLMR4rU5iNR2OYvEeFBiaf/0ESnRSSLQbryarJY4SVxtoz6A2ZtDMNM+iQEAA==", "license": "MIT", "dependencies": { - "@algolia/autocomplete-shared": "1.9.3" + "@algolia/autocomplete-shared": "1.19.8" }, "peerDependencies": { "search-insights": ">= 1 < 3" } }, - "node_modules/@algolia/autocomplete-preset-algolia": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/@algolia/autocomplete-preset-algolia/-/autocomplete-preset-algolia-1.9.3.tgz", - "integrity": "sha512-d4qlt6YmrLMYy95n5TB52wtNDr6EgAIPH81dvvvW8UmuWRgxEtY0NJiPwl/h95JtG2vmRM804M0DSwMCNZlzRA==", - "license": "MIT", - "dependencies": { - "@algolia/autocomplete-shared": "1.9.3" - }, - "peerDependencies": { - "@algolia/client-search": ">= 4.9.1 < 6", - "algoliasearch": ">= 4.9.1 < 6" - } - }, "node_modules/@algolia/autocomplete-shared": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/@algolia/autocomplete-shared/-/autocomplete-shared-1.9.3.tgz", - "integrity": "sha512-Wnm9E4Ye6Rl6sTTqjoymD+l8DjSTHsHboVRYrKgEt8Q7UHm9nYbqhN/i0fhUYA3OAEH7WA8x3jfpnmJm3rKvaQ==", + "version": "1.19.8", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-shared/-/autocomplete-shared-1.19.8.tgz", + "integrity": "sha512-h5hf2t8ejF6vlOgvLaZzQbWs5SyH2z4PAWygNAvvD/2RI29hdQ54ldUGwqVuj9Srs+n8XUKTPUqb7fvhBhQrnQ==", "license": "MIT", "peerDependencies": { "@algolia/client-search": ">= 4.9.1 < 6", "algoliasearch": ">= 4.9.1 < 6" } }, - "node_modules/@algolia/cache-browser-local-storage": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@algolia/cache-browser-local-storage/-/cache-browser-local-storage-4.24.0.tgz", - "integrity": "sha512-t63W9BnoXVrGy9iYHBgObNXqYXM3tYXCjDSHeNwnsc324r4o5UiVKUiAB4THQ5z9U5hTj6qUvwg/Ez43ZD85ww==", + "node_modules/@algolia/client-abtesting": { + "version": "5.52.1", + "resolved": "https://registry.npmjs.org/@algolia/client-abtesting/-/client-abtesting-5.52.1.tgz", + "integrity": "sha512-HmXOGBOAOJPounpBzBpuY0zDYeiCpxgHnQmuA7JO6ScukcBdGp3/XM9zJk5pJx/xNGD68mbPGXWpDxGtl6BwDQ==", "license": "MIT", "dependencies": { - "@algolia/cache-common": "4.24.0" - } - }, - "node_modules/@algolia/cache-common": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@algolia/cache-common/-/cache-common-4.24.0.tgz", - "integrity": "sha512-emi+v+DmVLpMGhp0V9q9h5CdkURsNmFC+cOS6uK9ndeJm9J4TiqSvPYVu+THUP8P/S08rxf5x2P+p3CfID0Y4g==", - "license": "MIT" - }, - "node_modules/@algolia/cache-in-memory": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@algolia/cache-in-memory/-/cache-in-memory-4.24.0.tgz", - "integrity": "sha512-gDrt2so19jW26jY3/MkFg5mEypFIPbPoXsQGQWAi6TrCPsNOSEYepBMPlucqWigsmEy/prp5ug2jy/N3PVG/8w==", - "license": "MIT", - "dependencies": { - "@algolia/cache-common": "4.24.0" - } - }, - "node_modules/@algolia/client-account": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@algolia/client-account/-/client-account-4.24.0.tgz", - "integrity": "sha512-adcvyJ3KjPZFDybxlqnf+5KgxJtBjwTPTeyG2aOyoJvx0Y8dUQAEOEVOJ/GBxX0WWNbmaSrhDURMhc+QeevDsA==", - "license": "MIT", - "dependencies": { - "@algolia/client-common": "4.24.0", - "@algolia/client-search": "4.24.0", - "@algolia/transporter": "4.24.0" - } - }, - "node_modules/@algolia/client-account/node_modules/@algolia/client-common": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-4.24.0.tgz", - "integrity": "sha512-bc2ROsNL6w6rqpl5jj/UywlIYC21TwSSoFHKl01lYirGMW+9Eek6r02Tocg4gZ8HAw3iBvu6XQiM3BEbmEMoiA==", - "license": "MIT", - "dependencies": { - "@algolia/requester-common": "4.24.0", - "@algolia/transporter": "4.24.0" - } - }, - "node_modules/@algolia/client-account/node_modules/@algolia/client-search": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-4.24.0.tgz", - "integrity": "sha512-uRW6EpNapmLAD0mW47OXqTP8eiIx5F6qN9/x/7HHO6owL3N1IXqydGwW5nhDFBrV+ldouro2W1VX3XlcUXEFCA==", - "license": "MIT", - "dependencies": { - "@algolia/client-common": "4.24.0", - "@algolia/requester-common": "4.24.0", - "@algolia/transporter": "4.24.0" + "@algolia/client-common": "5.52.1", + "@algolia/requester-browser-xhr": "5.52.1", + "@algolia/requester-fetch": "5.52.1", + "@algolia/requester-node-http": "5.52.1" + }, + "engines": { + "node": ">= 14.0.0" } }, "node_modules/@algolia/client-analytics": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-4.24.0.tgz", - "integrity": "sha512-y8jOZt1OjwWU4N2qr8G4AxXAzaa8DBvyHTWlHzX/7Me1LX8OayfgHexqrsL4vSBcoMmVw2XnVW9MhL+Y2ZDJXg==", + "version": "5.52.1", + "resolved": "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-5.52.1.tgz", + "integrity": "sha512-5oo4+I8iixie9vXhCyNFCzeIr8pqA3FQ//VsLHTDvZAV4ttYOPGvYHGQq5NSalrLx5Jc3dRro/5uDOlnUMcBJg==", "license": "MIT", "dependencies": { - "@algolia/client-common": "4.24.0", - "@algolia/client-search": "4.24.0", - "@algolia/requester-common": "4.24.0", - "@algolia/transporter": "4.24.0" - } - }, - "node_modules/@algolia/client-analytics/node_modules/@algolia/client-common": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-4.24.0.tgz", - "integrity": "sha512-bc2ROsNL6w6rqpl5jj/UywlIYC21TwSSoFHKl01lYirGMW+9Eek6r02Tocg4gZ8HAw3iBvu6XQiM3BEbmEMoiA==", - "license": "MIT", - "dependencies": { - "@algolia/requester-common": "4.24.0", - "@algolia/transporter": "4.24.0" - } - }, - "node_modules/@algolia/client-analytics/node_modules/@algolia/client-search": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-4.24.0.tgz", - "integrity": "sha512-uRW6EpNapmLAD0mW47OXqTP8eiIx5F6qN9/x/7HHO6owL3N1IXqydGwW5nhDFBrV+ldouro2W1VX3XlcUXEFCA==", - "license": "MIT", - "dependencies": { - "@algolia/client-common": "4.24.0", - "@algolia/requester-common": "4.24.0", - "@algolia/transporter": "4.24.0" + "@algolia/client-common": "5.52.1", + "@algolia/requester-browser-xhr": "5.52.1", + "@algolia/requester-fetch": "5.52.1", + "@algolia/requester-node-http": "5.52.1" + }, + "engines": { + "node": ">= 14.0.0" } }, "node_modules/@algolia/client-common": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-5.2.3.tgz", - "integrity": "sha512-zqfcbgjYR72Y/rx/+/6g5Li/eV33yhRq5mkGbU06JYBzvGq6viy0gZl1ckCFhLLifKzXZ4yzUQTw/KG6FV+smg==", + "version": "5.52.1", + "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-5.52.1.tgz", + "integrity": "sha512-qCDoZfx5MpX7XQzvQ3bC4tSEMkQWQMaF/ABtLuoze03Y/flR563CCSws02qIJ23oX7lxl92LsilZjINVyTdtLw==", "license": "MIT", - "peer": true, + "engines": { + "node": ">= 14.0.0" + } + }, + "node_modules/@algolia/client-insights": { + "version": "5.52.1", + "resolved": "https://registry.npmjs.org/@algolia/client-insights/-/client-insights-5.52.1.tgz", + "integrity": "sha512-hnGs0/lsFJ2PWDxNBz7pxreXo/Xz7gxYRcfePBUjsH26ad0kU/sgnVZd9LwWBpsQv65z2jlb5dkyaB9WE9M9FQ==", + "license": "MIT", + "dependencies": { + "@algolia/client-common": "5.52.1", + "@algolia/requester-browser-xhr": "5.52.1", + "@algolia/requester-fetch": "5.52.1", + "@algolia/requester-node-http": "5.52.1" + }, "engines": { "node": ">= 14.0.0" } }, "node_modules/@algolia/client-personalization": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@algolia/client-personalization/-/client-personalization-4.24.0.tgz", - "integrity": "sha512-l5FRFm/yngztweU0HdUzz1rC4yoWCFo3IF+dVIVTfEPg906eZg5BOd1k0K6rZx5JzyyoP4LdmOikfkfGsKVE9w==", + "version": "5.52.1", + "resolved": "https://registry.npmjs.org/@algolia/client-personalization/-/client-personalization-5.52.1.tgz", + "integrity": "sha512-2VxxNc/uBysyKvGeBdSM5n9eIDKH8kWD7wd9/yqbJAiVwU4Yv6tU1LSJusHKrXV/aCu1KW7t9Gug9QyeEmtn/Q==", "license": "MIT", "dependencies": { - "@algolia/client-common": "4.24.0", - "@algolia/requester-common": "4.24.0", - "@algolia/transporter": "4.24.0" + "@algolia/client-common": "5.52.1", + "@algolia/requester-browser-xhr": "5.52.1", + "@algolia/requester-fetch": "5.52.1", + "@algolia/requester-node-http": "5.52.1" + }, + "engines": { + "node": ">= 14.0.0" } }, - "node_modules/@algolia/client-personalization/node_modules/@algolia/client-common": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-4.24.0.tgz", - "integrity": "sha512-bc2ROsNL6w6rqpl5jj/UywlIYC21TwSSoFHKl01lYirGMW+9Eek6r02Tocg4gZ8HAw3iBvu6XQiM3BEbmEMoiA==", + "node_modules/@algolia/client-query-suggestions": { + "version": "5.52.1", + "resolved": "https://registry.npmjs.org/@algolia/client-query-suggestions/-/client-query-suggestions-5.52.1.tgz", + "integrity": "sha512-O6mPtsw3xEfNOe6gWFpYLeAZAIljNa4Hgna3bq15PwyN7nbjTY0wXJFRbzs/0YVf75Br+SbOQUmjKxXYjDiSiQ==", "license": "MIT", "dependencies": { - "@algolia/requester-common": "4.24.0", - "@algolia/transporter": "4.24.0" + "@algolia/client-common": "5.52.1", + "@algolia/requester-browser-xhr": "5.52.1", + "@algolia/requester-fetch": "5.52.1", + "@algolia/requester-node-http": "5.52.1" + }, + "engines": { + "node": ">= 14.0.0" } }, "node_modules/@algolia/client-search": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-5.2.3.tgz", - "integrity": "sha512-xXdCg8vpiwE8gqSyvjxq8V3qbFa+gHasY5epIz718IByWv3WKLLi/n4SMIfB/zRwXTLVWeGOH/UJSz5VCnAAqg==", + "version": "5.52.1", + "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-5.52.1.tgz", + "integrity": "sha512-gA8oJOV1LnQQkDf91iebNnFInHuW0gRPEgLSOQ7EfipCEjYTHm5swm1DlH9H5RaRw4RrHuzHBegnlzc0MAstcg==", "license": "MIT", - "peer": true, "dependencies": { - "@algolia/client-common": "5.2.3", - "@algolia/requester-browser-xhr": "5.2.3", - "@algolia/requester-node-http": "5.2.3" + "@algolia/client-common": "5.52.1", + "@algolia/requester-browser-xhr": "5.52.1", + "@algolia/requester-fetch": "5.52.1", + "@algolia/requester-node-http": "5.52.1" }, "engines": { "node": ">= 14.0.0" @@ -232,173 +202,157 @@ "integrity": "sha512-FQzvOCgoFXAbf5Y6mYozw2aj5KCJoA3m4heImceldzPSMbdyS4atVjJzXKMsfX3wnZTFYwkkt8/z8UesLHlSBQ==", "license": "MIT" }, - "node_modules/@algolia/logger-common": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@algolia/logger-common/-/logger-common-4.24.0.tgz", - "integrity": "sha512-LLUNjkahj9KtKYrQhFKCzMx0BY3RnNP4FEtO+sBybCjJ73E8jNdaKJ/Dd8A/VA4imVHP5tADZ8pn5B8Ga/wTMA==", - "license": "MIT" - }, - "node_modules/@algolia/logger-console": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@algolia/logger-console/-/logger-console-4.24.0.tgz", - "integrity": "sha512-X4C8IoHgHfiUROfoRCV+lzSy+LHMgkoEEU1BbKcsfnV0i0S20zyy0NLww9dwVHUWNfPPxdMU+/wKmLGYf96yTg==", + "node_modules/@algolia/ingestion": { + "version": "1.52.1", + "resolved": "https://registry.npmjs.org/@algolia/ingestion/-/ingestion-1.52.1.tgz", + "integrity": "sha512-U9zZfc5xIu9wRxZkt+HceJUAD4VKHKbAyLSloJdEyMRmphXeibfrY9cxqIXBcmPeZzGhn3Imb35Dq8l19PkJhw==", "license": "MIT", "dependencies": { - "@algolia/logger-common": "4.24.0" + "@algolia/client-common": "5.52.1", + "@algolia/requester-browser-xhr": "5.52.1", + "@algolia/requester-fetch": "5.52.1", + "@algolia/requester-node-http": "5.52.1" + }, + "engines": { + "node": ">= 14.0.0" + } + }, + "node_modules/@algolia/monitoring": { + "version": "1.52.1", + "resolved": "https://registry.npmjs.org/@algolia/monitoring/-/monitoring-1.52.1.tgz", + "integrity": "sha512-a3SGNceHmkQfq77iG8Ka+w1pvwfZa/0lzEIgse30fL0kD+yKnd/dg0dQvSfFPAEt2f21DMcGkDSSeJlO3KdQjQ==", + "license": "MIT", + "dependencies": { + "@algolia/client-common": "5.52.1", + "@algolia/requester-browser-xhr": "5.52.1", + "@algolia/requester-fetch": "5.52.1", + "@algolia/requester-node-http": "5.52.1" + }, + "engines": { + "node": ">= 14.0.0" } }, "node_modules/@algolia/recommend": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@algolia/recommend/-/recommend-4.24.0.tgz", - "integrity": "sha512-P9kcgerfVBpfYHDfVZDvvdJv0lEoCvzNlOy2nykyt5bK8TyieYyiD0lguIJdRZZYGre03WIAFf14pgE+V+IBlw==", + "version": "5.52.1", + "resolved": "https://registry.npmjs.org/@algolia/recommend/-/recommend-5.52.1.tgz", + "integrity": "sha512-z98QEguCFDpxb4S/PyrUK1igqF8tPsdbqOUUO6ON91vJ58w+Gwa6ncrI0oNXSFcrkxA5EqPKPQ2A1PBCn08TYQ==", "license": "MIT", "dependencies": { - "@algolia/cache-browser-local-storage": "4.24.0", - "@algolia/cache-common": "4.24.0", - "@algolia/cache-in-memory": "4.24.0", - "@algolia/client-common": "4.24.0", - "@algolia/client-search": "4.24.0", - "@algolia/logger-common": "4.24.0", - "@algolia/logger-console": "4.24.0", - "@algolia/requester-browser-xhr": "4.24.0", - "@algolia/requester-common": "4.24.0", - "@algolia/requester-node-http": "4.24.0", - "@algolia/transporter": "4.24.0" - } - }, - "node_modules/@algolia/recommend/node_modules/@algolia/client-common": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-4.24.0.tgz", - "integrity": "sha512-bc2ROsNL6w6rqpl5jj/UywlIYC21TwSSoFHKl01lYirGMW+9Eek6r02Tocg4gZ8HAw3iBvu6XQiM3BEbmEMoiA==", - "license": "MIT", - "dependencies": { - "@algolia/requester-common": "4.24.0", - "@algolia/transporter": "4.24.0" - } - }, - "node_modules/@algolia/recommend/node_modules/@algolia/client-search": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-4.24.0.tgz", - "integrity": "sha512-uRW6EpNapmLAD0mW47OXqTP8eiIx5F6qN9/x/7HHO6owL3N1IXqydGwW5nhDFBrV+ldouro2W1VX3XlcUXEFCA==", - "license": "MIT", - "dependencies": { - "@algolia/client-common": "4.24.0", - "@algolia/requester-common": "4.24.0", - "@algolia/transporter": "4.24.0" - } - }, - "node_modules/@algolia/recommend/node_modules/@algolia/requester-browser-xhr": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-4.24.0.tgz", - "integrity": "sha512-Z2NxZMb6+nVXSjF13YpjYTdvV3032YTBSGm2vnYvYPA6mMxzM3v5rsCiSspndn9rzIW4Qp1lPHBvuoKJV6jnAA==", - "license": "MIT", - "dependencies": { - "@algolia/requester-common": "4.24.0" - } - }, - "node_modules/@algolia/recommend/node_modules/@algolia/requester-node-http": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-4.24.0.tgz", - "integrity": "sha512-JF18yTjNOVYvU/L3UosRcvbPMGT9B+/GQWNWnenIImglzNVGpyzChkXLnrSf6uxwVNO6ESGu6oN8MqcGQcjQJw==", - "license": "MIT", - "dependencies": { - "@algolia/requester-common": "4.24.0" + "@algolia/client-common": "5.52.1", + "@algolia/requester-browser-xhr": "5.52.1", + "@algolia/requester-fetch": "5.52.1", + "@algolia/requester-node-http": "5.52.1" + }, + "engines": { + "node": ">= 14.0.0" } }, "node_modules/@algolia/requester-browser-xhr": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-5.2.3.tgz", - "integrity": "sha512-lezcE4E7ax7JkDGDKA/xAnyAY9p9LZ4AxzsyL0pksqUpOvn4U0msP553M2yJRfsxxdGDp15noCnPuRsh7u8dMg==", + "version": "5.52.1", + "resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-5.52.1.tgz", + "integrity": "sha512-CI7+/0I11QeZM59Uc8whd2or0kqzFVjpaPn9Qpwll/krHcBAxk24WkAQ6WX+IwDVMfpont4YGbKwAmCre3vE8Q==", "license": "MIT", - "peer": true, "dependencies": { - "@algolia/client-common": "5.2.3" + "@algolia/client-common": "5.52.1" }, "engines": { "node": ">= 14.0.0" } }, - "node_modules/@algolia/requester-common": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@algolia/requester-common/-/requester-common-4.24.0.tgz", - "integrity": "sha512-k3CXJ2OVnvgE3HMwcojpvY6d9kgKMPRxs/kVohrwF5WMr2fnqojnycZkxPoEg+bXm8fi5BBfFmOqgYztRtHsQA==", - "license": "MIT" + "node_modules/@algolia/requester-fetch": { + "version": "5.52.1", + "resolved": "https://registry.npmjs.org/@algolia/requester-fetch/-/requester-fetch-5.52.1.tgz", + "integrity": "sha512-S6bDuw9byfOvm3T71cgdoZgrgnZq6hpdMLkx52Louh57nUAmvGQESz2aojOynQHjbTiV55smvAFbgn0qT4tJrg==", + "license": "MIT", + "dependencies": { + "@algolia/client-common": "5.52.1" + }, + "engines": { + "node": ">= 14.0.0" + } }, "node_modules/@algolia/requester-node-http": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-5.2.3.tgz", - "integrity": "sha512-xTxsRnJqxG1dylIkxmflrHO9LJfJKjSHqEF5yGdRrtnqIEvb2hiQPCHm2XwqxMa3NBcf6lmydGfJqhPLnRJwtw==", + "version": "5.52.1", + "resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-5.52.1.tgz", + "integrity": "sha512-tqZXM+54rWo4mk5jL5Z/flE11nPmNEdXwFBM5py9DkOmbjeCNemfVd45FyM97XdzfZ0dl9uOJC6PYn1FpkeyQg==", "license": "MIT", - "peer": true, "dependencies": { - "@algolia/client-common": "5.2.3" + "@algolia/client-common": "5.52.1" }, "engines": { "node": ">= 14.0.0" } }, - "node_modules/@algolia/transporter": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@algolia/transporter/-/transporter-4.24.0.tgz", - "integrity": "sha512-86nI7w6NzWxd1Zp9q3413dRshDqAzSbsQjhcDhPIatEFiZrL1/TjnHL8S7jVKFePlIMzDsZWXAXwXzcok9c5oA==", + "node_modules/@antfu/install-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@antfu/install-pkg/-/install-pkg-1.1.0.tgz", + "integrity": "sha512-MGQsmw10ZyI+EJo45CdSER4zEb+p31LpDAFp2Z3gkSd1yqVZGi0Ebx++YTEMonJy4oChEMLsxZ64j8FH6sSqtQ==", "license": "MIT", "dependencies": { - "@algolia/cache-common": "4.24.0", - "@algolia/logger-common": "4.24.0", - "@algolia/requester-common": "4.24.0" + "package-manager-detector": "^1.3.0", + "tinyexec": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" } }, - "node_modules/@ampproject/remapping": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", - "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", - "license": "Apache-2.0", + "node_modules/@apidevtools/json-schema-ref-parser": { + "version": "11.9.3", + "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-11.9.3.tgz", + "integrity": "sha512-60vepv88RwcJtSHrD6MjIL6Ta3SOYbgfnkHb+ppAVK+o9mXprRtulx7VlRl3lN3bbvysAfCS7WMVfhUYemB0IQ==", + "dev": true, + "license": "MIT", "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.24" + "@jsdevtools/ono": "^7.1.3", + "@types/json-schema": "^7.0.15", + "js-yaml": "^4.1.0" }, "engines": { - "node": ">=6.0.0" + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/philsturgeon" } }, "node_modules/@babel/code-frame": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", - "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.0.tgz", + "integrity": "sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==", "license": "MIT", "dependencies": { - "@babel/highlight": "^7.24.7", - "picocolors": "^1.0.0" + "@babel/helper-validator-identifier": "^7.28.5", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/compat-data": { - "version": "7.25.4", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.25.4.tgz", - "integrity": "sha512-+LGRog6RAsCJrrrg/IO6LGmpphNe5DiK30dGjCoxxeGv49B10/3XYGxPsAwrDlMFcFEvdAUavDT8r9k/hSyQqQ==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.0.tgz", + "integrity": "sha512-T1NCJqT/j9+cn8fvkt7jtwbLBfLC/1y1c7NtCeXFRgzGTsafi68MRv8yzkYSapBnFA6L3U2VSc02ciDzoAJhJg==", "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.25.2", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.25.2.tgz", - "integrity": "sha512-BBt3opiCOxUr9euZ5/ro/Xv8/V7yJ5bjYMqG/C1YAo8MIKAnumZalCN+msbci3Pigy4lIQfPUpfMM27HMGaYEA==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.0.tgz", + "integrity": "sha512-CGOfOJqWjg2qW/Mb6zNsDm+u5vFQ8DxXfbM09z69p5Z6+mE1ikP2jUXw+j42Pf1XTYED2Rni5f95npYeuwMDQA==", "license": "MIT", "dependencies": { - "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.24.7", - "@babel/generator": "^7.25.0", - "@babel/helper-compilation-targets": "^7.25.2", - "@babel/helper-module-transforms": "^7.25.2", - "@babel/helpers": "^7.25.0", - "@babel/parser": "^7.25.0", - "@babel/template": "^7.25.0", - "@babel/traverse": "^7.25.2", - "@babel/types": "^7.25.2", + "@babel/code-frame": "^7.29.0", + "@babel/generator": "^7.29.0", + "@babel/helper-compilation-targets": "^7.28.6", + "@babel/helper-module-transforms": "^7.28.6", + "@babel/helpers": "^7.28.6", + "@babel/parser": "^7.29.0", + "@babel/template": "^7.28.6", + "@babel/traverse": "^7.29.0", + "@babel/types": "^7.29.0", + "@jridgewell/remapping": "^2.3.5", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -423,54 +377,42 @@ } }, "node_modules/@babel/generator": { - "version": "7.25.6", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.25.6.tgz", - "integrity": "sha512-VPC82gr1seXOpkjAAKoLhP50vx4vGNlF4msF64dSFq1P8RfB+QAuJWGHPXXPc8QyfVWwwB/TNNU4+ayZmHNbZw==", + "version": "7.29.1", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.1.tgz", + "integrity": "sha512-qsaF+9Qcm2Qv8SRIMMscAvG4O3lJ0F1GuMo5HR/Bp02LopNgnZBC/EkbevHFeGs4ls/oPz9v+Bsmzbkbe+0dUw==", "license": "MIT", "dependencies": { - "@babel/types": "^7.25.6", - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25", - "jsesc": "^2.5.1" + "@babel/parser": "^7.29.0", + "@babel/types": "^7.29.0", + "@jridgewell/gen-mapping": "^0.3.12", + "@jridgewell/trace-mapping": "^0.3.28", + "jsesc": "^3.0.2" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-annotate-as-pure": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.24.7.tgz", - "integrity": "sha512-BaDeOonYvhdKw+JoMVkAixAAJzG2jVPIwWoKBPdYuY9b452e2rPuI9QPYh3KpofZ3pW2akOmwZLOiOsHMiqRAg==", + "version": "7.27.3", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.27.3.tgz", + "integrity": "sha512-fXSwMQqitTGeHLBC08Eq5yXz2m37E4pJX1qAU1+2cNedz/ifv/bVXft90VeSav5nFO61EcNgwr0aJxbyPaWBPg==", "license": "MIT", "dependencies": { - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.24.7.tgz", - "integrity": "sha512-xZeCVVdwb4MsDBkkyZ64tReWYrLRHlMN72vP7Bdm3OUOuyFZExhsHUUnuWnm2/XOlAJzR0LfPpB56WXZn0X/lA==", - "license": "MIT", - "dependencies": { - "@babel/traverse": "^7.24.7", - "@babel/types": "^7.24.7" + "@babel/types": "^7.27.3" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.25.2", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.2.tgz", - "integrity": "sha512-U2U5LsSaZ7TAt3cfaymQ8WHh0pxvdHoEk6HVpaexxixjyEquMh0L0YNJNM6CTGKMXV1iksi0iZkGw4AcFkPaaw==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.28.6.tgz", + "integrity": "sha512-JYtls3hqi15fcx5GaSNL7SCTJ2MNmjrkHXg4FSpOA/grxK8KwyZ5bubHsCq8FXCkua6xhuaaBit+3b7+VZRfcA==", "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.25.2", - "@babel/helper-validator-option": "^7.24.8", - "browserslist": "^4.23.1", + "@babel/compat-data": "^7.28.6", + "@babel/helper-validator-option": "^7.27.1", + "browserslist": "^4.24.0", "lru-cache": "^5.1.1", "semver": "^6.3.1" }, @@ -488,17 +430,17 @@ } }, "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.25.4", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.25.4.tgz", - "integrity": "sha512-ro/bFs3/84MDgDmMwbcHgDa8/E6J3QKNTk4xJJnVeFtGE+tL0K26E3pNxhYz2b67fJpt7Aphw5XcploKXuCvCQ==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.28.6.tgz", + "integrity": "sha512-dTOdvsjnG3xNT9Y0AUg1wAl38y+4Rl4sf9caSQZOXdNqVn+H+HbbJ4IyyHaIqNR6SW9oJpA/RuRjsjCw2IdIow==", "license": "MIT", "dependencies": { - "@babel/helper-annotate-as-pure": "^7.24.7", - "@babel/helper-member-expression-to-functions": "^7.24.8", - "@babel/helper-optimise-call-expression": "^7.24.7", - "@babel/helper-replace-supers": "^7.25.0", - "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7", - "@babel/traverse": "^7.25.4", + "@babel/helper-annotate-as-pure": "^7.27.3", + "@babel/helper-member-expression-to-functions": "^7.28.5", + "@babel/helper-optimise-call-expression": "^7.27.1", + "@babel/helper-replace-supers": "^7.28.6", + "@babel/helper-skip-transparent-expression-wrappers": "^7.27.1", + "@babel/traverse": "^7.28.6", "semver": "^6.3.1" }, "engines": { @@ -518,13 +460,13 @@ } }, "node_modules/@babel/helper-create-regexp-features-plugin": { - "version": "7.25.2", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.25.2.tgz", - "integrity": "sha512-+wqVGP+DFmqwFD3EH6TMTfUNeqDehV3E/dl+Sd54eaXqm17tEUNbEIn4sVivVowbvUpOtIGxdo3GoXyDH9N/9g==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.28.5.tgz", + "integrity": "sha512-N1EhvLtHzOvj7QQOUCCS3NrPJP8c5W6ZXCHDn7Yialuy1iu4r5EmIYkXlKNqT99Ciw+W0mDqWoR6HWMZlFP3hw==", "license": "MIT", "dependencies": { - "@babel/helper-annotate-as-pure": "^7.24.7", - "regexpu-core": "^5.3.1", + "@babel/helper-annotate-as-pure": "^7.27.3", + "regexpu-core": "^6.3.1", "semver": "^6.3.1" }, "engines": { @@ -544,57 +486,65 @@ } }, "node_modules/@babel/helper-define-polyfill-provider": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.2.tgz", - "integrity": "sha512-LV76g+C502biUK6AyZ3LK10vDpDyCzZnhZFXkH1L75zHPj68+qc8Zfpx2th+gzwA2MzyK+1g/3EPl62yFnVttQ==", + "version": "0.6.8", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.8.tgz", + "integrity": "sha512-47UwBLPpQi1NoWzLuHNjRoHlYXMwIJoBf7MFou6viC/sIHWYygpvr0B6IAyh5sBdA2nr2LPIRww8lfaUVQINBA==", "license": "MIT", "dependencies": { - "@babel/helper-compilation-targets": "^7.22.6", - "@babel/helper-plugin-utils": "^7.22.5", - "debug": "^4.1.1", + "@babel/helper-compilation-targets": "^7.28.6", + "@babel/helper-plugin-utils": "^7.28.6", + "debug": "^4.4.3", "lodash.debounce": "^4.0.8", - "resolve": "^1.14.2" + "resolve": "^1.22.11" }, "peerDependencies": { "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" } }, + "node_modules/@babel/helper-globals": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz", + "integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/helper-member-expression-to-functions": { - "version": "7.24.8", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.24.8.tgz", - "integrity": "sha512-LABppdt+Lp/RlBxqrh4qgf1oEH/WxdzQNDJIu5gC/W1GyvPVrOBiItmmM8wan2fm4oYqFuFfkXmlGpLQhPY8CA==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.28.5.tgz", + "integrity": "sha512-cwM7SBRZcPCLgl8a7cY0soT1SptSzAlMH39vwiRpOQkJlh53r5hdHwLSCZpQdVLT39sZt+CRpNwYG4Y2v77atg==", "license": "MIT", "dependencies": { - "@babel/traverse": "^7.24.8", - "@babel/types": "^7.24.8" + "@babel/traverse": "^7.28.5", + "@babel/types": "^7.28.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-imports": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.7.tgz", - "integrity": "sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.28.6.tgz", + "integrity": "sha512-l5XkZK7r7wa9LucGw9LwZyyCUscb4x37JWTPz7swwFE/0FMQAGpiWUZn8u9DzkSBWEcK25jmvubfpw2dnAMdbw==", "license": "MIT", "dependencies": { - "@babel/traverse": "^7.24.7", - "@babel/types": "^7.24.7" + "@babel/traverse": "^7.28.6", + "@babel/types": "^7.28.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.25.2", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.25.2.tgz", - "integrity": "sha512-BjyRAbix6j/wv83ftcVJmBt72QtHI56C7JXZoG2xATiLpmoC7dpd8WnkikExHDVPpi/3qCmO6WY1EaXOluiecQ==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.6.tgz", + "integrity": "sha512-67oXFAYr2cDLDVGLXTEABjdBJZ6drElUSI7WKp70NrpyISso3plG9SAGEF6y7zbha/wOzUByWWTJvEDVNIUGcA==", "license": "MIT", "dependencies": { - "@babel/helper-module-imports": "^7.24.7", - "@babel/helper-simple-access": "^7.24.7", - "@babel/helper-validator-identifier": "^7.24.7", - "@babel/traverse": "^7.25.2" + "@babel/helper-module-imports": "^7.28.6", + "@babel/helper-validator-identifier": "^7.28.5", + "@babel/traverse": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -604,35 +554,35 @@ } }, "node_modules/@babel/helper-optimise-call-expression": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.24.7.tgz", - "integrity": "sha512-jKiTsW2xmWwxT1ixIdfXUZp+P5yURx2suzLZr5Hi64rURpDYdMW0pv+Uf17EYk2Rd428Lx4tLsnjGJzYKDM/6A==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.27.1.tgz", + "integrity": "sha512-URMGH08NzYFhubNSGJrpUEphGKQwMQYBySzat5cAByY1/YgIRkULnIy3tAMeszlL/so2HbeilYloUmSpd7GdVw==", "license": "MIT", "dependencies": { - "@babel/types": "^7.24.7" + "@babel/types": "^7.27.1" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.24.8", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.8.tgz", - "integrity": "sha512-FFWx5142D8h2Mgr/iPVGH5G7w6jDn4jUSpZTyDnQO0Yn7Ks2Kuz6Pci8H6MPCoUJegd/UZQ3tAvfLCxQSnWWwg==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.28.6.tgz", + "integrity": "sha512-S9gzZ/bz83GRysI7gAD4wPT/AI3uCnY+9xn+Mx/KPs2JwHJIz1W8PZkg2cqyt3RNOBM8ejcXhV6y8Og7ly/Dug==", "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-remap-async-to-generator": { - "version": "7.25.0", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.25.0.tgz", - "integrity": "sha512-NhavI2eWEIz/H9dbrG0TuOicDhNexze43i5z7lEqwYm0WEZVTwnPpA0EafUTP7+6/W79HWIP2cTe3Z5NiSTVpw==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.27.1.tgz", + "integrity": "sha512-7fiA521aVw8lSPeI4ZOD3vRFkoqkJcS+z4hFo82bFSH/2tNd6eJ5qCVMS5OzDmZh/kaHQeBaeyxK6wljcPtveA==", "license": "MIT", "dependencies": { - "@babel/helper-annotate-as-pure": "^7.24.7", - "@babel/helper-wrap-function": "^7.25.0", - "@babel/traverse": "^7.25.0" + "@babel/helper-annotate-as-pure": "^7.27.1", + "@babel/helper-wrap-function": "^7.27.1", + "@babel/traverse": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -642,14 +592,14 @@ } }, "node_modules/@babel/helper-replace-supers": { - "version": "7.25.0", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.25.0.tgz", - "integrity": "sha512-q688zIvQVYtZu+i2PsdIu/uWGRpfxzr5WESsfpShfZECkO+d2o+WROWezCi/Q6kJ0tfPa5+pUGUlfx2HhrA3Bg==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.28.6.tgz", + "integrity": "sha512-mq8e+laIk94/yFec3DxSjCRD2Z0TAjhVbEJY3UQrlwVo15Lmt7C2wAUbK4bjnTs4APkwsYLTahXRraQXhb1WCg==", "license": "MIT", "dependencies": { - "@babel/helper-member-expression-to-functions": "^7.24.8", - "@babel/helper-optimise-call-expression": "^7.24.7", - "@babel/traverse": "^7.25.0" + "@babel/helper-member-expression-to-functions": "^7.28.5", + "@babel/helper-optimise-call-expression": "^7.27.1", + "@babel/traverse": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -658,179 +608,80 @@ "@babel/core": "^7.0.0" } }, - "node_modules/@babel/helper-simple-access": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.24.7.tgz", - "integrity": "sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg==", - "license": "MIT", - "dependencies": { - "@babel/traverse": "^7.24.7", - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/helper-skip-transparent-expression-wrappers": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.24.7.tgz", - "integrity": "sha512-IO+DLT3LQUElMbpzlatRASEyQtfhSE0+m465v++3jyyXeBTBUjtVZg28/gHeV5mrTJqvEKhKroBGAvhW+qPHiQ==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.27.1.tgz", + "integrity": "sha512-Tub4ZKEXqbPjXgWLl2+3JpQAYBJ8+ikpQ2Ocj/q/r0LwE3UhENh7EUabyHjz2kCEsrRY83ew2DQdHluuiDQFzg==", "license": "MIT", "dependencies": { - "@babel/traverse": "^7.24.7", - "@babel/types": "^7.24.7" + "@babel/traverse": "^7.27.1", + "@babel/types": "^7.27.1" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-string-parser": { - "version": "7.24.8", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.8.tgz", - "integrity": "sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", + "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", - "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz", + "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==", "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-option": { - "version": "7.24.8", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.24.8.tgz", - "integrity": "sha512-xb8t9tD1MHLungh/AIoWYN+gVHaB9kwlu8gffXGSt3FFEIT7RjS+xWbc2vUD1UTZdIpKj/ab3rdqJ7ufngyi2Q==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz", + "integrity": "sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==", "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-wrap-function": { - "version": "7.25.0", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.25.0.tgz", - "integrity": "sha512-s6Q1ebqutSiZnEjaofc/UKDyC4SbzV5n5SrA2Gq8UawLycr3i04f1dX4OzoQVnexm6aOCh37SQNYlJ/8Ku+PMQ==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.28.6.tgz", + "integrity": "sha512-z+PwLziMNBeSQJonizz2AGnndLsP2DeGHIxDAn+wdHOGuo4Fo1x1HBPPXeE9TAOPHNNWQKCSlA2VZyYyyibDnQ==", "license": "MIT", "dependencies": { - "@babel/template": "^7.25.0", - "@babel/traverse": "^7.25.0", - "@babel/types": "^7.25.0" + "@babel/template": "^7.28.6", + "@babel/traverse": "^7.28.6", + "@babel/types": "^7.28.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helpers": { - "version": "7.25.6", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.25.6.tgz", - "integrity": "sha512-Xg0tn4HcfTijTwfDwYlvVCl43V6h4KyVVX2aEm4qdO/PC6L2YvzLHFdmxhoeSA3eslcE6+ZVXHgWwopXYLNq4Q==", + "version": "7.29.2", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.2.tgz", + "integrity": "sha512-HoGuUs4sCZNezVEKdVcwqmZN8GoHirLUcLaYVNBK2J0DadGtdcqgr3BCbvH8+XUo4NGjNl3VOtSjEKNzqfFgKw==", "license": "MIT", "dependencies": { - "@babel/template": "^7.25.0", - "@babel/types": "^7.25.6" + "@babel/template": "^7.28.6", + "@babel/types": "^7.29.0" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/highlight": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", - "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==", - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.24.7", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "license": "MIT", - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "license": "MIT", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "license": "MIT", - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/@babel/highlight/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "license": "MIT" - }, - "node_modules/@babel/highlight/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@babel/highlight/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "license": "MIT", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/@babel/parser": { - "version": "7.25.6", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.25.6.tgz", - "integrity": "sha512-trGdfBdbD0l1ZPmcJ83eNxB9rbEax4ALFTF7fN386TMYbeCQbyme5cOEXQhbGXKebwGaB/J52w1mrklMcbgy6Q==", + "version": "7.29.2", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.2.tgz", + "integrity": "sha512-4GgRzy/+fsBa72/RZVJmGKPmZu9Byn8o4MoLpmNe1m8ZfYnz5emHLQz3U4gLud6Zwl0RZIcgiLD7Uq7ySFuDLA==", "license": "MIT", "dependencies": { - "@babel/types": "^7.25.6" + "@babel/types": "^7.29.0" }, "bin": { "parser": "bin/babel-parser.js" @@ -840,13 +691,13 @@ } }, "node_modules/@babel/plugin-bugfix-firefox-class-in-computed-class-key": { - "version": "7.25.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-firefox-class-in-computed-class-key/-/plugin-bugfix-firefox-class-in-computed-class-key-7.25.3.tgz", - "integrity": "sha512-wUrcsxZg6rqBXG05HG1FPYgsP6EvwF4WpBbxIpWIIYnH8wG0gzx3yZY3dtEHas4sTAOGkbTsc9EGPxwff8lRoA==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-firefox-class-in-computed-class-key/-/plugin-bugfix-firefox-class-in-computed-class-key-7.28.5.tgz", + "integrity": "sha512-87GDMS3tsmMSi/3bWOte1UblL+YUTFMV8SZPZ2eSEL17s74Cw/l63rR6NmGVKMYW2GYi85nE+/d6Hw5N0bEk2Q==", "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.8", - "@babel/traverse": "^7.25.3" + "@babel/helper-plugin-utils": "^7.27.1", + "@babel/traverse": "^7.28.5" }, "engines": { "node": ">=6.9.0" @@ -856,12 +707,12 @@ } }, "node_modules/@babel/plugin-bugfix-safari-class-field-initializer-scope": { - "version": "7.25.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-class-field-initializer-scope/-/plugin-bugfix-safari-class-field-initializer-scope-7.25.0.tgz", - "integrity": "sha512-Bm4bH2qsX880b/3ziJ8KD711LT7z4u8CFudmjqle65AZj/HNUFhEf90dqYv6O86buWvSBmeQDjv0Tn2aF/bIBA==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-class-field-initializer-scope/-/plugin-bugfix-safari-class-field-initializer-scope-7.27.1.tgz", + "integrity": "sha512-qNeq3bCKnGgLkEXUuFry6dPlGfCdQNZbn7yUAPCInwAJHMU7THJfrBSozkcWq5sNM6RcF3S8XyQL2A52KNR9IA==", "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.8" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -871,12 +722,12 @@ } }, "node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { - "version": "7.25.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.25.0.tgz", - "integrity": "sha512-lXwdNZtTmeVOOFtwM/WDe7yg1PL8sYhRk/XH0FzbR2HDQ0xC+EnQ/JHeoMYSavtU115tnUk0q9CDyq8si+LMAA==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.27.1.tgz", + "integrity": "sha512-g4L7OYun04N1WyqMNjldFwlfPCLVkgB54A/YCXICZYBsvJJE3kByKv9c9+R/nAfmIfjl2rKYLNyMHboYbZaWaA==", "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.8" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -886,14 +737,14 @@ } }, "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.24.7.tgz", - "integrity": "sha512-+izXIbke1T33mY4MSNnrqhPXDz01WYhEf3yF5NbnUtkiNnm+XBZJl3kNfoK6NKmYlz/D07+l2GWVK/QfDkNCuQ==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.27.1.tgz", + "integrity": "sha512-oO02gcONcD5O1iTLi/6frMJBIwWEHceWGSGqrpCmEL8nogiS6J9PBlE48CaK20/Jx1LuRml9aDftLgdjXT8+Cw==", "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7", - "@babel/plugin-transform-optional-chaining": "^7.24.7" + "@babel/helper-plugin-utils": "^7.27.1", + "@babel/helper-skip-transparent-expression-wrappers": "^7.27.1", + "@babel/plugin-transform-optional-chaining": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -903,13 +754,13 @@ } }, "node_modules/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": { - "version": "7.25.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.25.0.tgz", - "integrity": "sha512-tggFrk1AIShG/RUQbEwt2Tr/E+ObkfwrPjR6BjbRvsx24+PSjK8zrq0GWPNCjo8qpRx4DuJzlcvWJqlm+0h3kw==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.28.6.tgz", + "integrity": "sha512-a0aBScVTlNaiUe35UtfxAN7A/tehvvG4/ByO6+46VPKTRSlfnAFsgKy0FUh+qAkQrDTmhDkT+IBOKlOoMUxQ0g==", "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.8", - "@babel/traverse": "^7.25.0" + "@babel/helper-plugin-utils": "^7.28.6", + "@babel/traverse": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -930,45 +781,6 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-async-generators": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", - "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-class-properties": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", - "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.12.13" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-class-static-block": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", - "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, "node_modules/@babel/plugin-syntax-dynamic-import": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", @@ -981,25 +793,13 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-export-namespace-from": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", - "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.3" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, "node_modules/@babel/plugin-syntax-import-assertions": { - "version": "7.25.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.25.6.tgz", - "integrity": "sha512-aABl0jHw9bZ2karQ/uUD6XP4u0SG22SJrOHFoL6XB1R7dTovOP4TzTlsxOYC5yQ1pdscVK2JTUnF6QL3ARoAiQ==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.28.6.tgz", + "integrity": "sha512-pSJUpFHdx9z5nqTSirOCMtYVP2wFgoWhP0p3g8ONK/4IHhLIBd0B9NYqAvIUAhq+OkhO4VM1tENCt0cjlsNShw==", "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.8" + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1009,12 +809,12 @@ } }, "node_modules/@babel/plugin-syntax-import-attributes": { - "version": "7.25.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.25.6.tgz", - "integrity": "sha512-sXaDXaJN9SNLymBdlWFA+bjzBhFD617ZaFiY13dGt7TVslVvVgA6fkZOP7Ki3IGElC45lwHdOTrCtKZGVAWeLQ==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.28.6.tgz", + "integrity": "sha512-jiLC0ma9XkQT3TKJ9uYvlakm66Pamywo+qwL+oL8HJOvc6TWdZXVfhqJr8CCzbSGUAbDOzlGHJC1U+vRfLQDvw==", "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.8" + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1023,139 +823,13 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-import-meta": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", - "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-json-strings": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", - "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.24.7.tgz", - "integrity": "sha512-6ddciUPe/mpMnOKv/U+RSd2vvVy+Yw/JfBB0ZHYjEZt9NLHmCUylNYlsbqCCS1Bffjlb0fCwC9Vqz+sBz6PsiQ==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.28.6.tgz", + "integrity": "sha512-wgEmr06G6sIpqr8YDwA2dSRTE3bJ+V0IfpzfSY3Lfgd7YWOaAdlykvJi13ZKBt8cZHfgH1IXN+CL656W3uUa4w==", "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-logical-assignment-operators": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", - "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", - "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-numeric-separator": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", - "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-object-rest-spread": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", - "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-optional-catch-binding": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", - "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-optional-chaining": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", - "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-private-property-in-object": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", - "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-top-level-await": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", - "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1165,12 +839,12 @@ } }, "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.25.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.25.4.tgz", - "integrity": "sha512-uMOCoHVU52BsSWxPOMVv5qKRdeSlPuImUCB2dlPuBSU+W2/ROE7/Zg8F2Kepbk+8yBa68LlRKxO+xgEVWorsDg==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.28.6.tgz", + "integrity": "sha512-+nDNmQye7nlnuuHDboPbGm00Vqg3oO8niRRL27/4LYHUsHYh0zJ1xWOz0uRwNFmM1Avzk8wZbc6rdiYhomzv/A==", "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.8" + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1196,12 +870,12 @@ } }, "node_modules/@babel/plugin-transform-arrow-functions": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.24.7.tgz", - "integrity": "sha512-Dt9LQs6iEY++gXUwY03DNFat5C2NbO48jj+j/bSAz6b3HgPs39qcPiYt77fDObIcFwj3/C2ICX9YMwGflUoSHQ==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.27.1.tgz", + "integrity": "sha512-8Z4TGic6xW70FKThA5HYEKKyBpOOsucTOD1DjU3fZxDg+K3zBJcXMFnt/4yQiZnf5+MiOMSXQ9PaEK/Ilh1DeA==", "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1211,15 +885,14 @@ } }, "node_modules/@babel/plugin-transform-async-generator-functions": { - "version": "7.25.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.25.4.tgz", - "integrity": "sha512-jz8cV2XDDTqjKPwVPJBIjORVEmSGYhdRa8e5k5+vN+uwcjSrSxUaebBRa4ko1jqNF2uxyg8G6XYk30Jv285xzg==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.29.0.tgz", + "integrity": "sha512-va0VdWro4zlBr2JsXC+ofCPB2iG12wPtVGTWFx2WLDOM3nYQZZIGP82qku2eW/JR83sD+k2k+CsNtyEbUqhU6w==", "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.8", - "@babel/helper-remap-async-to-generator": "^7.25.0", - "@babel/plugin-syntax-async-generators": "^7.8.4", - "@babel/traverse": "^7.25.4" + "@babel/helper-plugin-utils": "^7.28.6", + "@babel/helper-remap-async-to-generator": "^7.27.1", + "@babel/traverse": "^7.29.0" }, "engines": { "node": ">=6.9.0" @@ -1229,14 +902,14 @@ } }, "node_modules/@babel/plugin-transform-async-to-generator": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.24.7.tgz", - "integrity": "sha512-SQY01PcJfmQ+4Ash7NE+rpbLFbmqA2GPIgqzxfFTL4t1FKRq4zTms/7htKpoCUI9OcFYgzqfmCdH53s6/jn5fA==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.28.6.tgz", + "integrity": "sha512-ilTRcmbuXjsMmcZ3HASTe4caH5Tpo93PkTxF9oG2VZsSWsahydmcEHhix9Ik122RcTnZnUzPbmux4wh1swfv7g==", "license": "MIT", "dependencies": { - "@babel/helper-module-imports": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/helper-remap-async-to-generator": "^7.24.7" + "@babel/helper-module-imports": "^7.28.6", + "@babel/helper-plugin-utils": "^7.28.6", + "@babel/helper-remap-async-to-generator": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1246,12 +919,12 @@ } }, "node_modules/@babel/plugin-transform-block-scoped-functions": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.24.7.tgz", - "integrity": "sha512-yO7RAz6EsVQDaBH18IDJcMB1HnrUn2FJ/Jslc/WtPPWcjhpUJXU/rjbwmluzp7v/ZzWcEhTMXELnnsz8djWDwQ==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.27.1.tgz", + "integrity": "sha512-cnqkuOtZLapWYZUYM5rVIdv1nXYuFVIltZ6ZJ7nIj585QsjKM5dhL2Fu/lICXZ1OyIAFc7Qy+bvDAtTXqGrlhg==", "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1261,12 +934,12 @@ } }, "node_modules/@babel/plugin-transform-block-scoping": { - "version": "7.25.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.25.0.tgz", - "integrity": "sha512-yBQjYoOjXlFv9nlXb3f1casSHOZkWr29NX+zChVanLg5Nc157CrbEX9D7hxxtTpuFy7Q0YzmmWfJxzvps4kXrQ==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.28.6.tgz", + "integrity": "sha512-tt/7wOtBmwHPNMPu7ax4pdPz6shjFrmHDghvNC+FG9Qvj7D6mJcoRQIF5dy4njmxR941l6rgtvfSB2zX3VlUIw==", "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.8" + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1276,13 +949,13 @@ } }, "node_modules/@babel/plugin-transform-class-properties": { - "version": "7.25.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.25.4.tgz", - "integrity": "sha512-nZeZHyCWPfjkdU5pA/uHiTaDAFUEqkpzf1YoQT2NeSynCGYq9rxfyI3XpQbfx/a0hSnFH6TGlEXvae5Vi7GD8g==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.28.6.tgz", + "integrity": "sha512-dY2wS3I2G7D697VHndN91TJr8/AAfXQNt5ynCTI/MpxMsSzHp+52uNivYT5wCPax3whc47DR8Ba7cmlQMg24bw==", "license": "MIT", "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.25.4", - "@babel/helper-plugin-utils": "^7.24.8" + "@babel/helper-create-class-features-plugin": "^7.28.6", + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1292,14 +965,13 @@ } }, "node_modules/@babel/plugin-transform-class-static-block": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.24.7.tgz", - "integrity": "sha512-HMXK3WbBPpZQufbMG4B46A90PkuuhN9vBCb5T8+VAHqvAqvcLi+2cKoukcpmUYkszLhScU3l1iudhrks3DggRQ==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.28.6.tgz", + "integrity": "sha512-rfQ++ghVwTWTqQ7w8qyDxL1XGihjBss4CmTgGRCTAC9RIbhVpyp4fOeZtta0Lbf+dTNIVJer6ych2ibHwkZqsQ==", "license": "MIT", "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/plugin-syntax-class-static-block": "^7.14.5" + "@babel/helper-create-class-features-plugin": "^7.28.6", + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1309,17 +981,17 @@ } }, "node_modules/@babel/plugin-transform-classes": { - "version": "7.25.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.25.4.tgz", - "integrity": "sha512-oexUfaQle2pF/b6E0dwsxQtAol9TLSO88kQvym6HHBWFliV2lGdrPieX+WgMRLSJDVzdYywk7jXbLPuO2KLTLg==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.28.6.tgz", + "integrity": "sha512-EF5KONAqC5zAqT783iMGuM2ZtmEBy+mJMOKl2BCvPZ2lVrwvXnB6o+OBWCS+CoeCCpVRF2sA2RBKUxvT8tQT5Q==", "license": "MIT", "dependencies": { - "@babel/helper-annotate-as-pure": "^7.24.7", - "@babel/helper-compilation-targets": "^7.25.2", - "@babel/helper-plugin-utils": "^7.24.8", - "@babel/helper-replace-supers": "^7.25.0", - "@babel/traverse": "^7.25.4", - "globals": "^11.1.0" + "@babel/helper-annotate-as-pure": "^7.27.3", + "@babel/helper-compilation-targets": "^7.28.6", + "@babel/helper-globals": "^7.28.0", + "@babel/helper-plugin-utils": "^7.28.6", + "@babel/helper-replace-supers": "^7.28.6", + "@babel/traverse": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1329,13 +1001,13 @@ } }, "node_modules/@babel/plugin-transform-computed-properties": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.24.7.tgz", - "integrity": "sha512-25cS7v+707Gu6Ds2oY6tCkUwsJ9YIDbggd9+cu9jzzDgiNq7hR/8dkzxWfKWnTic26vsI3EsCXNd4iEB6e8esQ==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.28.6.tgz", + "integrity": "sha512-bcc3k0ijhHbc2lEfpFHgx7eYw9KNXqOerKWfzbxEHUGKnS3sz9C4CNL9OiFN1297bDNfUiSO7DaLzbvHQQQ1BQ==", "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/template": "^7.24.7" + "@babel/helper-plugin-utils": "^7.28.6", + "@babel/template": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1345,12 +1017,13 @@ } }, "node_modules/@babel/plugin-transform-destructuring": { - "version": "7.24.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.24.8.tgz", - "integrity": "sha512-36e87mfY8TnRxc7yc6M9g9gOB7rKgSahqkIKwLpz4Ppk2+zC2Cy1is0uwtuSG6AE4zlTOUa+7JGz9jCJGLqQFQ==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.28.5.tgz", + "integrity": "sha512-Kl9Bc6D0zTUcFUvkNuQh4eGXPKKNDOJQXVyyM4ZAQPMveniJdxi8XMJwLo+xSoW3MIq81bD33lcUe9kZpl0MCw==", "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.8" + "@babel/helper-plugin-utils": "^7.27.1", + "@babel/traverse": "^7.28.5" }, "engines": { "node": ">=6.9.0" @@ -1360,13 +1033,13 @@ } }, "node_modules/@babel/plugin-transform-dotall-regex": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.24.7.tgz", - "integrity": "sha512-ZOA3W+1RRTSWvyqcMJDLqbchh7U4NRGqwRfFSVbOLS/ePIP4vHB5e8T8eXcuqyN1QkgKyj5wuW0lcS85v4CrSw==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.28.6.tgz", + "integrity": "sha512-SljjowuNKB7q5Oayv4FoPzeB74g3QgLt8IVJw9ADvWy3QnUb/01aw8I4AVv8wYnPvQz2GDDZ/g3GhcNyDBI4Bg==", "license": "MIT", "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-create-regexp-features-plugin": "^7.28.5", + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1376,12 +1049,12 @@ } }, "node_modules/@babel/plugin-transform-duplicate-keys": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.24.7.tgz", - "integrity": "sha512-JdYfXyCRihAe46jUIliuL2/s0x0wObgwwiGxw/UbgJBr20gQBThrokO4nYKgWkD7uBaqM7+9x5TU7NkExZJyzw==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.27.1.tgz", + "integrity": "sha512-MTyJk98sHvSs+cvZ4nOauwTTG1JeonDjSGvGGUNHreGQns+Mpt6WX/dVzWBHgg+dYZhkC4X+zTDfkTU+Vy9y7Q==", "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1391,13 +1064,13 @@ } }, "node_modules/@babel/plugin-transform-duplicate-named-capturing-groups-regex": { - "version": "7.25.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-named-capturing-groups-regex/-/plugin-transform-duplicate-named-capturing-groups-regex-7.25.0.tgz", - "integrity": "sha512-YLpb4LlYSc3sCUa35un84poXoraOiQucUTTu8X1j18JV+gNa8E0nyUf/CjZ171IRGr4jEguF+vzJU66QZhn29g==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-named-capturing-groups-regex/-/plugin-transform-duplicate-named-capturing-groups-regex-7.29.0.tgz", + "integrity": "sha512-zBPcW2lFGxdiD8PUnPwJjag2J9otbcLQzvbiOzDxpYXyCuYX9agOwMPGn1prVH0a4qzhCKu24rlH4c1f7yA8rw==", "license": "MIT", "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.25.0", - "@babel/helper-plugin-utils": "^7.24.8" + "@babel/helper-create-regexp-features-plugin": "^7.28.5", + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1407,13 +1080,28 @@ } }, "node_modules/@babel/plugin-transform-dynamic-import": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.24.7.tgz", - "integrity": "sha512-sc3X26PhZQDb3JhORmakcbvkeInvxz+A8oda99lj7J60QRuPZvNAk9wQlTBS1ZynelDrDmTU4pw1tyc5d5ZMUg==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.27.1.tgz", + "integrity": "sha512-MHzkWQcEmjzzVW9j2q8LGjwGWpG2mjwaaB0BNQwst3FIjqsg8Ct/mIZlvSPJvfi9y2AC8mi/ktxbFVL9pZ1I4A==", "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/plugin-syntax-dynamic-import": "^7.8.3" + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-explicit-resource-management": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-explicit-resource-management/-/plugin-transform-explicit-resource-management-7.28.6.tgz", + "integrity": "sha512-Iao5Konzx2b6g7EPqTy40UZbcdXE126tTxVFr/nAIj+WItNxjKSYTEw3RC+A2/ZetmdJsgueL1KhaMCQHkLPIg==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.28.6", + "@babel/plugin-transform-destructuring": "^7.28.5" }, "engines": { "node": ">=6.9.0" @@ -1423,13 +1111,12 @@ } }, "node_modules/@babel/plugin-transform-exponentiation-operator": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.24.7.tgz", - "integrity": "sha512-Rqe/vSc9OYgDajNIK35u7ot+KeCoetqQYFXM4Epf7M7ez3lWlOjrDjrwMei6caCVhfdw+mIKD4cgdGNy5JQotQ==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.28.6.tgz", + "integrity": "sha512-WitabqiGjV/vJ0aPOLSFfNY1u9U3R7W36B03r5I2KoNix+a3sOhJ3pKFB3R5It9/UiK78NiO0KE9P21cMhlPkw==", "license": "MIT", "dependencies": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1439,13 +1126,12 @@ } }, "node_modules/@babel/plugin-transform-export-namespace-from": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.24.7.tgz", - "integrity": "sha512-v0K9uNYsPL3oXZ/7F9NNIbAj2jv1whUEtyA6aujhekLs56R++JDQuzRcP2/z4WX5Vg/c5lE9uWZA0/iUoFhLTA==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.27.1.tgz", + "integrity": "sha512-tQvHWSZ3/jH2xuq/vZDy0jNn+ZdXJeM8gHvX4lnJmsc3+50yPlWdZXIc5ay+umX+2/tJIqHqiEqcJvxlmIvRvQ==", "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/plugin-syntax-export-namespace-from": "^7.8.3" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1455,13 +1141,13 @@ } }, "node_modules/@babel/plugin-transform-for-of": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.24.7.tgz", - "integrity": "sha512-wo9ogrDG1ITTTBsy46oGiN1dS9A7MROBTcYsfS8DtsImMkHk9JXJ3EWQM6X2SUw4x80uGPlwj0o00Uoc6nEE3g==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.27.1.tgz", + "integrity": "sha512-BfbWFFEJFQzLCQ5N8VocnCtA8J1CLkNTe2Ms2wocj75dd6VpiqS5Z5quTYcUoo4Yq+DN0rtikODccuv7RU81sw==", "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7" + "@babel/helper-plugin-utils": "^7.27.1", + "@babel/helper-skip-transparent-expression-wrappers": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1471,14 +1157,14 @@ } }, "node_modules/@babel/plugin-transform-function-name": { - "version": "7.25.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.25.1.tgz", - "integrity": "sha512-TVVJVdW9RKMNgJJlLtHsKDTydjZAbwIsn6ySBPQaEAUU5+gVvlJt/9nRmqVbsV/IBanRjzWoaAQKLoamWVOUuA==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.27.1.tgz", + "integrity": "sha512-1bQeydJF9Nr1eBCMMbC+hdwmRlsv5XYOMu03YSWFwNs0HsAmtSxxF1fyuYPqemVldVyFmlCU7w8UE14LupUSZQ==", "license": "MIT", "dependencies": { - "@babel/helper-compilation-targets": "^7.24.8", - "@babel/helper-plugin-utils": "^7.24.8", - "@babel/traverse": "^7.25.1" + "@babel/helper-compilation-targets": "^7.27.1", + "@babel/helper-plugin-utils": "^7.27.1", + "@babel/traverse": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1488,13 +1174,12 @@ } }, "node_modules/@babel/plugin-transform-json-strings": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.24.7.tgz", - "integrity": "sha512-2yFnBGDvRuxAaE/f0vfBKvtnvvqU8tGpMHqMNpTN2oWMKIR3NqFkjaAgGwawhqK/pIN2T3XdjGPdaG0vDhOBGw==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.28.6.tgz", + "integrity": "sha512-Nr+hEN+0geQkzhbdgQVPoqr47lZbm+5fCUmO70722xJZd0Mvb59+33QLImGj6F+DkK3xgDi1YVysP8whD6FQAw==", "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/plugin-syntax-json-strings": "^7.8.3" + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1504,12 +1189,12 @@ } }, "node_modules/@babel/plugin-transform-literals": { - "version": "7.25.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.25.2.tgz", - "integrity": "sha512-HQI+HcTbm9ur3Z2DkO+jgESMAMcYLuN/A7NRw9juzxAezN9AvqvUTnpKP/9kkYANz6u7dFlAyOu44ejuGySlfw==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.27.1.tgz", + "integrity": "sha512-0HCFSepIpLTkLcsi86GG3mTUzxV5jpmbv97hTETW3yzrAij8aqlD36toB1D0daVFJM8NK6GvKO0gslVQmm+zZA==", "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.8" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1519,13 +1204,12 @@ } }, "node_modules/@babel/plugin-transform-logical-assignment-operators": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.24.7.tgz", - "integrity": "sha512-4D2tpwlQ1odXmTEIFWy9ELJcZHqrStlzK/dAOWYyxX3zT0iXQB6banjgeOJQXzEc4S0E0a5A+hahxPaEFYftsw==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.28.6.tgz", + "integrity": "sha512-+anKKair6gpi8VsM/95kmomGNMD0eLz1NQ8+Pfw5sAwWH9fGYXT50E55ZpV0pHUHWf6IUTWPM+f/7AAff+wr9A==", "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1535,12 +1219,12 @@ } }, "node_modules/@babel/plugin-transform-member-expression-literals": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.24.7.tgz", - "integrity": "sha512-T/hRC1uqrzXMKLQ6UCwMT85S3EvqaBXDGf0FaMf4446Qx9vKwlghvee0+uuZcDUCZU5RuNi4781UQ7R308zzBw==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.27.1.tgz", + "integrity": "sha512-hqoBX4dcZ1I33jCSWcXrP+1Ku7kdqXf1oeah7ooKOIiAdKQ+uqftgCFNOSzA5AMS2XIHEYeGFg4cKRCdpxzVOQ==", "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1550,13 +1234,13 @@ } }, "node_modules/@babel/plugin-transform-modules-amd": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.24.7.tgz", - "integrity": "sha512-9+pB1qxV3vs/8Hdmz/CulFB8w2tuu6EB94JZFsjdqxQokwGa9Unap7Bo2gGBGIvPmDIVvQrom7r5m/TCDMURhg==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.27.1.tgz", + "integrity": "sha512-iCsytMg/N9/oFq6n+gFTvUYDZQOMK5kEdeYxmxt91fcJGycfxVP9CnrxoliM0oumFERba2i8ZtwRUCMhvP1LnA==", "license": "MIT", "dependencies": { - "@babel/helper-module-transforms": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-module-transforms": "^7.27.1", + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1566,14 +1250,13 @@ } }, "node_modules/@babel/plugin-transform-modules-commonjs": { - "version": "7.24.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.24.8.tgz", - "integrity": "sha512-WHsk9H8XxRs3JXKWFiqtQebdh9b/pTk4EgueygFzYlTKAg0Ud985mSevdNjdXdFBATSKVJGQXP1tv6aGbssLKA==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.28.6.tgz", + "integrity": "sha512-jppVbf8IV9iWWwWTQIxJMAJCWBuuKx71475wHwYytrRGQ2CWiDvYlADQno3tcYpS/T2UUWFQp3nVtYfK/YBQrA==", "license": "MIT", "dependencies": { - "@babel/helper-module-transforms": "^7.24.8", - "@babel/helper-plugin-utils": "^7.24.8", - "@babel/helper-simple-access": "^7.24.7" + "@babel/helper-module-transforms": "^7.28.6", + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1583,15 +1266,15 @@ } }, "node_modules/@babel/plugin-transform-modules-systemjs": { - "version": "7.25.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.25.0.tgz", - "integrity": "sha512-YPJfjQPDXxyQWg/0+jHKj1llnY5f/R6a0p/vP4lPymxLu7Lvl4k2WMitqi08yxwQcCVUUdG9LCUj4TNEgAp3Jw==", + "version": "7.29.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.29.4.tgz", + "integrity": "sha512-N7QmZ0xRZfjHOfZeQLJjwgX2zS9pdGHSVl/cjSGlo4dXMqvurfxXDMKY4RqEKzPozV78VMcd0lxyG13mlbKc4w==", "license": "MIT", "dependencies": { - "@babel/helper-module-transforms": "^7.25.0", - "@babel/helper-plugin-utils": "^7.24.8", - "@babel/helper-validator-identifier": "^7.24.7", - "@babel/traverse": "^7.25.0" + "@babel/helper-module-transforms": "^7.28.6", + "@babel/helper-plugin-utils": "^7.28.6", + "@babel/helper-validator-identifier": "^7.28.5", + "@babel/traverse": "^7.29.0" }, "engines": { "node": ">=6.9.0" @@ -1601,13 +1284,13 @@ } }, "node_modules/@babel/plugin-transform-modules-umd": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.24.7.tgz", - "integrity": "sha512-3aytQvqJ/h9z4g8AsKPLvD4Zqi2qT+L3j7XoFFu1XBlZWEl2/1kWnhmAbxpLgPrHSY0M6UA02jyTiwUVtiKR6A==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.27.1.tgz", + "integrity": "sha512-iQBE/xC5BV1OxJbp6WG7jq9IWiD+xxlZhLrdwpPkTX3ydmXdvoCpyfJN7acaIBZaOqTfr76pgzqBJflNbeRK+w==", "license": "MIT", "dependencies": { - "@babel/helper-module-transforms": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-module-transforms": "^7.27.1", + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1617,13 +1300,13 @@ } }, "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.24.7.tgz", - "integrity": "sha512-/jr7h/EWeJtk1U/uz2jlsCioHkZk1JJZVcc8oQsJ1dUlaJD83f4/6Zeh2aHt9BIFokHIsSeDfhUmju0+1GPd6g==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.29.0.tgz", + "integrity": "sha512-1CZQA5KNAD6ZYQLPw7oi5ewtDNxH/2vuCh+6SmvgDfhumForvs8a1o9n0UrEoBD8HU4djO2yWngTQlXl1NDVEQ==", "license": "MIT", "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-create-regexp-features-plugin": "^7.28.5", + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1633,12 +1316,12 @@ } }, "node_modules/@babel/plugin-transform-new-target": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.24.7.tgz", - "integrity": "sha512-RNKwfRIXg4Ls/8mMTza5oPF5RkOW8Wy/WgMAp1/F1yZ8mMbtwXW+HDoJiOsagWrAhI5f57Vncrmr9XeT4CVapA==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.27.1.tgz", + "integrity": "sha512-f6PiYeqXQ05lYq3TIfIDu/MtliKUbNwkGApPUvyo6+tc7uaR4cPjPe7DFPr15Uyycg2lZU6btZ575CuQoYh7MQ==", "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1648,13 +1331,12 @@ } }, "node_modules/@babel/plugin-transform-nullish-coalescing-operator": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.24.7.tgz", - "integrity": "sha512-Ts7xQVk1OEocqzm8rHMXHlxvsfZ0cEF2yomUqpKENHWMF4zKk175Y4q8H5knJes6PgYad50uuRmt3UJuhBw8pQ==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.28.6.tgz", + "integrity": "sha512-3wKbRgmzYbw24mDJXT7N+ADXw8BC/imU9yo9c9X9NKaLF1fW+e5H1U5QjMUBe4Qo4Ox/o++IyUkl1sVCLgevKg==", "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1664,13 +1346,12 @@ } }, "node_modules/@babel/plugin-transform-numeric-separator": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.24.7.tgz", - "integrity": "sha512-e6q1TiVUzvH9KRvicuxdBTUj4AdKSRwzIyFFnfnezpCfP2/7Qmbb8qbU2j7GODbl4JMkblitCQjKYUaX/qkkwA==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.28.6.tgz", + "integrity": "sha512-SJR8hPynj8outz+SlStQSwvziMN4+Bq99it4tMIf5/Caq+3iOc0JtKyse8puvyXkk3eFRIA5ID/XfunGgO5i6w==", "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/plugin-syntax-numeric-separator": "^7.10.4" + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1680,15 +1361,16 @@ } }, "node_modules/@babel/plugin-transform-object-rest-spread": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.24.7.tgz", - "integrity": "sha512-4QrHAr0aXQCEFni2q4DqKLD31n2DL+RxcwnNjDFkSG0eNQ/xCavnRkfCUjsyqGC2OviNJvZOF/mQqZBw7i2C5Q==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.28.6.tgz", + "integrity": "sha512-5rh+JR4JBC4pGkXLAcYdLHZjXudVxWMXbB6u6+E9lRL5TrGVbHt1TjxGbZ8CkmYw9zjkB7jutzOROArsqtncEA==", "license": "MIT", "dependencies": { - "@babel/helper-compilation-targets": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-transform-parameters": "^7.24.7" + "@babel/helper-compilation-targets": "^7.28.6", + "@babel/helper-plugin-utils": "^7.28.6", + "@babel/plugin-transform-destructuring": "^7.28.5", + "@babel/plugin-transform-parameters": "^7.27.7", + "@babel/traverse": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1698,13 +1380,13 @@ } }, "node_modules/@babel/plugin-transform-object-super": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.24.7.tgz", - "integrity": "sha512-A/vVLwN6lBrMFmMDmPPz0jnE6ZGx7Jq7d6sT/Ev4H65RER6pZ+kczlf1DthF5N0qaPHBsI7UXiE8Zy66nmAovg==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.27.1.tgz", + "integrity": "sha512-SFy8S9plRPbIcxlJ8A6mT/CxFdJx/c04JEctz4jf8YZaVS2px34j7NXRrlGlHkN/M2gnpL37ZpGRGVFLd3l8Ng==", "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/helper-replace-supers": "^7.24.7" + "@babel/helper-plugin-utils": "^7.27.1", + "@babel/helper-replace-supers": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1714,13 +1396,12 @@ } }, "node_modules/@babel/plugin-transform-optional-catch-binding": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.24.7.tgz", - "integrity": "sha512-uLEndKqP5BfBbC/5jTwPxLh9kqPWWgzN/f8w6UwAIirAEqiIVJWWY312X72Eub09g5KF9+Zn7+hT7sDxmhRuKA==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.28.6.tgz", + "integrity": "sha512-R8ja/Pyrv0OGAvAXQhSTmWyPJPml+0TMqXlO5w+AsMEiwb2fg3WkOvob7UxFSL3OIttFSGSRFKQsOhJ/X6HQdQ==", "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1730,14 +1411,13 @@ } }, "node_modules/@babel/plugin-transform-optional-chaining": { - "version": "7.24.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.24.8.tgz", - "integrity": "sha512-5cTOLSMs9eypEy8JUVvIKOu6NgvbJMnpG62VpIHrTmROdQ+L5mDAaI40g25k5vXti55JWNX5jCkq3HZxXBQANw==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.28.6.tgz", + "integrity": "sha512-A4zobikRGJTsX9uqVFdafzGkqD30t26ck2LmOzAuLL8b2x6k3TIqRiT2xVvA9fNmFeTX484VpsdgmKNA0bS23w==", "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.8", - "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7", - "@babel/plugin-syntax-optional-chaining": "^7.8.3" + "@babel/helper-plugin-utils": "^7.28.6", + "@babel/helper-skip-transparent-expression-wrappers": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1747,12 +1427,12 @@ } }, "node_modules/@babel/plugin-transform-parameters": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.24.7.tgz", - "integrity": "sha512-yGWW5Rr+sQOhK0Ot8hjDJuxU3XLRQGflvT4lhlSY0DFvdb3TwKaY26CJzHtYllU0vT9j58hc37ndFPsqT1SrzA==", + "version": "7.27.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.27.7.tgz", + "integrity": "sha512-qBkYTYCb76RRxUM6CcZA5KRu8K4SM8ajzVeUgVdMVO9NN9uI/GaVmBg/WKJJGnNokV9SY8FxNOVWGXzqzUidBg==", "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1762,13 +1442,13 @@ } }, "node_modules/@babel/plugin-transform-private-methods": { - "version": "7.25.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.25.4.tgz", - "integrity": "sha512-ao8BG7E2b/URaUQGqN3Tlsg+M3KlHY6rJ1O1gXAEUnZoyNQnvKyH87Kfg+FoxSeyWUB8ISZZsC91C44ZuBFytw==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.28.6.tgz", + "integrity": "sha512-piiuapX9CRv7+0st8lmuUlRSmX6mBcVeNQ1b4AYzJxfCMuBfB0vBXDiGSmm03pKJw1v6cZ8KSeM+oUnM6yAExg==", "license": "MIT", "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.25.4", - "@babel/helper-plugin-utils": "^7.24.8" + "@babel/helper-create-class-features-plugin": "^7.28.6", + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1778,15 +1458,14 @@ } }, "node_modules/@babel/plugin-transform-private-property-in-object": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.24.7.tgz", - "integrity": "sha512-9z76mxwnwFxMyxZWEgdgECQglF2Q7cFLm0kMf8pGwt+GSJsY0cONKj/UuO4bOH0w/uAel3ekS4ra5CEAyJRmDA==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.28.6.tgz", + "integrity": "sha512-b97jvNSOb5+ehyQmBpmhOCiUC5oVK4PMnpRvO7+ymFBoqYjeDHIU9jnrNUuwHOiL9RpGDoKBpSViarV+BU+eVA==", "license": "MIT", "dependencies": { - "@babel/helper-annotate-as-pure": "^7.24.7", - "@babel/helper-create-class-features-plugin": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/plugin-syntax-private-property-in-object": "^7.14.5" + "@babel/helper-annotate-as-pure": "^7.27.3", + "@babel/helper-create-class-features-plugin": "^7.28.6", + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1796,12 +1475,12 @@ } }, "node_modules/@babel/plugin-transform-property-literals": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.24.7.tgz", - "integrity": "sha512-EMi4MLQSHfd2nrCqQEWxFdha2gBCqU4ZcCng4WBGZ5CJL4bBRW0ptdqqDdeirGZcpALazVVNJqRmsO8/+oNCBA==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.27.1.tgz", + "integrity": "sha512-oThy3BCuCha8kDZ8ZkgOg2exvPYUlprMukKQXI1r1pJ47NCvxfkEy8vK+r/hT9nF0Aa4H1WUPZZjHTFtAhGfmQ==", "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1811,12 +1490,12 @@ } }, "node_modules/@babel/plugin-transform-react-constant-elements": { - "version": "7.25.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-constant-elements/-/plugin-transform-react-constant-elements-7.25.1.tgz", - "integrity": "sha512-SLV/giH/V4SmloZ6Dt40HjTGTAIkxn33TVIHxNGNvo8ezMhrxBkzisj4op1KZYPIOHFLqhv60OHvX+YRu4xbmQ==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-constant-elements/-/plugin-transform-react-constant-elements-7.27.1.tgz", + "integrity": "sha512-edoidOjl/ZxvYo4lSBOQGDSyToYVkTAwyVoa2tkuYTSmjrB1+uAedoL5iROVLXkxH+vRgA7uP4tMg2pUJpZ3Ug==", "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.8" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1826,12 +1505,12 @@ } }, "node_modules/@babel/plugin-transform-react-display-name": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.24.7.tgz", - "integrity": "sha512-H/Snz9PFxKsS1JLI4dJLtnJgCJRoo0AUm3chP6NYr+9En1JMKloheEiLIhlp5MDVznWo+H3AAC1Mc8lmUEpsgg==", + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.28.0.tgz", + "integrity": "sha512-D6Eujc2zMxKjfa4Zxl4GHMsmhKKZ9VpcqIchJLvwTxad9zWIYulwYItBovpDOoNLISpcZSXoDJ5gaGbQUDqViA==", "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1841,16 +1520,16 @@ } }, "node_modules/@babel/plugin-transform-react-jsx": { - "version": "7.25.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.25.2.tgz", - "integrity": "sha512-KQsqEAVBpU82NM/B/N9j9WOdphom1SZH3R+2V7INrQUH+V9EBFwZsEJl8eBIVeQE62FxJCc70jzEZwqU7RcVqA==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.28.6.tgz", + "integrity": "sha512-61bxqhiRfAACulXSLd/GxqmAedUSrRZIu/cbaT18T1CetkTmtDN15it7i80ru4DVqRK1WMxQhXs+Lf9kajm5Ow==", "license": "MIT", "dependencies": { - "@babel/helper-annotate-as-pure": "^7.24.7", - "@babel/helper-module-imports": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.8", - "@babel/plugin-syntax-jsx": "^7.24.7", - "@babel/types": "^7.25.2" + "@babel/helper-annotate-as-pure": "^7.27.3", + "@babel/helper-module-imports": "^7.28.6", + "@babel/helper-plugin-utils": "^7.28.6", + "@babel/plugin-syntax-jsx": "^7.28.6", + "@babel/types": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1860,12 +1539,12 @@ } }, "node_modules/@babel/plugin-transform-react-jsx-development": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.24.7.tgz", - "integrity": "sha512-QG9EnzoGn+Qar7rxuW+ZOsbWOt56FvvI93xInqsZDC5fsekx1AlIO4KIJ5M+D0p0SqSH156EpmZyXq630B8OlQ==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.27.1.tgz", + "integrity": "sha512-ykDdF5yI4f1WrAolLqeF3hmYU12j9ntLQl/AOG1HAS21jxyg1Q0/J/tpREuYLfatGdGmXp/3yS0ZA76kOlVq9Q==", "license": "MIT", "dependencies": { - "@babel/plugin-transform-react-jsx": "^7.24.7" + "@babel/plugin-transform-react-jsx": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1875,13 +1554,13 @@ } }, "node_modules/@babel/plugin-transform-react-pure-annotations": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.24.7.tgz", - "integrity": "sha512-PLgBVk3fzbmEjBJ/u8kFzOqS9tUeDjiaWud/rRym/yjCo/M9cASPlnrd2ZmmZpQT40fOOrvR8jh+n8jikrOhNA==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.27.1.tgz", + "integrity": "sha512-JfuinvDOsD9FVMTHpzA/pBLisxpv1aSf+OIV8lgH3MuWrks19R27e6a6DipIg4aX1Zm9Wpb04p8wljfKrVSnPA==", "license": "MIT", "dependencies": { - "@babel/helper-annotate-as-pure": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-annotate-as-pure": "^7.27.1", + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1891,13 +1570,12 @@ } }, "node_modules/@babel/plugin-transform-regenerator": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.24.7.tgz", - "integrity": "sha512-lq3fvXPdimDrlg6LWBoqj+r/DEWgONuwjuOuQCSYgRroXDH/IdM1C0IZf59fL5cHLpjEH/O6opIRBbqv7ELnuA==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.29.0.tgz", + "integrity": "sha512-FijqlqMA7DmRdg/aINBSs04y8XNTYw/lr1gJ2WsmBnnaNw1iS43EPkJW+zK7z65auG3AWRFXWj+NcTQwYptUog==", "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", - "regenerator-transform": "^0.15.2" + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1906,13 +1584,29 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-reserved-words": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.24.7.tgz", - "integrity": "sha512-0DUq0pHcPKbjFZCfTss/pGkYMfy3vFWydkUBd9r0GHpIyfs2eCDENvqadMycRS9wZCXR41wucAfJHJmwA0UmoQ==", + "node_modules/@babel/plugin-transform-regexp-modifiers": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regexp-modifiers/-/plugin-transform-regexp-modifiers-7.28.6.tgz", + "integrity": "sha512-QGWAepm9qxpaIs7UM9FvUSnCGlb8Ua1RhyM4/veAxLwt3gMat/LSGrZixyuj4I6+Kn9iwvqCyPTtbdxanYoWYg==", "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-create-regexp-features-plugin": "^7.28.5", + "@babel/helper-plugin-utils": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-transform-reserved-words": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.27.1.tgz", + "integrity": "sha512-V2ABPHIJX4kC7HegLkYoDpfg9PVmuWy/i6vUM5eGK22bx4YVFD3M5F0QQnWQoDs6AGsUWTVOopBiMFQgHaSkVw==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1922,16 +1616,16 @@ } }, "node_modules/@babel/plugin-transform-runtime": { - "version": "7.25.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.25.4.tgz", - "integrity": "sha512-8hsyG+KUYGY0coX6KUCDancA0Vw225KJ2HJO0yCNr1vq5r+lJTleDaJf0K7iOhjw4SWhu03TMBzYTJ9krmzULQ==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.29.0.tgz", + "integrity": "sha512-jlaRT5dJtMaMCV6fAuLbsQMSwz/QkvaHOHOSXRitGGwSpR1blCY4KUKoyP2tYO8vJcqYe8cEj96cqSztv3uF9w==", "license": "MIT", "dependencies": { - "@babel/helper-module-imports": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.8", - "babel-plugin-polyfill-corejs2": "^0.4.10", - "babel-plugin-polyfill-corejs3": "^0.10.6", - "babel-plugin-polyfill-regenerator": "^0.6.1", + "@babel/helper-module-imports": "^7.28.6", + "@babel/helper-plugin-utils": "^7.28.6", + "babel-plugin-polyfill-corejs2": "^0.4.14", + "babel-plugin-polyfill-corejs3": "^0.13.0", + "babel-plugin-polyfill-regenerator": "^0.6.5", "semver": "^6.3.1" }, "engines": { @@ -1951,12 +1645,12 @@ } }, "node_modules/@babel/plugin-transform-shorthand-properties": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.24.7.tgz", - "integrity": "sha512-KsDsevZMDsigzbA09+vacnLpmPH4aWjcZjXdyFKGzpplxhbeB4wYtury3vglQkg6KM/xEPKt73eCjPPf1PgXBA==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.27.1.tgz", + "integrity": "sha512-N/wH1vcn4oYawbJ13Y/FxcQrWk63jhfNa7jef0ih7PHSIHX2LB7GWE1rkPrOnka9kwMxb6hMl19p7lidA+EHmQ==", "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1966,13 +1660,13 @@ } }, "node_modules/@babel/plugin-transform-spread": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.24.7.tgz", - "integrity": "sha512-x96oO0I09dgMDxJaANcRyD4ellXFLLiWhuwDxKZX5g2rWP1bTPkBSwCYv96VDXVT1bD9aPj8tppr5ITIh8hBng==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.28.6.tgz", + "integrity": "sha512-9U4QObUC0FtJl05AsUcodau/RWDytrU6uKgkxu09mLR9HLDAtUMoPuuskm5huQsoktmsYpI+bGmq+iapDcriKA==", "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7" + "@babel/helper-plugin-utils": "^7.28.6", + "@babel/helper-skip-transparent-expression-wrappers": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1982,12 +1676,12 @@ } }, "node_modules/@babel/plugin-transform-sticky-regex": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.24.7.tgz", - "integrity": "sha512-kHPSIJc9v24zEml5geKg9Mjx5ULpfncj0wRpYtxbvKyTtHCYDkVE3aHQ03FrpEo4gEe2vrJJS1Y9CJTaThA52g==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.27.1.tgz", + "integrity": "sha512-lhInBO5bi/Kowe2/aLdBAawijx+q1pQzicSgnkB6dUPc1+RC8QmJHKf2OjvU+NZWitguJHEaEmbV6VWEouT58g==", "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1997,12 +1691,12 @@ } }, "node_modules/@babel/plugin-transform-template-literals": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.24.7.tgz", - "integrity": "sha512-AfDTQmClklHCOLxtGoP7HkeMw56k1/bTQjwsfhL6pppo/M4TOBSq+jjBUBLmV/4oeFg4GWMavIl44ZeCtmmZTw==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.27.1.tgz", + "integrity": "sha512-fBJKiV7F2DxZUkg5EtHKXQdbsbURW3DZKQUWphDum0uRP6eHGGa/He9mc0mypL680pb+e/lDIthRohlv8NCHkg==", "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -2012,12 +1706,12 @@ } }, "node_modules/@babel/plugin-transform-typeof-symbol": { - "version": "7.24.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.24.8.tgz", - "integrity": "sha512-adNTUpDCVnmAE58VEqKlAA6ZBlNkMnWD0ZcW76lyNFN3MJniyGFZfNwERVk8Ap56MCnXztmDr19T4mPTztcuaw==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.27.1.tgz", + "integrity": "sha512-RiSILC+nRJM7FY5srIyc4/fGIwUhyDuuBSdWn4y6yT6gm652DpCHZjIipgn6B7MQ1ITOUnAKWixEUjQRIBIcLw==", "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.8" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -2027,16 +1721,16 @@ } }, "node_modules/@babel/plugin-transform-typescript": { - "version": "7.25.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.25.2.tgz", - "integrity": "sha512-lBwRvjSmqiMYe/pS0+1gggjJleUJi7NzjvQ1Fkqtt69hBa/0t1YuW/MLQMAPixfwaQOHUXsd6jeU3Z+vdGv3+A==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.28.6.tgz", + "integrity": "sha512-0YWL2RFxOqEm9Efk5PvreamxPME8OyY0wM5wh5lHjF+VtVhdneCWGzZeSqzOfiobVqQaNCd2z0tQvnI9DaPWPw==", "license": "MIT", "dependencies": { - "@babel/helper-annotate-as-pure": "^7.24.7", - "@babel/helper-create-class-features-plugin": "^7.25.0", - "@babel/helper-plugin-utils": "^7.24.8", - "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7", - "@babel/plugin-syntax-typescript": "^7.24.7" + "@babel/helper-annotate-as-pure": "^7.27.3", + "@babel/helper-create-class-features-plugin": "^7.28.6", + "@babel/helper-plugin-utils": "^7.28.6", + "@babel/helper-skip-transparent-expression-wrappers": "^7.27.1", + "@babel/plugin-syntax-typescript": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -2046,12 +1740,12 @@ } }, "node_modules/@babel/plugin-transform-unicode-escapes": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.24.7.tgz", - "integrity": "sha512-U3ap1gm5+4edc2Q/P+9VrBNhGkfnf+8ZqppY71Bo/pzZmXhhLdqgaUl6cuB07O1+AQJtCLfaOmswiNbSQ9ivhw==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.27.1.tgz", + "integrity": "sha512-Ysg4v6AmF26k9vpfFuTZg8HRfVWzsh1kVfowA23y9j/Gu6dOuahdUVhkLqpObp3JIv27MLSii6noRnuKN8H0Mg==", "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -2061,13 +1755,13 @@ } }, "node_modules/@babel/plugin-transform-unicode-property-regex": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.24.7.tgz", - "integrity": "sha512-uH2O4OV5M9FZYQrwc7NdVmMxQJOCCzFeYudlZSzUAHRFeOujQefa92E74TQDVskNHCzOXoigEuoyzHDhaEaK5w==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.28.6.tgz", + "integrity": "sha512-4Wlbdl/sIZjzi/8St0evF0gEZrgOswVO6aOzqxh1kDZOl9WmLrHq2HtGhnOJZmHZYKP8WZ1MDLCt5DAWwRo57A==", "license": "MIT", "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-create-regexp-features-plugin": "^7.28.5", + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -2077,13 +1771,13 @@ } }, "node_modules/@babel/plugin-transform-unicode-regex": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.24.7.tgz", - "integrity": "sha512-hlQ96MBZSAXUq7ltkjtu3FJCCSMx/j629ns3hA3pXnBXjanNP0LHi+JpPeA81zaWgVK1VGH95Xuy7u0RyQ8kMg==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.27.1.tgz", + "integrity": "sha512-xvINq24TRojDuyt6JGtHmkVkrfVV3FPT16uytxImLeBZqW3/H52yN+kM1MGuyPkIQxrzKwPHs5U/MP3qKyzkGw==", "license": "MIT", "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-create-regexp-features-plugin": "^7.27.1", + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -2093,13 +1787,13 @@ } }, "node_modules/@babel/plugin-transform-unicode-sets-regex": { - "version": "7.25.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.25.4.tgz", - "integrity": "sha512-qesBxiWkgN1Q+31xUE9RcMk79eOXXDCv6tfyGMRSs4RGlioSg2WVyQAm07k726cSE56pa+Kb0y9epX2qaXzTvA==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.28.6.tgz", + "integrity": "sha512-/wHc/paTUmsDYN7SZkpWxogTOBNnlx7nBQYfy6JJlCT7G3mVhltk3e++N7zV0XfgGsrqBxd4rJQt9H16I21Y1Q==", "license": "MIT", "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.25.2", - "@babel/helper-plugin-utils": "^7.24.8" + "@babel/helper-create-regexp-features-plugin": "^7.28.5", + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -2109,93 +1803,80 @@ } }, "node_modules/@babel/preset-env": { - "version": "7.25.4", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.25.4.tgz", - "integrity": "sha512-W9Gyo+KmcxjGahtt3t9fb14vFRWvPpu5pT6GBlovAK6BTBcxgjfVMSQCfJl4oi35ODrxP6xx2Wr8LNST57Mraw==", + "version": "7.29.2", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.29.2.tgz", + "integrity": "sha512-DYD23veRYGvBFhcTY1iUvJnDNpuqNd/BzBwCvzOTKUnJjKg5kpUBh3/u9585Agdkgj+QuygG7jLfOPWMa2KVNw==", "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.25.4", - "@babel/helper-compilation-targets": "^7.25.2", - "@babel/helper-plugin-utils": "^7.24.8", - "@babel/helper-validator-option": "^7.24.8", - "@babel/plugin-bugfix-firefox-class-in-computed-class-key": "^7.25.3", - "@babel/plugin-bugfix-safari-class-field-initializer-scope": "^7.25.0", - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.25.0", - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.24.7", - "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.25.0", + "@babel/compat-data": "^7.29.0", + "@babel/helper-compilation-targets": "^7.28.6", + "@babel/helper-plugin-utils": "^7.28.6", + "@babel/helper-validator-option": "^7.27.1", + "@babel/plugin-bugfix-firefox-class-in-computed-class-key": "^7.28.5", + "@babel/plugin-bugfix-safari-class-field-initializer-scope": "^7.27.1", + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.27.1", + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.27.1", + "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.28.6", "@babel/plugin-proposal-private-property-in-object": "7.21.0-placeholder-for-preset-env.2", - "@babel/plugin-syntax-async-generators": "^7.8.4", - "@babel/plugin-syntax-class-properties": "^7.12.13", - "@babel/plugin-syntax-class-static-block": "^7.14.5", - "@babel/plugin-syntax-dynamic-import": "^7.8.3", - "@babel/plugin-syntax-export-namespace-from": "^7.8.3", - "@babel/plugin-syntax-import-assertions": "^7.24.7", - "@babel/plugin-syntax-import-attributes": "^7.24.7", - "@babel/plugin-syntax-import-meta": "^7.10.4", - "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.10.4", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", - "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-private-property-in-object": "^7.14.5", - "@babel/plugin-syntax-top-level-await": "^7.14.5", + "@babel/plugin-syntax-import-assertions": "^7.28.6", + "@babel/plugin-syntax-import-attributes": "^7.28.6", "@babel/plugin-syntax-unicode-sets-regex": "^7.18.6", - "@babel/plugin-transform-arrow-functions": "^7.24.7", - "@babel/plugin-transform-async-generator-functions": "^7.25.4", - "@babel/plugin-transform-async-to-generator": "^7.24.7", - "@babel/plugin-transform-block-scoped-functions": "^7.24.7", - "@babel/plugin-transform-block-scoping": "^7.25.0", - "@babel/plugin-transform-class-properties": "^7.25.4", - "@babel/plugin-transform-class-static-block": "^7.24.7", - "@babel/plugin-transform-classes": "^7.25.4", - "@babel/plugin-transform-computed-properties": "^7.24.7", - "@babel/plugin-transform-destructuring": "^7.24.8", - "@babel/plugin-transform-dotall-regex": "^7.24.7", - "@babel/plugin-transform-duplicate-keys": "^7.24.7", - "@babel/plugin-transform-duplicate-named-capturing-groups-regex": "^7.25.0", - "@babel/plugin-transform-dynamic-import": "^7.24.7", - "@babel/plugin-transform-exponentiation-operator": "^7.24.7", - "@babel/plugin-transform-export-namespace-from": "^7.24.7", - "@babel/plugin-transform-for-of": "^7.24.7", - "@babel/plugin-transform-function-name": "^7.25.1", - "@babel/plugin-transform-json-strings": "^7.24.7", - "@babel/plugin-transform-literals": "^7.25.2", - "@babel/plugin-transform-logical-assignment-operators": "^7.24.7", - "@babel/plugin-transform-member-expression-literals": "^7.24.7", - "@babel/plugin-transform-modules-amd": "^7.24.7", - "@babel/plugin-transform-modules-commonjs": "^7.24.8", - "@babel/plugin-transform-modules-systemjs": "^7.25.0", - "@babel/plugin-transform-modules-umd": "^7.24.7", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.24.7", - "@babel/plugin-transform-new-target": "^7.24.7", - "@babel/plugin-transform-nullish-coalescing-operator": "^7.24.7", - "@babel/plugin-transform-numeric-separator": "^7.24.7", - "@babel/plugin-transform-object-rest-spread": "^7.24.7", - "@babel/plugin-transform-object-super": "^7.24.7", - "@babel/plugin-transform-optional-catch-binding": "^7.24.7", - "@babel/plugin-transform-optional-chaining": "^7.24.8", - "@babel/plugin-transform-parameters": "^7.24.7", - "@babel/plugin-transform-private-methods": "^7.25.4", - "@babel/plugin-transform-private-property-in-object": "^7.24.7", - "@babel/plugin-transform-property-literals": "^7.24.7", - "@babel/plugin-transform-regenerator": "^7.24.7", - "@babel/plugin-transform-reserved-words": "^7.24.7", - "@babel/plugin-transform-shorthand-properties": "^7.24.7", - "@babel/plugin-transform-spread": "^7.24.7", - "@babel/plugin-transform-sticky-regex": "^7.24.7", - "@babel/plugin-transform-template-literals": "^7.24.7", - "@babel/plugin-transform-typeof-symbol": "^7.24.8", - "@babel/plugin-transform-unicode-escapes": "^7.24.7", - "@babel/plugin-transform-unicode-property-regex": "^7.24.7", - "@babel/plugin-transform-unicode-regex": "^7.24.7", - "@babel/plugin-transform-unicode-sets-regex": "^7.25.4", + "@babel/plugin-transform-arrow-functions": "^7.27.1", + "@babel/plugin-transform-async-generator-functions": "^7.29.0", + "@babel/plugin-transform-async-to-generator": "^7.28.6", + "@babel/plugin-transform-block-scoped-functions": "^7.27.1", + "@babel/plugin-transform-block-scoping": "^7.28.6", + "@babel/plugin-transform-class-properties": "^7.28.6", + "@babel/plugin-transform-class-static-block": "^7.28.6", + "@babel/plugin-transform-classes": "^7.28.6", + "@babel/plugin-transform-computed-properties": "^7.28.6", + "@babel/plugin-transform-destructuring": "^7.28.5", + "@babel/plugin-transform-dotall-regex": "^7.28.6", + "@babel/plugin-transform-duplicate-keys": "^7.27.1", + "@babel/plugin-transform-duplicate-named-capturing-groups-regex": "^7.29.0", + "@babel/plugin-transform-dynamic-import": "^7.27.1", + "@babel/plugin-transform-explicit-resource-management": "^7.28.6", + "@babel/plugin-transform-exponentiation-operator": "^7.28.6", + "@babel/plugin-transform-export-namespace-from": "^7.27.1", + "@babel/plugin-transform-for-of": "^7.27.1", + "@babel/plugin-transform-function-name": "^7.27.1", + "@babel/plugin-transform-json-strings": "^7.28.6", + "@babel/plugin-transform-literals": "^7.27.1", + "@babel/plugin-transform-logical-assignment-operators": "^7.28.6", + "@babel/plugin-transform-member-expression-literals": "^7.27.1", + "@babel/plugin-transform-modules-amd": "^7.27.1", + "@babel/plugin-transform-modules-commonjs": "^7.28.6", + "@babel/plugin-transform-modules-systemjs": "^7.29.0", + "@babel/plugin-transform-modules-umd": "^7.27.1", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.29.0", + "@babel/plugin-transform-new-target": "^7.27.1", + "@babel/plugin-transform-nullish-coalescing-operator": "^7.28.6", + "@babel/plugin-transform-numeric-separator": "^7.28.6", + "@babel/plugin-transform-object-rest-spread": "^7.28.6", + "@babel/plugin-transform-object-super": "^7.27.1", + "@babel/plugin-transform-optional-catch-binding": "^7.28.6", + "@babel/plugin-transform-optional-chaining": "^7.28.6", + "@babel/plugin-transform-parameters": "^7.27.7", + "@babel/plugin-transform-private-methods": "^7.28.6", + "@babel/plugin-transform-private-property-in-object": "^7.28.6", + "@babel/plugin-transform-property-literals": "^7.27.1", + "@babel/plugin-transform-regenerator": "^7.29.0", + "@babel/plugin-transform-regexp-modifiers": "^7.28.6", + "@babel/plugin-transform-reserved-words": "^7.27.1", + "@babel/plugin-transform-shorthand-properties": "^7.27.1", + "@babel/plugin-transform-spread": "^7.28.6", + "@babel/plugin-transform-sticky-regex": "^7.27.1", + "@babel/plugin-transform-template-literals": "^7.27.1", + "@babel/plugin-transform-typeof-symbol": "^7.27.1", + "@babel/plugin-transform-unicode-escapes": "^7.27.1", + "@babel/plugin-transform-unicode-property-regex": "^7.28.6", + "@babel/plugin-transform-unicode-regex": "^7.27.1", + "@babel/plugin-transform-unicode-sets-regex": "^7.28.6", "@babel/preset-modules": "0.1.6-no-external-plugins", - "babel-plugin-polyfill-corejs2": "^0.4.10", - "babel-plugin-polyfill-corejs3": "^0.10.6", - "babel-plugin-polyfill-regenerator": "^0.6.1", - "core-js-compat": "^3.37.1", + "babel-plugin-polyfill-corejs2": "^0.4.15", + "babel-plugin-polyfill-corejs3": "^0.14.0", + "babel-plugin-polyfill-regenerator": "^0.6.6", + "core-js-compat": "^3.48.0", "semver": "^6.3.1" }, "engines": { @@ -2205,6 +1886,19 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/preset-env/node_modules/babel-plugin-polyfill-corejs3": { + "version": "0.14.2", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.14.2.tgz", + "integrity": "sha512-coWpDLJ410R781Npmn/SIBZEsAetR4xVi0SxLMXPaMO4lSf1MwnkGYMtkFxew0Dn8B3/CpbpYxN0JCgg8mn67g==", + "license": "MIT", + "dependencies": { + "@babel/helper-define-polyfill-provider": "^0.6.8", + "core-js-compat": "^3.48.0" + }, + "peerDependencies": { + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" + } + }, "node_modules/@babel/preset-env/node_modules/semver": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", @@ -2229,17 +1923,17 @@ } }, "node_modules/@babel/preset-react": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.24.7.tgz", - "integrity": "sha512-AAH4lEkpmzFWrGVlHaxJB7RLH21uPQ9+He+eFLWHmF9IuFQVugz8eAsamaW0DXRrTfco5zj1wWtpdcXJUOfsag==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.28.5.tgz", + "integrity": "sha512-Z3J8vhRq7CeLjdC58jLv4lnZ5RKFUJWqH5emvxmv9Hv3BD1T9R/Im713R4MTKwvFaV74ejZ3sM01LyEKk4ugNQ==", "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/helper-validator-option": "^7.24.7", - "@babel/plugin-transform-react-display-name": "^7.24.7", - "@babel/plugin-transform-react-jsx": "^7.24.7", - "@babel/plugin-transform-react-jsx-development": "^7.24.7", - "@babel/plugin-transform-react-pure-annotations": "^7.24.7" + "@babel/helper-plugin-utils": "^7.27.1", + "@babel/helper-validator-option": "^7.27.1", + "@babel/plugin-transform-react-display-name": "^7.28.0", + "@babel/plugin-transform-react-jsx": "^7.27.1", + "@babel/plugin-transform-react-jsx-development": "^7.27.1", + "@babel/plugin-transform-react-pure-annotations": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -2249,16 +1943,16 @@ } }, "node_modules/@babel/preset-typescript": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.24.7.tgz", - "integrity": "sha512-SyXRe3OdWwIwalxDg5UtJnJQO+YPcTfwiIY2B0Xlddh9o7jpWLvv8X1RthIeDOxQ+O1ML5BLPCONToObyVQVuQ==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.28.5.tgz", + "integrity": "sha512-+bQy5WOI2V6LJZpPVxY+yp66XdZ2yifu0Mc1aP5CQKgjn4QM5IN2i5fAZ4xKop47pr8rpVhiAeu+nDQa12C8+g==", "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/helper-validator-option": "^7.24.7", - "@babel/plugin-syntax-jsx": "^7.24.7", - "@babel/plugin-transform-modules-commonjs": "^7.24.7", - "@babel/plugin-transform-typescript": "^7.24.7" + "@babel/helper-plugin-utils": "^7.27.1", + "@babel/helper-validator-option": "^7.27.1", + "@babel/plugin-syntax-jsx": "^7.27.1", + "@babel/plugin-transform-modules-commonjs": "^7.27.1", + "@babel/plugin-transform-typescript": "^7.28.5" }, "engines": { "node": ">=6.9.0" @@ -2267,107 +1961,102 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/regjsgen": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@babel/regjsgen/-/regjsgen-0.8.0.tgz", - "integrity": "sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==", - "license": "MIT" - }, "node_modules/@babel/runtime": { - "version": "7.25.6", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.25.6.tgz", - "integrity": "sha512-VBj9MYyDb9tuLq7yzqjgzt6Q+IBQLrGZfdjOekyEirZPHxXWoTSGUTMrpsfi58Up73d13NfYLv8HT9vmznjzhQ==", + "version": "7.29.2", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.29.2.tgz", + "integrity": "sha512-JiDShH45zKHWyGe4ZNVRrCjBz8Nh9TMmZG1kh4QTK8hCBTWBi8Da+i7s1fJw7/lYpM4ccepSNfqzZ/QvABBi5g==", "license": "MIT", - "dependencies": { - "regenerator-runtime": "^0.14.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/runtime-corejs3": { - "version": "7.25.6", - "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.25.6.tgz", - "integrity": "sha512-Gz0Nrobx8szge6kQQ5Z5MX9L3ObqNwCQY1PSwSNzreFL7aHGxv8Fp2j3ETV6/wWdbiV+mW6OSm8oQhg3Tcsniw==", - "license": "MIT", - "dependencies": { - "core-js-pure": "^3.30.2", - "regenerator-runtime": "^0.14.0" - }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/template": { - "version": "7.25.0", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.0.tgz", - "integrity": "sha512-aOOgh1/5XzKvg1jvVz7AVrx2piJ2XBi227DHmbY6y+bM9H2FlN+IfecYu4Xl0cNiiVejlsCri89LUsbj8vJD9Q==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.28.6.tgz", + "integrity": "sha512-YA6Ma2KsCdGb+WC6UpBVFJGXL58MDA6oyONbjyF/+5sBgxY/dwkhLogbMT2GXXyU84/IhRw/2D1Os1B/giz+BQ==", "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.24.7", - "@babel/parser": "^7.25.0", - "@babel/types": "^7.25.0" + "@babel/code-frame": "^7.28.6", + "@babel/parser": "^7.28.6", + "@babel/types": "^7.28.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.25.6", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.25.6.tgz", - "integrity": "sha512-9Vrcx5ZW6UwK5tvqsj0nGpp/XzqthkT0dqIc9g1AdtygFToNtTF67XzYS//dm+SAK9cp3B9R4ZO/46p63SCjlQ==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.0.tgz", + "integrity": "sha512-4HPiQr0X7+waHfyXPZpWPfWL/J7dcN1mx9gL6WdQVMbPnF3+ZhSMs8tCxN7oHddJE9fhNE7+lxdnlyemKfJRuA==", "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.24.7", - "@babel/generator": "^7.25.6", - "@babel/parser": "^7.25.6", - "@babel/template": "^7.25.0", - "@babel/types": "^7.25.6", - "debug": "^4.3.1", - "globals": "^11.1.0" + "@babel/code-frame": "^7.29.0", + "@babel/generator": "^7.29.0", + "@babel/helper-globals": "^7.28.0", + "@babel/parser": "^7.29.0", + "@babel/template": "^7.28.6", + "@babel/types": "^7.29.0", + "debug": "^4.3.1" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/types": { - "version": "7.25.6", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.6.tgz", - "integrity": "sha512-/l42B1qxpG6RdfYf343Uw1vmDjeNhneUXtzhojE7pDgfpEypmRhI6j1kr17XCVv4Cgl9HdAiQY2x0GwKm7rWCw==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.0.tgz", + "integrity": "sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A==", "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.24.8", - "@babel/helper-validator-identifier": "^7.24.7", - "to-fast-properties": "^2.0.0" + "@babel/helper-string-parser": "^7.27.1", + "@babel/helper-validator-identifier": "^7.28.5" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@bcherny/json-schema-ref-parser": { - "version": "10.0.5-fork", - "resolved": "https://registry.npmjs.org/@bcherny/json-schema-ref-parser/-/json-schema-ref-parser-10.0.5-fork.tgz", - "integrity": "sha512-E/jKbPoca1tfUPj3iSbitDZTGnq6FUFjkH6L8U2oDwSuwK1WhnnVtCG7oFOTg/DDnyoXbQYUiUiGOibHqaGVnw==", - "dev": true, - "license": "MIT", + "node_modules/@braintree/sanitize-url": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/@braintree/sanitize-url/-/sanitize-url-7.1.2.tgz", + "integrity": "sha512-jigsZK+sMF/cuiB7sERuo9V7N9jx+dhmHHnQyDSVdpZwVutaBu7WvNYqMDLSgFgfB30n452TP3vjDAvFC973mA==", + "license": "MIT" + }, + "node_modules/@chevrotain/cst-dts-gen": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/@chevrotain/cst-dts-gen/-/cst-dts-gen-12.0.0.tgz", + "integrity": "sha512-fSL4KXjTl7cDgf0B5Rip9Q05BOrYvkJV/RrBTE/bKDN096E4hN/ySpcBK5B24T76dlQ2i32Zc3PAE27jFnFrKg==", + "license": "Apache-2.0", "dependencies": { - "@jsdevtools/ono": "^7.1.3", - "@types/json-schema": "^7.0.6", - "call-me-maybe": "^1.0.1", - "js-yaml": "^4.1.0" - }, - "engines": { - "node": ">= 16" - }, - "funding": { - "url": "https://github.com/sponsors/philsturgeon" + "@chevrotain/gast": "12.0.0", + "@chevrotain/types": "12.0.0" } }, - "node_modules/@braintree/sanitize-url": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/@braintree/sanitize-url/-/sanitize-url-6.0.4.tgz", - "integrity": "sha512-s3jaWicZd0pkP0jf5ysyHUI/RE7MHos6qlToFcGWXVp+ykHOy77OUMrfbgJ9it2C5bow7OIQwYYaHjk9XlBQ2A==", - "license": "MIT" + "node_modules/@chevrotain/gast": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/@chevrotain/gast/-/gast-12.0.0.tgz", + "integrity": "sha512-1ne/m3XsIT8aEdrvT33so0GUC+wkctpUPK6zU9IlOyJLUbR0rg4G7ZiApiJbggpgPir9ERy3FRjT6T7lpgetnQ==", + "license": "Apache-2.0", + "dependencies": { + "@chevrotain/types": "12.0.0" + } + }, + "node_modules/@chevrotain/regexp-to-ast": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/@chevrotain/regexp-to-ast/-/regexp-to-ast-12.0.0.tgz", + "integrity": "sha512-p+EW9MaJwgaHguhoqwOtx/FwuGr+DnNn857sXWOi/mClXIkPGl3rn7hGNWvo31HA3vyeQxjqe+H36yZJwYU8cA==", + "license": "Apache-2.0" + }, + "node_modules/@chevrotain/types": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/@chevrotain/types/-/types-12.0.0.tgz", + "integrity": "sha512-S+04vjFQKeuYw0/eW3U52LkAHQsB1ASxsPGsLPUyQgrZ2iNNibQrsidruDzjEX2JYfespXMG0eZmXlhA6z7nWA==", + "license": "Apache-2.0" + }, + "node_modules/@chevrotain/utils": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/@chevrotain/utils/-/utils-12.0.0.tgz", + "integrity": "sha512-lB59uJoaGIfOOL9knQqQRfhl9g7x8/wqFkp13zTdkRu1huG9kg6IJs1O8hqj9rs6h7orGxHJUKb+mX3rPbWGhA==", + "license": "Apache-2.0" }, "node_modules/@colors/colors": { "version": "1.5.0", @@ -2379,6 +2068,1322 @@ "node": ">=0.1.90" } }, + "node_modules/@csstools/cascade-layer-name-parser": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@csstools/cascade-layer-name-parser/-/cascade-layer-name-parser-2.0.5.tgz", + "integrity": "sha512-p1ko5eHgV+MgXFVa4STPKpvPxr6ReS8oS2jzTukjR74i5zJNyWO1ZM1m8YKBXnzDKWfBN1ztLYlHxbVemDD88A==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT", + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@csstools/css-parser-algorithms": "^3.0.5", + "@csstools/css-tokenizer": "^3.0.4" + } + }, + "node_modules/@csstools/color-helpers": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@csstools/color-helpers/-/color-helpers-5.1.0.tgz", + "integrity": "sha512-S11EXWJyy0Mz5SYvRmY8nJYTFFd1LCNV+7cXyAgQtOOuzb4EsgfqDufL+9esx72/eLhsRdGZwaldu/h+E4t4BA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "engines": { + "node": ">=18" + } + }, + "node_modules/@csstools/css-calc": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@csstools/css-calc/-/css-calc-2.1.4.tgz", + "integrity": "sha512-3N8oaj+0juUw/1H3YwmDDJXCgTB1gKU6Hc/bB502u9zR0q2vd786XJH9QfrKIEgFlZmhZiq6epXl4rHqhzsIgQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT", + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@csstools/css-parser-algorithms": "^3.0.5", + "@csstools/css-tokenizer": "^3.0.4" + } + }, + "node_modules/@csstools/css-color-parser": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@csstools/css-color-parser/-/css-color-parser-3.1.0.tgz", + "integrity": "sha512-nbtKwh3a6xNVIp/VRuXV64yTKnb1IjTAEEh3irzS+HkKjAOYLTGNb9pmVNntZ8iVBHcWDA2Dof0QtPgFI1BaTA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT", + "dependencies": { + "@csstools/color-helpers": "^5.1.0", + "@csstools/css-calc": "^2.1.4" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@csstools/css-parser-algorithms": "^3.0.5", + "@csstools/css-tokenizer": "^3.0.4" + } + }, + "node_modules/@csstools/css-parser-algorithms": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-3.0.5.tgz", + "integrity": "sha512-DaDeUkXZKjdGhgYaHNJTV9pV7Y9B3b644jCLs9Upc3VeNGg6LWARAT6O+Q+/COo+2gg/bM5rhpMAtf70WqfBdQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT", + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@csstools/css-tokenizer": "^3.0.4" + } + }, + "node_modules/@csstools/css-tokenizer": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-3.0.4.tgz", + "integrity": "sha512-Vd/9EVDiu6PPJt9yAh6roZP6El1xHrdvIVGjyBsHR0RYwNHgL7FJPyIIW4fANJNG6FtyZfvlRPpFI4ZM/lubvw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/@csstools/media-query-list-parser": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@csstools/media-query-list-parser/-/media-query-list-parser-4.0.3.tgz", + "integrity": "sha512-HAYH7d3TLRHDOUQK4mZKf9k9Ph/m8Akstg66ywKR4SFAigjs3yBiUeZtFxywiTm5moZMAp/5W/ZuFnNXXYLuuQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT", + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@csstools/css-parser-algorithms": "^3.0.5", + "@csstools/css-tokenizer": "^3.0.4" + } + }, + "node_modules/@csstools/postcss-alpha-function": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@csstools/postcss-alpha-function/-/postcss-alpha-function-1.0.1.tgz", + "integrity": "sha512-isfLLwksH3yHkFXfCI2Gcaqg7wGGHZZwunoJzEZk0yKYIokgre6hYVFibKL3SYAoR1kBXova8LB+JoO5vZzi9w==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "dependencies": { + "@csstools/css-color-parser": "^3.1.0", + "@csstools/css-parser-algorithms": "^3.0.5", + "@csstools/css-tokenizer": "^3.0.4", + "@csstools/postcss-progressive-custom-properties": "^4.2.1", + "@csstools/utilities": "^2.0.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/@csstools/postcss-cascade-layers": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@csstools/postcss-cascade-layers/-/postcss-cascade-layers-5.0.2.tgz", + "integrity": "sha512-nWBE08nhO8uWl6kSAeCx4im7QfVko3zLrtgWZY4/bP87zrSPpSyN/3W3TDqz1jJuH+kbKOHXg5rJnK+ZVYcFFg==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "dependencies": { + "@csstools/selector-specificity": "^5.0.0", + "postcss-selector-parser": "^7.0.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/@csstools/postcss-cascade-layers/node_modules/@csstools/selector-specificity": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-5.0.0.tgz", + "integrity": "sha512-PCqQV3c4CoVm3kdPhyeZ07VmBRdH2EpMFA/pd9OASpOEC3aXNGoqPDAZ80D0cLpMBxnmk0+yNhGsEx31hq7Gtw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss-selector-parser": "^7.0.0" + } + }, + "node_modules/@csstools/postcss-cascade-layers/node_modules/postcss-selector-parser": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.1.tgz", + "integrity": "sha512-orRsuYpJVw8LdAwqqLykBj9ecS5/cRHlI5+nvTo8LcCKmzDmqVORXtOIYEEQuL9D4BxtA1lm5isAqzQZCoQ6Eg==", + "license": "MIT", + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@csstools/postcss-color-function": { + "version": "4.0.12", + "resolved": "https://registry.npmjs.org/@csstools/postcss-color-function/-/postcss-color-function-4.0.12.tgz", + "integrity": "sha512-yx3cljQKRaSBc2hfh8rMZFZzChaFgwmO2JfFgFr1vMcF3C/uyy5I4RFIBOIWGq1D+XbKCG789CGkG6zzkLpagA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "dependencies": { + "@csstools/css-color-parser": "^3.1.0", + "@csstools/css-parser-algorithms": "^3.0.5", + "@csstools/css-tokenizer": "^3.0.4", + "@csstools/postcss-progressive-custom-properties": "^4.2.1", + "@csstools/utilities": "^2.0.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/@csstools/postcss-color-function-display-p3-linear": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@csstools/postcss-color-function-display-p3-linear/-/postcss-color-function-display-p3-linear-1.0.1.tgz", + "integrity": "sha512-E5qusdzhlmO1TztYzDIi8XPdPoYOjoTY6HBYBCYSj+Gn4gQRBlvjgPQXzfzuPQqt8EhkC/SzPKObg4Mbn8/xMg==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "dependencies": { + "@csstools/css-color-parser": "^3.1.0", + "@csstools/css-parser-algorithms": "^3.0.5", + "@csstools/css-tokenizer": "^3.0.4", + "@csstools/postcss-progressive-custom-properties": "^4.2.1", + "@csstools/utilities": "^2.0.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/@csstools/postcss-color-mix-function": { + "version": "3.0.12", + "resolved": "https://registry.npmjs.org/@csstools/postcss-color-mix-function/-/postcss-color-mix-function-3.0.12.tgz", + "integrity": "sha512-4STERZfCP5Jcs13P1U5pTvI9SkgLgfMUMhdXW8IlJWkzOOOqhZIjcNhWtNJZes2nkBDsIKJ0CJtFtuaZ00moag==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "dependencies": { + "@csstools/css-color-parser": "^3.1.0", + "@csstools/css-parser-algorithms": "^3.0.5", + "@csstools/css-tokenizer": "^3.0.4", + "@csstools/postcss-progressive-custom-properties": "^4.2.1", + "@csstools/utilities": "^2.0.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/@csstools/postcss-color-mix-variadic-function-arguments": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@csstools/postcss-color-mix-variadic-function-arguments/-/postcss-color-mix-variadic-function-arguments-1.0.2.tgz", + "integrity": "sha512-rM67Gp9lRAkTo+X31DUqMEq+iK+EFqsidfecmhrteErxJZb6tUoJBVQca1Vn1GpDql1s1rD1pKcuYzMsg7Z1KQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "dependencies": { + "@csstools/css-color-parser": "^3.1.0", + "@csstools/css-parser-algorithms": "^3.0.5", + "@csstools/css-tokenizer": "^3.0.4", + "@csstools/postcss-progressive-custom-properties": "^4.2.1", + "@csstools/utilities": "^2.0.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/@csstools/postcss-content-alt-text": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/@csstools/postcss-content-alt-text/-/postcss-content-alt-text-2.0.8.tgz", + "integrity": "sha512-9SfEW9QCxEpTlNMnpSqFaHyzsiRpZ5J5+KqCu1u5/eEJAWsMhzT40qf0FIbeeglEvrGRMdDzAxMIz3wqoGSb+Q==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "dependencies": { + "@csstools/css-parser-algorithms": "^3.0.5", + "@csstools/css-tokenizer": "^3.0.4", + "@csstools/postcss-progressive-custom-properties": "^4.2.1", + "@csstools/utilities": "^2.0.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/@csstools/postcss-contrast-color-function": { + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@csstools/postcss-contrast-color-function/-/postcss-contrast-color-function-2.0.12.tgz", + "integrity": "sha512-YbwWckjK3qwKjeYz/CijgcS7WDUCtKTd8ShLztm3/i5dhh4NaqzsbYnhm4bjrpFpnLZ31jVcbK8YL77z3GBPzA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "dependencies": { + "@csstools/css-color-parser": "^3.1.0", + "@csstools/css-parser-algorithms": "^3.0.5", + "@csstools/css-tokenizer": "^3.0.4", + "@csstools/postcss-progressive-custom-properties": "^4.2.1", + "@csstools/utilities": "^2.0.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/@csstools/postcss-exponential-functions": { + "version": "2.0.9", + "resolved": "https://registry.npmjs.org/@csstools/postcss-exponential-functions/-/postcss-exponential-functions-2.0.9.tgz", + "integrity": "sha512-abg2W/PI3HXwS/CZshSa79kNWNZHdJPMBXeZNyPQFbbj8sKO3jXxOt/wF7juJVjyDTc6JrvaUZYFcSBZBhaxjw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "dependencies": { + "@csstools/css-calc": "^2.1.4", + "@csstools/css-parser-algorithms": "^3.0.5", + "@csstools/css-tokenizer": "^3.0.4" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/@csstools/postcss-font-format-keywords": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@csstools/postcss-font-format-keywords/-/postcss-font-format-keywords-4.0.0.tgz", + "integrity": "sha512-usBzw9aCRDvchpok6C+4TXC57btc4bJtmKQWOHQxOVKen1ZfVqBUuCZ/wuqdX5GHsD0NRSr9XTP+5ID1ZZQBXw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "dependencies": { + "@csstools/utilities": "^2.0.0", + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/@csstools/postcss-gamut-mapping": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@csstools/postcss-gamut-mapping/-/postcss-gamut-mapping-2.0.11.tgz", + "integrity": "sha512-fCpCUgZNE2piVJKC76zFsgVW1apF6dpYsqGyH8SIeCcM4pTEsRTWTLCaJIMKFEundsCKwY1rwfhtrio04RJ4Dw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "dependencies": { + "@csstools/css-color-parser": "^3.1.0", + "@csstools/css-parser-algorithms": "^3.0.5", + "@csstools/css-tokenizer": "^3.0.4" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/@csstools/postcss-gradients-interpolation-method": { + "version": "5.0.12", + "resolved": "https://registry.npmjs.org/@csstools/postcss-gradients-interpolation-method/-/postcss-gradients-interpolation-method-5.0.12.tgz", + "integrity": "sha512-jugzjwkUY0wtNrZlFeyXzimUL3hN4xMvoPnIXxoZqxDvjZRiSh+itgHcVUWzJ2VwD/VAMEgCLvtaJHX+4Vj3Ow==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "dependencies": { + "@csstools/css-color-parser": "^3.1.0", + "@csstools/css-parser-algorithms": "^3.0.5", + "@csstools/css-tokenizer": "^3.0.4", + "@csstools/postcss-progressive-custom-properties": "^4.2.1", + "@csstools/utilities": "^2.0.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/@csstools/postcss-hwb-function": { + "version": "4.0.12", + "resolved": "https://registry.npmjs.org/@csstools/postcss-hwb-function/-/postcss-hwb-function-4.0.12.tgz", + "integrity": "sha512-mL/+88Z53KrE4JdePYFJAQWFrcADEqsLprExCM04GDNgHIztwFzj0Mbhd/yxMBngq0NIlz58VVxjt5abNs1VhA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "dependencies": { + "@csstools/css-color-parser": "^3.1.0", + "@csstools/css-parser-algorithms": "^3.0.5", + "@csstools/css-tokenizer": "^3.0.4", + "@csstools/postcss-progressive-custom-properties": "^4.2.1", + "@csstools/utilities": "^2.0.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/@csstools/postcss-ic-unit": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@csstools/postcss-ic-unit/-/postcss-ic-unit-4.0.4.tgz", + "integrity": "sha512-yQ4VmossuOAql65sCPppVO1yfb7hDscf4GseF0VCA/DTDaBc0Wtf8MTqVPfjGYlT5+2buokG0Gp7y0atYZpwjg==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "dependencies": { + "@csstools/postcss-progressive-custom-properties": "^4.2.1", + "@csstools/utilities": "^2.0.0", + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/@csstools/postcss-initial": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@csstools/postcss-initial/-/postcss-initial-2.0.1.tgz", + "integrity": "sha512-L1wLVMSAZ4wovznquK0xmC7QSctzO4D0Is590bxpGqhqjboLXYA16dWZpfwImkdOgACdQ9PqXsuRroW6qPlEsg==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/@csstools/postcss-is-pseudo-class": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/@csstools/postcss-is-pseudo-class/-/postcss-is-pseudo-class-5.0.3.tgz", + "integrity": "sha512-jS/TY4SpG4gszAtIg7Qnf3AS2pjcUM5SzxpApOrlndMeGhIbaTzWBzzP/IApXoNWEW7OhcjkRT48jnAUIFXhAQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "dependencies": { + "@csstools/selector-specificity": "^5.0.0", + "postcss-selector-parser": "^7.0.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/@csstools/postcss-is-pseudo-class/node_modules/@csstools/selector-specificity": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-5.0.0.tgz", + "integrity": "sha512-PCqQV3c4CoVm3kdPhyeZ07VmBRdH2EpMFA/pd9OASpOEC3aXNGoqPDAZ80D0cLpMBxnmk0+yNhGsEx31hq7Gtw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss-selector-parser": "^7.0.0" + } + }, + "node_modules/@csstools/postcss-is-pseudo-class/node_modules/postcss-selector-parser": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.1.tgz", + "integrity": "sha512-orRsuYpJVw8LdAwqqLykBj9ecS5/cRHlI5+nvTo8LcCKmzDmqVORXtOIYEEQuL9D4BxtA1lm5isAqzQZCoQ6Eg==", + "license": "MIT", + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@csstools/postcss-light-dark-function": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@csstools/postcss-light-dark-function/-/postcss-light-dark-function-2.0.11.tgz", + "integrity": "sha512-fNJcKXJdPM3Lyrbmgw2OBbaioU7yuKZtiXClf4sGdQttitijYlZMD5K7HrC/eF83VRWRrYq6OZ0Lx92leV2LFA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "dependencies": { + "@csstools/css-parser-algorithms": "^3.0.5", + "@csstools/css-tokenizer": "^3.0.4", + "@csstools/postcss-progressive-custom-properties": "^4.2.1", + "@csstools/utilities": "^2.0.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/@csstools/postcss-logical-float-and-clear": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@csstools/postcss-logical-float-and-clear/-/postcss-logical-float-and-clear-3.0.0.tgz", + "integrity": "sha512-SEmaHMszwakI2rqKRJgE+8rpotFfne1ZS6bZqBoQIicFyV+xT1UF42eORPxJkVJVrH9C0ctUgwMSn3BLOIZldQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/@csstools/postcss-logical-overflow": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@csstools/postcss-logical-overflow/-/postcss-logical-overflow-2.0.0.tgz", + "integrity": "sha512-spzR1MInxPuXKEX2csMamshR4LRaSZ3UXVaRGjeQxl70ySxOhMpP2252RAFsg8QyyBXBzuVOOdx1+bVO5bPIzA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/@csstools/postcss-logical-overscroll-behavior": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@csstools/postcss-logical-overscroll-behavior/-/postcss-logical-overscroll-behavior-2.0.0.tgz", + "integrity": "sha512-e/webMjoGOSYfqLunyzByZj5KKe5oyVg/YSbie99VEaSDE2kimFm0q1f6t/6Jo+VVCQ/jbe2Xy+uX+C4xzWs4w==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/@csstools/postcss-logical-resize": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@csstools/postcss-logical-resize/-/postcss-logical-resize-3.0.0.tgz", + "integrity": "sha512-DFbHQOFW/+I+MY4Ycd/QN6Dg4Hcbb50elIJCfnwkRTCX05G11SwViI5BbBlg9iHRl4ytB7pmY5ieAFk3ws7yyg==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "dependencies": { + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/@csstools/postcss-logical-viewport-units": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@csstools/postcss-logical-viewport-units/-/postcss-logical-viewport-units-3.0.4.tgz", + "integrity": "sha512-q+eHV1haXA4w9xBwZLKjVKAWn3W2CMqmpNpZUk5kRprvSiBEGMgrNH3/sJZ8UA3JgyHaOt3jwT9uFa4wLX4EqQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "dependencies": { + "@csstools/css-tokenizer": "^3.0.4", + "@csstools/utilities": "^2.0.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/@csstools/postcss-media-minmax": { + "version": "2.0.9", + "resolved": "https://registry.npmjs.org/@csstools/postcss-media-minmax/-/postcss-media-minmax-2.0.9.tgz", + "integrity": "sha512-af9Qw3uS3JhYLnCbqtZ9crTvvkR+0Se+bBqSr7ykAnl9yKhk6895z9rf+2F4dClIDJWxgn0iZZ1PSdkhrbs2ig==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT", + "dependencies": { + "@csstools/css-calc": "^2.1.4", + "@csstools/css-parser-algorithms": "^3.0.5", + "@csstools/css-tokenizer": "^3.0.4", + "@csstools/media-query-list-parser": "^4.0.3" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/@csstools/postcss-media-queries-aspect-ratio-number-values": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@csstools/postcss-media-queries-aspect-ratio-number-values/-/postcss-media-queries-aspect-ratio-number-values-3.0.5.tgz", + "integrity": "sha512-zhAe31xaaXOY2Px8IYfoVTB3wglbJUVigGphFLj6exb7cjZRH9A6adyE22XfFK3P2PzwRk0VDeTJmaxpluyrDg==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "dependencies": { + "@csstools/css-parser-algorithms": "^3.0.5", + "@csstools/css-tokenizer": "^3.0.4", + "@csstools/media-query-list-parser": "^4.0.3" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/@csstools/postcss-nested-calc": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@csstools/postcss-nested-calc/-/postcss-nested-calc-4.0.0.tgz", + "integrity": "sha512-jMYDdqrQQxE7k9+KjstC3NbsmC063n1FTPLCgCRS2/qHUbHM0mNy9pIn4QIiQGs9I/Bg98vMqw7mJXBxa0N88A==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "dependencies": { + "@csstools/utilities": "^2.0.0", + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/@csstools/postcss-normalize-display-values": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@csstools/postcss-normalize-display-values/-/postcss-normalize-display-values-4.0.1.tgz", + "integrity": "sha512-TQUGBuRvxdc7TgNSTevYqrL8oItxiwPDixk20qCB5me/W8uF7BPbhRrAvFuhEoywQp/woRsUZ6SJ+sU5idZAIA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "dependencies": { + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/@csstools/postcss-oklab-function": { + "version": "4.0.12", + "resolved": "https://registry.npmjs.org/@csstools/postcss-oklab-function/-/postcss-oklab-function-4.0.12.tgz", + "integrity": "sha512-HhlSmnE1NKBhXsTnNGjxvhryKtO7tJd1w42DKOGFD6jSHtYOrsJTQDKPMwvOfrzUAk8t7GcpIfRyM7ssqHpFjg==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "dependencies": { + "@csstools/css-color-parser": "^3.1.0", + "@csstools/css-parser-algorithms": "^3.0.5", + "@csstools/css-tokenizer": "^3.0.4", + "@csstools/postcss-progressive-custom-properties": "^4.2.1", + "@csstools/utilities": "^2.0.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/@csstools/postcss-position-area-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@csstools/postcss-position-area-property/-/postcss-position-area-property-1.0.0.tgz", + "integrity": "sha512-fUP6KR8qV2NuUZV3Cw8itx0Ep90aRjAZxAEzC3vrl6yjFv+pFsQbR18UuQctEKmA72K9O27CoYiKEgXxkqjg8Q==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/@csstools/postcss-progressive-custom-properties": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/@csstools/postcss-progressive-custom-properties/-/postcss-progressive-custom-properties-4.2.1.tgz", + "integrity": "sha512-uPiiXf7IEKtUQXsxu6uWtOlRMXd2QWWy5fhxHDnPdXKCQckPP3E34ZgDoZ62r2iT+UOgWsSbM4NvHE5m3mAEdw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "dependencies": { + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/@csstools/postcss-property-rule-prelude-list": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@csstools/postcss-property-rule-prelude-list/-/postcss-property-rule-prelude-list-1.0.0.tgz", + "integrity": "sha512-IxuQjUXq19fobgmSSvUDO7fVwijDJaZMvWQugxfEUxmjBeDCVaDuMpsZ31MsTm5xbnhA+ElDi0+rQ7sQQGisFA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "dependencies": { + "@csstools/css-parser-algorithms": "^3.0.5", + "@csstools/css-tokenizer": "^3.0.4" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/@csstools/postcss-random-function": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@csstools/postcss-random-function/-/postcss-random-function-2.0.1.tgz", + "integrity": "sha512-q+FQaNiRBhnoSNo+GzqGOIBKoHQ43lYz0ICrV+UudfWnEF6ksS6DsBIJSISKQT2Bvu3g4k6r7t0zYrk5pDlo8w==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "dependencies": { + "@csstools/css-calc": "^2.1.4", + "@csstools/css-parser-algorithms": "^3.0.5", + "@csstools/css-tokenizer": "^3.0.4" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/@csstools/postcss-relative-color-syntax": { + "version": "3.0.12", + "resolved": "https://registry.npmjs.org/@csstools/postcss-relative-color-syntax/-/postcss-relative-color-syntax-3.0.12.tgz", + "integrity": "sha512-0RLIeONxu/mtxRtf3o41Lq2ghLimw0w9ByLWnnEVuy89exmEEq8bynveBxNW3nyHqLAFEeNtVEmC1QK9MZ8Huw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "dependencies": { + "@csstools/css-color-parser": "^3.1.0", + "@csstools/css-parser-algorithms": "^3.0.5", + "@csstools/css-tokenizer": "^3.0.4", + "@csstools/postcss-progressive-custom-properties": "^4.2.1", + "@csstools/utilities": "^2.0.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/@csstools/postcss-scope-pseudo-class": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@csstools/postcss-scope-pseudo-class/-/postcss-scope-pseudo-class-4.0.1.tgz", + "integrity": "sha512-IMi9FwtH6LMNuLea1bjVMQAsUhFxJnyLSgOp/cpv5hrzWmrUYU5fm0EguNDIIOHUqzXode8F/1qkC/tEo/qN8Q==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "dependencies": { + "postcss-selector-parser": "^7.0.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/@csstools/postcss-scope-pseudo-class/node_modules/postcss-selector-parser": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.1.tgz", + "integrity": "sha512-orRsuYpJVw8LdAwqqLykBj9ecS5/cRHlI5+nvTo8LcCKmzDmqVORXtOIYEEQuL9D4BxtA1lm5isAqzQZCoQ6Eg==", + "license": "MIT", + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@csstools/postcss-sign-functions": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@csstools/postcss-sign-functions/-/postcss-sign-functions-1.1.4.tgz", + "integrity": "sha512-P97h1XqRPcfcJndFdG95Gv/6ZzxUBBISem0IDqPZ7WMvc/wlO+yU0c5D/OCpZ5TJoTt63Ok3knGk64N+o6L2Pg==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "dependencies": { + "@csstools/css-calc": "^2.1.4", + "@csstools/css-parser-algorithms": "^3.0.5", + "@csstools/css-tokenizer": "^3.0.4" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/@csstools/postcss-stepped-value-functions": { + "version": "4.0.9", + "resolved": "https://registry.npmjs.org/@csstools/postcss-stepped-value-functions/-/postcss-stepped-value-functions-4.0.9.tgz", + "integrity": "sha512-h9btycWrsex4dNLeQfyU3y3w40LMQooJWFMm/SK9lrKguHDcFl4VMkncKKoXi2z5rM9YGWbUQABI8BT2UydIcA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "dependencies": { + "@csstools/css-calc": "^2.1.4", + "@csstools/css-parser-algorithms": "^3.0.5", + "@csstools/css-tokenizer": "^3.0.4" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/@csstools/postcss-syntax-descriptor-syntax-production": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@csstools/postcss-syntax-descriptor-syntax-production/-/postcss-syntax-descriptor-syntax-production-1.0.1.tgz", + "integrity": "sha512-GneqQWefjM//f4hJ/Kbox0C6f2T7+pi4/fqTqOFGTL3EjnvOReTqO1qUQ30CaUjkwjYq9qZ41hzarrAxCc4gow==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "dependencies": { + "@csstools/css-tokenizer": "^3.0.4" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/@csstools/postcss-system-ui-font-family": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@csstools/postcss-system-ui-font-family/-/postcss-system-ui-font-family-1.0.0.tgz", + "integrity": "sha512-s3xdBvfWYfoPSBsikDXbuorcMG1nN1M6GdU0qBsGfcmNR0A/qhloQZpTxjA3Xsyrk1VJvwb2pOfiOT3at/DuIQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "dependencies": { + "@csstools/css-parser-algorithms": "^3.0.5", + "@csstools/css-tokenizer": "^3.0.4" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/@csstools/postcss-text-decoration-shorthand": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@csstools/postcss-text-decoration-shorthand/-/postcss-text-decoration-shorthand-4.0.3.tgz", + "integrity": "sha512-KSkGgZfx0kQjRIYnpsD7X2Om9BUXX/Kii77VBifQW9Ih929hK0KNjVngHDH0bFB9GmfWcR9vJYJJRvw/NQjkrA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "dependencies": { + "@csstools/color-helpers": "^5.1.0", + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/@csstools/postcss-trigonometric-functions": { + "version": "4.0.9", + "resolved": "https://registry.npmjs.org/@csstools/postcss-trigonometric-functions/-/postcss-trigonometric-functions-4.0.9.tgz", + "integrity": "sha512-Hnh5zJUdpNrJqK9v1/E3BbrQhaDTj5YiX7P61TOvUhoDHnUmsNNxcDAgkQ32RrcWx9GVUvfUNPcUkn8R3vIX6A==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "dependencies": { + "@csstools/css-calc": "^2.1.4", + "@csstools/css-parser-algorithms": "^3.0.5", + "@csstools/css-tokenizer": "^3.0.4" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/@csstools/postcss-unset-value": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@csstools/postcss-unset-value/-/postcss-unset-value-4.0.0.tgz", + "integrity": "sha512-cBz3tOCI5Fw6NIFEwU3RiwK6mn3nKegjpJuzCndoGq3BZPkUjnsq7uQmIeMNeMbMk7YD2MfKcgCpZwX5jyXqCA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/@csstools/utilities": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@csstools/utilities/-/utilities-2.0.0.tgz", + "integrity": "sha512-5VdOr0Z71u+Yp3ozOx8T11N703wIFGVRgOWbOZMKgglPJsWA54MRIoMNVMa7shUToIhx5J8vX4sOZgD2XiihiQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, "node_modules/@discoveryjs/json-ext": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", @@ -2388,27 +3393,48 @@ "node": ">=10.0.0" } }, + "node_modules/@docsearch/core": { + "version": "4.6.3", + "resolved": "https://registry.npmjs.org/@docsearch/core/-/core-4.6.3.tgz", + "integrity": "sha512-rUOujwIpxJRgD7+kicVsI3D5sqBvdiRTquzWBpTEXZs8ZXfGbfzpus5HqumaNYTppN2HvH8E2yNuRwYdHJeOlA==", + "license": "MIT", + "peerDependencies": { + "@types/react": ">= 16.8.0 < 20.0.0", + "react": ">= 16.8.0 < 20.0.0", + "react-dom": ">= 16.8.0 < 20.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "react": { + "optional": true + }, + "react-dom": { + "optional": true + } + } + }, "node_modules/@docsearch/css": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/@docsearch/css/-/css-3.6.1.tgz", - "integrity": "sha512-VtVb5DS+0hRIprU2CO6ZQjK2Zg4QU5HrDM1+ix6rT0umsYvFvatMAnf97NHZlVWDaaLlx7GRfR/7FikANiM2Fg==", + "version": "4.6.3", + "resolved": "https://registry.npmjs.org/@docsearch/css/-/css-4.6.3.tgz", + "integrity": "sha512-nlOwcXcsNAptQl4vlL4MA78qNJKO0Qlds5GuBjCoePgkebTXLSf8Qt1oyZ3YBshYupKXG9VRGEsk1zr23d+bzQ==", "license": "MIT" }, "node_modules/@docsearch/react": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/@docsearch/react/-/react-3.6.1.tgz", - "integrity": "sha512-qXZkEPvybVhSXj0K7U3bXc233tk5e8PfhoZ6MhPOiik/qUQxYC+Dn9DnoS7CxHQQhHfCvTiN0eY9M12oRghEXw==", + "version": "4.6.3", + "resolved": "https://registry.npmjs.org/@docsearch/react/-/react-4.6.3.tgz", + "integrity": "sha512-Bg2wdDsoQVlNCcEKuEJAU04tvHCqgx8rIu+uIoM4pRtcx3TBKJuXutJik3LTA8LRc9YEyHkrYUrmcC0D7BYf+g==", "license": "MIT", "dependencies": { - "@algolia/autocomplete-core": "1.9.3", - "@algolia/autocomplete-preset-algolia": "1.9.3", - "@docsearch/css": "3.6.1", - "algoliasearch": "^4.19.1" + "@algolia/autocomplete-core": "1.19.2", + "@docsearch/core": "4.6.3", + "@docsearch/css": "4.6.3" }, "peerDependencies": { - "@types/react": ">= 16.8.0 < 19.0.0", - "react": ">= 16.8.0 < 19.0.0", - "react-dom": ">= 16.8.0 < 19.0.0", + "@types/react": ">= 16.8.0 < 20.0.0", + "react": ">= 16.8.0 < 20.0.0", + "react-dom": ">= 16.8.0 < 20.0.0", "search-insights": ">= 1 < 3" }, "peerDependenciesMeta": { @@ -2426,137 +3452,217 @@ } } }, - "node_modules/@docusaurus/core": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/@docusaurus/core/-/core-3.5.2.tgz", - "integrity": "sha512-4Z1WkhCSkX4KO0Fw5m/Vuc7Q3NxBG53NE5u59Rs96fWkMPZVSrzEPP16/Nk6cWb/shK7xXPndTmalJtw7twL/w==", + "node_modules/@docsearch/react/node_modules/@algolia/autocomplete-core": { + "version": "1.19.2", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-core/-/autocomplete-core-1.19.2.tgz", + "integrity": "sha512-mKv7RyuAzXvwmq+0XRK8HqZXt9iZ5Kkm2huLjgn5JoCPtDy+oh9yxUMfDDaVCw0oyzZ1isdJBc7l9nuCyyR7Nw==", "license": "MIT", "dependencies": { - "@babel/core": "^7.23.3", - "@babel/generator": "^7.23.3", + "@algolia/autocomplete-plugin-algolia-insights": "1.19.2", + "@algolia/autocomplete-shared": "1.19.2" + } + }, + "node_modules/@docsearch/react/node_modules/@algolia/autocomplete-plugin-algolia-insights": { + "version": "1.19.2", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-plugin-algolia-insights/-/autocomplete-plugin-algolia-insights-1.19.2.tgz", + "integrity": "sha512-TjxbcC/r4vwmnZaPwrHtkXNeqvlpdyR+oR9Wi2XyfORkiGkLTVhX2j+O9SaCCINbKoDfc+c2PB8NjfOnz7+oKg==", + "license": "MIT", + "dependencies": { + "@algolia/autocomplete-shared": "1.19.2" + }, + "peerDependencies": { + "search-insights": ">= 1 < 3" + } + }, + "node_modules/@docsearch/react/node_modules/@algolia/autocomplete-shared": { + "version": "1.19.2", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-shared/-/autocomplete-shared-1.19.2.tgz", + "integrity": "sha512-jEazxZTVD2nLrC+wYlVHQgpBoBB5KPStrJxLzsIFl6Kqd1AlG9sIAGl39V5tECLpIQzB3Qa2T6ZPJ1ChkwMK/w==", + "license": "MIT", + "peerDependencies": { + "@algolia/client-search": ">= 4.9.1 < 6", + "algoliasearch": ">= 4.9.1 < 6" + } + }, + "node_modules/@docusaurus/babel": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/@docusaurus/babel/-/babel-3.10.1.tgz", + "integrity": "sha512-DZzFO1K3v/GoEt1fx1DiYHF4en+PuhtQf1AkQJa5zu3CoeKSpr5cpQRUlz3jr0m44wyzmSXu9bVpfir+N4+8bg==", + "license": "MIT", + "dependencies": { + "@babel/core": "^7.25.9", + "@babel/generator": "^7.25.9", "@babel/plugin-syntax-dynamic-import": "^7.8.3", - "@babel/plugin-transform-runtime": "^7.22.9", - "@babel/preset-env": "^7.22.9", - "@babel/preset-react": "^7.22.5", - "@babel/preset-typescript": "^7.22.5", - "@babel/runtime": "^7.22.6", - "@babel/runtime-corejs3": "^7.22.6", - "@babel/traverse": "^7.22.8", - "@docusaurus/cssnano-preset": "3.5.2", - "@docusaurus/logger": "3.5.2", - "@docusaurus/mdx-loader": "3.5.2", - "@docusaurus/utils": "3.5.2", - "@docusaurus/utils-common": "3.5.2", - "@docusaurus/utils-validation": "3.5.2", - "autoprefixer": "^10.4.14", - "babel-loader": "^9.1.3", + "@babel/plugin-transform-runtime": "^7.25.9", + "@babel/preset-env": "^7.25.9", + "@babel/preset-react": "^7.25.9", + "@babel/preset-typescript": "^7.25.9", + "@babel/runtime": "^7.25.9", + "@babel/traverse": "^7.25.9", + "@docusaurus/logger": "3.10.1", + "@docusaurus/utils": "3.10.1", "babel-plugin-dynamic-import-node": "^2.3.3", + "fs-extra": "^11.1.1", + "tslib": "^2.6.0" + }, + "engines": { + "node": ">=20.0" + } + }, + "node_modules/@docusaurus/bundler": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/@docusaurus/bundler/-/bundler-3.10.1.tgz", + "integrity": "sha512-HIqQPvbqnnQRe4NsBd1774KRarjXqS6wHsWELtyuSs1gCfvixJO2jUGH/OEBtr1Gvzpw+ze5CjGMvSJ8UE1KUw==", + "license": "MIT", + "dependencies": { + "@babel/core": "^7.25.9", + "@docusaurus/babel": "3.10.1", + "@docusaurus/cssnano-preset": "3.10.1", + "@docusaurus/logger": "3.10.1", + "@docusaurus/types": "3.10.1", + "@docusaurus/utils": "3.10.1", + "babel-loader": "^9.2.1", + "clean-css": "^5.3.3", + "copy-webpack-plugin": "^11.0.0", + "css-loader": "^6.11.0", + "css-minimizer-webpack-plugin": "^5.0.1", + "cssnano": "^6.1.2", + "file-loader": "^6.2.0", + "html-minifier-terser": "^7.2.0", + "mini-css-extract-plugin": "^2.9.2", + "null-loader": "^4.0.1", + "postcss": "^8.5.4", + "postcss-loader": "^7.3.4", + "postcss-preset-env": "^10.2.1", + "terser-webpack-plugin": "^5.3.9", + "tslib": "^2.6.0", + "url-loader": "^4.1.1", + "webpack": "^5.95.0", + "webpackbar": "^7.0.0" + }, + "engines": { + "node": ">=20.0" + }, + "peerDependencies": { + "@docusaurus/faster": "*" + }, + "peerDependenciesMeta": { + "@docusaurus/faster": { + "optional": true + } + } + }, + "node_modules/@docusaurus/core": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/@docusaurus/core/-/core-3.10.1.tgz", + "integrity": "sha512-3pf2fXXw0eVk8WnC3T4LIigRDupcpvngpKo9Vy7mYyBhuddc0klDUuZAIfzMoK6z05pdlk6EFC/vBSX43+1O5w==", + "license": "MIT", + "dependencies": { + "@docusaurus/babel": "3.10.1", + "@docusaurus/bundler": "3.10.1", + "@docusaurus/logger": "3.10.1", + "@docusaurus/mdx-loader": "3.10.1", + "@docusaurus/utils": "3.10.1", + "@docusaurus/utils-common": "3.10.1", + "@docusaurus/utils-validation": "3.10.1", "boxen": "^6.2.1", "chalk": "^4.1.2", "chokidar": "^3.5.3", - "clean-css": "^5.3.2", "cli-table3": "^0.6.3", "combine-promises": "^1.1.0", "commander": "^5.1.0", - "copy-webpack-plugin": "^11.0.0", "core-js": "^3.31.1", - "css-loader": "^6.8.1", - "css-minimizer-webpack-plugin": "^5.0.1", - "cssnano": "^6.1.2", - "del": "^6.1.1", "detect-port": "^1.5.1", "escape-html": "^1.0.3", "eta": "^2.2.0", "eval": "^0.1.8", - "file-loader": "^6.2.0", + "execa": "^5.1.1", "fs-extra": "^11.1.1", - "html-minifier-terser": "^7.2.0", "html-tags": "^3.3.1", - "html-webpack-plugin": "^5.5.3", + "html-webpack-plugin": "^5.6.0", "leven": "^3.1.0", "lodash": "^4.17.21", - "mini-css-extract-plugin": "^2.7.6", + "open": "^8.4.0", "p-map": "^4.0.0", - "postcss": "^8.4.26", - "postcss-loader": "^7.3.3", "prompts": "^2.4.2", - "react-dev-utils": "^12.0.1", - "react-helmet-async": "^1.3.0", + "react-helmet-async": "npm:@slorber/react-helmet-async@1.3.0", "react-loadable": "npm:@docusaurus/react-loadable@6.0.0", - "react-loadable-ssr-addon-v5-slorber": "^1.0.1", + "react-loadable-ssr-addon-v5-slorber": "^1.0.3", "react-router": "^5.3.4", "react-router-config": "^5.1.1", "react-router-dom": "^5.3.4", - "rtl-detect": "^1.0.4", "semver": "^7.5.4", - "serve-handler": "^6.1.5", - "shelljs": "^0.8.5", - "terser-webpack-plugin": "^5.3.9", + "serve-handler": "^6.1.7", + "tinypool": "^1.0.2", "tslib": "^2.6.0", "update-notifier": "^6.0.2", - "url-loader": "^4.1.1", - "webpack": "^5.88.1", - "webpack-bundle-analyzer": "^4.9.0", - "webpack-dev-server": "^4.15.1", - "webpack-merge": "^5.9.0", - "webpackbar": "^5.0.2" + "webpack": "^5.95.0", + "webpack-bundle-analyzer": "^4.10.2", + "webpack-dev-server": "^5.2.2", + "webpack-merge": "^6.0.1" }, "bin": { "docusaurus": "bin/docusaurus.mjs" }, "engines": { - "node": ">=18.0" + "node": ">=20.0" }, "peerDependencies": { + "@docusaurus/faster": "*", "@mdx-js/react": "^3.0.0", - "react": "^18.0.0", - "react-dom": "^18.0.0" + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@docusaurus/faster": { + "optional": true + } } }, "node_modules/@docusaurus/cssnano-preset": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/@docusaurus/cssnano-preset/-/cssnano-preset-3.5.2.tgz", - "integrity": "sha512-D3KiQXOMA8+O0tqORBrTOEQyQxNIfPm9jEaJoALjjSjc2M/ZAWcUfPQEnwr2JB2TadHw2gqWgpZckQmrVWkytA==", + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/@docusaurus/cssnano-preset/-/cssnano-preset-3.10.1.tgz", + "integrity": "sha512-eNfHGcTKCSq6xmcavAkX3RRclHaE2xRCMParlDXLdXVP01/a2e/jKXMj/0ULnLFQSNwwuI62L0Ge8J+nZsR7UQ==", "license": "MIT", "dependencies": { "cssnano-preset-advanced": "^6.1.2", - "postcss": "^8.4.38", + "postcss": "^8.5.4", "postcss-sort-media-queries": "^5.2.0", "tslib": "^2.6.0" }, "engines": { - "node": ">=18.0" + "node": ">=20.0" } }, "node_modules/@docusaurus/logger": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/@docusaurus/logger/-/logger-3.5.2.tgz", - "integrity": "sha512-LHC540SGkeLfyT3RHK3gAMK6aS5TRqOD4R72BEU/DE2M/TY8WwEUAMY576UUc/oNJXv8pGhBmQB6N9p3pt8LQw==", + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/@docusaurus/logger/-/logger-3.10.1.tgz", + "integrity": "sha512-oPjNFnfJsRCkePVjkGrxWGq4MvJKRQT0r9jOP0eRBTZ7Wr9FAbzdP/Gjs0I2Ss6YRkPoEgygKG112OkE6skvJw==", "license": "MIT", "dependencies": { "chalk": "^4.1.2", "tslib": "^2.6.0" }, "engines": { - "node": ">=18.0" + "node": ">=20.0" } }, "node_modules/@docusaurus/mdx-loader": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/@docusaurus/mdx-loader/-/mdx-loader-3.5.2.tgz", - "integrity": "sha512-ku3xO9vZdwpiMIVd8BzWV0DCqGEbCP5zs1iHfKX50vw6jX8vQo0ylYo1YJMZyz6e+JFJ17HYHT5FzVidz2IflA==", + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/@docusaurus/mdx-loader/-/mdx-loader-3.10.1.tgz", + "integrity": "sha512-GRmeb/wQ+iXRrFwcHBfgQhrJxGElgCsoTWZYDhccjsZVne1p8MK/EpQVIloXttz76TCe78kKD5AEG9n1xc1oxQ==", "license": "MIT", "dependencies": { - "@docusaurus/logger": "3.5.2", - "@docusaurus/utils": "3.5.2", - "@docusaurus/utils-validation": "3.5.2", + "@docusaurus/logger": "3.10.1", + "@docusaurus/utils": "3.10.1", + "@docusaurus/utils-validation": "3.10.1", "@mdx-js/mdx": "^3.0.0", "@slorber/remark-comment": "^1.0.0", "escape-html": "^1.0.3", "estree-util-value-to-estree": "^3.0.1", "file-loader": "^6.2.0", "fs-extra": "^11.1.1", - "image-size": "^1.0.2", + "image-size": "^2.0.2", "mdast-util-mdx": "^3.0.0", "mdast-util-to-string": "^4.0.0", "rehype-raw": "^7.0.0", @@ -2573,25 +3679,25 @@ "webpack": "^5.88.1" }, "engines": { - "node": ">=18.0" + "node": ">=20.0" }, "peerDependencies": { - "react": "^18.0.0", - "react-dom": "^18.0.0" + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" } }, "node_modules/@docusaurus/module-type-aliases": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/@docusaurus/module-type-aliases/-/module-type-aliases-3.5.2.tgz", - "integrity": "sha512-Z+Xu3+2rvKef/YKTMxZHsEXp1y92ac0ngjDiExRdqGTmEKtCUpkbNYH8v5eXo5Ls+dnW88n6WTa+Q54kLOkwPg==", + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/@docusaurus/module-type-aliases/-/module-type-aliases-3.10.1.tgz", + "integrity": "sha512-YoOZKUdGlp8xSYhuAkGdSo5Ydkbq4V4eK3sD8v0a2hloxCWdQbNBhkc+Ko9QyjpESc0BYcIGM5iHVAy5hdFV6w==", "license": "MIT", "dependencies": { - "@docusaurus/types": "3.5.2", + "@docusaurus/types": "3.10.1", "@types/history": "^4.7.11", "@types/react": "*", "@types/react-router-config": "*", "@types/react-router-dom": "*", - "react-helmet-async": "*", + "react-helmet-async": "npm:@slorber/react-helmet-async@1.3.0", "react-loadable": "npm:@docusaurus/react-loadable@6.0.0" }, "peerDependencies": { @@ -2600,24 +3706,25 @@ } }, "node_modules/@docusaurus/plugin-content-blog": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-blog/-/plugin-content-blog-3.5.2.tgz", - "integrity": "sha512-R7ghWnMvjSf+aeNDH0K4fjyQnt5L0KzUEnUhmf1e3jZrv3wogeytZNN6n7X8yHcMsuZHPOrctQhXWnmxu+IRRg==", + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-blog/-/plugin-content-blog-3.10.1.tgz", + "integrity": "sha512-mmkgE6Q2+K74tnkou7tXlpDLvoCU/qkSa2GSQ3XUiHWvcebCoDQzS670RR3tO8PmaWlIyWWISYWzZLuMfxunRA==", "license": "MIT", "dependencies": { - "@docusaurus/core": "3.5.2", - "@docusaurus/logger": "3.5.2", - "@docusaurus/mdx-loader": "3.5.2", - "@docusaurus/theme-common": "3.5.2", - "@docusaurus/types": "3.5.2", - "@docusaurus/utils": "3.5.2", - "@docusaurus/utils-common": "3.5.2", - "@docusaurus/utils-validation": "3.5.2", + "@docusaurus/core": "3.10.1", + "@docusaurus/logger": "3.10.1", + "@docusaurus/mdx-loader": "3.10.1", + "@docusaurus/theme-common": "3.10.1", + "@docusaurus/types": "3.10.1", + "@docusaurus/utils": "3.10.1", + "@docusaurus/utils-common": "3.10.1", + "@docusaurus/utils-validation": "3.10.1", "cheerio": "1.0.0-rc.12", + "combine-promises": "^1.1.0", "feed": "^4.2.2", "fs-extra": "^11.1.1", "lodash": "^4.17.21", - "reading-time": "^1.5.0", + "schema-dts": "^1.1.2", "srcset": "^4.0.0", "tslib": "^2.6.0", "unist-util-visit": "^5.0.0", @@ -2625,225 +3732,268 @@ "webpack": "^5.88.1" }, "engines": { - "node": ">=18.0" + "node": ">=20.0" }, "peerDependencies": { "@docusaurus/plugin-content-docs": "*", - "react": "^18.0.0", - "react-dom": "^18.0.0" + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" } }, "node_modules/@docusaurus/plugin-content-docs": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-docs/-/plugin-content-docs-3.5.2.tgz", - "integrity": "sha512-Bt+OXn/CPtVqM3Di44vHjE7rPCEsRCB/DMo2qoOuozB9f7+lsdrHvD0QCHdBs0uhz6deYJDppAr2VgqybKPlVQ==", + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-docs/-/plugin-content-docs-3.10.1.tgz", + "integrity": "sha512-2jRVrtzjf8LClGTHQlwlwuD3wQXRx3WEoF7XUarJ8Ou+0onV+SLtejsyfY9JLpfUh9hPhXM4pbBGkyAY4Bi3HQ==", "license": "MIT", "dependencies": { - "@docusaurus/core": "3.5.2", - "@docusaurus/logger": "3.5.2", - "@docusaurus/mdx-loader": "3.5.2", - "@docusaurus/module-type-aliases": "3.5.2", - "@docusaurus/theme-common": "3.5.2", - "@docusaurus/types": "3.5.2", - "@docusaurus/utils": "3.5.2", - "@docusaurus/utils-common": "3.5.2", - "@docusaurus/utils-validation": "3.5.2", + "@docusaurus/core": "3.10.1", + "@docusaurus/logger": "3.10.1", + "@docusaurus/mdx-loader": "3.10.1", + "@docusaurus/module-type-aliases": "3.10.1", + "@docusaurus/theme-common": "3.10.1", + "@docusaurus/types": "3.10.1", + "@docusaurus/utils": "3.10.1", + "@docusaurus/utils-common": "3.10.1", + "@docusaurus/utils-validation": "3.10.1", "@types/react-router-config": "^5.0.7", "combine-promises": "^1.1.0", "fs-extra": "^11.1.1", "js-yaml": "^4.1.0", "lodash": "^4.17.21", + "schema-dts": "^1.1.2", "tslib": "^2.6.0", "utility-types": "^3.10.0", "webpack": "^5.88.1" }, "engines": { - "node": ">=18.0" + "node": ">=20.0" }, "peerDependencies": { - "react": "^18.0.0", - "react-dom": "^18.0.0" + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" } }, "node_modules/@docusaurus/plugin-content-pages": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-pages/-/plugin-content-pages-3.5.2.tgz", - "integrity": "sha512-WzhHjNpoQAUz/ueO10cnundRz+VUtkjFhhaQ9jApyv1a46FPURO4cef89pyNIOMny1fjDz/NUN2z6Yi+5WUrCw==", + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-pages/-/plugin-content-pages-3.10.1.tgz", + "integrity": "sha512-huJpaRPMl42nsFwuCXvV8bVDj2MazuwRJIUylI/RSlmZeJssVoZXeCjVf1y+1Drtpa9SKcdGn8yoJ76IRJijtw==", "license": "MIT", "dependencies": { - "@docusaurus/core": "3.5.2", - "@docusaurus/mdx-loader": "3.5.2", - "@docusaurus/types": "3.5.2", - "@docusaurus/utils": "3.5.2", - "@docusaurus/utils-validation": "3.5.2", + "@docusaurus/core": "3.10.1", + "@docusaurus/mdx-loader": "3.10.1", + "@docusaurus/types": "3.10.1", + "@docusaurus/utils": "3.10.1", + "@docusaurus/utils-validation": "3.10.1", "fs-extra": "^11.1.1", "tslib": "^2.6.0", "webpack": "^5.88.1" }, "engines": { - "node": ">=18.0" + "node": ">=20.0" }, "peerDependencies": { - "react": "^18.0.0", - "react-dom": "^18.0.0" + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" + } + }, + "node_modules/@docusaurus/plugin-css-cascade-layers": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-css-cascade-layers/-/plugin-css-cascade-layers-3.10.1.tgz", + "integrity": "sha512-r//fn+MNHkE1wCof8T29VAQezt1enGCpsFxoziBbvLgBM4JfXN2P3rxrBaavHmvLvm7lYkpJeitcDthwnmWCTw==", + "license": "MIT", + "dependencies": { + "@docusaurus/core": "3.10.1", + "@docusaurus/types": "3.10.1", + "@docusaurus/utils": "3.10.1", + "@docusaurus/utils-validation": "3.10.1", + "tslib": "^2.6.0" + }, + "engines": { + "node": ">=20.0" } }, "node_modules/@docusaurus/plugin-debug": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-debug/-/plugin-debug-3.5.2.tgz", - "integrity": "sha512-kBK6GlN0itCkrmHuCS6aX1wmoWc5wpd5KJlqQ1FyrF0cLDnvsYSnh7+ftdwzt7G6lGBho8lrVwkkL9/iQvaSOA==", + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-debug/-/plugin-debug-3.10.1.tgz", + "integrity": "sha512-9KqOpKNfAyqGZykRb9LhIT/vyRF6sm/ykhjj/39JvaJahDS+jZJE0Z1Wfz9q3DUNDTMNN0Q7u/kk4rKKU+IJuA==", "license": "MIT", "dependencies": { - "@docusaurus/core": "3.5.2", - "@docusaurus/types": "3.5.2", - "@docusaurus/utils": "3.5.2", + "@docusaurus/core": "3.10.1", + "@docusaurus/types": "3.10.1", + "@docusaurus/utils": "3.10.1", "fs-extra": "^11.1.1", - "react-json-view-lite": "^1.2.0", + "react-json-view-lite": "^2.3.0", "tslib": "^2.6.0" }, "engines": { - "node": ">=18.0" + "node": ">=20.0" }, "peerDependencies": { - "react": "^18.0.0", - "react-dom": "^18.0.0" + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" } }, "node_modules/@docusaurus/plugin-google-analytics": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-google-analytics/-/plugin-google-analytics-3.5.2.tgz", - "integrity": "sha512-rjEkJH/tJ8OXRE9bwhV2mb/WP93V441rD6XnM6MIluu7rk8qg38iSxS43ga2V2Q/2ib53PcqbDEJDG/yWQRJhQ==", + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-google-analytics/-/plugin-google-analytics-3.10.1.tgz", + "integrity": "sha512-8o0P1KtmgdYQHH+oInitPpRWI0Of5XednAX4+DMhQNSmGSRNrsEEHg1ebv35m9AgRClfAytCJ5jA9KvcASTyuA==", "license": "MIT", "dependencies": { - "@docusaurus/core": "3.5.2", - "@docusaurus/types": "3.5.2", - "@docusaurus/utils-validation": "3.5.2", + "@docusaurus/core": "3.10.1", + "@docusaurus/types": "3.10.1", + "@docusaurus/utils-validation": "3.10.1", "tslib": "^2.6.0" }, "engines": { - "node": ">=18.0" + "node": ">=20.0" }, "peerDependencies": { - "react": "^18.0.0", - "react-dom": "^18.0.0" + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" } }, "node_modules/@docusaurus/plugin-google-gtag": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-google-gtag/-/plugin-google-gtag-3.5.2.tgz", - "integrity": "sha512-lm8XL3xLkTPHFKKjLjEEAHUrW0SZBSHBE1I+i/tmYMBsjCcUB5UJ52geS5PSiOCFVR74tbPGcPHEV/gaaxFeSA==", + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-google-gtag/-/plugin-google-gtag-3.10.1.tgz", + "integrity": "sha512-pu3xIUo5o/zCMLfUY9BO5KOwSH0zIsAGyFRPvXHayFSA5XIhCU/SFuB0g0ZNjFn9niZLCaNvoeAuOGFJZq0fdw==", "license": "MIT", "dependencies": { - "@docusaurus/core": "3.5.2", - "@docusaurus/types": "3.5.2", - "@docusaurus/utils-validation": "3.5.2", - "@types/gtag.js": "^0.0.12", + "@docusaurus/core": "3.10.1", + "@docusaurus/types": "3.10.1", + "@docusaurus/utils-validation": "3.10.1", + "@types/gtag.js": "^0.0.20", "tslib": "^2.6.0" }, "engines": { - "node": ">=18.0" + "node": ">=20.0" }, "peerDependencies": { - "react": "^18.0.0", - "react-dom": "^18.0.0" + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" } }, "node_modules/@docusaurus/plugin-google-tag-manager": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-google-tag-manager/-/plugin-google-tag-manager-3.5.2.tgz", - "integrity": "sha512-QkpX68PMOMu10Mvgvr5CfZAzZQFx8WLlOiUQ/Qmmcl6mjGK6H21WLT5x7xDmcpCoKA/3CegsqIqBR+nA137lQg==", + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-google-tag-manager/-/plugin-google-tag-manager-3.10.1.tgz", + "integrity": "sha512-f6fyGHiCm7kJHBtAisGQS5oNBnpnMTYQZxDXeVrnw/3zWU+LMA22pr6UHGYkBKDbN+qPC5QHG3NuOfzQLq3+Lw==", "license": "MIT", "dependencies": { - "@docusaurus/core": "3.5.2", - "@docusaurus/types": "3.5.2", - "@docusaurus/utils-validation": "3.5.2", + "@docusaurus/core": "3.10.1", + "@docusaurus/types": "3.10.1", + "@docusaurus/utils-validation": "3.10.1", "tslib": "^2.6.0" }, "engines": { - "node": ">=18.0" + "node": ">=20.0" }, "peerDependencies": { - "react": "^18.0.0", - "react-dom": "^18.0.0" + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" } }, "node_modules/@docusaurus/plugin-sitemap": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-sitemap/-/plugin-sitemap-3.5.2.tgz", - "integrity": "sha512-DnlqYyRAdQ4NHY28TfHuVk414ft2uruP4QWCH//jzpHjqvKyXjj2fmDtI8RPUBh9K8iZKFMHRnLtzJKySPWvFA==", + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-sitemap/-/plugin-sitemap-3.10.1.tgz", + "integrity": "sha512-C26MbmmqgdjkDq1htaZ3aD7LzEDKFWXfpyQpt0EOUThuq5nV77zDaedV20yHcVo9p+3ey9aZ4pbHA0D3QcZTzg==", "license": "MIT", "dependencies": { - "@docusaurus/core": "3.5.2", - "@docusaurus/logger": "3.5.2", - "@docusaurus/types": "3.5.2", - "@docusaurus/utils": "3.5.2", - "@docusaurus/utils-common": "3.5.2", - "@docusaurus/utils-validation": "3.5.2", + "@docusaurus/core": "3.10.1", + "@docusaurus/logger": "3.10.1", + "@docusaurus/types": "3.10.1", + "@docusaurus/utils": "3.10.1", + "@docusaurus/utils-common": "3.10.1", + "@docusaurus/utils-validation": "3.10.1", "fs-extra": "^11.1.1", "sitemap": "^7.1.1", "tslib": "^2.6.0" }, "engines": { - "node": ">=18.0" + "node": ">=20.0" }, "peerDependencies": { - "react": "^18.0.0", - "react-dom": "^18.0.0" + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" + } + }, + "node_modules/@docusaurus/plugin-svgr": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-svgr/-/plugin-svgr-3.10.1.tgz", + "integrity": "sha512-6SFxsmjWFkVLDmBUvFK6i72QjUwqyQFe4Ovz+SUJophJjOyVG3ZZG5IQpBC/kX/Gfv1yWeU9nWauH6F6Q7QX/Q==", + "license": "MIT", + "dependencies": { + "@docusaurus/core": "3.10.1", + "@docusaurus/types": "3.10.1", + "@docusaurus/utils": "3.10.1", + "@docusaurus/utils-validation": "3.10.1", + "@svgr/core": "8.1.0", + "@svgr/webpack": "^8.1.0", + "tslib": "^2.6.0", + "webpack": "^5.88.1" + }, + "engines": { + "node": ">=20.0" + }, + "peerDependencies": { + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" } }, "node_modules/@docusaurus/preset-classic": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/@docusaurus/preset-classic/-/preset-classic-3.5.2.tgz", - "integrity": "sha512-3ihfXQ95aOHiLB5uCu+9PRy2gZCeSZoDcqpnDvf3B+sTrMvMTr8qRUzBvWkoIqc82yG5prCboRjk1SVILKx6sg==", + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/@docusaurus/preset-classic/-/preset-classic-3.10.1.tgz", + "integrity": "sha512-YO/FL8v1zmbxoTso6mjMz/RDjhaTJxb1UpFFTDdY5847LLDCeyYiYlrhyTbgN1RIN3xnkLKZ9Lj1x8hUzI4JOg==", "license": "MIT", "dependencies": { - "@docusaurus/core": "3.5.2", - "@docusaurus/plugin-content-blog": "3.5.2", - "@docusaurus/plugin-content-docs": "3.5.2", - "@docusaurus/plugin-content-pages": "3.5.2", - "@docusaurus/plugin-debug": "3.5.2", - "@docusaurus/plugin-google-analytics": "3.5.2", - "@docusaurus/plugin-google-gtag": "3.5.2", - "@docusaurus/plugin-google-tag-manager": "3.5.2", - "@docusaurus/plugin-sitemap": "3.5.2", - "@docusaurus/theme-classic": "3.5.2", - "@docusaurus/theme-common": "3.5.2", - "@docusaurus/theme-search-algolia": "3.5.2", - "@docusaurus/types": "3.5.2" + "@docusaurus/core": "3.10.1", + "@docusaurus/plugin-content-blog": "3.10.1", + "@docusaurus/plugin-content-docs": "3.10.1", + "@docusaurus/plugin-content-pages": "3.10.1", + "@docusaurus/plugin-css-cascade-layers": "3.10.1", + "@docusaurus/plugin-debug": "3.10.1", + "@docusaurus/plugin-google-analytics": "3.10.1", + "@docusaurus/plugin-google-gtag": "3.10.1", + "@docusaurus/plugin-google-tag-manager": "3.10.1", + "@docusaurus/plugin-sitemap": "3.10.1", + "@docusaurus/plugin-svgr": "3.10.1", + "@docusaurus/theme-classic": "3.10.1", + "@docusaurus/theme-common": "3.10.1", + "@docusaurus/theme-search-algolia": "3.10.1", + "@docusaurus/types": "3.10.1" }, "engines": { - "node": ">=18.0" + "node": ">=20.0" }, "peerDependencies": { - "react": "^18.0.0", - "react-dom": "^18.0.0" + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" } }, "node_modules/@docusaurus/theme-classic": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/@docusaurus/theme-classic/-/theme-classic-3.5.2.tgz", - "integrity": "sha512-XRpinSix3NBv95Rk7xeMF9k4safMkwnpSgThn0UNQNumKvmcIYjfkwfh2BhwYh/BxMXQHJ/PdmNh22TQFpIaYg==", + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/@docusaurus/theme-classic/-/theme-classic-3.10.1.tgz", + "integrity": "sha512-VU1RK0qb2pab0si4r7HFK37cYco8VzqLj3u1PspVipSr/z/GPVKHO4/HXbnePqHoWDk8urjyGSeatH0NIMBM1A==", "license": "MIT", "dependencies": { - "@docusaurus/core": "3.5.2", - "@docusaurus/mdx-loader": "3.5.2", - "@docusaurus/module-type-aliases": "3.5.2", - "@docusaurus/plugin-content-blog": "3.5.2", - "@docusaurus/plugin-content-docs": "3.5.2", - "@docusaurus/plugin-content-pages": "3.5.2", - "@docusaurus/theme-common": "3.5.2", - "@docusaurus/theme-translations": "3.5.2", - "@docusaurus/types": "3.5.2", - "@docusaurus/utils": "3.5.2", - "@docusaurus/utils-common": "3.5.2", - "@docusaurus/utils-validation": "3.5.2", + "@docusaurus/core": "3.10.1", + "@docusaurus/logger": "3.10.1", + "@docusaurus/mdx-loader": "3.10.1", + "@docusaurus/module-type-aliases": "3.10.1", + "@docusaurus/plugin-content-blog": "3.10.1", + "@docusaurus/plugin-content-docs": "3.10.1", + "@docusaurus/plugin-content-pages": "3.10.1", + "@docusaurus/theme-common": "3.10.1", + "@docusaurus/theme-translations": "3.10.1", + "@docusaurus/types": "3.10.1", + "@docusaurus/utils": "3.10.1", + "@docusaurus/utils-common": "3.10.1", + "@docusaurus/utils-validation": "3.10.1", "@mdx-js/react": "^3.0.0", "clsx": "^2.0.0", "copy-text-to-clipboard": "^3.2.0", - "infima": "0.2.0-alpha.44", + "infima": "0.2.0-alpha.45", "lodash": "^4.17.21", "nprogress": "^0.2.0", - "postcss": "^8.4.26", + "postcss": "^8.5.4", "prism-react-renderer": "^2.3.0", "prismjs": "^1.29.0", "react-router-dom": "^5.3.4", @@ -2852,23 +4002,23 @@ "utility-types": "^3.10.0" }, "engines": { - "node": ">=18.0" + "node": ">=20.0" }, "peerDependencies": { - "react": "^18.0.0", - "react-dom": "^18.0.0" + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" } }, "node_modules/@docusaurus/theme-common": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/@docusaurus/theme-common/-/theme-common-3.5.2.tgz", - "integrity": "sha512-QXqlm9S6x9Ibwjs7I2yEDgsCocp708DrCrgHgKwg2n2AY0YQ6IjU0gAK35lHRLOvAoJUfCKpQAwUykB0R7+Eew==", + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/@docusaurus/theme-common/-/theme-common-3.10.1.tgz", + "integrity": "sha512-0YtmIeoNo1fIw65LO8+/1dPgmDV86UmhMkow37gzjytuiCSQm9xob6PJy0L4kuQEMTLfUOGvkXvZr7GPrHquMA==", "license": "MIT", "dependencies": { - "@docusaurus/mdx-loader": "3.5.2", - "@docusaurus/module-type-aliases": "3.5.2", - "@docusaurus/utils": "3.5.2", - "@docusaurus/utils-common": "3.5.2", + "@docusaurus/mdx-loader": "3.10.1", + "@docusaurus/module-type-aliases": "3.10.1", + "@docusaurus/utils": "3.10.1", + "@docusaurus/utils-common": "3.10.1", "@types/history": "^4.7.11", "@types/react": "*", "@types/react-router-config": "*", @@ -2879,52 +4029,59 @@ "utility-types": "^3.10.0" }, "engines": { - "node": ">=18.0" + "node": ">=20.0" }, "peerDependencies": { "@docusaurus/plugin-content-docs": "*", - "react": "^18.0.0", - "react-dom": "^18.0.0" + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" } }, "node_modules/@docusaurus/theme-mermaid": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/@docusaurus/theme-mermaid/-/theme-mermaid-3.5.2.tgz", - "integrity": "sha512-7vWCnIe/KoyTN1Dc55FIyqO5hJ3YaV08Mr63Zej0L0mX1iGzt+qKSmeVUAJ9/aOalUhF0typV0RmNUSy5FAmCg==", + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/@docusaurus/theme-mermaid/-/theme-mermaid-3.10.1.tgz", + "integrity": "sha512-2gxpmln8Pc4EN1oWzshQEx2HTs67jk14v7MmgqGs8ZU7Nm8oihg+fTouof2u4vN8DtB3Fln4cDJu4UprSX1S3Q==", "license": "MIT", "dependencies": { - "@docusaurus/core": "3.5.2", - "@docusaurus/module-type-aliases": "3.5.2", - "@docusaurus/theme-common": "3.5.2", - "@docusaurus/types": "3.5.2", - "@docusaurus/utils-validation": "3.5.2", - "mermaid": "^10.4.0", + "@docusaurus/core": "3.10.1", + "@docusaurus/module-type-aliases": "3.10.1", + "@docusaurus/theme-common": "3.10.1", + "@docusaurus/types": "3.10.1", + "@docusaurus/utils-validation": "3.10.1", + "mermaid": ">=11.6.0", "tslib": "^2.6.0" }, "engines": { - "node": ">=18.0" + "node": ">=20.0" }, "peerDependencies": { - "react": "^18.0.0", - "react-dom": "^18.0.0" + "@mermaid-js/layout-elk": "^0.1.9", + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@mermaid-js/layout-elk": { + "optional": true + } } }, "node_modules/@docusaurus/theme-search-algolia": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/@docusaurus/theme-search-algolia/-/theme-search-algolia-3.5.2.tgz", - "integrity": "sha512-qW53kp3VzMnEqZGjakaV90sst3iN1o32PH+nawv1uepROO8aEGxptcq2R5rsv7aBShSRbZwIobdvSYKsZ5pqvA==", + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/@docusaurus/theme-search-algolia/-/theme-search-algolia-3.10.1.tgz", + "integrity": "sha512-OTaARARVZj2GvkJQjB+1jOIxntRaXea+G+fMsNqrZBAU1O1vJKDW22R7kECOHW27oJCLFN9HKaZeRrfAUyviug==", "license": "MIT", "dependencies": { - "@docsearch/react": "^3.5.2", - "@docusaurus/core": "3.5.2", - "@docusaurus/logger": "3.5.2", - "@docusaurus/plugin-content-docs": "3.5.2", - "@docusaurus/theme-common": "3.5.2", - "@docusaurus/theme-translations": "3.5.2", - "@docusaurus/utils": "3.5.2", - "@docusaurus/utils-validation": "3.5.2", - "algoliasearch": "^4.18.0", - "algoliasearch-helper": "^3.13.3", + "@algolia/autocomplete-core": "^1.19.2", + "@docsearch/react": "^3.9.0 || ^4.3.2", + "@docusaurus/core": "3.10.1", + "@docusaurus/logger": "3.10.1", + "@docusaurus/plugin-content-docs": "3.10.1", + "@docusaurus/theme-common": "3.10.1", + "@docusaurus/theme-translations": "3.10.1", + "@docusaurus/utils": "3.10.1", + "@docusaurus/utils-validation": "3.10.1", + "algoliasearch": "^5.37.0", + "algoliasearch-helper": "^3.26.0", "clsx": "^2.0.0", "eta": "^2.2.0", "fs-extra": "^11.1.1", @@ -2933,64 +4090,80 @@ "utility-types": "^3.10.0" }, "engines": { - "node": ">=18.0" + "node": ">=20.0" }, "peerDependencies": { - "react": "^18.0.0", - "react-dom": "^18.0.0" + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" } }, "node_modules/@docusaurus/theme-translations": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/@docusaurus/theme-translations/-/theme-translations-3.5.2.tgz", - "integrity": "sha512-GPZLcu4aT1EmqSTmbdpVrDENGR2yObFEX8ssEFYTCiAIVc0EihNSdOIBTazUvgNqwvnoU1A8vIs1xyzc3LITTw==", + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/@docusaurus/theme-translations/-/theme-translations-3.10.1.tgz", + "integrity": "sha512-cLMyaKivjBVWKMJuWqyFVVgtqe8DPJNPkog0bn8W1MDVAKcPdxRFycBfC1We1RaNp7Rdk513bmtW78RR6OBxBw==", "license": "MIT", "dependencies": { "fs-extra": "^11.1.1", "tslib": "^2.6.0" }, "engines": { - "node": ">=18.0" + "node": ">=20.0" } }, "node_modules/@docusaurus/tsconfig": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/@docusaurus/tsconfig/-/tsconfig-3.5.2.tgz", - "integrity": "sha512-rQ7toURCFnWAIn8ubcquDs0ewhPwviMzxh6WpRjBW7sJVCXb6yzwUaY3HMNa0VXCFw+qkIbFywrMTf+Pb4uHWQ==", + "version": "3.9.2", + "resolved": "https://registry.npmjs.org/@docusaurus/tsconfig/-/tsconfig-3.9.2.tgz", + "integrity": "sha512-j6/Fp4Rlpxsc632cnRnl5HpOWeb6ZKssDj6/XzzAzVGXXfm9Eptx3rxCC+fDzySn9fHTS+CWJjPineCR1bB5WQ==", "dev": true, "license": "MIT" }, "node_modules/@docusaurus/types": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/@docusaurus/types/-/types-3.5.2.tgz", - "integrity": "sha512-N6GntLXoLVUwkZw7zCxwy9QiuEXIcTVzA9AkmNw16oc0AP3SXLrMmDMMBIfgqwuKWa6Ox6epHol9kMtJqekACw==", + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/@docusaurus/types/-/types-3.10.1.tgz", + "integrity": "sha512-XYMK8k1szDCFMw2V+Xyen0g7Kee1sP3dtFnl7vkGkZOkeAJ/oPDQPL8iz4HBKOo/cwU8QeV6onVjMqtP+tFzsw==", "license": "MIT", "dependencies": { "@mdx-js/mdx": "^3.0.0", "@types/history": "^4.7.11", + "@types/mdast": "^4.0.2", "@types/react": "*", "commander": "^5.1.0", "joi": "^17.9.2", - "react-helmet-async": "^1.3.0", + "react-helmet-async": "npm:@slorber/react-helmet-async@1.3.0", "utility-types": "^3.10.0", - "webpack": "^5.88.1", + "webpack": "^5.95.0", "webpack-merge": "^5.9.0" }, "peerDependencies": { - "react": "^18.0.0", - "react-dom": "^18.0.0" + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" + } + }, + "node_modules/@docusaurus/types/node_modules/webpack-merge": { + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.10.0.tgz", + "integrity": "sha512-+4zXKdx7UnO+1jaN4l2lHVD+mFvnlZQP/6ljaJVb4SZiwIKeUnrT5l0gkT8z+n4hKpC+jpOv6O9R+gLtag7pSA==", + "license": "MIT", + "dependencies": { + "clone-deep": "^4.0.1", + "flat": "^5.0.2", + "wildcard": "^2.0.0" + }, + "engines": { + "node": ">=10.0.0" } }, "node_modules/@docusaurus/utils": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/@docusaurus/utils/-/utils-3.5.2.tgz", - "integrity": "sha512-33QvcNFh+Gv+C2dP9Y9xWEzMgf3JzrpL2nW9PopidiohS1nDcyknKRx2DWaFvyVTTYIkkABVSr073VTj/NITNA==", + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/@docusaurus/utils/-/utils-3.10.1.tgz", + "integrity": "sha512-3ojeJry9xBYdJO6qoyyzqeJFSJBVx2mXhyDzSdjwL2+URFQMf+h25gG38iswGImicK0ELjTd1EL2xzk8hf3QPw==", "license": "MIT", "dependencies": { - "@docusaurus/logger": "3.5.2", - "@docusaurus/utils-common": "3.5.2", - "@svgr/webpack": "^8.1.0", + "@docusaurus/logger": "3.10.1", + "@docusaurus/types": "3.10.1", + "@docusaurus/utils-common": "3.10.1", "escape-string-regexp": "^4.0.0", + "execa": "^5.1.1", "file-loader": "^6.2.0", "fs-extra": "^11.1.1", "github-slugger": "^1.5.0", @@ -3000,55 +4173,40 @@ "js-yaml": "^4.1.0", "lodash": "^4.17.21", "micromatch": "^4.0.5", + "p-queue": "^6.6.2", "prompts": "^2.4.2", "resolve-pathname": "^3.0.0", - "shelljs": "^0.8.5", "tslib": "^2.6.0", "url-loader": "^4.1.1", "utility-types": "^3.10.0", "webpack": "^5.88.1" }, "engines": { - "node": ">=18.0" - }, - "peerDependencies": { - "@docusaurus/types": "*" - }, - "peerDependenciesMeta": { - "@docusaurus/types": { - "optional": true - } + "node": ">=20.0" } }, "node_modules/@docusaurus/utils-common": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/@docusaurus/utils-common/-/utils-common-3.5.2.tgz", - "integrity": "sha512-i0AZjHiRgJU6d7faQngIhuHKNrszpL/SHQPgF1zH4H+Ij6E9NBYGy6pkcGWToIv7IVPbs+pQLh1P3whn0gWXVg==", + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/@docusaurus/utils-common/-/utils-common-3.10.1.tgz", + "integrity": "sha512-5mFSgEADtnFxFH7RLw02QA5MpU5JVUCj0MPeIvi/aF4Fi45tQRIuTwXoXDqJ+1VfQJuYJGz3SI63wmGz4HvXzA==", "license": "MIT", "dependencies": { + "@docusaurus/types": "3.10.1", "tslib": "^2.6.0" }, "engines": { - "node": ">=18.0" - }, - "peerDependencies": { - "@docusaurus/types": "*" - }, - "peerDependenciesMeta": { - "@docusaurus/types": { - "optional": true - } + "node": ">=20.0" } }, "node_modules/@docusaurus/utils-validation": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/@docusaurus/utils-validation/-/utils-validation-3.5.2.tgz", - "integrity": "sha512-m+Foq7augzXqB6HufdS139PFxDC5d5q2QKZy8q0qYYvGdI6nnlNsGH4cIGsgBnV7smz+mopl3g4asbSDvMV0jA==", + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/@docusaurus/utils-validation/-/utils-validation-3.10.1.tgz", + "integrity": "sha512-cRv1X69jwaWv47waglllgZVWzeBFLhl53XT/XED/83BerVBTC5FTP8WTcVl8Z6sZOegDSwitu/wpCSPCDOT6lg==", "license": "MIT", "dependencies": { - "@docusaurus/logger": "3.5.2", - "@docusaurus/utils": "3.5.2", - "@docusaurus/utils-common": "3.5.2", + "@docusaurus/logger": "3.10.1", + "@docusaurus/utils": "3.10.1", + "@docusaurus/utils-common": "3.10.1", "fs-extra": "^11.2.0", "joi": "^17.9.2", "js-yaml": "^4.1.0", @@ -3056,52 +4214,34 @@ "tslib": "^2.6.0" }, "engines": { - "node": ">=18.0" + "node": ">=20.0" } }, "node_modules/@eslint-community/eslint-utils": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", - "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", - "devOptional": true, + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.1.tgz", + "integrity": "sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ==", + "dev": true, "license": "MIT", "dependencies": { - "eslint-visitor-keys": "^3.3.0" + "eslint-visitor-keys": "^3.4.3" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, + "funding": { + "url": "https://opencollective.com/eslint" + }, "peerDependencies": { "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } }, - "node_modules/@eslint-community/regexpp": { - "version": "4.11.0", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.0.tgz", - "integrity": "sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==", - "devOptional": true, - "license": "MIT", - "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" - } - }, - "node_modules/@eslint/eslintrc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", - "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", - "devOptional": true, - "license": "MIT", - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, + "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "license": "Apache-2.0", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, @@ -3109,89 +4249,176 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "devOptional": true, + "node_modules/@eslint-community/regexpp": { + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", + "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==", + "dev": true, "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, - "node_modules/@eslint/eslintrc/node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "devOptional": true, - "license": "(MIT OR CC0-1.0)", + "node_modules/@eslint/config-array": { + "version": "0.21.2", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.2.tgz", + "integrity": "sha512-nJl2KGTlrf9GjLimgIru+V/mzgSK0ABCDQRvxw5BjURL7WfH5uoWmizbH7QB6MmnMBd8cIC9uceWnezL1VZWWw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/object-schema": "^2.1.7", + "debug": "^4.3.1", + "minimatch": "^3.1.5" + }, "engines": { - "node": ">=10" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/config-helpers": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.4.2.tgz", + "integrity": "sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.17.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/core": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.17.0.tgz", + "integrity": "sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "3.3.5", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.5.tgz", + "integrity": "sha512-4IlJx0X0qftVsN5E+/vGujTRIFtwuLbNsVUe7TO6zYPDR1O6nFwvwhIKEKSrl6dZchmYBITazxKoUYOjdtjlRg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^6.14.0", + "debug": "^4.3.2", + "espree": "^10.0.1", + "globals": "^14.0.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.1", + "minimatch": "^3.1.5", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/globals": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/@eslint/js": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", - "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", - "devOptional": true, + "version": "9.39.4", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.39.4.tgz", + "integrity": "sha512-nE7DEIchvtiFTwBw4Lfbu59PG+kCofhjsKaCWzxTpt4lfRjRMqG6uMBzKXuEcyXhOHoUp9riAm7/aWYGhXZ9cw==", + "dev": true, "license": "MIT", "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + } + }, + "node_modules/@eslint/object-schema": { + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.7.tgz", + "integrity": "sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.4.1.tgz", + "integrity": "sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.17.0", + "levn": "^0.4.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, "node_modules/@fortawesome/fontawesome-common-types": { - "version": "6.6.0", - "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-6.6.0.tgz", - "integrity": "sha512-xyX0X9mc0kyz9plIyryrRbl7ngsA9jz77mCZJsUkLl+ZKs0KWObgaEBoSgQiYWAsSmjz/yjl0F++Got0Mdp4Rw==", + "version": "6.7.2", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-6.7.2.tgz", + "integrity": "sha512-Zs+YeHUC5fkt7Mg1l6XTniei3k4bwG/yo3iFUtZWd/pMx9g3fdvkSK9E0FOC+++phXOka78uJcYb8JaFkW52Xg==", "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/@fortawesome/fontawesome-svg-core": { - "version": "6.6.0", - "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-6.6.0.tgz", - "integrity": "sha512-KHwPkCk6oRT4HADE7smhfsKudt9N/9lm6EJ5BVg0tD1yPA5hht837fB87F8pn15D8JfTqQOjhKTktwmLMiD7Kg==", + "version": "6.7.2", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-6.7.2.tgz", + "integrity": "sha512-yxtOBWDrdi5DD5o1pmVdq3WMCvnobT0LU6R8RyyVXPvFRd2o79/0NCuQoCjNTeZz9EzA9xS3JxNWfv54RIHFEA==", "license": "MIT", "dependencies": { - "@fortawesome/fontawesome-common-types": "6.6.0" + "@fortawesome/fontawesome-common-types": "6.7.2" }, "engines": { "node": ">=6" } }, "node_modules/@fortawesome/free-solid-svg-icons": { - "version": "6.6.0", - "resolved": "https://registry.npmjs.org/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-6.6.0.tgz", - "integrity": "sha512-IYv/2skhEDFc2WGUcqvFJkeK39Q+HyPf5GHUrT/l2pKbtgEIv1al1TKd6qStR5OIwQdN1GZP54ci3y4mroJWjA==", + "version": "6.7.2", + "resolved": "https://registry.npmjs.org/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-6.7.2.tgz", + "integrity": "sha512-GsBrnOzU8uj0LECDfD5zomZJIjrPhIlWU82AHwa2s40FKH+kcxQaBvBo3Z4TxyZHIyX8XTDxsyA33/Vx9eFuQA==", "license": "(CC-BY-4.0 AND MIT)", "dependencies": { - "@fortawesome/fontawesome-common-types": "6.6.0" + "@fortawesome/fontawesome-common-types": "6.7.2" }, "engines": { "node": ">=6" } }, "node_modules/@fortawesome/react-fontawesome": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/@fortawesome/react-fontawesome/-/react-fontawesome-0.2.2.tgz", - "integrity": "sha512-EnkrprPNqI6SXJl//m29hpaNzOp1bruISWaOiRtkMi/xSvHJlzc2j2JAYS7egxt/EbjSNV/k6Xy0AQI6vB2+1g==", + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/@fortawesome/react-fontawesome/-/react-fontawesome-0.2.6.tgz", + "integrity": "sha512-mtBFIi1UsYQo7rYonYFkjgYKGoL8T+fEH6NGUpvuqtY3ytMsAoDaPo5rk25KuMtKDipY4bGYM/CkmCHA1N3FUg==", + "deprecated": "v0.2.x is no longer supported. Unless you are still using FontAwesome 5, please update to v3.1.1 or greater.", "license": "MIT", "dependencies": { "prop-types": "^15.8.1" }, "peerDependencies": { - "@fortawesome/fontawesome-svg-core": "~1 || ~6", - "react": ">=16.3" + "@fortawesome/fontawesome-svg-core": "~1 || ~6 || ~7", + "react": "^16.3 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "node_modules/@hapi/hoek": { @@ -3209,27 +4436,35 @@ "@hapi/hoek": "^9.0.0" } }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.11.14", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", - "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", - "deprecated": "Use @eslint/config-array instead", - "devOptional": true, + "node_modules/@humanfs/core": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", + "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node": { + "version": "0.16.7", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.7.tgz", + "integrity": "sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ==", + "dev": true, "license": "Apache-2.0", "dependencies": { - "@humanwhocodes/object-schema": "^2.0.2", - "debug": "^4.3.1", - "minimatch": "^3.0.5" + "@humanfs/core": "^0.19.1", + "@humanwhocodes/retry": "^0.4.0" }, "engines": { - "node": ">=10.10.0" + "node": ">=18.18.0" } }, "node_modules/@humanwhocodes/module-importer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "devOptional": true, + "dev": true, "license": "Apache-2.0", "engines": { "node": ">=12.22" @@ -3239,13 +4474,36 @@ "url": "https://github.com/sponsors/nzakas" } }, - "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", - "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", - "deprecated": "Use @eslint/object-schema instead", - "devOptional": true, - "license": "BSD-3-Clause" + "node_modules/@humanwhocodes/retry": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", + "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@iconify/types": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@iconify/types/-/types-2.0.0.tgz", + "integrity": "sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==", + "license": "MIT" + }, + "node_modules/@iconify/utils": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@iconify/utils/-/utils-3.1.0.tgz", + "integrity": "sha512-Zlzem1ZXhI1iHeeERabLNzBHdOa4VhQbqAcOQaMKuTuyZCpwKbC2R4Dd0Zo3g9EAc+Y4fiarO8HIHRAth7+skw==", + "license": "MIT", + "dependencies": { + "@antfu/install-pkg": "^1.1.0", + "@iconify/types": "^2.0.0", + "mlly": "^1.8.0" + } }, "node_modules/@isaacs/cliui": { "version": "8.0.2", @@ -3266,9 +4524,9 @@ } }, "node_modules/@isaacs/cliui/node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", "dev": true, "license": "MIT", "engines": { @@ -3279,13 +4537,13 @@ } }, "node_modules/@isaacs/cliui/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz", + "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==", "dev": true, "license": "MIT", "dependencies": { - "ansi-regex": "^6.0.1" + "ansi-regex": "^6.2.2" }, "engines": { "node": ">=12" @@ -3324,17 +4582,23 @@ } }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", - "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", "license": "MIT", "dependencies": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/remapping": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", + "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" } }, "node_modules/@jridgewell/resolve-uri": { @@ -3346,19 +4610,10 @@ "node": ">=6.0.0" } }, - "node_modules/@jridgewell/set-array": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", - "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/@jridgewell/source-map": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", - "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", + "version": "0.3.11", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.11.tgz", + "integrity": "sha512-ZMp1V8ZFcPG5dIWnQLr3NSI1MiCU7UETdS/A0G8V/XWHvJv3ZsFqutJn1Y5RPmAPX6F3BiE397OqveU/9NCuIA==", "license": "MIT", "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", @@ -3366,15 +4621,15 @@ } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", - "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", "license": "MIT" }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.25", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", "license": "MIT", "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", @@ -3388,6 +4643,415 @@ "dev": true, "license": "MIT" }, + "node_modules/@jsonjoy.com/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-q6XAnWQDIMA3+FTiOYajoYqySkO+JSat0ytXGSuRdq9uXE7o92gzuQwQM14xaCRlBLGq3v5miDGC4vkVTn54xA==", + "license": "Apache-2.0", + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@jsonjoy.com/buffers": { + "version": "17.67.0", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/buffers/-/buffers-17.67.0.tgz", + "integrity": "sha512-tfExRpYxBvi32vPs9ZHaTjSP4fHAfzSmcahOfNxtvGHcyJel+aibkPlGeBB+7AoC6hL7lXIE++8okecBxx7lcw==", + "license": "Apache-2.0", + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@jsonjoy.com/codegen": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/codegen/-/codegen-1.0.0.tgz", + "integrity": "sha512-E8Oy+08cmCf0EK/NMxpaJZmOxPqM+6iSe2S4nlSBrPZOORoDJILxtbSUEDKQyTamm/BVAhIGllOBNU79/dwf0g==", + "license": "Apache-2.0", + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@jsonjoy.com/fs-core": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/fs-core/-/fs-core-4.57.1.tgz", + "integrity": "sha512-YrEi/ZPmgc+GfdO0esBF04qv8boK9Dg9WpRQw/+vM8Qt3nnVIJWIa8HwZ/LXVZ0DB11XUROM8El/7yYTJX+WtA==", + "license": "Apache-2.0", + "dependencies": { + "@jsonjoy.com/fs-node-builtins": "4.57.1", + "@jsonjoy.com/fs-node-utils": "4.57.1", + "thingies": "^2.5.0" + }, + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@jsonjoy.com/fs-fsa": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/fs-fsa/-/fs-fsa-4.57.1.tgz", + "integrity": "sha512-ooEPvSW/HQDivPDPZMibHGKZf/QS4WRir1czGZmXmp3MsQqLECZEpN0JobrD8iV9BzsuwdIv+PxtWX9WpPLsIA==", + "license": "Apache-2.0", + "dependencies": { + "@jsonjoy.com/fs-core": "4.57.1", + "@jsonjoy.com/fs-node-builtins": "4.57.1", + "@jsonjoy.com/fs-node-utils": "4.57.1", + "thingies": "^2.5.0" + }, + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@jsonjoy.com/fs-node": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/fs-node/-/fs-node-4.57.1.tgz", + "integrity": "sha512-3YaKhP8gXEKN+2O49GLNfNb5l2gbnCFHyAaybbA2JkkbQP3dpdef7WcUaHAulg/c5Dg4VncHsA3NWAUSZMR5KQ==", + "license": "Apache-2.0", + "dependencies": { + "@jsonjoy.com/fs-core": "4.57.1", + "@jsonjoy.com/fs-node-builtins": "4.57.1", + "@jsonjoy.com/fs-node-utils": "4.57.1", + "@jsonjoy.com/fs-print": "4.57.1", + "@jsonjoy.com/fs-snapshot": "4.57.1", + "glob-to-regex.js": "^1.0.0", + "thingies": "^2.5.0" + }, + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@jsonjoy.com/fs-node-builtins": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/fs-node-builtins/-/fs-node-builtins-4.57.1.tgz", + "integrity": "sha512-XHkFKQ5GSH3uxm8c3ZYXVrexGdscpWKIcMWKFQpMpMJc8gA3AwOMBJXJlgpdJqmrhPyQXxaY9nbkNeYpacC0Og==", + "license": "Apache-2.0", + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@jsonjoy.com/fs-node-to-fsa": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/fs-node-to-fsa/-/fs-node-to-fsa-4.57.1.tgz", + "integrity": "sha512-pqGHyWWzNck4jRfaGV39hkqpY5QjRUQ/nRbNT7FYbBa0xf4bDG+TE1Gt2KWZrSkrkZZDE3qZUjYMbjwSliX6pg==", + "license": "Apache-2.0", + "dependencies": { + "@jsonjoy.com/fs-fsa": "4.57.1", + "@jsonjoy.com/fs-node-builtins": "4.57.1", + "@jsonjoy.com/fs-node-utils": "4.57.1" + }, + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@jsonjoy.com/fs-node-utils": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/fs-node-utils/-/fs-node-utils-4.57.1.tgz", + "integrity": "sha512-vp+7ZzIB8v43G+GLXTS4oDUSQmhAsRz532QmmWBbdYA20s465JvwhkSFvX9cVTqRRAQg+vZ7zWDaIEh0lFe2gw==", + "license": "Apache-2.0", + "dependencies": { + "@jsonjoy.com/fs-node-builtins": "4.57.1" + }, + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@jsonjoy.com/fs-print": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/fs-print/-/fs-print-4.57.1.tgz", + "integrity": "sha512-Ynct7ZJmfk6qoXDOKfpovNA36ITUx8rChLmRQtW08J73VOiuNsU8PB6d/Xs7fxJC2ohWR3a5AqyjmLojfrw5yw==", + "license": "Apache-2.0", + "dependencies": { + "@jsonjoy.com/fs-node-utils": "4.57.1", + "tree-dump": "^1.1.0" + }, + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@jsonjoy.com/fs-snapshot": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/fs-snapshot/-/fs-snapshot-4.57.1.tgz", + "integrity": "sha512-/oG8xBNFMbDXTq9J7vepSA1kerS5vpgd3p5QZSPd+nX59uwodGJftI51gDYyHRpP57P3WCQf7LHtBYPqwUg2Bg==", + "license": "Apache-2.0", + "dependencies": { + "@jsonjoy.com/buffers": "^17.65.0", + "@jsonjoy.com/fs-node-utils": "4.57.1", + "@jsonjoy.com/json-pack": "^17.65.0", + "@jsonjoy.com/util": "^17.65.0" + }, + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@jsonjoy.com/fs-snapshot/node_modules/@jsonjoy.com/base64": { + "version": "17.67.0", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/base64/-/base64-17.67.0.tgz", + "integrity": "sha512-5SEsJGsm15aP8TQGkDfJvz9axgPwAEm98S5DxOuYe8e1EbfajcDmgeXXzccEjh+mLnjqEKrkBdjHWS5vFNwDdw==", + "license": "Apache-2.0", + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@jsonjoy.com/fs-snapshot/node_modules/@jsonjoy.com/codegen": { + "version": "17.67.0", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/codegen/-/codegen-17.67.0.tgz", + "integrity": "sha512-idnkUplROpdBOV0HMcwhsCUS5TRUi9poagdGs70A6S4ux9+/aPuKbh8+UYRTLYQHtXvAdNfQWXDqZEx5k4Dj2Q==", + "license": "Apache-2.0", + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@jsonjoy.com/fs-snapshot/node_modules/@jsonjoy.com/json-pack": { + "version": "17.67.0", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/json-pack/-/json-pack-17.67.0.tgz", + "integrity": "sha512-t0ejURcGaZsn1ClbJ/3kFqSOjlryd92eQY465IYrezsXmPcfHPE/av4twRSxf6WE+TkZgLY+71vCZbiIiFKA/w==", + "license": "Apache-2.0", + "dependencies": { + "@jsonjoy.com/base64": "17.67.0", + "@jsonjoy.com/buffers": "17.67.0", + "@jsonjoy.com/codegen": "17.67.0", + "@jsonjoy.com/json-pointer": "17.67.0", + "@jsonjoy.com/util": "17.67.0", + "hyperdyperid": "^1.2.0", + "thingies": "^2.5.0", + "tree-dump": "^1.1.0" + }, + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@jsonjoy.com/fs-snapshot/node_modules/@jsonjoy.com/json-pointer": { + "version": "17.67.0", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/json-pointer/-/json-pointer-17.67.0.tgz", + "integrity": "sha512-+iqOFInH+QZGmSuaybBUNdh7yvNrXvqR+h3wjXm0N/3JK1EyyFAeGJvqnmQL61d1ARLlk/wJdFKSL+LHJ1eaUA==", + "license": "Apache-2.0", + "dependencies": { + "@jsonjoy.com/util": "17.67.0" + }, + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@jsonjoy.com/fs-snapshot/node_modules/@jsonjoy.com/util": { + "version": "17.67.0", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/util/-/util-17.67.0.tgz", + "integrity": "sha512-6+8xBaz1rLSohlGh68D1pdw3AwDi9xydm8QNlAFkvnavCJYSze+pxoW2VKP8p308jtlMRLs5NTHfPlZLd4w7ew==", + "license": "Apache-2.0", + "dependencies": { + "@jsonjoy.com/buffers": "17.67.0", + "@jsonjoy.com/codegen": "17.67.0" + }, + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@jsonjoy.com/json-pack": { + "version": "1.21.0", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/json-pack/-/json-pack-1.21.0.tgz", + "integrity": "sha512-+AKG+R2cfZMShzrF2uQw34v3zbeDYUqnQ+jg7ORic3BGtfw9p/+N6RJbq/kkV8JmYZaINknaEQ2m0/f693ZPpg==", + "license": "Apache-2.0", + "dependencies": { + "@jsonjoy.com/base64": "^1.1.2", + "@jsonjoy.com/buffers": "^1.2.0", + "@jsonjoy.com/codegen": "^1.0.0", + "@jsonjoy.com/json-pointer": "^1.0.2", + "@jsonjoy.com/util": "^1.9.0", + "hyperdyperid": "^1.2.0", + "thingies": "^2.5.0", + "tree-dump": "^1.1.0" + }, + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@jsonjoy.com/json-pack/node_modules/@jsonjoy.com/buffers": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/buffers/-/buffers-1.2.1.tgz", + "integrity": "sha512-12cdlDwX4RUM3QxmUbVJWqZ/mrK6dFQH4Zxq6+r1YXKXYBNgZXndx2qbCJwh3+WWkCSn67IjnlG3XYTvmvYtgA==", + "license": "Apache-2.0", + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@jsonjoy.com/json-pointer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/json-pointer/-/json-pointer-1.0.2.tgz", + "integrity": "sha512-Fsn6wM2zlDzY1U+v4Nc8bo3bVqgfNTGcn6dMgs6FjrEnt4ZCe60o6ByKRjOGlI2gow0aE/Q41QOigdTqkyK5fg==", + "license": "Apache-2.0", + "dependencies": { + "@jsonjoy.com/codegen": "^1.0.0", + "@jsonjoy.com/util": "^1.9.0" + }, + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@jsonjoy.com/util": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/util/-/util-1.9.0.tgz", + "integrity": "sha512-pLuQo+VPRnN8hfPqUTLTHk126wuYdXVxE6aDmjSeV4NCAgyxWbiOIeNJVtID3h1Vzpoi9m4jXezf73I6LgabgQ==", + "license": "Apache-2.0", + "dependencies": { + "@jsonjoy.com/buffers": "^1.0.0", + "@jsonjoy.com/codegen": "^1.0.0" + }, + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@jsonjoy.com/util/node_modules/@jsonjoy.com/buffers": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/buffers/-/buffers-1.2.1.tgz", + "integrity": "sha512-12cdlDwX4RUM3QxmUbVJWqZ/mrK6dFQH4Zxq6+r1YXKXYBNgZXndx2qbCJwh3+WWkCSn67IjnlG3XYTvmvYtgA==", + "license": "Apache-2.0", + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, "node_modules/@leichtgewicht/ip-codec": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.5.tgz", @@ -3395,25 +5059,27 @@ "license": "MIT" }, "node_modules/@mdx-js/mdx": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@mdx-js/mdx/-/mdx-3.0.1.tgz", - "integrity": "sha512-eIQ4QTrOWyL3LWEe/bu6Taqzq2HQvHcyTMaOrI95P2/LmJE7AsfPfgJGuFLPVqBUE1BC1rik3VIhU+s9u72arA==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@mdx-js/mdx/-/mdx-3.1.1.tgz", + "integrity": "sha512-f6ZO2ifpwAQIpzGWaBQT2TXxPv6z3RBzQKpVftEWN78Vl/YweF1uwussDx8ECAXVtr3Rs89fKyG9YlzUs9DyGQ==", "license": "MIT", "dependencies": { "@types/estree": "^1.0.0", "@types/estree-jsx": "^1.0.0", "@types/hast": "^3.0.0", "@types/mdx": "^2.0.0", + "acorn": "^8.0.0", "collapse-white-space": "^2.0.0", "devlop": "^1.0.0", - "estree-util-build-jsx": "^3.0.0", "estree-util-is-identifier-name": "^3.0.0", - "estree-util-to-js": "^2.0.0", + "estree-util-scope": "^1.0.0", "estree-walker": "^3.0.0", - "hast-util-to-estree": "^3.0.0", "hast-util-to-jsx-runtime": "^2.0.0", "markdown-extensions": "^2.0.0", - "periscopic": "^3.0.0", + "recma-build-jsx": "^1.0.0", + "recma-jsx": "^1.0.0", + "recma-stringify": "^1.0.0", + "rehype-recma": "^1.0.0", "remark-mdx": "^3.0.0", "remark-parse": "^11.0.0", "remark-rehype": "^11.0.0", @@ -3430,9 +5096,9 @@ } }, "node_modules/@mdx-js/react": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@mdx-js/react/-/react-3.0.1.tgz", - "integrity": "sha512-9ZrPIU4MGf6et1m1ov3zKf+q9+deetI51zprKB1D/z3NOb+rUxxtEl3mCjW5wTGh6VhRdwPueh1oRzi6ezkA8A==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@mdx-js/react/-/react-3.1.1.tgz", + "integrity": "sha512-f++rKLQgUVYDAtECQ6fn/is15GkEH9+nZPM3MS0RcxVqoTfawHvDlSCH7JbMhAM6uJ32v3eXLvLmLvjGu7PTQw==", "license": "MIT", "dependencies": { "@types/mdx": "^2.0.0" @@ -3446,6 +5112,27 @@ "react": ">=16" } }, + "node_modules/@mermaid-js/parser": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@mermaid-js/parser/-/parser-1.0.1.tgz", + "integrity": "sha512-opmV19kN1JsK0T6HhhokHpcVkqKpF+x2pPDKKM2ThHtZAB5F4PROopk0amuVYK5qMrIA4erzpNm8gmPNJgMDxQ==", + "license": "MIT", + "dependencies": { + "langium": "^4.0.0" + } + }, + "node_modules/@noble/hashes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", + "license": "MIT", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -3502,9 +5189,9 @@ } }, "node_modules/@npmcli/config/node_modules/ci-info": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.0.0.tgz", - "integrity": "sha512-TdHqgGf9odd8SXNuxtUBVx8Nv+qZOejE6qyqiy5NtbYYQOeFa6zmHkxlPzmaLxWWHsU6nJmB7AETdVPi+2NBUg==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.4.0.tgz", + "integrity": "sha512-77PSwercCZU2Fc4sX94eF8k8Pxte6JAwL4/ICZLFjJLqegs7kCuAsqqj/70NQF6TvDpgFjkubQB2FW2ZZddvQg==", "dev": true, "funding": [ { @@ -3517,16 +5204,6 @@ "node": ">=8" } }, - "node_modules/@npmcli/config/node_modules/ini": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/ini/-/ini-4.1.3.tgz", - "integrity": "sha512-X7rqawQBvfdjS10YU1y1YVreA3SsLrW9dX2CewP2EbBJM4ypVNLDkO5y04gejPwKIY9lR+7r9gn3rFPt/kmWFg==", - "dev": true, - "license": "ISC", - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, "node_modules/@npmcli/git": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-5.0.8.tgz", @@ -3548,24 +5225,14 @@ "node": "^16.14.0 || >=18.0.0" } }, - "node_modules/@npmcli/git/node_modules/ini": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/ini/-/ini-4.1.3.tgz", - "integrity": "sha512-X7rqawQBvfdjS10YU1y1YVreA3SsLrW9dX2CewP2EbBJM4ypVNLDkO5y04gejPwKIY9lR+7r9gn3rFPt/kmWFg==", - "dev": true, - "license": "ISC", - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, "node_modules/@npmcli/git/node_modules/isexe": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", - "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.5.tgz", + "integrity": "sha512-6B3tLtFqtQS4ekarvLVMZ+X+VlvQekbe4taUkf/rhVO3d/h0M2rfARm/pXLcPEsjjMsFgrFgSrhQIxcSVrBz8w==", "dev": true, - "license": "ISC", + "license": "BlueOak-1.0.0", "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/@npmcli/git/node_modules/lru-cache": { @@ -3608,9 +5275,9 @@ } }, "node_modules/@npmcli/map-workspaces/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.3.tgz", + "integrity": "sha512-MCV/fYJEbqx68aE58kv2cA/kiky1G8vux3OR6/jbS+jIMe/6fJWa0DTzJU7dqijOWYwHi1t29FlfYI9uytqlpA==", "dev": true, "license": "MIT", "dependencies": { @@ -3618,9 +5285,10 @@ } }, "node_modules/@npmcli/map-workspaces/node_modules/glob": { - "version": "10.4.5", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", - "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz", + "integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", "dev": true, "license": "ISC", "dependencies": { @@ -3639,13 +5307,13 @@ } }, "node_modules/@npmcli/map-workspaces/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "version": "9.0.9", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.9.tgz", + "integrity": "sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==", "dev": true, "license": "ISC", "dependencies": { - "brace-expansion": "^2.0.1" + "brace-expansion": "^2.0.2" }, "engines": { "node": ">=16 || 14 >=14.17" @@ -3665,9 +5333,9 @@ } }, "node_modules/@npmcli/package-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@npmcli/package-json/-/package-json-5.2.0.tgz", - "integrity": "sha512-qe/kiqqkW0AGtvBjL8TJKZk/eBBSpnJkUWvHdQ9jM2lKHXRYYJuyNpJPlJw3c8QjC2ow6NZYiLExhUaeJelbxQ==", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/@npmcli/package-json/-/package-json-5.2.1.tgz", + "integrity": "sha512-f7zYC6kQautXHvNbLEWgD/uGu1+xCn9izgqBfgItWSx22U0ZDekxN08A1vM8cTxj/cRVe0Q94Ode+tdoYmIOOQ==", "dev": true, "license": "ISC", "dependencies": { @@ -3684,9 +5352,9 @@ } }, "node_modules/@npmcli/package-json/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.3.tgz", + "integrity": "sha512-MCV/fYJEbqx68aE58kv2cA/kiky1G8vux3OR6/jbS+jIMe/6fJWa0DTzJU7dqijOWYwHi1t29FlfYI9uytqlpA==", "dev": true, "license": "MIT", "dependencies": { @@ -3694,9 +5362,10 @@ } }, "node_modules/@npmcli/package-json/node_modules/glob": { - "version": "10.4.5", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", - "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz", + "integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", "dev": true, "license": "ISC", "dependencies": { @@ -3725,13 +5394,13 @@ } }, "node_modules/@npmcli/package-json/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "version": "9.0.9", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.9.tgz", + "integrity": "sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==", "dev": true, "license": "ISC", "dependencies": { - "brace-expansion": "^2.0.1" + "brace-expansion": "^2.0.2" }, "engines": { "node": ">=16 || 14 >=14.17" @@ -3754,13 +5423,13 @@ } }, "node_modules/@npmcli/promise-spawn/node_modules/isexe": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", - "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.5.tgz", + "integrity": "sha512-6B3tLtFqtQS4ekarvLVMZ+X+VlvQekbe4taUkf/rhVO3d/h0M2rfARm/pXLcPEsjjMsFgrFgSrhQIxcSVrBz8w==", "dev": true, - "license": "ISC", + "license": "BlueOak-1.0.0", "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/@npmcli/promise-spawn/node_modules/which": { @@ -3779,6 +5448,154 @@ "node": "^16.13.0 || >=18.0.0" } }, + "node_modules/@peculiar/asn1-cms": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-cms/-/asn1-cms-2.6.1.tgz", + "integrity": "sha512-vdG4fBF6Lkirkcl53q6eOdn3XYKt+kJTG59edgRZORlg/3atWWEReRCx5rYE1ZzTTX6vLK5zDMjHh7vbrcXGtw==", + "license": "MIT", + "dependencies": { + "@peculiar/asn1-schema": "^2.6.0", + "@peculiar/asn1-x509": "^2.6.1", + "@peculiar/asn1-x509-attr": "^2.6.1", + "asn1js": "^3.0.6", + "tslib": "^2.8.1" + } + }, + "node_modules/@peculiar/asn1-csr": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-csr/-/asn1-csr-2.6.1.tgz", + "integrity": "sha512-WRWnKfIocHyzFYQTka8O/tXCiBquAPSrRjXbOkHbO4qdmS6loffCEGs+rby6WxxGdJCuunnhS2duHURhjyio6w==", + "license": "MIT", + "dependencies": { + "@peculiar/asn1-schema": "^2.6.0", + "@peculiar/asn1-x509": "^2.6.1", + "asn1js": "^3.0.6", + "tslib": "^2.8.1" + } + }, + "node_modules/@peculiar/asn1-ecc": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-ecc/-/asn1-ecc-2.6.1.tgz", + "integrity": "sha512-+Vqw8WFxrtDIN5ehUdvlN2m73exS2JVG0UAyfVB31gIfor3zWEAQPD+K9ydCxaj3MLen9k0JhKpu9LqviuCE1g==", + "license": "MIT", + "dependencies": { + "@peculiar/asn1-schema": "^2.6.0", + "@peculiar/asn1-x509": "^2.6.1", + "asn1js": "^3.0.6", + "tslib": "^2.8.1" + } + }, + "node_modules/@peculiar/asn1-pfx": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-pfx/-/asn1-pfx-2.6.1.tgz", + "integrity": "sha512-nB5jVQy3MAAWvq0KY0R2JUZG8bO/bTLpnwyOzXyEh/e54ynGTatAR+csOnXkkVD9AFZ2uL8Z7EV918+qB1qDvw==", + "license": "MIT", + "dependencies": { + "@peculiar/asn1-cms": "^2.6.1", + "@peculiar/asn1-pkcs8": "^2.6.1", + "@peculiar/asn1-rsa": "^2.6.1", + "@peculiar/asn1-schema": "^2.6.0", + "asn1js": "^3.0.6", + "tslib": "^2.8.1" + } + }, + "node_modules/@peculiar/asn1-pkcs8": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-pkcs8/-/asn1-pkcs8-2.6.1.tgz", + "integrity": "sha512-JB5iQ9Izn5yGMw3ZG4Nw3Xn/hb/G38GYF3lf7WmJb8JZUydhVGEjK/ZlFSWhnlB7K/4oqEs8HnfFIKklhR58Tw==", + "license": "MIT", + "dependencies": { + "@peculiar/asn1-schema": "^2.6.0", + "@peculiar/asn1-x509": "^2.6.1", + "asn1js": "^3.0.6", + "tslib": "^2.8.1" + } + }, + "node_modules/@peculiar/asn1-pkcs9": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-pkcs9/-/asn1-pkcs9-2.6.1.tgz", + "integrity": "sha512-5EV8nZoMSxeWmcxWmmcolg22ojZRgJg+Y9MX2fnE2bGRo5KQLqV5IL9kdSQDZxlHz95tHvIq9F//bvL1OeNILw==", + "license": "MIT", + "dependencies": { + "@peculiar/asn1-cms": "^2.6.1", + "@peculiar/asn1-pfx": "^2.6.1", + "@peculiar/asn1-pkcs8": "^2.6.1", + "@peculiar/asn1-schema": "^2.6.0", + "@peculiar/asn1-x509": "^2.6.1", + "@peculiar/asn1-x509-attr": "^2.6.1", + "asn1js": "^3.0.6", + "tslib": "^2.8.1" + } + }, + "node_modules/@peculiar/asn1-rsa": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-rsa/-/asn1-rsa-2.6.1.tgz", + "integrity": "sha512-1nVMEh46SElUt5CB3RUTV4EG/z7iYc7EoaDY5ECwganibQPkZ/Y2eMsTKB/LeyrUJ+W/tKoD9WUqIy8vB+CEdA==", + "license": "MIT", + "dependencies": { + "@peculiar/asn1-schema": "^2.6.0", + "@peculiar/asn1-x509": "^2.6.1", + "asn1js": "^3.0.6", + "tslib": "^2.8.1" + } + }, + "node_modules/@peculiar/asn1-schema": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-schema/-/asn1-schema-2.6.0.tgz", + "integrity": "sha512-xNLYLBFTBKkCzEZIw842BxytQQATQv+lDTCEMZ8C196iJcJJMBUZxrhSTxLaohMyKK8QlzRNTRkUmanucnDSqg==", + "license": "MIT", + "dependencies": { + "asn1js": "^3.0.6", + "pvtsutils": "^1.3.6", + "tslib": "^2.8.1" + } + }, + "node_modules/@peculiar/asn1-x509": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-x509/-/asn1-x509-2.6.1.tgz", + "integrity": "sha512-O9jT5F1A2+t3r7C4VT7LYGXqkGLK7Kj1xFpz7U0isPrubwU5PbDoyYtx6MiGst29yq7pXN5vZbQFKRCP+lLZlA==", + "license": "MIT", + "dependencies": { + "@peculiar/asn1-schema": "^2.6.0", + "asn1js": "^3.0.6", + "pvtsutils": "^1.3.6", + "tslib": "^2.8.1" + } + }, + "node_modules/@peculiar/asn1-x509-attr": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-x509-attr/-/asn1-x509-attr-2.6.1.tgz", + "integrity": "sha512-tlW6cxoHwgcQghnJwv3YS+9OO1737zgPogZ+CgWRUK4roEwIPzRH4JEiG770xe5HX2ATfCpmX60gurfWIF9dcQ==", + "license": "MIT", + "dependencies": { + "@peculiar/asn1-schema": "^2.6.0", + "@peculiar/asn1-x509": "^2.6.1", + "asn1js": "^3.0.6", + "tslib": "^2.8.1" + } + }, + "node_modules/@peculiar/x509": { + "version": "1.14.3", + "resolved": "https://registry.npmjs.org/@peculiar/x509/-/x509-1.14.3.tgz", + "integrity": "sha512-C2Xj8FZ0uHWeCXXqX5B4/gVFQmtSkiuOolzAgutjTfseNOHT3pUjljDZsTSxXFGgio54bCzVFqmEOUrIVk8RDA==", + "license": "MIT", + "dependencies": { + "@peculiar/asn1-cms": "^2.6.0", + "@peculiar/asn1-csr": "^2.6.0", + "@peculiar/asn1-ecc": "^2.6.0", + "@peculiar/asn1-pkcs9": "^2.6.0", + "@peculiar/asn1-rsa": "^2.6.0", + "@peculiar/asn1-schema": "^2.6.0", + "@peculiar/asn1-x509": "^2.6.0", + "pvtsutils": "^1.3.6", + "reflect-metadata": "^0.2.2", + "tslib": "^2.8.1", + "tsyringe": "^4.10.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, "node_modules/@pkgjs/parseargs": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", @@ -3791,16 +5608,16 @@ } }, "node_modules/@pkgr/core": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz", - "integrity": "sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==", + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.2.9.tgz", + "integrity": "sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA==", "dev": true, "license": "MIT", "engines": { "node": "^12.20.0 || ^14.18.0 || >=16.0.0" }, "funding": { - "url": "https://opencollective.com/unts" + "url": "https://opencollective.com/pkgr" } }, "node_modules/@pnpm/config.env-replace": { @@ -3831,9 +5648,9 @@ "license": "ISC" }, "node_modules/@pnpm/npm-conf": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@pnpm/npm-conf/-/npm-conf-2.3.1.tgz", - "integrity": "sha512-c83qWb22rNRuB0UaVCI0uRPNRr8Z0FWnEIvT47jiHAmOIUHbBOg5XvV7pM5x+rKn9HRpjxquDbXYSXr3fAKFcw==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@pnpm/npm-conf/-/npm-conf-3.0.2.tgz", + "integrity": "sha512-h104Kh26rR8tm+a3Qkc5S4VLYint3FE48as7+/5oCEcKR2idC/pF1G6AhIXKI+eHPJa/3J9i5z0Al47IeGHPkA==", "license": "MIT", "dependencies": { "@pnpm/config.env-replace": "^1.1.0", @@ -3845,9 +5662,9 @@ } }, "node_modules/@polka/url": { - "version": "1.0.0-next.25", - "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.25.tgz", - "integrity": "sha512-j7P6Rgr3mmtdkeDGTe0E/aYyWEWVtc5yFXtHCRHs28/jptDEWfaVOc5T7cblqy1XKPPfCxJc/8DwQ5YgLOZOVQ==", + "version": "1.0.0-next.29", + "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.29.tgz", + "integrity": "sha512-wwQAWhWSuHaag8c4q/KN/vCoeOJYshAIvMQwD4GpSb3OiZklFfvAgmj0VCBBImRpuF/aFgIRzllXlVX93Jevww==", "license": "MIT" }, "node_modules/@sideway/address": { @@ -3872,9 +5689,9 @@ "license": "BSD-3-Clause" }, "node_modules/@sinclair/typebox": { - "version": "0.27.8", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", - "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", + "version": "0.27.10", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.10.tgz", + "integrity": "sha512-MTBk/3jGLNB2tVxv6uLlFh1iu64iYOQ2PbdOSK3NW8JZsmlaOh2q6sdtKowBhfw8QFLmYNzTW4/oK4uATIi6ZA==", "license": "MIT" }, "node_modules/@sindresorhus/is": { @@ -4169,28 +5986,10 @@ "node": ">=14.16" } }, - "node_modules/@trysound/sax": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/@trysound/sax/-/sax-0.2.0.tgz", - "integrity": "sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==", - "license": "ISC", - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/@types/acorn": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/@types/acorn/-/acorn-4.0.6.tgz", - "integrity": "sha512-veQTnWP+1D/xbxVrPC3zHnCZRjSrKfhbMUlEA43iMZLu7EsnTtkJklIuwrCPbOi8YkvDQAiW05VQQFvvz9oieQ==", - "license": "MIT", - "dependencies": { - "@types/estree": "*" - } - }, "node_modules/@types/body-parser": { - "version": "1.19.5", - "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.5.tgz", - "integrity": "sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==", + "version": "1.19.6", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.6.tgz", + "integrity": "sha512-HLFeCYgz89uk22N5Qg3dvGvsv46B8GLvKKo1zKG4NybA8U2DiEO3w9lqGg29t/tfLRJpJ6iQxnVw4OnB7MoM9g==", "license": "MIT", "dependencies": { "@types/connect": "*", @@ -4235,40 +6034,292 @@ "@types/node": "*" } }, + "node_modules/@types/d3": { + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/@types/d3/-/d3-7.4.3.tgz", + "integrity": "sha512-lZXZ9ckh5R8uiFVt8ogUNf+pIrK4EsWrx2Np75WvF/eTpJ0FMHNhjXk8CKEx/+gpHbNQyJWehbFaTvqmHWB3ww==", + "license": "MIT", + "dependencies": { + "@types/d3-array": "*", + "@types/d3-axis": "*", + "@types/d3-brush": "*", + "@types/d3-chord": "*", + "@types/d3-color": "*", + "@types/d3-contour": "*", + "@types/d3-delaunay": "*", + "@types/d3-dispatch": "*", + "@types/d3-drag": "*", + "@types/d3-dsv": "*", + "@types/d3-ease": "*", + "@types/d3-fetch": "*", + "@types/d3-force": "*", + "@types/d3-format": "*", + "@types/d3-geo": "*", + "@types/d3-hierarchy": "*", + "@types/d3-interpolate": "*", + "@types/d3-path": "*", + "@types/d3-polygon": "*", + "@types/d3-quadtree": "*", + "@types/d3-random": "*", + "@types/d3-scale": "*", + "@types/d3-scale-chromatic": "*", + "@types/d3-selection": "*", + "@types/d3-shape": "*", + "@types/d3-time": "*", + "@types/d3-time-format": "*", + "@types/d3-timer": "*", + "@types/d3-transition": "*", + "@types/d3-zoom": "*" + } + }, + "node_modules/@types/d3-array": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/@types/d3-array/-/d3-array-3.2.2.tgz", + "integrity": "sha512-hOLWVbm7uRza0BYXpIIW5pxfrKe0W+D5lrFiAEYR+pb6w3N2SwSMaJbXdUfSEv+dT4MfHBLtn5js0LAWaO6otw==", + "license": "MIT" + }, + "node_modules/@types/d3-axis": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/@types/d3-axis/-/d3-axis-3.0.6.tgz", + "integrity": "sha512-pYeijfZuBd87T0hGn0FO1vQ/cgLk6E1ALJjfkC0oJ8cbwkZl3TpgS8bVBLZN+2jjGgg38epgxb2zmoGtSfvgMw==", + "license": "MIT", + "dependencies": { + "@types/d3-selection": "*" + } + }, + "node_modules/@types/d3-brush": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/@types/d3-brush/-/d3-brush-3.0.6.tgz", + "integrity": "sha512-nH60IZNNxEcrh6L1ZSMNA28rj27ut/2ZmI3r96Zd+1jrZD++zD3LsMIjWlvg4AYrHn/Pqz4CF3veCxGjtbqt7A==", + "license": "MIT", + "dependencies": { + "@types/d3-selection": "*" + } + }, + "node_modules/@types/d3-chord": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/@types/d3-chord/-/d3-chord-3.0.6.tgz", + "integrity": "sha512-LFYWWd8nwfwEmTZG9PfQxd17HbNPksHBiJHaKuY1XeqscXacsS2tyoo6OdRsjf+NQYeB6XrNL3a25E3gH69lcg==", + "license": "MIT" + }, + "node_modules/@types/d3-color": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@types/d3-color/-/d3-color-3.1.3.tgz", + "integrity": "sha512-iO90scth9WAbmgv7ogoq57O9YpKmFBbmoEoCHDB2xMBY0+/KVrqAaCDyCE16dUspeOvIxFFRI+0sEtqDqy2b4A==", + "license": "MIT" + }, + "node_modules/@types/d3-contour": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/@types/d3-contour/-/d3-contour-3.0.6.tgz", + "integrity": "sha512-BjzLgXGnCWjUSYGfH1cpdo41/hgdWETu4YxpezoztawmqsvCeep+8QGfiY6YbDvfgHz/DkjeIkkZVJavB4a3rg==", + "license": "MIT", + "dependencies": { + "@types/d3-array": "*", + "@types/geojson": "*" + } + }, + "node_modules/@types/d3-delaunay": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/@types/d3-delaunay/-/d3-delaunay-6.0.4.tgz", + "integrity": "sha512-ZMaSKu4THYCU6sV64Lhg6qjf1orxBthaC161plr5KuPHo3CNm8DTHiLw/5Eq2b6TsNP0W0iJrUOFscY6Q450Hw==", + "license": "MIT" + }, + "node_modules/@types/d3-dispatch": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@types/d3-dispatch/-/d3-dispatch-3.0.7.tgz", + "integrity": "sha512-5o9OIAdKkhN1QItV2oqaE5KMIiXAvDWBDPrD85e58Qlz1c1kI/J0NcqbEG88CoTwJrYe7ntUCVfeUl2UJKbWgA==", + "license": "MIT" + }, + "node_modules/@types/d3-drag": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@types/d3-drag/-/d3-drag-3.0.7.tgz", + "integrity": "sha512-HE3jVKlzU9AaMazNufooRJ5ZpWmLIoc90A37WU2JMmeq28w1FQqCZswHZ3xR+SuxYftzHq6WU6KJHvqxKzTxxQ==", + "license": "MIT", + "dependencies": { + "@types/d3-selection": "*" + } + }, + "node_modules/@types/d3-dsv": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@types/d3-dsv/-/d3-dsv-3.0.7.tgz", + "integrity": "sha512-n6QBF9/+XASqcKK6waudgL0pf/S5XHPPI8APyMLLUHd8NqouBGLsU8MgtO7NINGtPBtk9Kko/W4ea0oAspwh9g==", + "license": "MIT" + }, + "node_modules/@types/d3-ease": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-ease/-/d3-ease-3.0.2.tgz", + "integrity": "sha512-NcV1JjO5oDzoK26oMzbILE6HW7uVXOHLQvHshBUW4UMdZGfiY6v5BeQwh9a9tCzv+CeefZQHJt5SRgK154RtiA==", + "license": "MIT" + }, + "node_modules/@types/d3-fetch": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@types/d3-fetch/-/d3-fetch-3.0.7.tgz", + "integrity": "sha512-fTAfNmxSb9SOWNB9IoG5c8Hg6R+AzUHDRlsXsDZsNp6sxAEOP0tkP3gKkNSO/qmHPoBFTxNrjDprVHDQDvo5aA==", + "license": "MIT", + "dependencies": { + "@types/d3-dsv": "*" + } + }, + "node_modules/@types/d3-force": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/@types/d3-force/-/d3-force-3.0.10.tgz", + "integrity": "sha512-ZYeSaCF3p73RdOKcjj+swRlZfnYpK1EbaDiYICEEp5Q6sUiqFaFQ9qgoshp5CzIyyb/yD09kD9o2zEltCexlgw==", + "license": "MIT" + }, + "node_modules/@types/d3-format": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/d3-format/-/d3-format-3.0.4.tgz", + "integrity": "sha512-fALi2aI6shfg7vM5KiR1wNJnZ7r6UuggVqtDA+xiEdPZQwy/trcQaHnwShLuLdta2rTymCNpxYTiMZX/e09F4g==", + "license": "MIT" + }, + "node_modules/@types/d3-geo": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@types/d3-geo/-/d3-geo-3.1.0.tgz", + "integrity": "sha512-856sckF0oP/diXtS4jNsiQw/UuK5fQG8l/a9VVLeSouf1/PPbBE1i1W852zVwKwYCBkFJJB7nCFTbk6UMEXBOQ==", + "license": "MIT", + "dependencies": { + "@types/geojson": "*" + } + }, + "node_modules/@types/d3-hierarchy": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/@types/d3-hierarchy/-/d3-hierarchy-3.1.7.tgz", + "integrity": "sha512-tJFtNoYBtRtkNysX1Xq4sxtjK8YgoWUNpIiUee0/jHGRwqvzYxkq0hGVbbOGSz+JgFxxRu4K8nb3YpG3CMARtg==", + "license": "MIT" + }, + "node_modules/@types/d3-interpolate": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/d3-interpolate/-/d3-interpolate-3.0.4.tgz", + "integrity": "sha512-mgLPETlrpVV1YRJIglr4Ez47g7Yxjl1lj7YKsiMCb27VJH9W8NVM6Bb9d8kkpG/uAQS5AmbA48q2IAolKKo1MA==", + "license": "MIT", + "dependencies": { + "@types/d3-color": "*" + } + }, + "node_modules/@types/d3-path": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@types/d3-path/-/d3-path-3.1.1.tgz", + "integrity": "sha512-VMZBYyQvbGmWyWVea0EHs/BwLgxc+MKi1zLDCONksozI4YJMcTt8ZEuIR4Sb1MMTE8MMW49v0IwI5+b7RmfWlg==", + "license": "MIT" + }, + "node_modules/@types/d3-polygon": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-polygon/-/d3-polygon-3.0.2.tgz", + "integrity": "sha512-ZuWOtMaHCkN9xoeEMr1ubW2nGWsp4nIql+OPQRstu4ypeZ+zk3YKqQT0CXVe/PYqrKpZAi+J9mTs05TKwjXSRA==", + "license": "MIT" + }, + "node_modules/@types/d3-quadtree": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/@types/d3-quadtree/-/d3-quadtree-3.0.6.tgz", + "integrity": "sha512-oUzyO1/Zm6rsxKRHA1vH0NEDG58HrT5icx/azi9MF1TWdtttWl0UIUsjEQBBh+SIkrpd21ZjEv7ptxWys1ncsg==", + "license": "MIT" + }, + "node_modules/@types/d3-random": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/d3-random/-/d3-random-3.0.3.tgz", + "integrity": "sha512-Imagg1vJ3y76Y2ea0871wpabqp613+8/r0mCLEBfdtqC7xMSfj9idOnmBYyMoULfHePJyxMAw3nWhJxzc+LFwQ==", + "license": "MIT" + }, "node_modules/@types/d3-scale": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/@types/d3-scale/-/d3-scale-4.0.8.tgz", - "integrity": "sha512-gkK1VVTr5iNiYJ7vWDI+yUFFlszhNMtVeneJ6lUTKPjprsvLLI9/tgEGiXJOnlINJA8FyA88gfnQsHbybVZrYQ==", + "version": "4.0.9", + "resolved": "https://registry.npmjs.org/@types/d3-scale/-/d3-scale-4.0.9.tgz", + "integrity": "sha512-dLmtwB8zkAeO/juAMfnV+sItKjlsw2lKdZVVy6LRr0cBmegxSABiLEpGVmSJJ8O08i4+sGR6qQtb6WtuwJdvVw==", "license": "MIT", "dependencies": { "@types/d3-time": "*" } }, "node_modules/@types/d3-scale-chromatic": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@types/d3-scale-chromatic/-/d3-scale-chromatic-3.0.3.tgz", - "integrity": "sha512-laXM4+1o5ImZv3RpFAsTRn3TEkzqkytiOY0Dz0sq5cnd1dtNlk6sHLon4OvqaiJb28T0S/TdsBI3Sjsy+keJrw==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@types/d3-scale-chromatic/-/d3-scale-chromatic-3.1.0.tgz", + "integrity": "sha512-iWMJgwkK7yTRmWqRB5plb1kadXyQ5Sj8V/zYlFGMUBbIPKQScw+Dku9cAAMgJG+z5GYDoMjWGLVOvjghDEFnKQ==", "license": "MIT" }, + "node_modules/@types/d3-selection": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/@types/d3-selection/-/d3-selection-3.0.11.tgz", + "integrity": "sha512-bhAXu23DJWsrI45xafYpkQ4NtcKMwWnAC/vKrd2l+nxMFuvOT3XMYTIj2opv8vq8AO5Yh7Qac/nSeP/3zjTK0w==", + "license": "MIT" + }, + "node_modules/@types/d3-shape": { + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/@types/d3-shape/-/d3-shape-3.1.8.tgz", + "integrity": "sha512-lae0iWfcDeR7qt7rA88BNiqdvPS5pFVPpo5OfjElwNaT2yyekbM0C9vK+yqBqEmHr6lDkRnYNoTBYlAgJa7a4w==", + "license": "MIT", + "dependencies": { + "@types/d3-path": "*" + } + }, "node_modules/@types/d3-time": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@types/d3-time/-/d3-time-3.0.3.tgz", - "integrity": "sha512-2p6olUZ4w3s+07q3Tm2dbiMZy5pCDfYwtLXXHUnVzXgQlZ/OyPtUz6OL382BkOuGlLXqfT+wqv8Fw2v8/0geBw==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/d3-time/-/d3-time-3.0.4.tgz", + "integrity": "sha512-yuzZug1nkAAaBlBBikKZTgzCeA+k1uy4ZFwWANOfKw5z5LRhV0gNA7gNkKm7HoK+HRN0wX3EkxGk0fpbWhmB7g==", "license": "MIT" }, + "node_modules/@types/d3-time-format": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@types/d3-time-format/-/d3-time-format-4.0.3.tgz", + "integrity": "sha512-5xg9rC+wWL8kdDj153qZcsJ0FWiFt0J5RB6LYUNZjwSnesfblqrI/bJ1wBdJ8OQfncgbJG5+2F+qfqnqyzYxyg==", + "license": "MIT" + }, + "node_modules/@types/d3-timer": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-timer/-/d3-timer-3.0.2.tgz", + "integrity": "sha512-Ps3T8E8dZDam6fUyNiMkekK3XUsaUEik+idO9/YjPtfj2qruF8tFBXS7XhtE4iIXBLxhmLjP3SXpLhVf21I9Lw==", + "license": "MIT" + }, + "node_modules/@types/d3-transition": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/@types/d3-transition/-/d3-transition-3.0.9.tgz", + "integrity": "sha512-uZS5shfxzO3rGlu0cC3bjmMFKsXv+SmZZcgp0KD22ts4uGXp5EVYGzu/0YdwZeKmddhcAccYtREJKkPfXkZuCg==", + "license": "MIT", + "dependencies": { + "@types/d3-selection": "*" + } + }, + "node_modules/@types/d3-zoom": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@types/d3-zoom/-/d3-zoom-3.0.8.tgz", + "integrity": "sha512-iqMC4/YlFCSlO8+2Ii1GGGliCAY4XdeG748w5vQUbevlbDu0zSjH/+jojorQVBK/se0j6DUFNPBGSqD3YWYnDw==", + "license": "MIT", + "dependencies": { + "@types/d3-interpolate": "*", + "@types/d3-selection": "*" + } + }, "node_modules/@types/debug": { - "version": "4.1.12", - "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.12.tgz", - "integrity": "sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==", + "version": "4.1.13", + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.13.tgz", + "integrity": "sha512-KSVgmQmzMwPlmtljOomayoR89W4FynCAi3E8PPs7vmDVPe84hT+vGPKkJfThkmXs0x0jAaa9U8uW8bbfyS2fWw==", "license": "MIT", "dependencies": { "@types/ms": "*" } }, + "node_modules/@types/eslint": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-9.6.1.tgz", + "integrity": "sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==", + "license": "MIT", + "dependencies": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "node_modules/@types/eslint-scope": { + "version": "3.7.7", + "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.7.tgz", + "integrity": "sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==", + "license": "MIT", + "dependencies": { + "@types/eslint": "*", + "@types/estree": "*" + } + }, "node_modules/@types/estree": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", - "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", "license": "MIT" }, "node_modules/@types/estree-jsx": { @@ -4281,21 +6332,21 @@ } }, "node_modules/@types/express": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.21.tgz", - "integrity": "sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==", + "version": "4.17.25", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.25.tgz", + "integrity": "sha512-dVd04UKsfpINUnK0yBoYHDF3xu7xVH4BuDotC/xGuycx4CgbP48X/KF/586bcObxT0HENHXEU8Nqtu6NR+eKhw==", "license": "MIT", "dependencies": { "@types/body-parser": "*", "@types/express-serve-static-core": "^4.17.33", "@types/qs": "*", - "@types/serve-static": "*" + "@types/serve-static": "^1" } }, "node_modules/@types/express-serve-static-core": { - "version": "4.19.5", - "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.5.tgz", - "integrity": "sha512-y6W03tvrACO72aijJ5uF02FRq5cgDR9lUxddQ8vyF+GvmjJQqbzDcJngEjURc+ZsG31VI3hODNZJ2URj86pzmg==", + "version": "4.19.8", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.8.tgz", + "integrity": "sha512-02S5fmqeoKzVZCHPZid4b8JH2eM5HzQLZWN2FohQEy/0eXTq8VXZfSN6Pcr3F6N9R/vNrj7cpgbhjie6m/1tCA==", "license": "MIT", "dependencies": { "@types/node": "*", @@ -4304,21 +6355,27 @@ "@types/send": "*" } }, + "node_modules/@types/geojson": { + "version": "7946.0.16", + "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.16.tgz", + "integrity": "sha512-6C8nqWur3j98U6+lXDfTUWIfgvZU+EumvpHKcYjujKH7woYyLj2sUmff0tRhrqM7BohUw7Pz3ZB1jj2gW9Fvmg==", + "license": "MIT" + }, "node_modules/@types/glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-IO+MJPVhoqz+28h1qLAcBEH2+xHMK6MTyHJc7MTnnYb6wsoLR29POVGJ7LycmVXIqyy/4/2ShP5sUwTXuOwb/w==", "dev": true, "license": "MIT", "dependencies": { - "@types/minimatch": "*", + "@types/minimatch": "^5.1.2", "@types/node": "*" } }, "node_modules/@types/gtag.js": { - "version": "0.0.12", - "resolved": "https://registry.npmjs.org/@types/gtag.js/-/gtag.js-0.0.12.tgz", - "integrity": "sha512-YQV9bUsemkzG81Ea295/nF/5GijnD2Af7QhEofh7xu+kvCN6RdodgNwwGWXB5GMI3NoyvQo0odNctoH/qLMIpg==", + "version": "0.0.20", + "resolved": "https://registry.npmjs.org/@types/gtag.js/-/gtag.js-0.0.20.tgz", + "integrity": "sha512-wwAbk3SA2QeU67unN7zPxjEHmPmlXwZXZvQEpbEUQuMCRGgKyE1m6XDuTUA9b6pCGb/GqJmdfMOY5LuDjJSbbg==", "license": "MIT" }, "node_modules/@types/hast": { @@ -4343,21 +6400,21 @@ "license": "MIT" }, "node_modules/@types/http-cache-semantics": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz", - "integrity": "sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.2.0.tgz", + "integrity": "sha512-L3LgimLHXtGkWikKnsPg0/VFx9OGZaC+eN1u4r+OB1XRqH3meBIAVC2zr1WdMH+RHmnRkqliQAOHNJ/E0j/e0Q==", "license": "MIT" }, "node_modules/@types/http-errors": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.4.tgz", - "integrity": "sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.5.tgz", + "integrity": "sha512-r8Tayk8HJnX0FztbZN7oVqGccWgw98T/0neJphO91KkmOzug1KkofZURD4UaD5uH8AqcFLfdPErnBod0u71/qg==", "license": "MIT" }, "node_modules/@types/http-proxy": { - "version": "1.17.15", - "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.15.tgz", - "integrity": "sha512-25g5atgiVNTIv0LBDTg1H74Hvayx0ajtJPLLcYE3whFv75J0pWNtOBzaXJQgDTmrX1bx5U9YC2w/n65BN1HwRQ==", + "version": "1.17.17", + "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.17.tgz", + "integrity": "sha512-ED6LB+Z1AVylNTu7hdzuBqOgMnvG/ld6wGCG8wFnAzKX5uyW2K3WD52v0gnLCTK/VLpXtKckgWuyScYK6cSPaw==", "license": "MIT", "dependencies": { "@types/node": "*" @@ -4408,27 +6465,21 @@ "license": "MIT" }, "node_modules/@types/lodash": { - "version": "4.17.7", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.7.tgz", - "integrity": "sha512-8wTvZawATi/lsmNu10/j2hk1KEP0IvjubqPE3cu1Xz7xfXXt5oCq3SNUz4fMIP4XGF9Ky+Ue2tBA3hcS7LSBlA==", + "version": "4.17.24", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.24.tgz", + "integrity": "sha512-gIW7lQLZbue7lRSWEFql49QJJWThrTFFeIMJdp3eH4tKoxm1OvEPg02rm4wCCSHS0cL3/Fizimb35b7k8atwsQ==", "dev": true, "license": "MIT" }, "node_modules/@types/mdast": { - "version": "3.0.15", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", - "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz", + "integrity": "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==", "license": "MIT", "dependencies": { - "@types/unist": "^2" + "@types/unist": "*" } }, - "node_modules/@types/mdast/node_modules/@types/unist": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz", - "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==", - "license": "MIT" - }, "node_modules/@types/mdx": { "version": "2.0.13", "resolved": "https://registry.npmjs.org/@types/mdx/-/mdx-2.0.13.tgz", @@ -4449,58 +6500,36 @@ "license": "MIT" }, "node_modules/@types/ms": { - "version": "0.7.34", - "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.34.tgz", - "integrity": "sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@types/ms/-/ms-2.1.0.tgz", + "integrity": "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==", "license": "MIT" }, "node_modules/@types/node": { - "version": "22.5.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.5.1.tgz", - "integrity": "sha512-KkHsxej0j9IW1KKOOAA/XBA0z08UFSrRQHErzEfA3Vgq57eXIMYboIlHJuYIfd+lwCQjtKqUu3UnmKbtUc9yRw==", + "version": "25.5.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-25.5.0.tgz", + "integrity": "sha512-jp2P3tQMSxWugkCUKLRPVUpGaL5MVFwF8RDuSRztfwgN1wmqJeMSbKlnEtQqU8UrhTmzEmZdu2I6v2dpp7XIxw==", "license": "MIT", "dependencies": { - "undici-types": "~6.19.2" + "undici-types": "~7.18.0" } }, - "node_modules/@types/node-forge": { - "version": "1.3.11", - "resolved": "https://registry.npmjs.org/@types/node-forge/-/node-forge-1.3.11.tgz", - "integrity": "sha512-FQx220y22OKNTqaByeBGqHWYz4cl94tpcxeFdvBo3wjG6XPBuZ0BNgNZRV5J5TFmmcsJ4IzsLkmGRiQbnYsBEQ==", - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/parse-json": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.2.tgz", - "integrity": "sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==", - "license": "MIT" - }, - "node_modules/@types/prettier": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.3.tgz", - "integrity": "sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==", - "dev": true, - "license": "MIT" - }, "node_modules/@types/prismjs": { - "version": "1.26.4", - "resolved": "https://registry.npmjs.org/@types/prismjs/-/prismjs-1.26.4.tgz", - "integrity": "sha512-rlAnzkW2sZOjbqZ743IHUhFcvzaGbqijwOu8QZnZCjfQzBqFE3s4lOTJEsxikImav9uzz/42I+O7YUs1mWgMlg==", + "version": "1.26.6", + "resolved": "https://registry.npmjs.org/@types/prismjs/-/prismjs-1.26.6.tgz", + "integrity": "sha512-vqlvI7qlMvcCBbVe0AKAb4f97//Hy0EBTaiW8AalRnG/xAN5zOiWWyrNqNXeq8+KAuvRewjCVY1+IPxk4RdNYw==", "license": "MIT" }, "node_modules/@types/prop-types": { - "version": "15.7.12", - "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.12.tgz", - "integrity": "sha512-5zvhXYtRNRluoE/jAp4GVsSduVUzNWKkOZrCDBWYtE7biZywwdC2AcEzg+cSMLFRfVgeAFqpfNabiPjxFddV1Q==", + "version": "15.7.15", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.15.tgz", + "integrity": "sha512-F6bEyamV9jKGAFBEmlQnesRPGOQqS2+Uwi0Em15xenOxHaf2hv6L8YCVn3rPdPJOiJfPiCnLIRyvwVaqMY3MIw==", "license": "MIT" }, "node_modules/@types/qs": { - "version": "6.9.15", - "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.15.tgz", - "integrity": "sha512-uXHQKES6DQKKCLh441Xv/dwxOq1TVS3JPUMlEqoEglvlhR6Mxnlew/Xq/LRVHpLyk7iK3zODe1qYHIMltO7XGg==", + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.15.0.tgz", + "integrity": "sha512-JawvT8iBVWpzTrz3EGw9BTQFg3BQNmwERdKE22vlTxawwtbyUSlMppvZYKLZzB5zgACXdXxbD3m1bXaMqP/9ow==", "license": "MIT" }, "node_modules/@types/range-parser": { @@ -4510,13 +6539,13 @@ "license": "MIT" }, "node_modules/@types/react": { - "version": "18.3.5", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.5.tgz", - "integrity": "sha512-WeqMfGJLGuLCqHGYRGHxnKrXcTitc6L/nBUWfWPcTarG3t9PsquqUMuVeXZeca+mglY4Vo5GZjCi0A3Or2lnxA==", + "version": "18.3.28", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.28.tgz", + "integrity": "sha512-z9VXpC7MWrhfWipitjNdgCauoMLRdIILQsAEV+ZesIzBq/oUlxk0m3ApZuMFCXdnS4U7KrI+l3WRUEGQ8K1QKw==", "license": "MIT", "dependencies": { "@types/prop-types": "*", - "csstype": "^3.0.2" + "csstype": "^3.2.2" } }, "node_modules/@types/react-helmet": { @@ -4562,9 +6591,9 @@ } }, "node_modules/@types/retry": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.0.tgz", - "integrity": "sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==", + "version": "0.12.2", + "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.2.tgz", + "integrity": "sha512-XISRgDJ2Tc5q4TRqvgJtzsRkFYNJzZrhTdtMoGVBttwzzQJkPnS3WWTFc7kuDRoPtPakl+T+OfdEUjYJj7Jbow==", "license": "MIT" }, "node_modules/@types/sax": { @@ -4577,12 +6606,11 @@ } }, "node_modules/@types/send": { - "version": "0.17.4", - "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.4.tgz", - "integrity": "sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@types/send/-/send-1.2.1.tgz", + "integrity": "sha512-arsCikDvlU99zl1g69TcAB3mzZPpxgw0UQnaHeC1Nwb015xp8bknZv5rIfri9xTOcMuaVgvabfIRA7PSZVuZIQ==", "license": "MIT", "dependencies": { - "@types/mime": "^1", "@types/node": "*" } }, @@ -4596,14 +6624,24 @@ } }, "node_modules/@types/serve-static": { - "version": "1.15.7", - "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.7.tgz", - "integrity": "sha512-W8Ym+h8nhuRwaKPaDw34QUkwsGi6Rc4yYqvKFo5rm2FUEhCFbzVWrxXUxuKK8TASjWsysJY0nsmNCGhCOIsrOw==", + "version": "1.15.10", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.10.tgz", + "integrity": "sha512-tRs1dB+g8Itk72rlSI2ZrW6vZg0YrLI81iQSTkMmOqnqCaNr/8Ek4VwWcN5vZgCYWbg/JJSGBlUaYGAOP73qBw==", "license": "MIT", "dependencies": { "@types/http-errors": "*", "@types/node": "*", - "@types/send": "*" + "@types/send": "<1" + } + }, + "node_modules/@types/serve-static/node_modules/@types/send": { + "version": "0.17.6", + "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.6.tgz", + "integrity": "sha512-Uqt8rPBE8SY0RK8JB1EzVOIZ32uqy8HwdxCnoCOsYrvnswqmFZ/k+9Ikidlk/ImhsdvBsloHbAlewb2IEBV/Og==", + "license": "MIT", + "dependencies": { + "@types/mime": "^1", + "@types/node": "*" } }, "node_modules/@types/sockjs": { @@ -4622,6 +6660,13 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/trusted-types": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz", + "integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==", + "license": "MIT", + "optional": true + }, "node_modules/@types/unist": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz", @@ -4629,18 +6674,18 @@ "license": "MIT" }, "node_modules/@types/ws": { - "version": "8.5.12", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.12.tgz", - "integrity": "sha512-3tPRkv1EtkDpzlgyKyI8pGsGZAGPEaXeu0DOj5DI25Ja91bdAYddYHbADRYVrZMRbfW+1l5YwXVDKohDJNQxkQ==", + "version": "8.18.1", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.18.1.tgz", + "integrity": "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==", "license": "MIT", "dependencies": { "@types/node": "*" } }, "node_modules/@types/yargs": { - "version": "17.0.33", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.33.tgz", - "integrity": "sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==", + "version": "17.0.35", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.35.tgz", + "integrity": "sha512-qUHkeCyQFxMXg79wQfTtfndEC+N9ZZg76HJftDJp+qH2tV7Gj4OJi7l+PiWwJ+pWtW8GwSmqsDj/oymhrTWXjg==", "license": "MIT", "dependencies": { "@types/yargs-parser": "*" @@ -4652,155 +6697,447 @@ "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", "license": "MIT" }, - "node_modules/@ungap/structured-clone": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", - "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", - "license": "ISC" - }, - "node_modules/@webassemblyjs/ast": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.12.1.tgz", - "integrity": "sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==", + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "8.57.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.57.2.tgz", + "integrity": "sha512-NZZgp0Fm2IkD+La5PR81sd+g+8oS6JwJje+aRWsDocxHkjyRw0J5L5ZTlN3LI1LlOcGL7ph3eaIUmTXMIjLk0w==", + "dev": true, "license": "MIT", "dependencies": { - "@webassemblyjs/helper-numbers": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6" + "@eslint-community/regexpp": "^4.12.2", + "@typescript-eslint/scope-manager": "8.57.2", + "@typescript-eslint/type-utils": "8.57.2", + "@typescript-eslint/utils": "8.57.2", + "@typescript-eslint/visitor-keys": "8.57.2", + "ignore": "^7.0.5", + "natural-compare": "^1.4.0", + "ts-api-utils": "^2.4.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^8.57.2", + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", + "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "8.57.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.57.2.tgz", + "integrity": "sha512-30ScMRHIAD33JJQkgfGW1t8CURZtjc2JpTrq5n2HFhOefbAhb7ucc7xJwdWcrEtqUIYJ73Nybpsggii6GtAHjA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/scope-manager": "8.57.2", + "@typescript-eslint/types": "8.57.2", + "@typescript-eslint/typescript-estree": "8.57.2", + "@typescript-eslint/visitor-keys": "8.57.2", + "debug": "^4.4.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/project-service": { + "version": "8.57.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.57.2.tgz", + "integrity": "sha512-FuH0wipFywXRTHf+bTTjNyuNQQsQC3qh/dYzaM4I4W0jrCqjCVuUh99+xd9KamUfmCGPvbO8NDngo/vsnNVqgw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/tsconfig-utils": "^8.57.2", + "@typescript-eslint/types": "^8.57.2", + "debug": "^4.4.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "8.57.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.57.2.tgz", + "integrity": "sha512-snZKH+W4WbWkrBqj4gUNRIGb/jipDW3qMqVJ4C9rzdFc+wLwruxk+2a5D+uoFcKPAqyqEnSb4l2ULuZf95eSkw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.57.2", + "@typescript-eslint/visitor-keys": "8.57.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/tsconfig-utils": { + "version": "8.57.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.57.2.tgz", + "integrity": "sha512-3Lm5DSM+DCowsUOJC+YqHHnKEfFh5CoGkj5Z31NQSNF4l5wdOwqGn99wmwN/LImhfY3KJnmordBq/4+VDe2eKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "8.57.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.57.2.tgz", + "integrity": "sha512-Co6ZCShm6kIbAM/s+oYVpKFfW7LBc6FXoPXjTRQ449PPNBY8U0KZXuevz5IFuuUj2H9ss40atTaf9dlGLzbWZg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.57.2", + "@typescript-eslint/typescript-estree": "8.57.2", + "@typescript-eslint/utils": "8.57.2", + "debug": "^4.4.3", + "ts-api-utils": "^2.4.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/types": { + "version": "8.57.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.57.2.tgz", + "integrity": "sha512-/iZM6FnM4tnx9csuTxspMW4BOSegshwX5oBDznJ7S4WggL7Vczz5d2W11ecc4vRrQMQHXRSxzrCsyG5EsPPTbA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "8.57.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.57.2.tgz", + "integrity": "sha512-2MKM+I6g8tJxfSmFKOnHv2t8Sk3T6rF20A1Puk0svLK+uVapDZB/4pfAeB7nE83uAZrU6OxW+HmOd5wHVdXwXA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/project-service": "8.57.2", + "@typescript-eslint/tsconfig-utils": "8.57.2", + "@typescript-eslint/types": "8.57.2", + "@typescript-eslint/visitor-keys": "8.57.2", + "debug": "^4.4.3", + "minimatch": "^10.2.2", + "semver": "^7.7.3", + "tinyglobby": "^0.2.15", + "ts-api-utils": "^2.4.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/balanced-match": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.5.tgz", + "integrity": "sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { + "version": "10.2.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.4.tgz", + "integrity": "sha512-oRjTw/97aTBN0RHbYCdtF1MQfvusSIBQM0IZEgzl6426+8jSC0nF1a/GmnVLpfB9yyr6g6FTqWqiZVbxrtaCIg==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "brace-expansion": "^5.0.2" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "8.57.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.57.2.tgz", + "integrity": "sha512-krRIbvPK1ju1WBKIefiX+bngPs+odIQUtR7kymzPfo1POVw3jlF+nLkmexdSSd4UCbDcQn+wMBATOOmpBbqgKg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.9.1", + "@typescript-eslint/scope-manager": "8.57.2", + "@typescript-eslint/types": "8.57.2", + "@typescript-eslint/typescript-estree": "8.57.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "8.57.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.57.2.tgz", + "integrity": "sha512-zhahknjobV2FiD6Ee9iLbS7OV9zi10rG26odsQdfBO/hjSzUQbkIYgda+iNKK1zNiW2ey+Lf8MU5btN17V3dUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.57.2", + "eslint-visitor-keys": "^5.0.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz", + "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@ungap/structured-clone": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.0.tgz", + "integrity": "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==", + "license": "ISC" + }, + "node_modules/@upsetjs/venn.js": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@upsetjs/venn.js/-/venn.js-2.0.0.tgz", + "integrity": "sha512-WbBhLrooyePuQ1VZxrJjtLvTc4NVfpOyKx0sKqioq9bX1C1m7Jgykkn8gLrtwumBioXIqam8DLxp88Adbue6Hw==", + "license": "MIT", + "optionalDependencies": { + "d3-selection": "^3.0.0", + "d3-transition": "^3.0.1" + } + }, + "node_modules/@webassemblyjs/ast": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.14.1.tgz", + "integrity": "sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ==", + "license": "MIT", + "dependencies": { + "@webassemblyjs/helper-numbers": "1.13.2", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2" } }, "node_modules/@webassemblyjs/floating-point-hex-parser": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", - "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.13.2.tgz", + "integrity": "sha512-6oXyTOzbKxGH4steLbLNOu71Oj+C8Lg34n6CqRvqfS2O71BxY6ByfMDRhBytzknj9yGUPVJ1qIKhRlAwO1AovA==", "license": "MIT" }, "node_modules/@webassemblyjs/helper-api-error": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", - "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.13.2.tgz", + "integrity": "sha512-U56GMYxy4ZQCbDZd6JuvvNV/WFildOjsaWD3Tzzvmw/mas3cXzRJPMjP83JqEsgSbyrmaGjBfDtV7KDXV9UzFQ==", "license": "MIT" }, "node_modules/@webassemblyjs/helper-buffer": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz", - "integrity": "sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.14.1.tgz", + "integrity": "sha512-jyH7wtcHiKssDtFPRB+iQdxlDf96m0E39yb0k5uJVhFGleZFoNw1c4aeIcVUPPbXUVJ94wwnMOAqUHyzoEPVMA==", "license": "MIT" }, "node_modules/@webassemblyjs/helper-numbers": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", - "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.13.2.tgz", + "integrity": "sha512-FE8aCmS5Q6eQYcV3gI35O4J789wlQA+7JrqTTpJqn5emA4U2hvwJmvFRC0HODS+3Ye6WioDklgd6scJ3+PLnEA==", "license": "MIT", "dependencies": { - "@webassemblyjs/floating-point-hex-parser": "1.11.6", - "@webassemblyjs/helper-api-error": "1.11.6", + "@webassemblyjs/floating-point-hex-parser": "1.13.2", + "@webassemblyjs/helper-api-error": "1.13.2", "@xtuc/long": "4.2.2" } }, "node_modules/@webassemblyjs/helper-wasm-bytecode": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", - "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.13.2.tgz", + "integrity": "sha512-3QbLKy93F0EAIXLh0ogEVR6rOubA9AoZ+WRYhNbFyuB70j3dRdwH9g+qXhLAO0kiYGlg3TxDV+I4rQTr/YNXkA==", "license": "MIT" }, "node_modules/@webassemblyjs/helper-wasm-section": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz", - "integrity": "sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.14.1.tgz", + "integrity": "sha512-ds5mXEqTJ6oxRoqjhWDU83OgzAYjwsCV8Lo/N+oRsNDmx/ZDpqalmrtgOMkHwxsG0iI//3BwWAErYRHtgn0dZw==", "license": "MIT", "dependencies": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-buffer": "1.12.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/wasm-gen": "1.12.1" + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-buffer": "1.14.1", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/wasm-gen": "1.14.1" } }, "node_modules/@webassemblyjs/ieee754": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", - "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.13.2.tgz", + "integrity": "sha512-4LtOzh58S/5lX4ITKxnAK2USuNEvpdVV9AlgGQb8rJDHaLeHciwG4zlGr0j/SNWlr7x3vO1lDEsuePvtcDNCkw==", "license": "MIT", "dependencies": { "@xtuc/ieee754": "^1.2.0" } }, "node_modules/@webassemblyjs/leb128": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", - "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.13.2.tgz", + "integrity": "sha512-Lde1oNoIdzVzdkNEAWZ1dZ5orIbff80YPdHx20mrHwHrVNNTjNr8E3xz9BdpcGqRQbAEa+fkrCb+fRFTl/6sQw==", "license": "Apache-2.0", "dependencies": { "@xtuc/long": "4.2.2" } }, "node_modules/@webassemblyjs/utf8": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", - "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.13.2.tgz", + "integrity": "sha512-3NQWGjKTASY1xV5m7Hr0iPeXD9+RDobLll3T9d2AO+g3my8xy5peVyjSag4I50mR1bBSN/Ct12lo+R9tJk0NZQ==", "license": "MIT" }, "node_modules/@webassemblyjs/wasm-edit": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz", - "integrity": "sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.14.1.tgz", + "integrity": "sha512-RNJUIQH/J8iA/1NzlE4N7KtyZNHi3w7at7hDjvRNm5rcUXa00z1vRz3glZoULfJ5mpvYhLybmVcwcjGrC1pRrQ==", "license": "MIT", "dependencies": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-buffer": "1.12.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/helper-wasm-section": "1.12.1", - "@webassemblyjs/wasm-gen": "1.12.1", - "@webassemblyjs/wasm-opt": "1.12.1", - "@webassemblyjs/wasm-parser": "1.12.1", - "@webassemblyjs/wast-printer": "1.12.1" + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-buffer": "1.14.1", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/helper-wasm-section": "1.14.1", + "@webassemblyjs/wasm-gen": "1.14.1", + "@webassemblyjs/wasm-opt": "1.14.1", + "@webassemblyjs/wasm-parser": "1.14.1", + "@webassemblyjs/wast-printer": "1.14.1" } }, "node_modules/@webassemblyjs/wasm-gen": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz", - "integrity": "sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.14.1.tgz", + "integrity": "sha512-AmomSIjP8ZbfGQhumkNvgC33AY7qtMCXnN6bL2u2Js4gVCg8fp735aEiMSBbDR7UQIj90n4wKAFUSEd0QN2Ukg==", "license": "MIT", "dependencies": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/ieee754": "1.11.6", - "@webassemblyjs/leb128": "1.11.6", - "@webassemblyjs/utf8": "1.11.6" + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/ieee754": "1.13.2", + "@webassemblyjs/leb128": "1.13.2", + "@webassemblyjs/utf8": "1.13.2" } }, "node_modules/@webassemblyjs/wasm-opt": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz", - "integrity": "sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.14.1.tgz", + "integrity": "sha512-PTcKLUNvBqnY2U6E5bdOQcSM+oVP/PmrDY9NzowJjislEjwP/C4an2303MCVS2Mg9d3AJpIGdUFIQQWbPds0Sw==", "license": "MIT", "dependencies": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-buffer": "1.12.1", - "@webassemblyjs/wasm-gen": "1.12.1", - "@webassemblyjs/wasm-parser": "1.12.1" + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-buffer": "1.14.1", + "@webassemblyjs/wasm-gen": "1.14.1", + "@webassemblyjs/wasm-parser": "1.14.1" } }, "node_modules/@webassemblyjs/wasm-parser": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz", - "integrity": "sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.14.1.tgz", + "integrity": "sha512-JLBl+KZ0R5qB7mCnud/yyX08jWFw5MsoalJ1pQ4EdFlgj9VdXKGuENGsiCIjegI1W7p91rUlcB/LB5yRJKNTcQ==", "license": "MIT", "dependencies": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-api-error": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/ieee754": "1.11.6", - "@webassemblyjs/leb128": "1.11.6", - "@webassemblyjs/utf8": "1.11.6" + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-api-error": "1.13.2", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/ieee754": "1.13.2", + "@webassemblyjs/leb128": "1.13.2", + "@webassemblyjs/utf8": "1.13.2" } }, "node_modules/@webassemblyjs/wast-printer": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz", - "integrity": "sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.14.1.tgz", + "integrity": "sha512-kPSSXE6De1XOR820C90RIo2ogvZG+c3KiHzqUoO/F34Y2shGzesfqv7o57xrxovZJH/MetF5UjroJ/R/3isoiw==", "license": "MIT", "dependencies": { - "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/ast": "1.14.1", "@xtuc/long": "4.2.2" } }, @@ -4860,10 +7197,19 @@ "node": ">= 0.6" } }, + "node_modules/accepts/node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, "node_modules/acorn": { - "version": "8.12.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", - "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.16.0.tgz", + "integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==", "license": "MIT", "bin": { "acorn": "bin/acorn" @@ -4872,13 +7218,16 @@ "node": ">=0.4.0" } }, - "node_modules/acorn-import-attributes": { - "version": "1.9.5", - "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz", - "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==", + "node_modules/acorn-import-phases": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/acorn-import-phases/-/acorn-import-phases-1.0.4.tgz", + "integrity": "sha512-wKmbr/DDiIXzEOiWrTTUcDm24kQ2vGfZQvM2fwg2vXqR5uW6aapr7ObPtj1th32b9u90/Pf4AItvdTh42fBmVQ==", "license": "MIT", + "engines": { + "node": ">=10.13.0" + }, "peerDependencies": { - "acorn": "^8" + "acorn": "^8.14.0" } }, "node_modules/acorn-jsx": { @@ -4891,9 +7240,9 @@ } }, "node_modules/acorn-walk": { - "version": "8.3.3", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.3.tgz", - "integrity": "sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw==", + "version": "8.3.5", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.5.tgz", + "integrity": "sha512-HEHNfbars9v4pgpW6SO1KSPkfoS0xVOM/9UzkJltjlsHZmJasxg8aXkuZa7SMf8vKGIBhpUsPluQSqhJFCqebw==", "license": "MIT", "dependencies": { "acorn": "^8.11.0" @@ -4925,9 +7274,9 @@ } }, "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.14.0.tgz", + "integrity": "sha512-IWrosm/yrn43eiKqkfkHis7QioDleaXQHdDVPKg0FSwwd/DuvyX79TZnFOnYpB7dcsFAMmtFztZuXPDvSePkFw==", "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.1", @@ -4958,9 +7307,9 @@ } }, "node_modules/ajv-formats/node_modules/ajv": { - "version": "8.17.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", - "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.18.0.tgz", + "integrity": "sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A==", "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.3", @@ -4989,32 +7338,34 @@ } }, "node_modules/algoliasearch": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-4.24.0.tgz", - "integrity": "sha512-bf0QV/9jVejssFBmz2HQLxUadxk574t4iwjCKp5E7NBzwKkrDEhKPISIIjAU/p6K5qDx3qoeh4+26zWN1jmw3g==", + "version": "5.52.1", + "resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-5.52.1.tgz", + "integrity": "sha512-fHA8+kXTbjagw3jkLiaS7KKrH8qe2DyOsiUhGlN4cdT77PEsfqXZl7ewDk1hsg+pJnPlnE50XtLxjR91iJOpmg==", "license": "MIT", "dependencies": { - "@algolia/cache-browser-local-storage": "4.24.0", - "@algolia/cache-common": "4.24.0", - "@algolia/cache-in-memory": "4.24.0", - "@algolia/client-account": "4.24.0", - "@algolia/client-analytics": "4.24.0", - "@algolia/client-common": "4.24.0", - "@algolia/client-personalization": "4.24.0", - "@algolia/client-search": "4.24.0", - "@algolia/logger-common": "4.24.0", - "@algolia/logger-console": "4.24.0", - "@algolia/recommend": "4.24.0", - "@algolia/requester-browser-xhr": "4.24.0", - "@algolia/requester-common": "4.24.0", - "@algolia/requester-node-http": "4.24.0", - "@algolia/transporter": "4.24.0" + "@algolia/abtesting": "1.18.1", + "@algolia/client-abtesting": "5.52.1", + "@algolia/client-analytics": "5.52.1", + "@algolia/client-common": "5.52.1", + "@algolia/client-insights": "5.52.1", + "@algolia/client-personalization": "5.52.1", + "@algolia/client-query-suggestions": "5.52.1", + "@algolia/client-search": "5.52.1", + "@algolia/ingestion": "1.52.1", + "@algolia/monitoring": "1.52.1", + "@algolia/recommend": "5.52.1", + "@algolia/requester-browser-xhr": "5.52.1", + "@algolia/requester-fetch": "5.52.1", + "@algolia/requester-node-http": "5.52.1" + }, + "engines": { + "node": ">= 14.0.0" } }, "node_modules/algoliasearch-helper": { - "version": "3.22.4", - "resolved": "https://registry.npmjs.org/algoliasearch-helper/-/algoliasearch-helper-3.22.4.tgz", - "integrity": "sha512-fvBCywguW9f+939S6awvRMstqMF1XXcd2qs1r1aGqL/PJ1go/DqN06tWmDVmhCDqBJanm++imletrQWf0G2S1g==", + "version": "3.29.1", + "resolved": "https://registry.npmjs.org/algoliasearch-helper/-/algoliasearch-helper-3.29.1.tgz", + "integrity": "sha512-6ck2YFudF2Pje7szQoPBiRFTGfd+1I+0I/WfLPGn0bj1kvrFoOQmNyedNiDxTk3/r4IfSLDYk+RA4G7u8H6+yA==", "license": "MIT", "dependencies": { "@algolia/events": "^4.0.1" @@ -5023,45 +7374,6 @@ "algoliasearch": ">= 3.1 < 6" } }, - "node_modules/algoliasearch/node_modules/@algolia/client-common": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-4.24.0.tgz", - "integrity": "sha512-bc2ROsNL6w6rqpl5jj/UywlIYC21TwSSoFHKl01lYirGMW+9Eek6r02Tocg4gZ8HAw3iBvu6XQiM3BEbmEMoiA==", - "license": "MIT", - "dependencies": { - "@algolia/requester-common": "4.24.0", - "@algolia/transporter": "4.24.0" - } - }, - "node_modules/algoliasearch/node_modules/@algolia/client-search": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-4.24.0.tgz", - "integrity": "sha512-uRW6EpNapmLAD0mW47OXqTP8eiIx5F6qN9/x/7HHO6owL3N1IXqydGwW5nhDFBrV+ldouro2W1VX3XlcUXEFCA==", - "license": "MIT", - "dependencies": { - "@algolia/client-common": "4.24.0", - "@algolia/requester-common": "4.24.0", - "@algolia/transporter": "4.24.0" - } - }, - "node_modules/algoliasearch/node_modules/@algolia/requester-browser-xhr": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-4.24.0.tgz", - "integrity": "sha512-Z2NxZMb6+nVXSjF13YpjYTdvV3032YTBSGm2vnYvYPA6mMxzM3v5rsCiSspndn9rzIW4Qp1lPHBvuoKJV6jnAA==", - "license": "MIT", - "dependencies": { - "@algolia/requester-common": "4.24.0" - } - }, - "node_modules/algoliasearch/node_modules/@algolia/requester-node-http": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-4.24.0.tgz", - "integrity": "sha512-JF18yTjNOVYvU/L3UosRcvbPMGT9B+/GQWNWnenIImglzNVGpyzChkXLnrSf6uxwVNO6ESGu6oN8MqcGQcjQJw==", - "license": "MIT", - "dependencies": { - "@algolia/requester-common": "4.24.0" - } - }, "node_modules/ansi-align": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz", @@ -5127,12 +7439,14 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/any-promise": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", - "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", - "dev": true, - "license": "MIT" + "node_modules/ansis": { + "version": "3.17.0", + "resolved": "https://registry.npmjs.org/ansis/-/ansis-3.17.0.tgz", + "integrity": "sha512-0qWUglt9JEqLFr3w1I1pbrChn1grhaiAR2ocX1PP/flRmxgtwTzPFFFnfIlD6aMOLQZgSuCRlidD70lvx8yhzg==", + "license": "ISC", + "engines": { + "node": ">=14" + } }, "node_modules/anymatch": { "version": "3.1.3", @@ -5160,14 +7474,14 @@ "license": "Python-2.0" }, "node_modules/array-buffer-byte-length": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", - "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.2.tgz", + "integrity": "sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.5", - "is-array-buffer": "^3.0.4" + "call-bound": "^1.0.3", + "is-array-buffer": "^3.0.5" }, "engines": { "node": ">= 0.4" @@ -5183,18 +7497,20 @@ "license": "MIT" }, "node_modules/array-includes": { - "version": "3.1.8", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.8.tgz", - "integrity": "sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==", + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.9.tgz", + "integrity": "sha512-FmeCCAenzH0KH381SPT5FZmiA/TmpndpcaShhfgEN9eCVjnFBqq3l1xrI42y8+PPLI6hypzou4GXw00WHmPBLQ==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-object-atoms": "^1.0.0", - "get-intrinsic": "^1.2.4", - "is-string": "^1.0.7" + "es-abstract": "^1.24.0", + "es-object-atoms": "^1.1.1", + "get-intrinsic": "^1.3.0", + "is-string": "^1.1.1", + "math-intrinsics": "^1.1.0" }, "engines": { "node": ">= 0.4" @@ -5234,16 +7550,16 @@ } }, "node_modules/array.prototype.flat": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz", - "integrity": "sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.3.tgz", + "integrity": "sha512-rwG/ja1neyLqCuGZ5YYrznA62D4mZXg0i1cIskIUKSiqF3Cje9/wXAls9B9s1Wa2fomMsIv8czB8jZcPmxCXFg==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-shim-unscopables": "^1.0.0" + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.5", + "es-shim-unscopables": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -5253,16 +7569,16 @@ } }, "node_modules/array.prototype.flatmap": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz", - "integrity": "sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.3.tgz", + "integrity": "sha512-Y7Wt51eKJSyi80hFrJCePGGNo5ktJCslFuboqJsbf57CCPcm5zztluPlc4/aD8sWsKvlwatezpV4U1efk8kpjg==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-shim-unscopables": "^1.0.0" + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.5", + "es-shim-unscopables": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -5289,20 +7605,19 @@ } }, "node_modules/arraybuffer.prototype.slice": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", - "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.4.tgz", + "integrity": "sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ==", "dev": true, "license": "MIT", "dependencies": { "array-buffer-byte-length": "^1.0.1", - "call-bind": "^1.0.5", + "call-bind": "^1.0.8", "define-properties": "^1.2.1", - "es-abstract": "^1.22.3", - "es-errors": "^1.2.1", - "get-intrinsic": "^1.2.3", - "is-array-buffer": "^3.0.4", - "is-shared-array-buffer": "^1.0.2" + "es-abstract": "^1.23.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "is-array-buffer": "^3.0.4" }, "engines": { "node": ">= 0.4" @@ -5311,6 +7626,20 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/asn1js": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/asn1js/-/asn1js-3.0.7.tgz", + "integrity": "sha512-uLvq6KJu04qoQM6gvBfKFjlh6Gl0vOKQuR5cJMDHQkmwfMOQeN3F3SHCv9SNYSL+CRoHvOGFfllDlVz03GQjvQ==", + "license": "BSD-3-Clause", + "dependencies": { + "pvtsutils": "^1.3.6", + "pvutils": "^1.1.3", + "tslib": "^2.8.1" + }, + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/astring": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/astring/-/astring-1.9.0.tgz", @@ -5320,19 +7649,20 @@ "astring": "bin/astring" } }, - "node_modules/at-least-node": { + "node_modules/async-function": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", - "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", - "license": "ISC", + "resolved": "https://registry.npmjs.org/async-function/-/async-function-1.0.0.tgz", + "integrity": "sha512-hsU18Ae8CDTR6Kgu9DYf0EbCr/a5iGL0rytQDobUcdpYOKokk8LEjVphnXkDkgpi0wYVsqrXuP0bZxJaTqdgoA==", + "dev": true, + "license": "MIT", "engines": { - "node": ">= 4.0.0" + "node": ">= 0.4" } }, "node_modules/autoprefixer": { - "version": "10.4.20", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.20.tgz", - "integrity": "sha512-XY25y5xSv/wEoqzDyXXME4AFfkZI0P23z6Fs3YgymDnKJkCGOnkL0iTxCa85UTqaSgfcqyf3UA6+c7wUvx/16g==", + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.5.0.tgz", + "integrity": "sha512-FMhOoZV4+qR6aTUALKX2rEqGG+oyATvwBt9IIzVR5rMa2HRWPkxf+P+PAJLD1I/H5/II+HuZcBJYEFBpq39ong==", "funding": [ { "type": "opencollective", @@ -5349,11 +7679,10 @@ ], "license": "MIT", "dependencies": { - "browserslist": "^4.23.3", - "caniuse-lite": "^1.0.30001646", - "fraction.js": "^4.3.7", - "normalize-range": "^0.1.2", - "picocolors": "^1.0.1", + "browserslist": "^4.28.2", + "caniuse-lite": "^1.0.30001787", + "fraction.js": "^5.3.4", + "picocolors": "^1.1.1", "postcss-value-parser": "^4.2.0" }, "bin": { @@ -5383,9 +7712,9 @@ } }, "node_modules/babel-loader": { - "version": "9.1.3", - "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-9.1.3.tgz", - "integrity": "sha512-xG3ST4DglodGf8qSwv0MdeWLhrDsw/32QMdTO5T1ZIp9gQur0HkCyFs7Awskr10JKXFXwpAhiCuYX5oGXnRGbw==", + "version": "9.2.1", + "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-9.2.1.tgz", + "integrity": "sha512-fqe8naHt46e0yIdkjUZYqddSXfej3AHajX+CSO5X7oy0EmPc6o5Xh+RClNoHjnieWz9AW4kZxW9yyFMhVB1QLA==", "license": "MIT", "dependencies": { "find-cache-dir": "^4.0.0", @@ -5409,13 +7738,13 @@ } }, "node_modules/babel-plugin-polyfill-corejs2": { - "version": "0.4.11", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.11.tgz", - "integrity": "sha512-sMEJ27L0gRHShOh5G54uAAPaiCOygY/5ratXuiyb2G46FmlSpc9eFCzYVyDiPxfNbwzA7mYahmjQc5q+CZQ09Q==", + "version": "0.4.17", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.17.tgz", + "integrity": "sha512-aTyf30K/rqAsNwN76zYrdtx8obu0E4KoUME29B1xj+B3WxgvWkp943vYQ+z8Mv3lw9xHXMHpvSPOBxzAkIa94w==", "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.22.6", - "@babel/helper-define-polyfill-provider": "^0.6.2", + "@babel/compat-data": "^7.28.6", + "@babel/helper-define-polyfill-provider": "^0.6.8", "semver": "^6.3.1" }, "peerDependencies": { @@ -5432,25 +7761,25 @@ } }, "node_modules/babel-plugin-polyfill-corejs3": { - "version": "0.10.6", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.10.6.tgz", - "integrity": "sha512-b37+KR2i/khY5sKmWNVQAnitvquQbNdWy6lJdsr0kmquCKEEUgMKK4SboVM3HtfnZilfjr4MMQ7vY58FVWDtIA==", + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.13.0.tgz", + "integrity": "sha512-U+GNwMdSFgzVmfhNm8GJUX88AadB3uo9KpJqS3FaqNIPKgySuvMb+bHPsOmmuWyIcuqZj/pzt1RUIUZns4y2+A==", "license": "MIT", "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.6.2", - "core-js-compat": "^3.38.0" + "@babel/helper-define-polyfill-provider": "^0.6.5", + "core-js-compat": "^3.43.0" }, "peerDependencies": { "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" } }, "node_modules/babel-plugin-polyfill-regenerator": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.6.2.tgz", - "integrity": "sha512-2R25rQZWP63nGwaAswvDazbPXfrM3HwVoBXK6HcqeKrSrL/JqcC/rDcf95l4r7LXLyxDXc8uQDa064GubtCABg==", + "version": "0.6.8", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.6.8.tgz", + "integrity": "sha512-M762rNHfSF1EV3SLtnCJXFoQbbIIz0OyRwnCmV0KPC7qosSfCO0QLTSuJX3ayAebubhE6oYBAYPrBA5ljowaZg==", "license": "MIT", "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.6.2" + "@babel/helper-define-polyfill-provider": "^0.6.8" }, "peerDependencies": { "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" @@ -5472,6 +7801,18 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "license": "MIT" }, + "node_modules/baseline-browser-mapping": { + "version": "2.10.12", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.12.tgz", + "integrity": "sha512-qyq26DxfY4awP2gIRXhhLWfwzwI+N5Nxk6iQi8EFizIaWIjqicQTE4sLnZZVdeKPRcVNoJOkkpfzoIYuvCKaIQ==", + "license": "Apache-2.0", + "bin": { + "baseline-browser-mapping": "dist/cli.cjs" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/batch": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", @@ -5500,23 +7841,23 @@ } }, "node_modules/body-parser": { - "version": "1.20.2", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", - "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", + "version": "1.20.5", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.5.tgz", + "integrity": "sha512-3grm+/2tUOvu2cjJkvsIxrv/wVpfXQW4PsQHYm7yk4vfpu7Ekl6nEsYBoJUL6qDwZUx8wUhQ8tR2qz+ad9c9OA==", "license": "MIT", "dependencies": { - "bytes": "3.1.2", + "bytes": "~3.1.2", "content-type": "~1.0.5", "debug": "2.6.9", "depd": "2.0.0", - "destroy": "1.2.0", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "on-finished": "2.4.1", - "qs": "6.11.0", - "raw-body": "2.5.2", + "destroy": "~1.2.0", + "http-errors": "~2.0.1", + "iconv-lite": "~0.4.24", + "on-finished": "~2.4.1", + "qs": "~6.15.1", + "raw-body": "~2.5.3", "type-is": "~1.6.18", - "unpipe": "1.0.0" + "unpipe": "~1.0.0" }, "engines": { "node": ">= 0.8", @@ -5560,9 +7901,9 @@ "license": "MIT" }, "node_modules/bonjour-service": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/bonjour-service/-/bonjour-service-1.2.1.tgz", - "integrity": "sha512-oSzCS2zV14bh2kji6vNe7vrpJYCHGvcZnlffFQ1MEoX/WOeQ/teD8SYWKR942OI3INjq8OMNJlbPK5LLLUxFDw==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/bonjour-service/-/bonjour-service-1.3.0.tgz", + "integrity": "sha512-3YuAUiSkWykd+2Azjgyxei8OWf8thdn8AITIog2M4UICzoqfjlqr64WIjEXZllf/W6vK1goqleSR6brGomxQqA==", "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.3", @@ -5598,9 +7939,9 @@ } }, "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.13.tgz", + "integrity": "sha512-9ZLprWS6EENmhEOpjCYW2c8VkmOvckIJZfkr7rBW6dObmfgJ/L1GpSYW5Hpo9lDz4D1+n0Ckz8rU7FwHDQiG/w==", "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", @@ -5620,9 +7961,9 @@ } }, "node_modules/browserslist": { - "version": "4.23.3", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.3.tgz", - "integrity": "sha512-btwCFJVjI4YWDNfau8RhZ+B1Q/VLoUITrm3RlP6y1tYGWIOa+InuYiRGXUBXo8nA1qKmHMyLB/iVQg5TT4eFoA==", + "version": "4.28.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.2.tgz", + "integrity": "sha512-48xSriZYYg+8qXna9kwqjIVzuQxi+KYWp2+5nCYnYKPTr0LvD89Jqk2Or5ogxz0NUMfIjhh2lIUX/LyX9B4oIg==", "funding": [ { "type": "opencollective", @@ -5639,10 +7980,11 @@ ], "license": "MIT", "dependencies": { - "caniuse-lite": "^1.0.30001646", - "electron-to-chromium": "^1.5.4", - "node-releases": "^2.0.18", - "update-browserslist-db": "^1.1.0" + "baseline-browser-mapping": "^2.10.12", + "caniuse-lite": "^1.0.30001782", + "electron-to-chromium": "^1.5.328", + "node-releases": "^2.0.36", + "update-browserslist-db": "^1.2.3" }, "bin": { "browserslist": "cli.js" @@ -5657,6 +7999,21 @@ "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", "license": "MIT" }, + "node_modules/bundle-name": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-4.1.0.tgz", + "integrity": "sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q==", + "license": "MIT", + "dependencies": { + "run-applescript": "^7.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/bytes": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", @@ -5666,6 +8023,15 @@ "node": ">= 0.8" } }, + "node_modules/bytestreamjs": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/bytestreamjs/-/bytestreamjs-2.0.1.tgz", + "integrity": "sha512-U1Z/ob71V/bXfVABvNr/Kumf5VyeQRBEm6Txb0PQ6S7V5GpBM3w4Cbqz/xPDicR5tN0uvDifng8C+5qECeGwyQ==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/cacheable-lookup": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-7.0.0.tgz", @@ -5694,16 +8060,15 @@ } }, "node_modules/call-bind": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", - "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", + "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==", "license": "MIT", "dependencies": { + "call-bind-apply-helpers": "^1.0.0", "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", "get-intrinsic": "^1.2.4", - "set-function-length": "^1.2.1" + "set-function-length": "^1.2.2" }, "engines": { "node": ">= 0.4" @@ -5712,12 +8077,34 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/call-me-maybe": { + "node_modules/call-bind-apply-helpers": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.2.tgz", - "integrity": "sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/callsites": { "version": "3.1.0", @@ -5763,9 +8150,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001655", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001655.tgz", - "integrity": "sha512-jRGVy3iSGO5Uutn2owlb5gR6qsGngTw9ZTb4ali9f3glshcNmJ2noam4Mo9zia5P9Dk3jNNydy7vQjuE5dQmfg==", + "version": "1.0.30001793", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001793.tgz", + "integrity": "sha512-iwSsYWaCOoh26cV8NwNRViHlrfUvYsHDfRVcbtmw0Kg6PJIZZXwMkj1442FYLBGkeUf1juAsU3DTfxW579mrPA==", "funding": [ { "type": "opencollective", @@ -5838,10 +8225,9 @@ } }, "node_modules/character-entities-legacy": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz", - "integrity": "sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==", - "dev": true, + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-3.0.0.tgz", + "integrity": "sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==", "license": "MIT", "funding": { "type": "github", @@ -5849,10 +8235,9 @@ } }, "node_modules/character-reference-invalid": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz", - "integrity": "sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==", - "dev": true, + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-2.0.1.tgz", + "integrity": "sha512-iBZ4F4wRbyORVsu0jPV7gXkOsGYjGHPmAyv+HiHG8gi5PtC9KI2j1+v8/tlibRvjoWX027ypmG/n0HtO5t7unw==", "license": "MIT", "funding": { "type": "github", @@ -5897,6 +8282,34 @@ "url": "https://github.com/sponsors/fb55" } }, + "node_modules/chevrotain": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/chevrotain/-/chevrotain-12.0.0.tgz", + "integrity": "sha512-csJvb+6kEiQaqo1woTdSAuOWdN0WTLIydkKrBnS+V5gZz0oqBrp4kQ35519QgK6TpBThiG3V1vNSHlIkv4AglQ==", + "license": "Apache-2.0", + "dependencies": { + "@chevrotain/cst-dts-gen": "12.0.0", + "@chevrotain/gast": "12.0.0", + "@chevrotain/regexp-to-ast": "12.0.0", + "@chevrotain/types": "12.0.0", + "@chevrotain/utils": "12.0.0" + }, + "engines": { + "node": ">=22.0.0" + } + }, + "node_modules/chevrotain-allstar": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/chevrotain-allstar/-/chevrotain-allstar-0.4.3.tgz", + "integrity": "sha512-2X4mkroolSMKqW+H22pyPMUVDqYZzPhephTmg/NODKb1IGYPHfxfhcW0EjS7wcPJNbze2i4vBWT7zT5FKF2lrQ==", + "license": "MIT", + "dependencies": { + "lodash-es": "^4.18.1" + }, + "peerDependencies": { + "chevrotain": "^12.0.0" + } + }, "node_modules/chokidar": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", @@ -5993,23 +8406,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/cli-color": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/cli-color/-/cli-color-2.0.4.tgz", - "integrity": "sha512-zlnpg0jNcibNrO7GG9IeHH7maWFeCz+Ja1wx/7tZNU5ASSSSZ+/qZciM0/LHCYxSdqv5h2sdbQ/PXYdOuetXvA==", - "dev": true, - "license": "ISC", - "dependencies": { - "d": "^1.0.1", - "es5-ext": "^0.10.64", - "es6-iterator": "^2.0.3", - "memoizee": "^0.4.15", - "timers-ext": "^0.1.7" - }, - "engines": { - "node": ">=0.10" - } - }, "node_modules/cli-table3": { "version": "0.6.5", "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.5.tgz", @@ -6155,32 +8551,41 @@ } }, "node_modules/compressible/node_modules/mime-db": { - "version": "1.53.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.53.0.tgz", - "integrity": "sha512-oHlN/w+3MQ3rba9rqFr6V/ypF10LSkdwUysQL7GkXoTgIWeV+tcXGA852TBxH+gsh8UWoyhR1hKcoMJTuWflpg==", + "version": "1.54.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", + "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", "license": "MIT", "engines": { "node": ">= 0.6" } }, "node_modules/compression": { - "version": "1.7.4", - "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz", - "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/compression/-/compression-1.8.1.tgz", + "integrity": "sha512-9mAqGPHLakhCLeNyxPkK4xVo746zQ/czLH1Ky+vkitMnWfWZps8r0qXuwhwizagCRttsL4lfG4pIOvaWLpAP0w==", "license": "MIT", "dependencies": { - "accepts": "~1.3.5", - "bytes": "3.0.0", - "compressible": "~2.0.16", + "bytes": "3.1.2", + "compressible": "~2.0.18", "debug": "2.6.9", - "on-headers": "~1.0.2", - "safe-buffer": "5.1.2", + "negotiator": "~0.6.4", + "on-headers": "~1.1.0", + "safe-buffer": "5.2.1", "vary": "~1.1.2" }, "engines": { "node": ">= 0.8.0" } }, + "node_modules/compression/node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, "node_modules/compression/node_modules/debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -6196,12 +8601,6 @@ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "license": "MIT" }, - "node_modules/compression/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "license": "MIT" - }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -6224,6 +8623,12 @@ "typedarray": "^0.0.6" } }, + "node_modules/confbox": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.1.8.tgz", + "integrity": "sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==", + "license": "MIT" + }, "node_modules/config-chain": { "version": "1.1.13", "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz", @@ -6234,6 +8639,12 @@ "proto-list": "~1.2.1" } }, + "node_modules/config-chain/node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "license": "ISC" + }, "node_modules/configstore": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/configstore/-/configstore-6.0.0.tgz", @@ -6263,10 +8674,13 @@ } }, "node_modules/consola": { - "version": "2.15.3", - "resolved": "https://registry.npmjs.org/consola/-/consola-2.15.3.tgz", - "integrity": "sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw==", - "license": "MIT" + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/consola/-/consola-3.4.2.tgz", + "integrity": "sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==", + "license": "MIT", + "engines": { + "node": "^14.18.0 || >=16.10.0" + } }, "node_modules/content-disposition": { "version": "0.5.2", @@ -6293,24 +8707,24 @@ "license": "MIT" }, "node_modules/cookie": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", - "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", + "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", "license": "MIT", "engines": { "node": ">= 0.6" } }, "node_modules/cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.7.tgz", + "integrity": "sha512-NXdYc3dLr47pBkpUCHtKSwIOQXLVn8dZEuywboCOJY/osA0wFSLlSawr3KN8qXJEyX66FcONTH8EIlVuK0yyFA==", "license": "MIT" }, "node_modules/copy-text-to-clipboard": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/copy-text-to-clipboard/-/copy-text-to-clipboard-3.2.0.tgz", - "integrity": "sha512-RnJFp1XR/LOBDckxTib5Qjr/PMfkatD0MUCQgdpqS8MdKiNUzBjAQBEN6oUy+jW7LI93BBG3DtMB2KOOKpGs2Q==", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/copy-text-to-clipboard/-/copy-text-to-clipboard-3.2.2.tgz", + "integrity": "sha512-T6SqyLd1iLuqPA90J5N4cTalrtovCySh58iiZDGJ6FGznbclKh4UI+FGacQSgFzwKG77W7XT5gwbVEbd9cIH1A==", "license": "MIT", "engines": { "node": ">=12" @@ -6396,9 +8810,9 @@ } }, "node_modules/core-js": { - "version": "3.38.1", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.38.1.tgz", - "integrity": "sha512-OP35aUorbU3Zvlx7pjsFdu1rGNnD4pgw/CWoYzRY3t2EzoVT7shKHY1dlAy3f41cGIO7ZDPQimhGFTlEYkG/Hw==", + "version": "3.49.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.49.0.tgz", + "integrity": "sha512-es1U2+YTtzpwkxVLwAFdSpaIMyQaq0PBgm3YD1W3Qpsn1NAmO3KSgZfu+oGSWVu6NvLHoHCV/aYcsE5wiB7ALg==", "hasInstallScript": true, "license": "MIT", "funding": { @@ -6407,29 +8821,18 @@ } }, "node_modules/core-js-compat": { - "version": "3.38.1", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.38.1.tgz", - "integrity": "sha512-JRH6gfXxGmrzF3tZ57lFx97YARxCXPaMzPo6jELZhv88pBH5VXpQ+y0znKGlFnzuaihqhLbefxSJxWJMPtfDzw==", + "version": "3.49.0", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.49.0.tgz", + "integrity": "sha512-VQXt1jr9cBz03b331DFDCCP90b3fanciLkgiOoy8SBHy06gNf+vQ1A3WFLqG7I8TipYIKeYK9wxd0tUrvHcOZA==", "license": "MIT", "dependencies": { - "browserslist": "^4.23.3" + "browserslist": "^4.28.1" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/core-js" } }, - "node_modules/core-js-pure": { - "version": "3.38.1", - "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.38.1.tgz", - "integrity": "sha512-BY8Etc1FZqdw1glX0XNOq2FDwfrg/VGqoZOZCdaL+UmdaqDwQwYXkMJT4t6In+zfEfOJDcM9T0KdbBeJg8KKCQ==", - "hasInstallScript": true, - "license": "MIT", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/core-js" - } - }, "node_modules/core-util-is": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", @@ -6472,9 +8875,9 @@ } }, "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "license": "MIT", "dependencies": { "path-key": "^3.1.0", @@ -6512,10 +8915,48 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/css-blank-pseudo": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/css-blank-pseudo/-/css-blank-pseudo-7.0.1.tgz", + "integrity": "sha512-jf+twWGDf6LDoXDUode+nc7ZlrqfaNphrBIBrcmeP3D8yw1uPaix1gCC8LUQUGQ6CycuK2opkbFFWFuq/a94ag==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "dependencies": { + "postcss-selector-parser": "^7.0.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/css-blank-pseudo/node_modules/postcss-selector-parser": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.1.tgz", + "integrity": "sha512-orRsuYpJVw8LdAwqqLykBj9ecS5/cRHlI5+nvTo8LcCKmzDmqVORXtOIYEEQuL9D4BxtA1lm5isAqzQZCoQ6Eg==", + "license": "MIT", + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/css-declaration-sorter": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-7.2.0.tgz", - "integrity": "sha512-h70rUM+3PNFuaBDTLe8wF/cdWu+dOZmb7pJt8Z2sedYbAcQVQV/tEchueg3GWxwqS0cxtbxmaHEdkNACqcvsow==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-7.4.0.tgz", + "integrity": "sha512-LTuzjPoyA2vMGKKcaOqKSp7Ub2eGrNfKiZH4LpezxpNrsICGCSFvsQOI29psISxNZtaXibkC2CXzrQ5enMeGGw==", "license": "ISC", "engines": { "node": "^14 || ^16 || >=18" @@ -6524,6 +8965,68 @@ "postcss": "^8.0.9" } }, + "node_modules/css-has-pseudo": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/css-has-pseudo/-/css-has-pseudo-7.0.3.tgz", + "integrity": "sha512-oG+vKuGyqe/xvEMoxAQrhi7uY16deJR3i7wwhBerVrGQKSqUC5GiOVxTpM9F9B9hw0J+eKeOWLH7E9gZ1Dr5rA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "dependencies": { + "@csstools/selector-specificity": "^5.0.0", + "postcss-selector-parser": "^7.0.0", + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/css-has-pseudo/node_modules/@csstools/selector-specificity": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-5.0.0.tgz", + "integrity": "sha512-PCqQV3c4CoVm3kdPhyeZ07VmBRdH2EpMFA/pd9OASpOEC3aXNGoqPDAZ80D0cLpMBxnmk0+yNhGsEx31hq7Gtw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss-selector-parser": "^7.0.0" + } + }, + "node_modules/css-has-pseudo/node_modules/postcss-selector-parser": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.1.tgz", + "integrity": "sha512-orRsuYpJVw8LdAwqqLykBj9ecS5/cRHlI5+nvTo8LcCKmzDmqVORXtOIYEEQuL9D4BxtA1lm5isAqzQZCoQ6Eg==", + "license": "MIT", + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/css-loader": { "version": "6.11.0", "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-6.11.0.tgz", @@ -6603,10 +9106,32 @@ } } }, + "node_modules/css-prefers-color-scheme": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/css-prefers-color-scheme/-/css-prefers-color-scheme-10.0.0.tgz", + "integrity": "sha512-VCtXZAWivRglTZditUfB4StnsWr6YVZ2PRtuxQLKTNRdtAf8tpzaVPE9zXIF3VaSc7O70iK/j1+NXxyQCqdPjQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, "node_modules/css-select": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", - "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.2.2.tgz", + "integrity": "sha512-TizTzUddG/xYLA3NXodFM0fSbNizXjOKhqiQQwvhlspadZokn1KDy0NZFS0wuEubIYAV5/c1/lAr0TaaFXEXzw==", "license": "BSD-2-Clause", "dependencies": { "boolbase": "^1.0.0", @@ -6633,9 +9158,9 @@ } }, "node_modules/css-what": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", - "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.2.2.tgz", + "integrity": "sha512-u/O3vwbptzhMs3L1fQE82ZSLHQQfto5gyZzwteVIEyeaY5Fc7R4dapF/BvRoSYFeqfBk4m0V1Vafq5Pjv25wvA==", "license": "BSD-2-Clause", "engines": { "node": ">= 6" @@ -6644,6 +9169,22 @@ "url": "https://github.com/sponsors/fb55" } }, + "node_modules/cssdb": { + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/cssdb/-/cssdb-8.9.0.tgz", + "integrity": "sha512-J8jOU/hLjaXcO1LldOLraJSQpfLXRKof0I7mtbRyOy2AAXgqst0x9rlgi2qXeD6d0ou3ZLqcPAMqYVbpCbrxEw==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + }, + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + } + ], + "license": "MIT-0" + }, "node_modules/cssesc": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", @@ -6787,15 +9328,15 @@ "license": "CC0-1.0" }, "node_modules/csstype": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", - "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", + "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", "license": "MIT" }, "node_modules/cytoscape": { - "version": "3.30.2", - "resolved": "https://registry.npmjs.org/cytoscape/-/cytoscape-3.30.2.tgz", - "integrity": "sha512-oICxQsjW8uSaRmn4UK/jkczKOqTrVqt5/1WL0POiJUT2EKNc9STM4hYFHv917yu55aTBMFNRzymlJhVAiWPCxw==", + "version": "3.33.1", + "resolved": "https://registry.npmjs.org/cytoscape/-/cytoscape-3.33.1.tgz", + "integrity": "sha512-iJc4TwyANnOGR1OmWhsS9ayRS3s+XQ185FmuHObThD+5AeJCakAAbWv8KimMTt08xCCLNgneQwFp+JRJOr9qGQ==", "license": "MIT", "engines": { "node": ">=0.10" @@ -6813,20 +9354,33 @@ "cytoscape": "^3.2.0" } }, - "node_modules/d": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/d/-/d-1.0.2.tgz", - "integrity": "sha512-MOqHvMWF9/9MX6nza0KgvFH4HpMU0EF5uUDXqX/BtxtU8NfB0QzRtJ8Oe/6SuS4kbhyzVJwjd97EA4PKrzJ8bw==", - "dev": true, - "license": "ISC", + "node_modules/cytoscape-fcose": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cytoscape-fcose/-/cytoscape-fcose-2.2.0.tgz", + "integrity": "sha512-ki1/VuRIHFCzxWNrsshHYPs6L7TvLu3DL+TyIGEsRcvVERmxokbf5Gdk7mFxZnTdiGtnA4cfSmjZJMviqSuZrQ==", + "license": "MIT", "dependencies": { - "es5-ext": "^0.10.64", - "type": "^2.7.2" + "cose-base": "^2.2.0" }, - "engines": { - "node": ">=0.12" + "peerDependencies": { + "cytoscape": "^3.2.0" } }, + "node_modules/cytoscape-fcose/node_modules/cose-base": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cose-base/-/cose-base-2.2.0.tgz", + "integrity": "sha512-AzlgcsCbUMymkADOJtQm3wO9S3ltPfYOFD5033keQn9NJzIbtnZj+UdBJe7DYml/8TdbtHJW3j58SOnKhWY/5g==", + "license": "MIT", + "dependencies": { + "layout-base": "^2.0.0" + } + }, + "node_modules/cytoscape-fcose/node_modules/layout-base": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/layout-base/-/layout-base-2.0.1.tgz", + "integrity": "sha512-dp3s92+uNI1hWIpPGH3jK2kxE2lMjdXdr+DH8ynZHpd6PUlH6x6cbuXnoMmiNumznqaNO31xu9e79F0uuZ0JFg==", + "license": "MIT" + }, "node_modules/d3": { "version": "7.9.0", "resolved": "https://registry.npmjs.org/d3/-/d3-7.9.0.tgz", @@ -7042,9 +9596,9 @@ } }, "node_modules/d3-format": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/d3-format/-/d3-format-3.1.0.tgz", - "integrity": "sha512-YyUI6AEuY/Wpt8KWLgZHsIU86atmikuoOmCfommt0LYHiQSPjvX2AcFc38PX0CBpr2RCyZhjex+NS/LPOv6YqA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/d3-format/-/d3-format-3.1.2.tgz", + "integrity": "sha512-AJDdYOdnyRDV5b6ArilzCPPwc1ejkHcoyFarqlPqT7zRYjhavcT3uSrqcMvsgh2CgoPbK3RCwyHaVyxYcP2Arg==", "license": "ISC", "engines": { "node": ">=12" @@ -7278,25 +9832,25 @@ } }, "node_modules/dagre-d3-es": { - "version": "7.0.10", - "resolved": "https://registry.npmjs.org/dagre-d3-es/-/dagre-d3-es-7.0.10.tgz", - "integrity": "sha512-qTCQmEhcynucuaZgY5/+ti3X/rnszKZhEQH/ZdWdtP1tA/y3VoHJzcVrO9pjjJCNpigfscAtoUB5ONcd2wNn0A==", + "version": "7.0.14", + "resolved": "https://registry.npmjs.org/dagre-d3-es/-/dagre-d3-es-7.0.14.tgz", + "integrity": "sha512-P4rFMVq9ESWqmOgK+dlXvOtLwYg0i7u0HBGJER0LZDJT2VHIPAMZ/riPxqJceWMStH5+E61QxFra9kIS3AqdMg==", "license": "MIT", "dependencies": { - "d3": "^7.8.2", + "d3": "^7.9.0", "lodash-es": "^4.17.21" } }, "node_modules/data-view-buffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", - "integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.2.tgz", + "integrity": "sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.6", + "call-bound": "^1.0.3", "es-errors": "^1.3.0", - "is-data-view": "^1.0.1" + "is-data-view": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -7306,31 +9860,31 @@ } }, "node_modules/data-view-byte-length": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz", - "integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.2.tgz", + "integrity": "sha512-tuhGbE6CfTM9+5ANGf+oQb72Ky/0+s3xKUpHvShfiz2RxMFgFPjsXuRLBVMtvMs15awe45SRb83D6wH4ew6wlQ==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bound": "^1.0.3", "es-errors": "^1.3.0", - "is-data-view": "^1.0.1" + "is-data-view": "^1.0.2" }, "engines": { "node": ">= 0.4" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/inspect-js" } }, "node_modules/data-view-byte-offset": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz", - "integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.1.tgz", + "integrity": "sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.6", + "call-bound": "^1.0.2", "es-errors": "^1.3.0", "is-data-view": "^1.0.1" }, @@ -7342,9 +9896,9 @@ } }, "node_modules/dayjs": { - "version": "1.11.13", - "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.13.tgz", - "integrity": "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==", + "version": "1.11.20", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.20.tgz", + "integrity": "sha512-YbwwqR/uYpeoP4pu043q+LTDLFBLApUP6VxRihdfNTqu4ubqMlGDLd6ErXhEgsyvY0K6nCs7nggYumAN+9uEuQ==", "license": "MIT" }, "node_modules/debounce": { @@ -7354,12 +9908,12 @@ "license": "MIT" }, "node_modules/debug": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", - "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -7371,9 +9925,9 @@ } }, "node_modules/decode-named-character-reference": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/decode-named-character-reference/-/decode-named-character-reference-1.0.2.tgz", - "integrity": "sha512-O8x12RzrUF8xyVcY0KJowWsmaJxQbmy0/EtnNtHRpsOcT7dFk5W598coHqBVpmWo1oQQfsCqfCmkZN5DJrZVdg==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/decode-named-character-reference/-/decode-named-character-reference-1.3.0.tgz", + "integrity": "sha512-GtpQYB283KrPp6nRw50q3U9/VfOutZOe103qlN7BPP6Ad27xYnOIWv4lPzo8HCAL+mMZofJ9KEy30fq6MfaK6Q==", "license": "MIT", "dependencies": { "character-entities": "^2.0.0" @@ -7423,7 +9977,7 @@ "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/deepmerge": { @@ -7435,16 +9989,32 @@ "node": ">=0.10.0" } }, - "node_modules/default-gateway": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-6.0.3.tgz", - "integrity": "sha512-fwSOJsbbNzZ/CUFpqFBqYfYNLj1NbMPm8MMCIzHjC83iSJRBEGmDUxU+WP661BaBQImeC2yHwXtz+P/O9o+XEg==", - "license": "BSD-2-Clause", + "node_modules/default-browser": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-5.5.0.tgz", + "integrity": "sha512-H9LMLr5zwIbSxrmvikGuI/5KGhZ8E2zH3stkMgM5LpOWDutGM2JZaj460Udnf1a+946zc7YBgrqEWwbk7zHvGw==", + "license": "MIT", "dependencies": { - "execa": "^5.0.0" + "bundle-name": "^4.1.0", + "default-browser-id": "^5.0.0" }, "engines": { - "node": ">= 10" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser-id": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-5.0.1.tgz", + "integrity": "sha512-x1VCxdX4t+8wVfd1so/9w+vQ4vx7lKd2Qp5tDRutErwmR85OgmfX7RlLRMWafRMY7hbEiXIbudNrjOAPa/hL8Q==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/defer-to-connect": { @@ -7499,32 +10069,10 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/del": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/del/-/del-6.1.1.tgz", - "integrity": "sha512-ua8BhapfP0JUJKC/zV9yHHDW/rDoDxP4Zhn3AkA6/xT6gY7jYXJiaeyBZznYVujhZZET+UgcbZiQ7sN3WqcImg==", - "license": "MIT", - "dependencies": { - "globby": "^11.0.1", - "graceful-fs": "^4.2.4", - "is-glob": "^4.0.1", - "is-path-cwd": "^2.2.0", - "is-path-inside": "^3.0.2", - "p-map": "^4.0.0", - "rimraf": "^3.0.2", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/delaunator": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/delaunator/-/delaunator-5.0.1.tgz", - "integrity": "sha512-8nvh+XBe96aCESrGOqMp/84b13H9cdKbG5P2ejQCh4d4sK9RL4371qou9drQjMhvnPmhWl5hnmqbEE0fXr9Xnw==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/delaunator/-/delaunator-5.1.0.tgz", + "integrity": "sha512-AGrQ4QSgssa1NGmWmLPqN5NY2KajF5MqxetNEO+o0n3ZwZZeTmt7bBnvzHWrmkZFxGgr4HdyFgelzgi06otLuQ==", "license": "ISC", "dependencies": { "robust-predicates": "^3.0.2" @@ -7581,38 +10129,6 @@ "node": ">= 4.0.0" } }, - "node_modules/detect-port-alt": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/detect-port-alt/-/detect-port-alt-1.1.6.tgz", - "integrity": "sha512-5tQykt+LqfJFBEYaDITx7S7cR7mJ/zQmLXZ2qt5w04ainYZw6tBf9dBunMjVeVOdYVRUzUOE4HkY5J7+uttb5Q==", - "license": "MIT", - "dependencies": { - "address": "^1.0.1", - "debug": "^2.6.0" - }, - "bin": { - "detect": "bin/detect-port", - "detect-port": "bin/detect-port" - }, - "engines": { - "node": ">= 4.2.1" - } - }, - "node_modules/detect-port-alt/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/detect-port-alt/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "license": "MIT" - }, "node_modules/devlop": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/devlop/-/devlop-1.1.0.tgz", @@ -7626,15 +10142,6 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/diff": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", - "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.3.1" - } - }, "node_modules/dir-glob": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", @@ -7660,16 +10167,16 @@ } }, "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "devOptional": true, + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, "license": "Apache-2.0", "dependencies": { "esutils": "^2.0.2" }, "engines": { - "node": ">=6.0.0" + "node": ">=0.10.0" } }, "node_modules/dom-converter": { @@ -7723,15 +10230,18 @@ } }, "node_modules/dompurify": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.1.6.tgz", - "integrity": "sha512-cTOAhc36AalkjtBpfG6O8JimdTMWNXjiePT2xQH/ppBGi/4uIpmj8eKyIkMJErXWARyINV/sB38yf8JCLF5pbQ==", - "license": "(MPL-2.0 OR Apache-2.0)" + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.4.2.tgz", + "integrity": "sha512-lHeS9SA/IKeIFFyYciHBr2n0v1VMPlSj843HdLOwjb2OxNwdq9Xykxqhk+FE42MzAdHvInbAolSE4mhahPpjXA==", + "license": "(MPL-2.0 OR Apache-2.0)", + "optionalDependencies": { + "@types/trusted-types": "^2.0.7" + } }, "node_modules/domutils": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.1.0.tgz", - "integrity": "sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.2.2.tgz", + "integrity": "sha512-6kZKyUajlDuqlHKVX1w7gyslj9MPIXzIFiz/rGu35uC1wMi+kMhQwGhl4lt9unC9Vb9INnY9Z3/ZA3+FhASLaw==", "license": "BSD-2-Clause", "dependencies": { "dom-serializer": "^2.0.0", @@ -7776,6 +10286,20 @@ "node": ">=8" } }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/duplexer": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", @@ -7795,17 +10319,11 @@ "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.5.13", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.13.tgz", - "integrity": "sha512-lbBcvtIJ4J6sS4tb5TLp1b4LyfCdMkwStzXPyAgVgTRAsep4bvrAGaBOP7ZJtQMNJpSQ9SqG4brWOroNaQtm7Q==", + "version": "1.5.328", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.328.tgz", + "integrity": "sha512-QNQ5l45DzYytThO21403XN3FvK0hOkWDG8viNf6jqS42msJ8I4tGDSpBCgvDRRPnkffafiwAym2X2eHeGD2V0w==", "license": "ISC" }, - "node_modules/elkjs": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/elkjs/-/elkjs-0.9.3.tgz", - "integrity": "sha512-f/ZeWvW/BCXbhGEf1Ujp29EASo/lk1FDnETgNKwJrsVvGZhUWCZyg3xLJjAsxfOmt8KjswHmI5EwCQcPMpOYhQ==", - "license": "EPL-2.0" - }, "node_modules/emoji-regex": { "version": "9.2.2", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", @@ -7838,22 +10356,22 @@ } }, "node_modules/encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", "license": "MIT", "engines": { "node": ">= 0.8" } }, "node_modules/enhanced-resolve": { - "version": "5.17.1", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz", - "integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==", + "version": "5.20.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.20.1.tgz", + "integrity": "sha512-Qohcme7V1inbAfvjItgw0EaxVX5q2rdVEZHRBrEQdRZTssLDGsL8Lwrznl8oQ/6kuTJONLaDcGjkNP247XEhcA==", "license": "MIT", "dependencies": { "graceful-fs": "^4.2.4", - "tapable": "^2.2.0" + "tapable": "^2.3.0" }, "engines": { "node": ">=10.13.0" @@ -7879,67 +10397,75 @@ "license": "MIT" }, "node_modules/error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.4.tgz", + "integrity": "sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ==", "license": "MIT", "dependencies": { "is-arrayish": "^0.2.1" } }, "node_modules/es-abstract": { - "version": "1.23.3", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.3.tgz", - "integrity": "sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==", + "version": "1.24.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.24.1.tgz", + "integrity": "sha512-zHXBLhP+QehSSbsS9Pt23Gg964240DPd6QCf8WpkqEXxQ7fhdZzYsocOr5u7apWonsS5EjZDmTF+/slGMyasvw==", "dev": true, "license": "MIT", "dependencies": { - "array-buffer-byte-length": "^1.0.1", - "arraybuffer.prototype.slice": "^1.0.3", + "array-buffer-byte-length": "^1.0.2", + "arraybuffer.prototype.slice": "^1.0.4", "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.7", - "data-view-buffer": "^1.0.1", - "data-view-byte-length": "^1.0.1", - "data-view-byte-offset": "^1.0.0", - "es-define-property": "^1.0.0", + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "data-view-buffer": "^1.0.2", + "data-view-byte-length": "^1.0.2", + "data-view-byte-offset": "^1.0.1", + "es-define-property": "^1.0.1", "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "es-set-tostringtag": "^2.0.3", - "es-to-primitive": "^1.2.1", - "function.prototype.name": "^1.1.6", - "get-intrinsic": "^1.2.4", - "get-symbol-description": "^1.0.2", - "globalthis": "^1.0.3", - "gopd": "^1.0.1", + "es-object-atoms": "^1.1.1", + "es-set-tostringtag": "^2.1.0", + "es-to-primitive": "^1.3.0", + "function.prototype.name": "^1.1.8", + "get-intrinsic": "^1.3.0", + "get-proto": "^1.0.1", + "get-symbol-description": "^1.1.0", + "globalthis": "^1.0.4", + "gopd": "^1.2.0", "has-property-descriptors": "^1.0.2", - "has-proto": "^1.0.3", - "has-symbols": "^1.0.3", + "has-proto": "^1.2.0", + "has-symbols": "^1.1.0", "hasown": "^2.0.2", - "internal-slot": "^1.0.7", - "is-array-buffer": "^3.0.4", + "internal-slot": "^1.1.0", + "is-array-buffer": "^3.0.5", "is-callable": "^1.2.7", - "is-data-view": "^1.0.1", + "is-data-view": "^1.0.2", "is-negative-zero": "^2.0.3", - "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.3", - "is-string": "^1.0.7", - "is-typed-array": "^1.1.13", - "is-weakref": "^1.0.2", - "object-inspect": "^1.13.1", + "is-regex": "^1.2.1", + "is-set": "^2.0.3", + "is-shared-array-buffer": "^1.0.4", + "is-string": "^1.1.1", + "is-typed-array": "^1.1.15", + "is-weakref": "^1.1.1", + "math-intrinsics": "^1.1.0", + "object-inspect": "^1.13.4", "object-keys": "^1.1.1", - "object.assign": "^4.1.5", - "regexp.prototype.flags": "^1.5.2", - "safe-array-concat": "^1.1.2", - "safe-regex-test": "^1.0.3", - "string.prototype.trim": "^1.2.9", - "string.prototype.trimend": "^1.0.8", + "object.assign": "^4.1.7", + "own-keys": "^1.0.1", + "regexp.prototype.flags": "^1.5.4", + "safe-array-concat": "^1.1.3", + "safe-push-apply": "^1.0.0", + "safe-regex-test": "^1.1.0", + "set-proto": "^1.0.0", + "stop-iteration-iterator": "^1.1.0", + "string.prototype.trim": "^1.2.10", + "string.prototype.trimend": "^1.0.9", "string.prototype.trimstart": "^1.0.8", - "typed-array-buffer": "^1.0.2", - "typed-array-byte-length": "^1.0.1", - "typed-array-byte-offset": "^1.0.2", - "typed-array-length": "^1.0.6", - "unbox-primitive": "^1.0.2", - "which-typed-array": "^1.1.15" + "typed-array-buffer": "^1.0.3", + "typed-array-byte-length": "^1.0.3", + "typed-array-byte-offset": "^1.0.4", + "typed-array-length": "^1.0.7", + "unbox-primitive": "^1.1.0", + "which-typed-array": "^1.1.19" }, "engines": { "node": ">= 0.4" @@ -7949,13 +10475,10 @@ } }, "node_modules/es-define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", - "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", "license": "MIT", - "dependencies": { - "get-intrinsic": "^1.2.4" - }, "engines": { "node": ">= 0.4" } @@ -7970,42 +10493,44 @@ } }, "node_modules/es-iterator-helpers": { - "version": "1.0.19", - "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.0.19.tgz", - "integrity": "sha512-zoMwbCcH5hwUkKJkT8kDIBZSz9I6mVG//+lDCinLCGov4+r7NIy0ld8o03M0cJxl2spVf6ESYVS6/gpIfq1FFw==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.3.1.tgz", + "integrity": "sha512-zWwRvqWiuBPr0muUG/78cW3aHROFCNIQ3zpmYDpwdbnt2m+xlNyRWpHBpa2lJjSBit7BQ+RXA1iwbSmu5yJ/EQ==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", "define-properties": "^1.2.1", - "es-abstract": "^1.23.3", + "es-abstract": "^1.24.1", "es-errors": "^1.3.0", - "es-set-tostringtag": "^2.0.3", + "es-set-tostringtag": "^2.1.0", "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "globalthis": "^1.0.3", + "get-intrinsic": "^1.3.0", + "globalthis": "^1.0.4", + "gopd": "^1.2.0", "has-property-descriptors": "^1.0.2", - "has-proto": "^1.0.3", - "has-symbols": "^1.0.3", - "internal-slot": "^1.0.7", - "iterator.prototype": "^1.1.2", - "safe-array-concat": "^1.1.2" + "has-proto": "^1.2.0", + "has-symbols": "^1.1.0", + "internal-slot": "^1.1.0", + "iterator.prototype": "^1.1.5", + "math-intrinsics": "^1.1.0", + "safe-array-concat": "^1.1.3" }, "engines": { "node": ">= 0.4" } }, "node_modules/es-module-lexer": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.4.tgz", - "integrity": "sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.0.0.tgz", + "integrity": "sha512-5POEcUuZybH7IdmGsD8wlf0AI55wMecM9rVBTI/qEAy2c1kTOm3DjFYjrBdI2K3BaJjJYfYFeRtM0t9ssnRuxw==", "license": "MIT" }, "node_modules/es-object-atoms": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", - "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", - "dev": true, + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", "license": "MIT", "dependencies": { "es-errors": "^1.3.0" @@ -8015,40 +10540,44 @@ } }, "node_modules/es-set-tostringtag": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz", - "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", "dev": true, "license": "MIT", "dependencies": { - "get-intrinsic": "^1.2.4", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", "has-tostringtag": "^1.0.2", - "hasown": "^2.0.1" + "hasown": "^2.0.2" }, "engines": { "node": ">= 0.4" } }, "node_modules/es-shim-unscopables": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz", - "integrity": "sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.1.0.tgz", + "integrity": "sha512-d9T8ucsEhh8Bi1woXCf+TIKDIROLG5WCkxg8geBCbvk22kzwC5G2OnXVMO6FUsvQlgUUXQ2itephWDLqDzbeCw==", "dev": true, "license": "MIT", "dependencies": { - "hasown": "^2.0.0" + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" } }, "node_modules/es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.3.0.tgz", + "integrity": "sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g==", "dev": true, "license": "MIT", "dependencies": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" + "is-callable": "^1.2.7", + "is-date-object": "^1.0.5", + "is-symbol": "^1.0.4" }, "engines": { "node": ">= 0.4" @@ -8057,60 +10586,36 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/es5-ext": { - "version": "0.10.64", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.64.tgz", - "integrity": "sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==", - "dev": true, - "hasInstallScript": true, - "license": "ISC", - "dependencies": { - "es6-iterator": "^2.0.3", - "es6-symbol": "^3.1.3", - "esniff": "^2.0.1", - "next-tick": "^1.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/es6-iterator": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", - "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==", - "dev": true, + "node_modules/esast-util-from-estree": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/esast-util-from-estree/-/esast-util-from-estree-2.0.0.tgz", + "integrity": "sha512-4CyanoAudUSBAn5K13H4JhsMH6L9ZP7XbLVe/dKybkxMO7eDyLsT8UHl9TRNrU2Gr9nz+FovfSIjuXWJ81uVwQ==", "license": "MIT", "dependencies": { - "d": "1", - "es5-ext": "^0.10.35", - "es6-symbol": "^3.1.1" - } - }, - "node_modules/es6-symbol": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.4.tgz", - "integrity": "sha512-U9bFFjX8tFiATgtkJ1zg25+KviIXpgRvRHS8sau3GfhVzThRQrOeksPeT0BWW2MNZs1OEWJ1DPXOQMn0KKRkvg==", - "dev": true, - "license": "ISC", - "dependencies": { - "d": "^1.0.2", - "ext": "^1.7.0" + "@types/estree-jsx": "^1.0.0", + "devlop": "^1.0.0", + "estree-util-visit": "^2.0.0", + "unist-util-position-from-estree": "^2.0.0" }, - "engines": { - "node": ">=0.12" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/es6-weak-map": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz", - "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==", - "dev": true, - "license": "ISC", + "node_modules/esast-util-from-js": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/esast-util-from-js/-/esast-util-from-js-2.0.1.tgz", + "integrity": "sha512-8Ja+rNJ0Lt56Pcf3TAmpBZjmx8ZcK5Ts4cAzIOjsjevg9oSXJnl6SUQ2EevU8tv3h6ZLWmoKL5H4fgWvdvfETw==", + "license": "MIT", "dependencies": { - "d": "1", - "es5-ext": "^0.10.46", - "es6-iterator": "^2.0.3", - "es6-symbol": "^3.1.1" + "@types/estree-jsx": "^1.0.0", + "acorn": "^8.0.0", + "esast-util-from-estree": "^2.0.0", + "vfile-message": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, "node_modules/escalade": { @@ -8153,95 +10658,84 @@ } }, "node_modules/eslint": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", - "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", - "devOptional": true, + "version": "9.39.4", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.39.4.tgz", + "integrity": "sha512-XoMjdBOwe/esVgEvLmNsD3IRHkm7fbKIUGvrleloJXUZgDHig2IPWNniv+GwjyJXzuNqVjlr5+4yVUZjycJwfQ==", + "dev": true, "license": "MIT", "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.0", - "@humanwhocodes/config-array": "^0.11.14", + "@eslint-community/eslint-utils": "^4.8.0", + "@eslint-community/regexpp": "^4.12.1", + "@eslint/config-array": "^0.21.2", + "@eslint/config-helpers": "^0.4.2", + "@eslint/core": "^0.17.0", + "@eslint/eslintrc": "^3.3.5", + "@eslint/js": "9.39.4", + "@eslint/plugin-kit": "^0.4.1", + "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", - "ajv": "^6.12.4", + "@humanwhocodes/retry": "^0.4.2", + "@types/estree": "^1.0.6", + "ajv": "^6.14.0", "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", + "cross-spawn": "^7.0.6", "debug": "^4.3.2", - "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", + "eslint-scope": "^8.4.0", + "eslint-visitor-keys": "^4.2.1", + "espree": "^10.4.0", + "esquery": "^1.5.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", + "file-entry-cache": "^8.0.0", "find-up": "^5.0.0", "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", + "minimatch": "^3.1.5", "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" + "optionator": "^0.9.3" }, "bin": { "eslint": "bin/eslint.js" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-config-prettier": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz", - "integrity": "sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==", - "dev": true, - "license": "MIT", - "bin": { - "eslint-config-prettier": "bin/cli.js" + "url": "https://eslint.org/donate" }, "peerDependencies": { - "eslint": ">=7.0.0" + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } } }, "node_modules/eslint-mdx": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/eslint-mdx/-/eslint-mdx-3.1.5.tgz", - "integrity": "sha512-ynztX0k7CQ3iDL7fDEIeg3g0O/d6QPv7IBI9fdYLhXp5fAp0fi8X22xF/D3+Pk0f90R27uwqa1clHpay6t0l8Q==", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/eslint-mdx/-/eslint-mdx-3.7.0.tgz", + "integrity": "sha512-QpPdJ6EeFthHuIrfgnWneZgwwFNOLFj/nf2jg/tOTBoiUnqNTxUUpTGAn0ZFHYEh5htVVoe5kjvD02oKtxZGeA==", "dev": true, "license": "MIT", "dependencies": { - "acorn": "^8.11.3", + "acorn": "^8.15.0", "acorn-jsx": "^5.3.2", - "espree": "^9.6.1", + "espree": "^9.6.1 || ^10.4.0", "estree-util-visit": "^2.0.0", - "remark-mdx": "^3.0.0", + "remark-mdx": "^3.1.0", "remark-parse": "^11.0.0", "remark-stringify": "^11.0.0", - "synckit": "^0.9.0", - "tslib": "^2.6.2", - "unified": "^11.0.4", - "unified-engine": "^11.2.0", + "synckit": "^0.11.8", + "unified": "^11.0.5", + "unified-engine": "^11.2.2", "unist-util-visit": "^5.0.0", - "uvu": "^0.5.6", - "vfile": "^6.0.1" + "vfile": "^6.0.3" }, "engines": { "node": ">=18.0.0" @@ -8251,40 +10745,32 @@ "url": "https://opencollective.com/unified" }, "peerDependencies": { - "eslint": ">=8.0.0" - } - }, - "node_modules/eslint-plugin-markdown": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-markdown/-/eslint-plugin-markdown-3.0.1.tgz", - "integrity": "sha512-8rqoc148DWdGdmYF6WSQFT3uQ6PO7zXYgeBpHAOAakX/zpq+NvFYbDA/H7PYzHajwtmaOzAwfxyl++x0g1/N9A==", - "dev": true, - "license": "MIT", - "dependencies": { - "mdast-util-from-markdown": "^0.8.5" + "eslint": ">=8.0.0", + "remark-lint-file-extension": "*" }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + "peerDependenciesMeta": { + "remark-lint-file-extension": { + "optional": true + } } }, "node_modules/eslint-plugin-mdx": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/eslint-plugin-mdx/-/eslint-plugin-mdx-3.1.5.tgz", - "integrity": "sha512-lUE7tP7IrIRHU3gTtASDe5u4YM2SvQveYVJfuo82yn3MLh/B/v05FNySURCK4aIxIYF1QYo3IRemQG/lyQzpAg==", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-mdx/-/eslint-plugin-mdx-3.7.0.tgz", + "integrity": "sha512-JXaaQPnKqyti/QSOSQDThLV1EemHm/Fe2l/nMKH0vmhvmABtN/yV/9+GtKgh8UTZwrwuTfQq1HW5eR8HXneNLA==", "dev": true, "license": "MIT", "dependencies": { - "eslint-mdx": "^3.1.5", - "eslint-plugin-markdown": "^3.0.1", - "remark-mdx": "^3.0.0", + "eslint-mdx": "^3.7.0", + "mdast-util-from-markdown": "^2.0.2", + "mdast-util-mdx": "^3.0.0", + "micromark-extension-mdxjs": "^3.0.0", + "remark-mdx": "^3.1.0", "remark-parse": "^11.0.0", "remark-stringify": "^11.0.0", - "tslib": "^2.6.2", - "unified": "^11.0.4", - "vfile": "^6.0.1" + "synckit": "^0.11.8", + "unified": "^11.0.5", + "vfile": "^6.0.3" }, "engines": { "node": ">=18.0.0" @@ -8298,29 +10784,29 @@ } }, "node_modules/eslint-plugin-react": { - "version": "7.35.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.35.0.tgz", - "integrity": "sha512-v501SSMOWv8gerHkk+IIQBkcGRGrO2nfybfj5pLxuJNFTPxxA3PSryhXTK+9pNbtkggheDdsC0E9Q8CuPk6JKA==", + "version": "7.37.5", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.37.5.tgz", + "integrity": "sha512-Qteup0SqU15kdocexFNAJMvCJEfa2xUKNV4CC1xsVMrIIqEy3SQ/rqyxCWNzfrd3/ldy6HMlD2e0JDVpDg2qIA==", "dev": true, "license": "MIT", "dependencies": { "array-includes": "^3.1.8", "array.prototype.findlast": "^1.2.5", - "array.prototype.flatmap": "^1.3.2", + "array.prototype.flatmap": "^1.3.3", "array.prototype.tosorted": "^1.1.4", "doctrine": "^2.1.0", - "es-iterator-helpers": "^1.0.19", + "es-iterator-helpers": "^1.2.1", "estraverse": "^5.3.0", "hasown": "^2.0.2", "jsx-ast-utils": "^2.4.1 || ^3.0.0", "minimatch": "^3.1.2", - "object.entries": "^1.1.8", + "object.entries": "^1.1.9", "object.fromentries": "^2.0.8", - "object.values": "^1.2.0", + "object.values": "^1.2.1", "prop-types": "^15.8.1", "resolve": "^2.0.0-next.5", "semver": "^6.3.1", - "string.prototype.matchall": "^4.0.11", + "string.prototype.matchall": "^4.0.12", "string.prototype.repeat": "^1.0.0" }, "engines": { @@ -8330,33 +10816,26 @@ "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7" } }, - "node_modules/eslint-plugin-react/node_modules/doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/eslint-plugin-react/node_modules/resolve": { - "version": "2.0.0-next.5", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.5.tgz", - "integrity": "sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA==", + "version": "2.0.0-next.6", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.6.tgz", + "integrity": "sha512-3JmVl5hMGtJ3kMmB3zi3DL25KfkCEyy3Tw7Gmw7z5w8M9WlwoPFnIvwChzu1+cF3iaK3sp18hhPz8ANeimdJfA==", "dev": true, "license": "MIT", "dependencies": { - "is-core-module": "^2.13.0", + "es-errors": "^1.3.0", + "is-core-module": "^2.16.1", + "node-exports-info": "^1.6.0", + "object-keys": "^1.1.1", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, "bin": { "resolve": "bin/resolve" }, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -8372,30 +10851,30 @@ } }, "node_modules/eslint-scope": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", - "devOptional": true, + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz", + "integrity": "sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==", + "dev": true, "license": "BSD-2-Clause", "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" } }, "node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "devOptional": true, + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "dev": true, "license": "Apache-2.0", "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -8405,7 +10884,7 @@ "version": "6.0.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "devOptional": true, + "dev": true, "license": "ISC", "dependencies": { "is-glob": "^4.0.3" @@ -8414,64 +10893,19 @@ "node": ">=10.13.0" } }, - "node_modules/eslint/node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "devOptional": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint/node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "devOptional": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/esniff": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/esniff/-/esniff-2.0.1.tgz", - "integrity": "sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==", - "dev": true, - "license": "ISC", - "dependencies": { - "d": "^1.0.1", - "es5-ext": "^0.10.62", - "event-emitter": "^0.3.5", - "type": "^2.7.2" - }, - "engines": { - "node": ">=0.10" - } - }, "node_modules/espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", - "devOptional": true, + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz", + "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==", + "dev": true, "license": "BSD-2-Clause", "dependencies": { - "acorn": "^8.9.0", + "acorn": "^8.15.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" + "eslint-visitor-keys": "^4.2.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -8491,10 +10925,10 @@ } }, "node_modules/esquery": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", - "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", - "devOptional": true, + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz", + "integrity": "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==", + "dev": true, "license": "BSD-3-Clause", "dependencies": { "estraverse": "^5.1.0" @@ -8563,6 +10997,20 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/estree-util-scope": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/estree-util-scope/-/estree-util-scope-1.0.0.tgz", + "integrity": "sha512-2CAASclonf+JFWBNJPndcOpA8EMJwa0Q8LUFJEKqXLW6+qBvbFZuF5gItbQOs/umBUkjviCSDCbBwU2cXbmrhQ==", + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0", + "devlop": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/estree-util-to-js": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/estree-util-to-js/-/estree-util-to-js-2.0.0.tgz", @@ -8579,9 +11027,9 @@ } }, "node_modules/estree-util-value-to-estree": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/estree-util-value-to-estree/-/estree-util-value-to-estree-3.1.2.tgz", - "integrity": "sha512-S0gW2+XZkmsx00tU2uJ4L9hUT7IFabbml9pHh2WQqFmAbxit++YGZne0sKJbNwkj9Wvg9E4uqWl4nCIFQMmfag==", + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/estree-util-value-to-estree/-/estree-util-value-to-estree-3.5.0.tgz", + "integrity": "sha512-aMV56R27Gv3QmfmF1MY12GWkGzzeAezAX+UplqHVASfjc9wNzI/X6hC0S9oxq61WT4aQesLGslWP9tKk6ghRZQ==", "license": "MIT", "dependencies": { "@types/estree": "^1.0.0" @@ -8655,17 +11103,6 @@ "node": ">= 0.8" } }, - "node_modules/event-emitter": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", - "integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==", - "dev": true, - "license": "MIT", - "dependencies": { - "d": "1", - "es5-ext": "~0.10.14" - } - }, "node_modules/eventemitter3": { "version": "4.0.7", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", @@ -8705,45 +11142,49 @@ } }, "node_modules/express": { - "version": "4.19.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.19.2.tgz", - "integrity": "sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==", + "version": "4.22.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.22.2.tgz", + "integrity": "sha512-IuL+Elrou2ZvCFHs18/CIzy2Nzvo25nZ1/D2eIZlz7c+QUayAcYoiM2BthCjs+EBHVpjYjcuLDAiCWgeIX3X1Q==", "license": "MIT", "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.20.2", - "content-disposition": "0.5.4", + "body-parser": "~1.20.5", + "content-disposition": "~0.5.4", "content-type": "~1.0.4", - "cookie": "0.6.0", - "cookie-signature": "1.0.6", + "cookie": "~0.7.1", + "cookie-signature": "~1.0.6", "debug": "2.6.9", "depd": "2.0.0", - "encodeurl": "~1.0.2", + "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "etag": "~1.8.1", - "finalhandler": "1.2.0", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "merge-descriptors": "1.0.1", + "finalhandler": "~1.3.1", + "fresh": "~0.5.2", + "http-errors": "~2.0.0", + "merge-descriptors": "1.0.3", "methods": "~1.1.2", - "on-finished": "2.4.1", + "on-finished": "~2.4.1", "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", + "path-to-regexp": "~0.1.12", "proxy-addr": "~2.0.7", - "qs": "6.11.0", + "qs": "~6.15.1", "range-parser": "~1.2.1", "safe-buffer": "5.2.1", - "send": "0.18.0", - "serve-static": "1.15.0", + "send": "~0.19.0", + "serve-static": "~1.16.2", "setprototypeof": "1.2.0", - "statuses": "2.0.1", + "statuses": "~2.0.1", "type-is": "~1.6.18", "utils-merge": "1.0.1", "vary": "~1.1.2" }, "engines": { "node": ">= 0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/express/node_modules/content-disposition": { @@ -8774,9 +11215,9 @@ "license": "MIT" }, "node_modules/express/node_modules/path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==", + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.13.tgz", + "integrity": "sha512-A/AGNMFN3c8bOlvV9RreMdrv7jsmF9XIfDeCd87+I8RNg6s78BhJxMu69NEMHBSJFxKidViTEdruRwEk/WIKqA==", "license": "MIT" }, "node_modules/express/node_modules/range-parser": { @@ -8788,16 +11229,6 @@ "node": ">= 0.6" } }, - "node_modules/ext": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", - "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==", - "dev": true, - "license": "ISC", - "dependencies": { - "type": "^2.7.2" - } - }, "node_modules/extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", @@ -8823,16 +11254,16 @@ "license": "MIT" }, "node_modules/fast-glob": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", - "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", "license": "MIT", "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", "glob-parent": "^5.1.2", "merge2": "^1.3.0", - "micromatch": "^4.0.4" + "micromatch": "^4.0.8" }, "engines": { "node": ">=8.6.0" @@ -8848,28 +11279,29 @@ "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/fast-uri": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.1.tgz", - "integrity": "sha512-MWipKbbYiYI0UC7cl8m/i/IWTqfC8YXsqjzybjddLsFjStroQzsHXkc73JutMvBiXmOvapk+axIl79ig5t55Bw==", - "license": "MIT" - }, - "node_modules/fast-url-parser": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/fast-url-parser/-/fast-url-parser-1.1.3.tgz", - "integrity": "sha512-5jOCVXADYNuRkKFzNJ0dCCewsZiYo0dz8QNYljkOpFC6r2U4OBmKtvm/Tsuh4w1YYdDqDb31a8TVhBJ2OJKdqQ==", - "license": "MIT", - "dependencies": { - "punycode": "^1.3.2" - } + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.2.tgz", + "integrity": "sha512-rVjf7ArG3LTk+FS6Yw81V1DLuZl1bRbNrev6Tmd/9RaroeeRRJhAt7jg/6YFxbvAQXUCavSoZhPPj6oOx+5KjQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "BSD-3-Clause" }, "node_modules/fastq": { - "version": "1.17.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", - "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.20.1.tgz", + "integrity": "sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw==", "license": "ISC", "dependencies": { "reusify": "^1.0.4" @@ -8913,16 +11345,16 @@ } }, "node_modules/file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "devOptional": true, + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", + "dev": true, "license": "MIT", "dependencies": { - "flat-cache": "^3.0.4" + "flat-cache": "^4.0.0" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=16.0.0" } }, "node_modules/file-loader": { @@ -8963,15 +11395,6 @@ "url": "https://opencollective.com/webpack" } }, - "node_modules/filesize": { - "version": "8.0.7", - "resolved": "https://registry.npmjs.org/filesize/-/filesize-8.0.7.tgz", - "integrity": "sha512-pjmC+bkIF8XI7fWaH8KxHcZL3DPybs1roSKP4rKDvy20tAWwIObE4+JIseG2byfGKhud5ZnM4YSGKBz7Sh0ndQ==", - "license": "BSD-3-Clause", - "engines": { - "node": ">= 0.4.0" - } - }, "node_modules/fill-range": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", @@ -8985,17 +11408,17 @@ } }, "node_modules/finalhandler": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", - "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.2.tgz", + "integrity": "sha512-aA4RyPcd3badbdABGDuTXCMTtOneUCAYH/gxoYRTZlIJdF0YPWuGqiAsIrhNnnqdXGswYk6dGujem4w80UJFhg==", "license": "MIT", "dependencies": { "debug": "2.6.9", - "encodeurl": "~1.0.2", + "encodeurl": "~2.0.0", "escape-html": "~1.0.3", - "on-finished": "2.4.1", + "on-finished": "~2.4.1", "parseurl": "~1.3.3", - "statuses": "2.0.1", + "statuses": "~2.0.2", "unpipe": "~1.0.0" }, "engines": { @@ -9037,6 +11460,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, "license": "MIT", "dependencies": { "locate-path": "^6.0.0", @@ -9059,31 +11483,30 @@ } }, "node_modules/flat-cache": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", - "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", - "devOptional": true, + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", + "dev": true, "license": "MIT", "dependencies": { "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" + "keyv": "^4.5.4" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=16" } }, "node_modules/flatted": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", - "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", - "devOptional": true, + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.2.tgz", + "integrity": "sha512-PjDse7RzhcPkIJwy5t7KPWQSZ9cAbzQXcafsetQoD7sOJRQlGikNbx7yZp2OotDnJyrDcbyRq3Ttb18iYOqkxA==", + "dev": true, "license": "ISC" }, "node_modules/follow-redirects": { - "version": "1.15.6", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", - "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.16.0.tgz", + "integrity": "sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw==", "funding": [ { "type": "individual", @@ -9101,23 +11524,29 @@ } }, "node_modules/for-each": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", - "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz", + "integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==", "dev": true, "license": "MIT", "dependencies": { - "is-callable": "^1.1.3" + "is-callable": "^1.2.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/foreground-child": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz", - "integrity": "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", + "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", "dev": true, "license": "ISC", "dependencies": { - "cross-spawn": "^7.0.0", + "cross-spawn": "^7.0.6", "signal-exit": "^4.0.1" }, "engines": { @@ -9140,112 +11569,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/fork-ts-checker-webpack-plugin": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-6.5.3.tgz", - "integrity": "sha512-SbH/l9ikmMWycd5puHJKTkZJKddF4iRLyW3DeZ08HTI7NGyLS38MXd/KGgeWumQO7YNQbW2u/NtPT2YowbPaGQ==", - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.8.3", - "@types/json-schema": "^7.0.5", - "chalk": "^4.1.0", - "chokidar": "^3.4.2", - "cosmiconfig": "^6.0.0", - "deepmerge": "^4.2.2", - "fs-extra": "^9.0.0", - "glob": "^7.1.6", - "memfs": "^3.1.2", - "minimatch": "^3.0.4", - "schema-utils": "2.7.0", - "semver": "^7.3.2", - "tapable": "^1.0.0" - }, - "engines": { - "node": ">=10", - "yarn": ">=1.0.0" - }, - "peerDependencies": { - "eslint": ">= 6", - "typescript": ">= 2.7", - "vue-template-compiler": "*", - "webpack": ">= 4" - }, - "peerDependenciesMeta": { - "eslint": { - "optional": true - }, - "vue-template-compiler": { - "optional": true - } - } - }, - "node_modules/fork-ts-checker-webpack-plugin/node_modules/cosmiconfig": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-6.0.0.tgz", - "integrity": "sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg==", - "license": "MIT", - "dependencies": { - "@types/parse-json": "^4.0.0", - "import-fresh": "^3.1.0", - "parse-json": "^5.0.0", - "path-type": "^4.0.0", - "yaml": "^1.7.2" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/fork-ts-checker-webpack-plugin/node_modules/fs-extra": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", - "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", - "license": "MIT", - "dependencies": { - "at-least-node": "^1.0.0", - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/fork-ts-checker-webpack-plugin/node_modules/schema-utils": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.0.tgz", - "integrity": "sha512-0ilKFI6QQF5nxDZLFn2dMjvc4hjg/Wkg7rHd3jK6/A4a1Hl9VFdQWvgB1UMGoU94pad1P/8N7fMcEnLnSiju8A==", - "license": "MIT", - "dependencies": { - "@types/json-schema": "^7.0.4", - "ajv": "^6.12.2", - "ajv-keywords": "^3.4.1" - }, - "engines": { - "node": ">= 8.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, - "node_modules/fork-ts-checker-webpack-plugin/node_modules/tapable": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz", - "integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/fork-ts-checker-webpack-plugin/node_modules/yaml": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", - "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", - "license": "ISC", - "engines": { - "node": ">= 6" - } - }, "node_modules/form-data-encoder": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-2.1.4.tgz", @@ -9273,15 +11596,15 @@ } }, "node_modules/fraction.js": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.7.tgz", - "integrity": "sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==", + "version": "5.3.4", + "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-5.3.4.tgz", + "integrity": "sha512-1X1NTtiJphryn/uLQz3whtY6jK3fTqoE3ohKs0tT+Ujr1W59oopxmoEh7Lu5p6vBaPbgoM0bzveAW4Qi5RyWDQ==", "license": "MIT", "engines": { "node": "*" }, "funding": { - "type": "patreon", + "type": "github", "url": "https://github.com/sponsors/rawify" } }, @@ -9295,9 +11618,9 @@ } }, "node_modules/fs-extra": { - "version": "11.2.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz", - "integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==", + "version": "11.3.4", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.4.tgz", + "integrity": "sha512-CTXd6rk/M3/ULNQj8FBqBWHYBVYybQ3VPBw0xGKFe3tuH7ytT6ACnvzpIQ3UZtB8yvUKC2cXn1a+x+5EVQLovA==", "license": "MIT", "dependencies": { "graceful-fs": "^4.2.0", @@ -9308,16 +11631,11 @@ "node": ">=14.14" } }, - "node_modules/fs-monkey": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/fs-monkey/-/fs-monkey-1.0.6.tgz", - "integrity": "sha512-b1FMfwetIKymC0eioW7mTywihSQE4oLzQn1dB6rZB5fx/3NpNEdAWeCSMB+60/AeT0TCXsxzAlcYVEFCTAksWg==", - "license": "Unlicense" - }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true, "license": "ISC" }, "node_modules/fsevents": { @@ -9344,16 +11662,18 @@ } }, "node_modules/function.prototype.name": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", - "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.8.tgz", + "integrity": "sha512-e5iwyodOHhbMr/yNrc7fDYG4qlbIvI5gajyzPnb5TCwyhjApznQh1BMFou9b30SevY43gCJKXycoCBjMbsuW0Q==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "functions-have-names": "^1.2.3" + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "define-properties": "^1.2.1", + "functions-have-names": "^1.2.3", + "hasown": "^2.0.2", + "is-callable": "^1.2.7" }, "engines": { "node": ">= 0.4" @@ -9372,6 +11692,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/generator-function": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/generator-function/-/generator-function-2.0.1.tgz", + "integrity": "sha512-SFdFmIJi+ybC0vjlHN0ZGVGHc3lgE0DxPAT0djjVg+kjOnSqclqmj0KQ7ykTOLP6YxoqOvuAODGdcHJn+43q3g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/gensync": { "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", @@ -9382,16 +11712,21 @@ } }, "node_modules/get-intrinsic": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", - "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", "license": "MIT", "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", "function-bind": "^1.1.2", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0" + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" }, "engines": { "node": ">= 0.4" @@ -9406,17 +11741,17 @@ "integrity": "sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g==", "license": "ISC" }, - "node_modules/get-stdin": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-8.0.0.tgz", - "integrity": "sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg==", - "dev": true, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", "license": "MIT", - "engines": { - "node": ">=10" + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "engines": { + "node": ">= 0.4" } }, "node_modules/get-stream": { @@ -9432,15 +11767,15 @@ } }, "node_modules/get-symbol-description": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", - "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.1.0.tgz", + "integrity": "sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.5", + "call-bound": "^1.0.3", "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4" + "get-intrinsic": "^1.2.6" }, "engines": { "node": ">= 0.4" @@ -9459,7 +11794,8 @@ "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", + "dev": true, "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", @@ -9488,24 +11824,20 @@ "node": ">= 6" } }, - "node_modules/glob-promise": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/glob-promise/-/glob-promise-4.2.2.tgz", - "integrity": "sha512-xcUzJ8NWN5bktoTIX7eOclO1Npxd/dyVqUJxlLIDasT4C7KZyqlPIwkdJ0Ypiy3p2ZKahTjK4M9uC3sNSfNMzw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/glob": "^7.1.3" - }, + "node_modules/glob-to-regex.js": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/glob-to-regex.js/-/glob-to-regex.js-1.2.0.tgz", + "integrity": "sha512-QMwlOQKU/IzqMUOAZWubUOT8Qft+Y0KQWnX9nK3ch0CJg0tTp4TvGZsTfudYKv2NzoQSyPcnA6TYeIQ3jGichQ==", + "license": "Apache-2.0", "engines": { - "node": ">=12" + "node": ">=10.0" }, "funding": { - "type": "individual", - "url": "https://github.com/sponsors/ahmadnassri" + "type": "github", + "url": "https://github.com/sponsors/streamich" }, "peerDependencies": { - "glob": "^7.1.6" + "tslib": "2" } }, "node_modules/glob-to-regexp": { @@ -9538,51 +11870,17 @@ "node": ">=10" } }, - "node_modules/global-modules": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", - "integrity": "sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==", - "license": "MIT", - "dependencies": { - "global-prefix": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/global-prefix": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz", - "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", - "license": "MIT", - "dependencies": { - "ini": "^1.3.5", - "kind-of": "^6.0.2", - "which": "^1.3.1" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/global-prefix/node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "which": "bin/which" - } - }, "node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "version": "17.6.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-17.6.0.tgz", + "integrity": "sha512-sepffkT8stwnIYbsMBpoCHJuJM5l98FUF2AnE07hfvE0m/qp3R586hw4jF4uadbhvg1ooIdzuu7CsfD2jzCaNA==", + "dev": true, "license": "MIT", "engines": { - "node": ">=4" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/globalthis": { @@ -9623,12 +11921,12 @@ } }, "node_modules/gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", "license": "MIT", - "dependencies": { - "get-intrinsic": "^1.1.3" + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -9677,13 +11975,6 @@ "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "license": "ISC" }, - "node_modules/graphemer": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "devOptional": true, - "license": "MIT" - }, "node_modules/gray-matter": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/gray-matter/-/gray-matter-4.0.3.tgz", @@ -9709,9 +12000,9 @@ } }, "node_modules/gray-matter/node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "version": "3.14.2", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.2.tgz", + "integrity": "sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==", "license": "MIT", "dependencies": { "argparse": "^1.0.7", @@ -9736,6 +12027,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/hachure-fill": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/hachure-fill/-/hachure-fill-0.5.2.tgz", + "integrity": "sha512-3GKBOn+m2LX9iq+JC1064cSFprJY4jL1jCXTcpnfER5HYE2l/4EfWSGzkPa/ZDBmYI0ZOEj5VHV/eKnPGkHuOg==", + "license": "MIT" + }, "node_modules/handle-thing": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.1.tgz", @@ -9743,11 +12040,14 @@ "license": "MIT" }, "node_modules/has-bigints": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", - "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.1.0.tgz", + "integrity": "sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg==", "dev": true, "license": "MIT", + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -9774,10 +12074,14 @@ } }, "node_modules/has-proto": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", - "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.2.0.tgz", + "integrity": "sha512-KIL7eQPfHQRC8+XluaIw7BHUwwqL19bQn4hzNgdr+1wXoU0KKj6rufu47lhY7KbJR2C6T6+PfyN0Ea7wkSS+qQ==", + "dev": true, "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.0" + }, "engines": { "node": ">= 0.4" }, @@ -9786,9 +12090,9 @@ } }, "node_modules/has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", "license": "MIT", "engines": { "node": ">= 0.4" @@ -9838,16 +12142,16 @@ } }, "node_modules/hast-util-from-parse5": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/hast-util-from-parse5/-/hast-util-from-parse5-8.0.1.tgz", - "integrity": "sha512-Er/Iixbc7IEa7r/XLtuG52zoqn/b3Xng/w6aZQ0xGVxzhw5xUFxcRqdPzP6yFi/4HBYRaifaI5fQ1RH8n0ZeOQ==", + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/hast-util-from-parse5/-/hast-util-from-parse5-8.0.3.tgz", + "integrity": "sha512-3kxEVkEKt0zvcZ3hCRYI8rqrgwtlIOFMWkbclACvjlDw8Li9S2hk/d51OI0nr/gIpdMHNepwgOKqZ/sy0Clpyg==", "license": "MIT", "dependencies": { "@types/hast": "^3.0.0", "@types/unist": "^3.0.0", "devlop": "^1.0.0", - "hastscript": "^8.0.0", - "property-information": "^6.0.0", + "hastscript": "^9.0.0", + "property-information": "^7.0.0", "vfile": "^6.0.0", "vfile-location": "^5.0.0", "web-namespaces": "^2.0.0" @@ -9871,9 +12175,9 @@ } }, "node_modules/hast-util-raw": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/hast-util-raw/-/hast-util-raw-9.0.4.tgz", - "integrity": "sha512-LHE65TD2YiNsHD3YuXcKPHXPLuYh/gjp12mOfU8jxSrm1f/yJpsb0F/KKljS6U9LJoP0Ux+tCe8iJ2AsPzTdgA==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/hast-util-raw/-/hast-util-raw-9.1.0.tgz", + "integrity": "sha512-Y8/SBAHkZGoNkpzqqfCldijcuUKh7/su31kEBp67cFY09Wy0mTRgtsLYsiIxMJxlu0f6AA5SUTbDR8K0rxnbUw==", "license": "MIT", "dependencies": { "@types/hast": "^3.0.0", @@ -9896,9 +12200,9 @@ } }, "node_modules/hast-util-to-estree": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/hast-util-to-estree/-/hast-util-to-estree-3.1.0.tgz", - "integrity": "sha512-lfX5g6hqVh9kjS/B9E2gSkvHH4SZNiQFiqWS0x9fENzEl+8W12RqdRxX6d/Cwxi30tPQs3bIO+aolQJNp1bIyw==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/hast-util-to-estree/-/hast-util-to-estree-3.1.3.tgz", + "integrity": "sha512-48+B/rJWAp0jamNbAAf9M7Uf//UVqAoMmgXhBdxTDJLGKY+LRnZ99qcG+Qjl5HfMpYNzS5v4EAwVEF34LeAj7w==", "license": "MIT", "dependencies": { "@types/estree": "^1.0.0", @@ -9912,9 +12216,9 @@ "mdast-util-mdx-expression": "^2.0.0", "mdast-util-mdx-jsx": "^3.0.0", "mdast-util-mdxjs-esm": "^2.0.0", - "property-information": "^6.0.0", + "property-information": "^7.0.0", "space-separated-tokens": "^2.0.0", - "style-to-object": "^0.4.0", + "style-to-js": "^1.0.0", "unist-util-position": "^5.0.0", "zwitch": "^2.0.0" }, @@ -9924,9 +12228,9 @@ } }, "node_modules/hast-util-to-jsx-runtime": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/hast-util-to-jsx-runtime/-/hast-util-to-jsx-runtime-2.3.0.tgz", - "integrity": "sha512-H/y0+IWPdsLLS738P8tDnrQ8Z+dj12zQQ6WC11TIM21C8WFVoIxcqWXf2H3hiTVZjF1AWqoimGwrTWecWrnmRQ==", + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/hast-util-to-jsx-runtime/-/hast-util-to-jsx-runtime-2.3.6.tgz", + "integrity": "sha512-zl6s8LwNyo1P9uw+XJGvZtdFF1GdAkOg8ujOw+4Pyb76874fLps4ueHXDhXWdk6YHQ6OgUtinliG7RsYvCbbBg==", "license": "MIT", "dependencies": { "@types/estree": "^1.0.0", @@ -9939,9 +12243,9 @@ "mdast-util-mdx-expression": "^2.0.0", "mdast-util-mdx-jsx": "^3.0.0", "mdast-util-mdxjs-esm": "^2.0.0", - "property-information": "^6.0.0", + "property-information": "^7.0.0", "space-separated-tokens": "^2.0.0", - "style-to-object": "^1.0.0", + "style-to-js": "^1.0.0", "unist-util-position": "^5.0.0", "vfile-message": "^4.0.0" }, @@ -9950,31 +12254,16 @@ "url": "https://opencollective.com/unified" } }, - "node_modules/hast-util-to-jsx-runtime/node_modules/inline-style-parser": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.2.3.tgz", - "integrity": "sha512-qlD8YNDqyTKTyuITrDOffsl6Tdhv+UC4hcdAVuQsK4IMQ99nSgd1MIA/Q+jQYoh9r3hVUXhYh7urSRmXPkW04g==", - "license": "MIT" - }, - "node_modules/hast-util-to-jsx-runtime/node_modules/style-to-object": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-1.0.7.tgz", - "integrity": "sha512-uSjr59G5u6fbxUfKbb8GcqMGT3Xs9v5IbPkjb0S16GyOeBLAzSRK0CixBv5YrYvzO6TDLzIS6QCn78tkqWngPw==", - "license": "MIT", - "dependencies": { - "inline-style-parser": "0.2.3" - } - }, "node_modules/hast-util-to-parse5": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/hast-util-to-parse5/-/hast-util-to-parse5-8.0.0.tgz", - "integrity": "sha512-3KKrV5ZVI8if87DVSi1vDeByYrkGzg4mEfeu4alwgmmIeARiBLKCZS2uw5Gb6nU9x9Yufyj3iudm6i7nl52PFw==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/hast-util-to-parse5/-/hast-util-to-parse5-8.0.1.tgz", + "integrity": "sha512-MlWT6Pjt4CG9lFCjiz4BH7l9wmrMkfkJYCxFwKQic8+RTZgWPuWxwAfjJElsXkex7DJjfSJsQIt931ilUgmwdA==", "license": "MIT", "dependencies": { "@types/hast": "^3.0.0", "comma-separated-tokens": "^2.0.0", "devlop": "^1.0.0", - "property-information": "^6.0.0", + "property-information": "^7.0.0", "space-separated-tokens": "^2.0.0", "web-namespaces": "^2.0.0", "zwitch": "^2.0.0" @@ -9998,15 +12287,15 @@ } }, "node_modules/hastscript": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/hastscript/-/hastscript-8.0.0.tgz", - "integrity": "sha512-dMOtzCEd3ABUeSIISmrETiKuyydk1w0pa+gE/uormcTpSYuaNJPbX1NU3JLyscSLjwAQM8bWMhhIlnCqnRvDTw==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/hastscript/-/hastscript-9.0.1.tgz", + "integrity": "sha512-g7df9rMFX/SPi34tyGCyUBREQoKkapwdY/T04Qn9TDWfHhAYt4/I0gMVirzK5wEzeUqIjEB+LXC/ypb7Aqno5w==", "license": "MIT", "dependencies": { "@types/hast": "^3.0.0", "comma-separated-tokens": "^2.0.0", "hast-util-parse-selector": "^4.0.0", - "property-information": "^6.0.0", + "property-information": "^7.0.0", "space-separated-tokens": "^2.0.0" }, "funding": { @@ -10114,22 +12403,6 @@ "safe-buffer": "~5.1.0" } }, - "node_modules/html-entities": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-2.5.2.tgz", - "integrity": "sha512-K//PSRMQk4FZ78Kyau+mZurHn3FH0Vwr+H36eE0rPbeYkRRi9YxceYPhuN60UwWorxyKHhqoAJl2OFKa4BVtaA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/mdevils" - }, - { - "type": "patreon", - "url": "https://patreon.com/mdevils" - } - ], - "license": "MIT" - }, "node_modules/html-escaper": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", @@ -10189,9 +12462,9 @@ } }, "node_modules/html-webpack-plugin": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-5.6.0.tgz", - "integrity": "sha512-iwaY4wzbe48AfKLZ/Cc8k0L+FKG6oSNRaZ8x5A/T/IVDGyXcbHncM9TdDa93wn0FsSm82FhTKW7f3vS61thXAw==", + "version": "5.6.6", + "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-5.6.6.tgz", + "integrity": "sha512-bLjW01UTrvoWTJQL5LsMRo1SypHW80FTm12OJRSnr3v6YHNhfe+1r0MYUZJMACxnCHURVnBWRwAsWs2yPU9Ezw==", "license": "MIT", "dependencies": { "@types/html-minifier-terser": "^6.0.0", @@ -10270,9 +12543,9 @@ } }, "node_modules/http-cache-semantics": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", - "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.2.0.tgz", + "integrity": "sha512-dTxcvPXqPvXBQpq5dUr6mEMJX4oIEFv6bwom3FDwKRDsuIjjJGANqhBuoAn9c1RQJIdAKav33ED65E2ys+87QQ==", "license": "BSD-2-Clause" }, "node_modules/http-deceiver": { @@ -10282,25 +12555,29 @@ "license": "MIT" }, "node_modules/http-errors": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", - "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz", + "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==", "license": "MIT", "dependencies": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" + "depd": "~2.0.0", + "inherits": "~2.0.4", + "setprototypeof": "~1.2.0", + "statuses": "~2.0.2", + "toidentifier": "~1.0.1" }, "engines": { "node": ">= 0.8" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/http-parser-js": { - "version": "0.5.8", - "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.8.tgz", - "integrity": "sha512-SGeBX54F94Wgu5RH3X5jsDtf4eHyRogWX1XGT3b4HuW3tQPM4AaBzoUji/4AAJNXCEOWZ5O0DgZmJw1947gD5Q==", + "version": "0.5.10", + "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.10.tgz", + "integrity": "sha512-Pysuw9XpUq5dVc/2SMHpuTY01RFl8fttgcyunjL7eEMhGM3cI4eOmiCycJDVCo/7O7ClfQD3SaI6ftDzqOXYMA==", "license": "MIT" }, "node_modules/http-proxy": { @@ -10318,9 +12595,9 @@ } }, "node_modules/http-proxy-middleware": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.6.tgz", - "integrity": "sha512-ya/UeJ6HVBYxrgYotAZo1KvPWlgB48kUJLDePFeneHsVujFaW5WNj2NgWCAE//B1Dl02BIfYlpNgBy8Kf8Rjmw==", + "version": "2.0.9", + "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.9.tgz", + "integrity": "sha512-c1IyJYLYppU574+YI7R4QyX2ystMtVXZwIdzazUIPIJsHuWNd+mho2j+bKoHftndicGj9yh+xjd+l0yj7VeT1Q==", "license": "MIT", "dependencies": { "@types/http-proxy": "^1.17.8", @@ -10375,6 +12652,15 @@ "node": ">=10.17.0" } }, + "node_modules/hyperdyperid": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/hyperdyperid/-/hyperdyperid-1.2.0.tgz", + "integrity": "sha512-Y93lCzHYgGWdrJ66yIktxiaGULYc6oGiABxhcO5AufBeOyoIdZF7bIfLaOrbM0iGIOXQQgxxRrFEnb+Y6w1n4A==", + "license": "MIT", + "engines": { + "node": ">=10.18" + } + }, "node_modules/iconv-lite": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", @@ -10409,13 +12695,10 @@ } }, "node_modules/image-size": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/image-size/-/image-size-1.1.1.tgz", - "integrity": "sha512-541xKlUw6jr/6gGuk92F+mYM5zaFAc5ahphvkqvNe2bQ6gVBkd6bfrmVJ2t4KDAfikAYZyIqTnktX3i6/aQDrQ==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/image-size/-/image-size-2.0.2.tgz", + "integrity": "sha512-IRqXKlaXwgSMAMtpNzZa1ZAe8m+Sa1770Dhk8VkSsP9LS+iHD62Zd8FQKs8fbPiagBE7BzoFX23cxFnwshpV6w==", "license": "MIT", - "dependencies": { - "queue": "6.0.2" - }, "bin": { "image-size": "bin/image-size.js" }, @@ -10423,20 +12706,10 @@ "node": ">=16.x" } }, - "node_modules/immer": { - "version": "9.0.21", - "resolved": "https://registry.npmjs.org/immer/-/immer-9.0.21.tgz", - "integrity": "sha512-bc4NBHqOqSfRW7POMkHd51LvClaeMXpm8dx0e8oE2GORbq5aRK7Bxl4FyzVLdGtLmvLKL7BTDBG5ACQm4HWjTA==", - "license": "MIT", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/immer" - } - }, "node_modules/import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", + "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", "license": "MIT", "dependencies": { "parent-module": "^1.0.0", @@ -10459,9 +12732,9 @@ } }, "node_modules/import-meta-resolve": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-4.1.0.tgz", - "integrity": "sha512-I6fiaX09Xivtk+THaMfAwnA3MVA5Big1WHF1Dfx9hFuvNIWpXnorlkzhcQf6ehrqQiiZECRt1poOAkPmer3ruw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-4.2.0.tgz", + "integrity": "sha512-Iqv2fzaTQN28s/FwZAoFq0ZSs/7hMAHJVX+w8PZl3cY19Pxk6jFFalxQoIfW2826i/fDLXv8IiEZRIT0lDuWcg==", "dev": true, "license": "MIT", "funding": { @@ -10488,9 +12761,9 @@ } }, "node_modules/infima": { - "version": "0.2.0-alpha.44", - "resolved": "https://registry.npmjs.org/infima/-/infima-0.2.0-alpha.44.tgz", - "integrity": "sha512-tuRkUSO/lB3rEhLJk25atwAjgLuzq070+pOW8XcvpHky/YbENnRRdPd85IBkyeTgttmOy5ah+yHYsK1HhUd4lQ==", + "version": "0.2.0-alpha.45", + "resolved": "https://registry.npmjs.org/infima/-/infima-0.2.0-alpha.45.tgz", + "integrity": "sha512-uyH0zfr1erU1OohLk0fT4Rrb94AOhguWNOcD9uGrSpRvNB+6gZXUoJX5J0NtvzBO10YZ9PgvA4NFgt+fYg8ojw==", "license": "MIT", "engines": { "node": ">=12" @@ -10501,6 +12774,7 @@ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, "license": "ISC", "dependencies": { "once": "^1.3.0", @@ -10514,27 +12788,31 @@ "license": "ISC" }, "node_modules/ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "license": "ISC" + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ini/-/ini-4.1.3.tgz", + "integrity": "sha512-X7rqawQBvfdjS10YU1y1YVreA3SsLrW9dX2CewP2EbBJM4ypVNLDkO5y04gejPwKIY9lR+7r9gn3rFPt/kmWFg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } }, "node_modules/inline-style-parser": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.1.1.tgz", - "integrity": "sha512-7NXolsK4CAS5+xvdj5OMMbI962hU/wvwoxk+LWR9Ek9bVtyuuYScDN6eS0rUm6TxApFpw7CX1o4uJzcd4AyD3Q==", + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.2.7.tgz", + "integrity": "sha512-Nb2ctOyNR8DqQoR0OwRG95uNWIC0C1lCgf5Naz5H6Ji72KZ8OcFZLz2P5sNgwlyoJ8Yif11oMuYs5pBQa86csA==", "license": "MIT" }, "node_modules/internal-slot": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", - "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.1.0.tgz", + "integrity": "sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==", "dev": true, "license": "MIT", "dependencies": { "es-errors": "^1.3.0", - "hasown": "^2.0.0", - "side-channel": "^1.0.4" + "hasown": "^2.0.2", + "side-channel": "^1.1.0" }, "engines": { "node": ">= 0.4" @@ -10549,15 +12827,6 @@ "node": ">=12" } }, - "node_modules/interpret": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", - "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", - "license": "MIT", - "engines": { - "node": ">= 0.10" - } - }, "node_modules/invariant": { "version": "2.2.4", "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", @@ -10568,19 +12837,18 @@ } }, "node_modules/ipaddr.js": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.2.0.tgz", - "integrity": "sha512-Ag3wB2o37wslZS19hZqorUnrnzSkpOVy+IiiDEiTqNubEYpYuHWIf6K4psgN2ZWKExS4xhVCrRVfb/wfW8fWJA==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.3.0.tgz", + "integrity": "sha512-Zv/pA+ciVFbCSBBjGfaKUya/CcGmUHzTydLMaTwrUUEM2DIEO3iZvueGxmacvmN50fGpGVKeTXpb2LcYQxeVdg==", "license": "MIT", "engines": { "node": ">= 10" } }, "node_modules/is-alphabetical": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz", - "integrity": "sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==", - "dev": true, + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-2.0.1.tgz", + "integrity": "sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ==", "license": "MIT", "funding": { "type": "github", @@ -10588,14 +12856,13 @@ } }, "node_modules/is-alphanumerical": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz", - "integrity": "sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==", - "dev": true, + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-2.0.1.tgz", + "integrity": "sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw==", "license": "MIT", "dependencies": { - "is-alphabetical": "^1.0.0", - "is-decimal": "^1.0.0" + "is-alphabetical": "^2.0.0", + "is-decimal": "^2.0.0" }, "funding": { "type": "github", @@ -10603,14 +12870,15 @@ } }, "node_modules/is-array-buffer": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", - "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.5.tgz", + "integrity": "sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.1" + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "get-intrinsic": "^1.2.6" }, "engines": { "node": ">= 0.4" @@ -10626,13 +12894,17 @@ "license": "MIT" }, "node_modules/is-async-function": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.0.0.tgz", - "integrity": "sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.1.1.tgz", + "integrity": "sha512-9dgM/cZBnNvjzaMYHVoxxfPj2QXt22Ev7SuuPrs+xav0ukGB0S6d4ydZdEiM48kLx5kDV+QBPrpVnFyefL8kkQ==", "dev": true, "license": "MIT", "dependencies": { - "has-tostringtag": "^1.0.0" + "async-function": "^1.0.0", + "call-bound": "^1.0.3", + "get-proto": "^1.0.1", + "has-tostringtag": "^1.0.2", + "safe-regex-test": "^1.1.0" }, "engines": { "node": ">= 0.4" @@ -10642,13 +12914,16 @@ } }, "node_modules/is-bigint": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", - "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.1.0.tgz", + "integrity": "sha512-n4ZT37wG78iz03xPRKJrHTdZbe3IicyucEtdRsV5yglwc3GyUfbAfpSeD0FJ41NbUNSt5wbhqfp1fS+BgnvDFQ==", "dev": true, "license": "MIT", "dependencies": { - "has-bigints": "^1.0.1" + "has-bigints": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -10667,14 +12942,14 @@ } }, "node_modules/is-boolean-object": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", - "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.2.2.tgz", + "integrity": "sha512-wa56o2/ElJMYqjCjGkXri7it5FbebW5usLw/nPmCMs5DeZ7eziSYZhSmPRn0txqeW4LnAmQQU7FgqLpsEFKM4A==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" + "call-bound": "^1.0.3", + "has-tostringtag": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -10709,9 +12984,9 @@ } }, "node_modules/is-core-module": { - "version": "2.15.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", - "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", + "version": "2.16.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", + "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", "license": "MIT", "dependencies": { "hasown": "^2.0.2" @@ -10724,12 +12999,14 @@ } }, "node_modules/is-data-view": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz", - "integrity": "sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.2.tgz", + "integrity": "sha512-RKtWF8pGmS87i2D6gqQu/l7EYRlVdfzemCJN/P3UOs//x1QE7mfhvzHIApBTRf7axvT6DMGwSwBXYCT0nfB9xw==", "dev": true, "license": "MIT", "dependencies": { + "call-bound": "^1.0.2", + "get-intrinsic": "^1.2.6", "is-typed-array": "^1.1.13" }, "engines": { @@ -10740,13 +13017,14 @@ } }, "node_modules/is-date-object": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", - "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.1.0.tgz", + "integrity": "sha512-PwwhEakHVKTdRNVOw+/Gyh0+MzlCl4R6qKvkhuvLtPMggI1WAHt9sOwZxQLSGpUaDnrdyDsomoRgNnCfKNSXXg==", "dev": true, "license": "MIT", "dependencies": { - "has-tostringtag": "^1.0.0" + "call-bound": "^1.0.2", + "has-tostringtag": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -10756,10 +13034,9 @@ } }, "node_modules/is-decimal": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.4.tgz", - "integrity": "sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==", - "dev": true, + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-2.0.1.tgz", + "integrity": "sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A==", "license": "MIT", "funding": { "type": "github", @@ -10807,13 +13084,16 @@ } }, "node_modules/is-finalizationregistry": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.0.2.tgz", - "integrity": "sha512-0by5vtUJs8iFQb5TYUHHPudOR+qXYIMKtiUzvLIZITZUjknFmziyBJuLhVRc+Ds0dREFlskDNJKYIdIzu/9pfw==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.1.1.tgz", + "integrity": "sha512-1pC6N8qWJbWoPtEjgcL2xyhQOP491EQjeUo3qTKcmV8YSDDJrOepfG8pcC7h/QgnQHYSv0mJ3Z/ZWxmatVrysg==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.2" + "call-bound": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -10829,13 +13109,17 @@ } }, "node_modules/is-generator-function": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", - "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.2.tgz", + "integrity": "sha512-upqt1SkGkODW9tsGNG5mtXTXtECizwtS2kA161M+gJPc1xdb/Ax629af6YrTwcOeQHbewrPNlE5Dx7kzvXTizA==", "dev": true, "license": "MIT", "dependencies": { - "has-tostringtag": "^1.0.0" + "call-bound": "^1.0.4", + "generator-function": "^2.0.0", + "get-proto": "^1.0.1", + "has-tostringtag": "^1.0.2", + "safe-regex-test": "^1.1.0" }, "engines": { "node": ">= 0.4" @@ -10857,16 +13141,48 @@ } }, "node_modules/is-hexadecimal": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz", - "integrity": "sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==", - "dev": true, + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-2.0.1.tgz", + "integrity": "sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg==", "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/is-inside-container": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", + "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==", + "license": "MIT", + "dependencies": { + "is-docker": "^3.0.0" + }, + "bin": { + "is-inside-container": "cli.js" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-inside-container/node_modules/is-docker": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", + "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==", + "license": "MIT", + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-installed-globally": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", @@ -10909,10 +13225,22 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-network-error": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/is-network-error/-/is-network-error-1.3.1.tgz", + "integrity": "sha512-6QCxa49rQbmUWLfk0nuGqzql9U8uaV2H6279bRErPBHe/109hCzsLUBUHfbEtvLIHBd6hyXbgedBSHevm43Edw==", + "license": "MIT", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-npm": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-6.0.0.tgz", - "integrity": "sha512-JEjxbSmtPSt1c8XTkVrlujcXdKV1/tvuQ7GwKcAlyiVLeYFQ2VHat8xfrDJsIkhCdF/tZ7CiIR3sy141c6+gPQ==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-6.1.0.tgz", + "integrity": "sha512-O2z4/kNgyjhQwVR1Wpkbfc19JIhggF97NZNCpWTnjH7kVcZMUrnut9XSN7txI7VdyIYk5ZatOq3zvSuWpU8hoA==", "license": "MIT", "engines": { "node": "^12.20.0 || ^14.13.1 || >=16.0.0" @@ -10931,13 +13259,14 @@ } }, "node_modules/is-number-object": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", - "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.1.1.tgz", + "integrity": "sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw==", "dev": true, "license": "MIT", "dependencies": { - "has-tostringtag": "^1.0.0" + "call-bound": "^1.0.3", + "has-tostringtag": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -10955,15 +13284,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-path-cwd": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz", - "integrity": "sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/is-path-inside": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", @@ -10997,31 +13317,17 @@ "node": ">=0.10.0" } }, - "node_modules/is-promise": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", - "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/is-reference": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-3.0.2.tgz", - "integrity": "sha512-v3rht/LgVcsdZa3O2Nqs+NMowLOxeOm7Ay9+/ARQ2F+qEoANRcqrjAZKGN0v8ymUetZGgkp26LTnGT7H0Qo9Pg==", - "license": "MIT", - "dependencies": { - "@types/estree": "*" - } - }, "node_modules/is-regex": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", - "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz", + "integrity": "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" + "call-bound": "^1.0.2", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" }, "engines": { "node": ">= 0.4" @@ -11039,15 +13345,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-root": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-root/-/is-root-2.1.0.tgz", - "integrity": "sha512-AGOriNp96vNBd3HtU+RzFEc75FfR5ymiYv8E553I71SCeXBiMsVDUtdio1OEFvrPyLIQ9tVR5RxXIFe5PUFjMg==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/is-set": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz", @@ -11062,13 +13359,13 @@ } }, "node_modules/is-shared-array-buffer": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", - "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.4.tgz", + "integrity": "sha512-ISWac8drv4ZGfwKl5slpHG9OwPNty4jOWPRIhBpxOoD+hqITiwuipOQ2bNthAzwA3B4fIjO4Nln74N0S9byq8A==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7" + "call-bound": "^1.0.3" }, "engines": { "node": ">= 0.4" @@ -11090,13 +13387,14 @@ } }, "node_modules/is-string": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", - "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.1.1.tgz", + "integrity": "sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA==", "dev": true, "license": "MIT", "dependencies": { - "has-tostringtag": "^1.0.0" + "call-bound": "^1.0.3", + "has-tostringtag": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -11106,13 +13404,15 @@ } }, "node_modules/is-symbol": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", - "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.1.1.tgz", + "integrity": "sha512-9gGx6GTtCQM73BgmHQXfDmLtfjjTUDSyoxTCbp5WtoixAhfgsDirWIcVQ/IHpvI5Vgd5i/J5F7B9cN/WlVbC/w==", "dev": true, "license": "MIT", "dependencies": { - "has-symbols": "^1.0.2" + "call-bound": "^1.0.2", + "has-symbols": "^1.1.0", + "safe-regex-test": "^1.1.0" }, "engines": { "node": ">= 0.4" @@ -11122,13 +13422,13 @@ } }, "node_modules/is-typed-array": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", - "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz", + "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==", "dev": true, "license": "MIT", "dependencies": { - "which-typed-array": "^1.1.14" + "which-typed-array": "^1.1.16" }, "engines": { "node": ">= 0.4" @@ -11157,27 +13457,30 @@ } }, "node_modules/is-weakref": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", - "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.1.1.tgz", + "integrity": "sha512-6i9mGWSlqzNMEqpCp93KwRS1uUOodk2OJ6b+sq7ZPDSy2WuI5NFIxp/254TytR8ftefexkWn5xNiHUNpPOfSew==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.2" + "call-bound": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/is-weakset": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.3.tgz", - "integrity": "sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.4.tgz", + "integrity": "sha512-mfcwb6IzQyOKTs84CQMrOwW4gQcaTOAWJ0zzJCl2WSPDrWk/OzDaImWFH3djXhb24g4eudZfLRozAvPGw4d9hQ==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", - "get-intrinsic": "^1.2.4" + "call-bound": "^1.0.3", + "get-intrinsic": "^1.2.6" }, "engines": { "node": ">= 0.4" @@ -11229,17 +13532,21 @@ } }, "node_modules/iterator.prototype": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/iterator.prototype/-/iterator.prototype-1.1.2.tgz", - "integrity": "sha512-DR33HMMr8EzwuRL8Y9D3u2BMj8+RqSE850jfGu59kS7tbmPLzGkZmVSfyCFSDxuZiEY6Rzt3T2NA/qU+NwVj1w==", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/iterator.prototype/-/iterator.prototype-1.1.5.tgz", + "integrity": "sha512-H0dkQoCa3b2VEeKQBOxFph+JAbcrQdE7KC0UkqwpLmv2EC4P41QXP+rqo9wYodACiG5/WM5s9oDApTU8utwj9g==", "dev": true, "license": "MIT", "dependencies": { - "define-properties": "^1.2.1", - "get-intrinsic": "^1.2.1", - "has-symbols": "^1.0.3", - "reflect.getprototypeof": "^1.0.4", - "set-function-name": "^2.0.1" + "define-data-property": "^1.1.4", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.6", + "get-proto": "^1.0.0", + "has-symbols": "^1.1.0", + "set-function-name": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" } }, "node_modules/jackspeak": { @@ -11306,9 +13613,9 @@ } }, "node_modules/jiti": { - "version": "1.21.6", - "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.6.tgz", - "integrity": "sha512-2yTgeWTWzMWkHu6Jp9NKgePDaYHbntiwvYuuJLbbN9vl7DC9DvXKOB2BC3ZZ92D3cvV/aflH0osDfwpHepQ53w==", + "version": "1.21.7", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.7.tgz", + "integrity": "sha512-/imKNG4EbWNrVjoNC/1H5/9GFy+tqjGBHCaSsN+P2RnPqjsLmv6UD3Ej+Kj8nBWaRAwyk7kK5ZUc+OEatnTR3A==", "license": "MIT", "bin": { "jiti": "bin/jiti.js" @@ -11334,9 +13641,9 @@ "license": "MIT" }, "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", + "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", "license": "MIT", "dependencies": { "argparse": "^2.0.1" @@ -11346,15 +13653,15 @@ } }, "node_modules/jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", "license": "MIT", "bin": { "jsesc": "bin/jsesc" }, "engines": { - "node": ">=4" + "node": ">=6" } }, "node_modules/json-buffer": { @@ -11370,32 +13677,27 @@ "license": "MIT" }, "node_modules/json-schema-to-typescript": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/json-schema-to-typescript/-/json-schema-to-typescript-13.1.2.tgz", - "integrity": "sha512-17G+mjx4nunvOpkPvcz7fdwUwYCEwyH8vR3Ym3rFiQ8uzAL3go+c1306Kk7iGRk8HuXBXqy+JJJmpYl0cvOllw==", + "version": "15.0.4", + "resolved": "https://registry.npmjs.org/json-schema-to-typescript/-/json-schema-to-typescript-15.0.4.tgz", + "integrity": "sha512-Su9oK8DR4xCmDsLlyvadkXzX6+GGXJpbhwoLtOGArAG61dvbW4YQmSEno2y66ahpIdmLMg6YUf/QHLgiwvkrHQ==", "dev": true, "license": "MIT", "dependencies": { - "@bcherny/json-schema-ref-parser": "10.0.5-fork", - "@types/json-schema": "^7.0.11", - "@types/lodash": "^4.14.182", - "@types/prettier": "^2.6.1", - "cli-color": "^2.0.2", - "get-stdin": "^8.0.0", - "glob": "^7.1.6", - "glob-promise": "^4.2.2", + "@apidevtools/json-schema-ref-parser": "^11.5.5", + "@types/json-schema": "^7.0.15", + "@types/lodash": "^4.17.7", "is-glob": "^4.0.3", + "js-yaml": "^4.1.0", "lodash": "^4.17.21", - "minimist": "^1.2.6", - "mkdirp": "^1.0.4", - "mz": "^2.7.0", - "prettier": "^2.6.2" + "minimist": "^1.2.8", + "prettier": "^3.2.5", + "tinyglobby": "^0.2.9" }, "bin": { "json2ts": "dist/src/cli.js" }, "engines": { - "node": ">=12.0.0" + "node": ">=16.0.0" } }, "node_modules/json-schema-traverse": { @@ -11408,7 +13710,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/json5": { @@ -11424,9 +13726,9 @@ } }, "node_modules/jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz", + "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", "license": "MIT", "dependencies": { "universalify": "^2.0.0" @@ -11452,9 +13754,9 @@ } }, "node_modules/katex": { - "version": "0.16.11", - "resolved": "https://registry.npmjs.org/katex/-/katex-0.16.11.tgz", - "integrity": "sha512-RQrI8rlHY92OLf3rho/Ts8i/XvjgguEjOkO1BEXcU3N8BqPpSzBNwV/G0Ukr+P/l3ivvJUE/Fa/CwbS6HesGNQ==", + "version": "0.16.44", + "resolved": "https://registry.npmjs.org/katex/-/katex-0.16.44.tgz", + "integrity": "sha512-EkxoDTk8ufHqHlf9QxGwcxeLkWRR3iOuYfRpfORgYfqc8s13bgb+YtRY59NK5ZpRaCwq1kqA6a5lpX8C/eLphQ==", "funding": [ "https://opencollective.com/katex", "https://github.com/sponsors/katex" @@ -11508,6 +13810,27 @@ "node": ">=6" } }, + "node_modules/langium": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/langium/-/langium-4.2.4.tgz", + "integrity": "sha512-J0M9BkTOZ9Izee2YL0eXkUKFdWhrmTYYVLgiZTz6Z3KvK03ooM+vjVrfphKcdGVPWmM2cFYtDnNyIsIIZPrHNA==", + "license": "MIT", + "dependencies": { + "@chevrotain/regexp-to-ast": "~12.0.0", + "chevrotain": "~12.0.0", + "chevrotain-allstar": "~0.4.3", + "vscode-jsonrpc": "~8.2.0", + "vscode-languageserver": "~9.0.1", + "vscode-languageserver-protocol": "~3.17.5", + "vscode-languageserver-textdocument": "~1.0.12", + "vscode-languageserver-types": "~3.17.5", + "vscode-uri": "~3.1.0" + }, + "engines": { + "node": ">=20.10.0", + "npm": ">=10.2.3" + } + }, "node_modules/latest-version": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-7.0.0.tgz", @@ -11524,13 +13847,13 @@ } }, "node_modules/launch-editor": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/launch-editor/-/launch-editor-2.8.1.tgz", - "integrity": "sha512-elBx2l/tp9z99X5H/qev8uyDywVh0VXAwEbjk8kJhnc5grOFkGh7aW6q55me9xnYbss261XtnUrysZ+XvGbhQA==", + "version": "2.14.1", + "resolved": "https://registry.npmjs.org/launch-editor/-/launch-editor-2.14.1.tgz", + "integrity": "sha512-QWBrQsMpH7gPr965dsKD/3cKWiNoTjpATQf++Xq63N6sKRGMwlVXz41O1IZTMfZQgBctD/K5Zt06+/I6pP6+HA==", "license": "MIT", "dependencies": { - "picocolors": "^1.0.0", - "shell-quote": "^1.8.1" + "picocolors": "^1.1.1", + "shell-quote": "^1.8.4" } }, "node_modules/layout-base": { @@ -11552,7 +13875,7 @@ "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1", @@ -11563,9 +13886,9 @@ } }, "node_modules/lilconfig": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.2.tgz", - "integrity": "sha512-eop+wDAvpItUys0FWkHIKeC9ybYrTGbU41U5K7+bttZZeohvnY7M9dZ5kB21GNWiFT2q1OoPTvncPCgSOVO5ow==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz", + "integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==", "license": "MIT", "engines": { "node": ">=14" @@ -11596,12 +13919,16 @@ } }, "node_modules/loader-runner": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", - "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.1.tgz", + "integrity": "sha512-IWqP2SCPhyVFTBtRcgMHdzlf9ul25NwaFx4wCEH/KjAXuuHY4yNjvPXsBokp8jCB936PyWRaPKUNh8NvylLp2Q==", "license": "MIT", "engines": { "node": ">=6.11.5" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" } }, "node_modules/loader-utils": { @@ -11622,6 +13949,7 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, "license": "MIT", "dependencies": { "p-locate": "^5.0.0" @@ -11634,15 +13962,15 @@ } }, "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.18.1.tgz", + "integrity": "sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==", "license": "MIT" }, "node_modules/lodash-es": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz", - "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==", + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.18.1.tgz", + "integrity": "sha512-J8xewKD/Gk22OZbhpOVSwcs60zhd95ESDwezOFuA3/099925PdHJ7OFHNTGtajL3AlZkykD32HykiMo+BIBI8A==", "license": "MIT" }, "node_modules/lodash.debounce": { @@ -11661,7 +13989,7 @@ "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/lodash.uniq": { @@ -11722,16 +14050,6 @@ "yallist": "^3.0.2" } }, - "node_modules/lru-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz", - "integrity": "sha512-BpdYkt9EvGl8OfWHDQPISVpcl5xZthb+XPsbELj5AQXxIC8IriDZIQYjBJPEm5rS420sjZ0TLEzRcq5KdBhYrQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "es5-ext": "~0.10.2" - } - }, "node_modules/markdown-extensions": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/markdown-extensions/-/markdown-extensions-2.0.0.tgz", @@ -11745,23 +14063,45 @@ } }, "node_modules/markdown-table": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-3.0.3.tgz", - "integrity": "sha512-Z1NL3Tb1M9wH4XESsCDEksWoKTdlUafKc4pt0GRwjUyXaCFZ+dc3g2erqB6zm3szA2IUSi7VnPI+o/9jnxh9hw==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-3.0.4.tgz", + "integrity": "sha512-wiYz4+JrLyb/DqW2hkFJxP7Vd7JuTDm77fvbM8VfEQdmSMqcImWeeRbHwZjBjIFki/VaMK2BhFi7oUUZeM5bqw==", "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/marked": { + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/marked/-/marked-16.4.2.tgz", + "integrity": "sha512-TI3V8YYWvkVf3KJe1dRkpnjs68JUPyEa5vjKrp1XEEJUAOaQc+Qj+L1qWbPd0SJuAdQkFU0h73sXXqwDYxsiDA==", + "license": "MIT", + "bin": { + "marked": "bin/marked.js" + }, + "engines": { + "node": ">= 20" + } + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/mdast-util-directive": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/mdast-util-directive/-/mdast-util-directive-3.0.0.tgz", - "integrity": "sha512-JUpYOqKI4mM3sZcNxmF/ox04XYFFkNwr0CFlrQIkCwbvH0xzMCqkMqAde9wRd80VAhaUrwFwKm2nxretdT1h7Q==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mdast-util-directive/-/mdast-util-directive-3.1.0.tgz", + "integrity": "sha512-I3fNFt+DHmpWCYAT7quoM6lHf9wuqtI+oCOfvILnoicNIqjh5E3dEJWiXuYME2gNe8vl1iMQwyUHa7bgFmak6Q==", "license": "MIT", "dependencies": { "@types/mdast": "^4.0.0", "@types/unist": "^3.0.0", + "ccount": "^2.0.0", "devlop": "^1.0.0", "mdast-util-from-markdown": "^2.0.0", "mdast-util-to-markdown": "^2.0.0", @@ -11774,83 +14114,38 @@ "url": "https://opencollective.com/unified" } }, - "node_modules/mdast-util-directive/node_modules/@types/mdast": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz", - "integrity": "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==", + "node_modules/mdast-util-find-and-replace": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/mdast-util-find-and-replace/-/mdast-util-find-and-replace-3.0.2.tgz", + "integrity": "sha512-Tmd1Vg/m3Xz43afeNxDIhWRtFZgM2VLyaf4vSTYwudTyeuTneoL3qtWMA5jeLyz/O1vDJmmV4QuScFCA2tBPwg==", "license": "MIT", "dependencies": { - "@types/unist": "*" - } - }, - "node_modules/mdast-util-directive/node_modules/character-entities-legacy": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-3.0.0.tgz", - "integrity": "sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/mdast-util-directive/node_modules/character-reference-invalid": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-2.0.1.tgz", - "integrity": "sha512-iBZ4F4wRbyORVsu0jPV7gXkOsGYjGHPmAyv+HiHG8gi5PtC9KI2j1+v8/tlibRvjoWX027ypmG/n0HtO5t7unw==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/mdast-util-directive/node_modules/is-alphabetical": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-2.0.1.tgz", - "integrity": "sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/mdast-util-directive/node_modules/is-alphanumerical": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-2.0.1.tgz", - "integrity": "sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw==", - "license": "MIT", - "dependencies": { - "is-alphabetical": "^2.0.0", - "is-decimal": "^2.0.0" + "@types/mdast": "^4.0.0", + "escape-string-regexp": "^5.0.0", + "unist-util-is": "^6.0.0", + "unist-util-visit-parents": "^6.0.0" }, "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/mdast-util-directive/node_modules/is-decimal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-2.0.1.tgz", - "integrity": "sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A==", + "node_modules/mdast-util-find-and-replace/node_modules/escape-string-regexp": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", + "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==", "license": "MIT", + "engines": { + "node": ">=12" + }, "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/mdast-util-directive/node_modules/is-hexadecimal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-2.0.1.tgz", - "integrity": "sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/mdast-util-directive/node_modules/mdast-util-from-markdown": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-2.0.1.tgz", - "integrity": "sha512-aJEUyzZ6TzlsX2s5B4Of7lN7EQtAxvtradMMglCQDyaTFgse6CmtmdJ15ElnVRlCg1vpNyVtbem0PWzlNieZsA==", + "node_modules/mdast-util-from-markdown": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-2.0.3.tgz", + "integrity": "sha512-W4mAWTvSlKvf8L6J+VN9yLSqQ9AOAAvHuoDAmPkz4dHf553m5gVj2ejadHJhoJmcmxEnOv6Pa8XJhpxE93kb8Q==", "license": "MIT", "dependencies": { "@types/mdast": "^4.0.0", @@ -11871,85 +14166,10 @@ "url": "https://opencollective.com/unified" } }, - "node_modules/mdast-util-directive/node_modules/micromark": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/micromark/-/micromark-4.0.0.tgz", - "integrity": "sha512-o/sd0nMof8kYff+TqcDx3VSrgBTcZpSvYcAHIfHhv5VAuNmisCxjhx6YmxS8PFEpb9z5WKWKPdzf0jM23ro3RQ==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "@types/debug": "^4.0.0", - "debug": "^4.0.0", - "decode-named-character-reference": "^1.0.0", - "devlop": "^1.0.0", - "micromark-core-commonmark": "^2.0.0", - "micromark-factory-space": "^2.0.0", - "micromark-util-character": "^2.0.0", - "micromark-util-chunked": "^2.0.0", - "micromark-util-combine-extensions": "^2.0.0", - "micromark-util-decode-numeric-character-reference": "^2.0.0", - "micromark-util-encode": "^2.0.0", - "micromark-util-normalize-identifier": "^2.0.0", - "micromark-util-resolve-all": "^2.0.0", - "micromark-util-sanitize-uri": "^2.0.0", - "micromark-util-subtokenize": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/mdast-util-directive/node_modules/micromark-factory-space": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-2.0.0.tgz", - "integrity": "sha512-TKr+LIDX2pkBJXFLzpyPyljzYK3MtmllMUMODTQJIUfDGncESaqB90db9IAUcz4AZAJFdd8U9zOp9ty1458rxg==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-character": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/mdast-util-directive/node_modules/micromark-util-character": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.0.tgz", - "integrity": "sha512-KvOVV+X1yLBfs9dCBSopq/+G1PcgT3lAK07mC4BzXi5E7ahzMAF8oIupDDJ6mievI6F+lAATkbQQlQixJfT3aQ==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/mdast-util-directive/node_modules/micromark-util-symbol": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.0.tgz", - "integrity": "sha512-8JZt9ElZ5kyTnO94muPxIGS8oyElRJaiJO8EzV6ZSyGQ1Is8xwl4Q45qU5UOg+bGH4AikWziz0iN4sFLWs8PGw==", + "node_modules/mdast-util-from-markdown/node_modules/micromark-util-symbol": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz", + "integrity": "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==", "funding": [ { "type": "GitHub Sponsors", @@ -11962,135 +14182,6 @@ ], "license": "MIT" }, - "node_modules/mdast-util-directive/node_modules/micromark-util-types": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.0.tgz", - "integrity": "sha512-oNh6S2WMHWRZrmutsRmDDfkzKtxF+bc2VxLC9dvtrDIRFln627VsFP6fLMgTryGDljgLPjkrzQSDcPrjPyDJ5w==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, - "node_modules/mdast-util-directive/node_modules/parse-entities": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-4.0.1.tgz", - "integrity": "sha512-SWzvYcSJh4d/SGLIOQfZ/CoNv6BTlI6YEQ7Nj82oDVnRpwe/Z/F1EMx42x3JAOwGBlCjeCH0BRJQbQ/opHL17w==", - "license": "MIT", - "dependencies": { - "@types/unist": "^2.0.0", - "character-entities": "^2.0.0", - "character-entities-legacy": "^3.0.0", - "character-reference-invalid": "^2.0.0", - "decode-named-character-reference": "^1.0.0", - "is-alphanumerical": "^2.0.0", - "is-decimal": "^2.0.0", - "is-hexadecimal": "^2.0.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/mdast-util-directive/node_modules/parse-entities/node_modules/@types/unist": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz", - "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==", - "license": "MIT" - }, - "node_modules/mdast-util-find-and-replace": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/mdast-util-find-and-replace/-/mdast-util-find-and-replace-3.0.1.tgz", - "integrity": "sha512-SG21kZHGC3XRTSUhtofZkBzZTJNM5ecCi0SK2IMKmSXR8vO3peL+kb1O0z7Zl83jKtutG4k5Wv/W7V3/YHvzPA==", - "license": "MIT", - "dependencies": { - "@types/mdast": "^4.0.0", - "escape-string-regexp": "^5.0.0", - "unist-util-is": "^6.0.0", - "unist-util-visit-parents": "^6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/mdast-util-find-and-replace/node_modules/@types/mdast": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz", - "integrity": "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==", - "license": "MIT", - "dependencies": { - "@types/unist": "*" - } - }, - "node_modules/mdast-util-find-and-replace/node_modules/escape-string-regexp": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", - "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/mdast-util-from-markdown": { - "version": "0.8.5", - "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-0.8.5.tgz", - "integrity": "sha512-2hkTXtYYnr+NubD/g6KGBS/0mFmBcifAsI0yIWRiRo0PjVs6SSOSOdtzbp6kSGnShDN6G5aWZpKQ2lWRy27mWQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/mdast": "^3.0.0", - "mdast-util-to-string": "^2.0.0", - "micromark": "~2.11.0", - "parse-entities": "^2.0.0", - "unist-util-stringify-position": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/mdast-util-from-markdown/node_modules/@types/unist": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz", - "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==", - "dev": true, - "license": "MIT" - }, - "node_modules/mdast-util-from-markdown/node_modules/mdast-util-to-string": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-2.0.0.tgz", - "integrity": "sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w==", - "dev": true, - "license": "MIT", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/mdast-util-from-markdown/node_modules/unist-util-stringify-position": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-2.0.3.tgz", - "integrity": "sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/unist": "^2.0.2" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, "node_modules/mdast-util-frontmatter": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/mdast-util-frontmatter/-/mdast-util-frontmatter-2.0.1.tgz", @@ -12109,15 +14200,6 @@ "url": "https://opencollective.com/unified" } }, - "node_modules/mdast-util-frontmatter/node_modules/@types/mdast": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz", - "integrity": "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==", - "license": "MIT", - "dependencies": { - "@types/unist": "*" - } - }, "node_modules/mdast-util-frontmatter/node_modules/escape-string-regexp": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", @@ -12130,141 +14212,10 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/mdast-util-frontmatter/node_modules/mdast-util-from-markdown": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-2.0.1.tgz", - "integrity": "sha512-aJEUyzZ6TzlsX2s5B4Of7lN7EQtAxvtradMMglCQDyaTFgse6CmtmdJ15ElnVRlCg1vpNyVtbem0PWzlNieZsA==", - "license": "MIT", - "dependencies": { - "@types/mdast": "^4.0.0", - "@types/unist": "^3.0.0", - "decode-named-character-reference": "^1.0.0", - "devlop": "^1.0.0", - "mdast-util-to-string": "^4.0.0", - "micromark": "^4.0.0", - "micromark-util-decode-numeric-character-reference": "^2.0.0", - "micromark-util-decode-string": "^2.0.0", - "micromark-util-normalize-identifier": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0", - "unist-util-stringify-position": "^4.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/mdast-util-frontmatter/node_modules/micromark": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/micromark/-/micromark-4.0.0.tgz", - "integrity": "sha512-o/sd0nMof8kYff+TqcDx3VSrgBTcZpSvYcAHIfHhv5VAuNmisCxjhx6YmxS8PFEpb9z5WKWKPdzf0jM23ro3RQ==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "@types/debug": "^4.0.0", - "debug": "^4.0.0", - "decode-named-character-reference": "^1.0.0", - "devlop": "^1.0.0", - "micromark-core-commonmark": "^2.0.0", - "micromark-factory-space": "^2.0.0", - "micromark-util-character": "^2.0.0", - "micromark-util-chunked": "^2.0.0", - "micromark-util-combine-extensions": "^2.0.0", - "micromark-util-decode-numeric-character-reference": "^2.0.0", - "micromark-util-encode": "^2.0.0", - "micromark-util-normalize-identifier": "^2.0.0", - "micromark-util-resolve-all": "^2.0.0", - "micromark-util-sanitize-uri": "^2.0.0", - "micromark-util-subtokenize": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/mdast-util-frontmatter/node_modules/micromark-factory-space": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-2.0.0.tgz", - "integrity": "sha512-TKr+LIDX2pkBJXFLzpyPyljzYK3MtmllMUMODTQJIUfDGncESaqB90db9IAUcz4AZAJFdd8U9zOp9ty1458rxg==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-character": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/mdast-util-frontmatter/node_modules/micromark-util-character": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.0.tgz", - "integrity": "sha512-KvOVV+X1yLBfs9dCBSopq/+G1PcgT3lAK07mC4BzXi5E7ahzMAF8oIupDDJ6mievI6F+lAATkbQQlQixJfT3aQ==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/mdast-util-frontmatter/node_modules/micromark-util-symbol": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.0.tgz", - "integrity": "sha512-8JZt9ElZ5kyTnO94muPxIGS8oyElRJaiJO8EzV6ZSyGQ1Is8xwl4Q45qU5UOg+bGH4AikWziz0iN4sFLWs8PGw==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, - "node_modules/mdast-util-frontmatter/node_modules/micromark-util-types": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.0.tgz", - "integrity": "sha512-oNh6S2WMHWRZrmutsRmDDfkzKtxF+bc2VxLC9dvtrDIRFln627VsFP6fLMgTryGDljgLPjkrzQSDcPrjPyDJ5w==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, "node_modules/mdast-util-gfm": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/mdast-util-gfm/-/mdast-util-gfm-3.0.0.tgz", - "integrity": "sha512-dgQEX5Amaq+DuUqf26jJqSK9qgixgd6rYDHAv4aTBuA92cTknZlKpPfa86Z/s8Dj8xsAQpFfBmPUHWJBWqS4Bw==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mdast-util-gfm/-/mdast-util-gfm-3.1.0.tgz", + "integrity": "sha512-0ulfdQOM3ysHhCJ1p06l0b0VKlhU0wuQs3thxZQagjcjPrlFRqY215uZGHHJan9GEAXd9MbfPjFJz+qMkVR6zQ==", "license": "MIT", "dependencies": { "mdast-util-from-markdown": "^2.0.0", @@ -12297,19 +14248,10 @@ "url": "https://opencollective.com/unified" } }, - "node_modules/mdast-util-gfm-autolink-literal/node_modules/@types/mdast": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz", - "integrity": "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==", - "license": "MIT", - "dependencies": { - "@types/unist": "*" - } - }, "node_modules/mdast-util-gfm-autolink-literal/node_modules/micromark-util-character": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.0.tgz", - "integrity": "sha512-KvOVV+X1yLBfs9dCBSopq/+G1PcgT3lAK07mC4BzXi5E7ahzMAF8oIupDDJ6mievI6F+lAATkbQQlQixJfT3aQ==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.1.tgz", + "integrity": "sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==", "funding": [ { "type": "GitHub Sponsors", @@ -12327,25 +14269,9 @@ } }, "node_modules/mdast-util-gfm-autolink-literal/node_modules/micromark-util-symbol": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.0.tgz", - "integrity": "sha512-8JZt9ElZ5kyTnO94muPxIGS8oyElRJaiJO8EzV6ZSyGQ1Is8xwl4Q45qU5UOg+bGH4AikWziz0iN4sFLWs8PGw==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, - "node_modules/mdast-util-gfm-autolink-literal/node_modules/micromark-util-types": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.0.tgz", - "integrity": "sha512-oNh6S2WMHWRZrmutsRmDDfkzKtxF+bc2VxLC9dvtrDIRFln627VsFP6fLMgTryGDljgLPjkrzQSDcPrjPyDJ5w==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz", + "integrity": "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==", "funding": [ { "type": "GitHub Sponsors", @@ -12359,9 +14285,9 @@ "license": "MIT" }, "node_modules/mdast-util-gfm-footnote": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mdast-util-gfm-footnote/-/mdast-util-gfm-footnote-2.0.0.tgz", - "integrity": "sha512-5jOT2boTSVkMnQ7LTrd6n/18kqwjmuYqo7JUPe+tRCY6O7dAuTFMtTPauYYrMPpox9hlN0uOx/FL8XvEfG9/mQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-footnote/-/mdast-util-gfm-footnote-2.1.0.tgz", + "integrity": "sha512-sqpDWlsHn7Ac9GNZQMeUzPQSMzR6Wv0WKRNvQRg0KqHh02fpTz69Qc1QSseNX29bhz1ROIyNyxExfawVKTm1GQ==", "license": "MIT", "dependencies": { "@types/mdast": "^4.0.0", @@ -12375,146 +14301,6 @@ "url": "https://opencollective.com/unified" } }, - "node_modules/mdast-util-gfm-footnote/node_modules/@types/mdast": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz", - "integrity": "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==", - "license": "MIT", - "dependencies": { - "@types/unist": "*" - } - }, - "node_modules/mdast-util-gfm-footnote/node_modules/mdast-util-from-markdown": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-2.0.1.tgz", - "integrity": "sha512-aJEUyzZ6TzlsX2s5B4Of7lN7EQtAxvtradMMglCQDyaTFgse6CmtmdJ15ElnVRlCg1vpNyVtbem0PWzlNieZsA==", - "license": "MIT", - "dependencies": { - "@types/mdast": "^4.0.0", - "@types/unist": "^3.0.0", - "decode-named-character-reference": "^1.0.0", - "devlop": "^1.0.0", - "mdast-util-to-string": "^4.0.0", - "micromark": "^4.0.0", - "micromark-util-decode-numeric-character-reference": "^2.0.0", - "micromark-util-decode-string": "^2.0.0", - "micromark-util-normalize-identifier": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0", - "unist-util-stringify-position": "^4.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/mdast-util-gfm-footnote/node_modules/micromark": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/micromark/-/micromark-4.0.0.tgz", - "integrity": "sha512-o/sd0nMof8kYff+TqcDx3VSrgBTcZpSvYcAHIfHhv5VAuNmisCxjhx6YmxS8PFEpb9z5WKWKPdzf0jM23ro3RQ==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "@types/debug": "^4.0.0", - "debug": "^4.0.0", - "decode-named-character-reference": "^1.0.0", - "devlop": "^1.0.0", - "micromark-core-commonmark": "^2.0.0", - "micromark-factory-space": "^2.0.0", - "micromark-util-character": "^2.0.0", - "micromark-util-chunked": "^2.0.0", - "micromark-util-combine-extensions": "^2.0.0", - "micromark-util-decode-numeric-character-reference": "^2.0.0", - "micromark-util-encode": "^2.0.0", - "micromark-util-normalize-identifier": "^2.0.0", - "micromark-util-resolve-all": "^2.0.0", - "micromark-util-sanitize-uri": "^2.0.0", - "micromark-util-subtokenize": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/mdast-util-gfm-footnote/node_modules/micromark-factory-space": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-2.0.0.tgz", - "integrity": "sha512-TKr+LIDX2pkBJXFLzpyPyljzYK3MtmllMUMODTQJIUfDGncESaqB90db9IAUcz4AZAJFdd8U9zOp9ty1458rxg==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-character": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/mdast-util-gfm-footnote/node_modules/micromark-util-character": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.0.tgz", - "integrity": "sha512-KvOVV+X1yLBfs9dCBSopq/+G1PcgT3lAK07mC4BzXi5E7ahzMAF8oIupDDJ6mievI6F+lAATkbQQlQixJfT3aQ==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/mdast-util-gfm-footnote/node_modules/micromark-util-symbol": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.0.tgz", - "integrity": "sha512-8JZt9ElZ5kyTnO94muPxIGS8oyElRJaiJO8EzV6ZSyGQ1Is8xwl4Q45qU5UOg+bGH4AikWziz0iN4sFLWs8PGw==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, - "node_modules/mdast-util-gfm-footnote/node_modules/micromark-util-types": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.0.tgz", - "integrity": "sha512-oNh6S2WMHWRZrmutsRmDDfkzKtxF+bc2VxLC9dvtrDIRFln627VsFP6fLMgTryGDljgLPjkrzQSDcPrjPyDJ5w==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, "node_modules/mdast-util-gfm-strikethrough": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/mdast-util-gfm-strikethrough/-/mdast-util-gfm-strikethrough-2.0.0.tgz", @@ -12530,146 +14316,6 @@ "url": "https://opencollective.com/unified" } }, - "node_modules/mdast-util-gfm-strikethrough/node_modules/@types/mdast": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz", - "integrity": "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==", - "license": "MIT", - "dependencies": { - "@types/unist": "*" - } - }, - "node_modules/mdast-util-gfm-strikethrough/node_modules/mdast-util-from-markdown": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-2.0.1.tgz", - "integrity": "sha512-aJEUyzZ6TzlsX2s5B4Of7lN7EQtAxvtradMMglCQDyaTFgse6CmtmdJ15ElnVRlCg1vpNyVtbem0PWzlNieZsA==", - "license": "MIT", - "dependencies": { - "@types/mdast": "^4.0.0", - "@types/unist": "^3.0.0", - "decode-named-character-reference": "^1.0.0", - "devlop": "^1.0.0", - "mdast-util-to-string": "^4.0.0", - "micromark": "^4.0.0", - "micromark-util-decode-numeric-character-reference": "^2.0.0", - "micromark-util-decode-string": "^2.0.0", - "micromark-util-normalize-identifier": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0", - "unist-util-stringify-position": "^4.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/mdast-util-gfm-strikethrough/node_modules/micromark": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/micromark/-/micromark-4.0.0.tgz", - "integrity": "sha512-o/sd0nMof8kYff+TqcDx3VSrgBTcZpSvYcAHIfHhv5VAuNmisCxjhx6YmxS8PFEpb9z5WKWKPdzf0jM23ro3RQ==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "@types/debug": "^4.0.0", - "debug": "^4.0.0", - "decode-named-character-reference": "^1.0.0", - "devlop": "^1.0.0", - "micromark-core-commonmark": "^2.0.0", - "micromark-factory-space": "^2.0.0", - "micromark-util-character": "^2.0.0", - "micromark-util-chunked": "^2.0.0", - "micromark-util-combine-extensions": "^2.0.0", - "micromark-util-decode-numeric-character-reference": "^2.0.0", - "micromark-util-encode": "^2.0.0", - "micromark-util-normalize-identifier": "^2.0.0", - "micromark-util-resolve-all": "^2.0.0", - "micromark-util-sanitize-uri": "^2.0.0", - "micromark-util-subtokenize": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/mdast-util-gfm-strikethrough/node_modules/micromark-factory-space": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-2.0.0.tgz", - "integrity": "sha512-TKr+LIDX2pkBJXFLzpyPyljzYK3MtmllMUMODTQJIUfDGncESaqB90db9IAUcz4AZAJFdd8U9zOp9ty1458rxg==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-character": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/mdast-util-gfm-strikethrough/node_modules/micromark-util-character": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.0.tgz", - "integrity": "sha512-KvOVV+X1yLBfs9dCBSopq/+G1PcgT3lAK07mC4BzXi5E7ahzMAF8oIupDDJ6mievI6F+lAATkbQQlQixJfT3aQ==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/mdast-util-gfm-strikethrough/node_modules/micromark-util-symbol": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.0.tgz", - "integrity": "sha512-8JZt9ElZ5kyTnO94muPxIGS8oyElRJaiJO8EzV6ZSyGQ1Is8xwl4Q45qU5UOg+bGH4AikWziz0iN4sFLWs8PGw==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, - "node_modules/mdast-util-gfm-strikethrough/node_modules/micromark-util-types": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.0.tgz", - "integrity": "sha512-oNh6S2WMHWRZrmutsRmDDfkzKtxF+bc2VxLC9dvtrDIRFln627VsFP6fLMgTryGDljgLPjkrzQSDcPrjPyDJ5w==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, "node_modules/mdast-util-gfm-table": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/mdast-util-gfm-table/-/mdast-util-gfm-table-2.0.0.tgz", @@ -12687,146 +14333,6 @@ "url": "https://opencollective.com/unified" } }, - "node_modules/mdast-util-gfm-table/node_modules/@types/mdast": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz", - "integrity": "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==", - "license": "MIT", - "dependencies": { - "@types/unist": "*" - } - }, - "node_modules/mdast-util-gfm-table/node_modules/mdast-util-from-markdown": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-2.0.1.tgz", - "integrity": "sha512-aJEUyzZ6TzlsX2s5B4Of7lN7EQtAxvtradMMglCQDyaTFgse6CmtmdJ15ElnVRlCg1vpNyVtbem0PWzlNieZsA==", - "license": "MIT", - "dependencies": { - "@types/mdast": "^4.0.0", - "@types/unist": "^3.0.0", - "decode-named-character-reference": "^1.0.0", - "devlop": "^1.0.0", - "mdast-util-to-string": "^4.0.0", - "micromark": "^4.0.0", - "micromark-util-decode-numeric-character-reference": "^2.0.0", - "micromark-util-decode-string": "^2.0.0", - "micromark-util-normalize-identifier": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0", - "unist-util-stringify-position": "^4.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/mdast-util-gfm-table/node_modules/micromark": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/micromark/-/micromark-4.0.0.tgz", - "integrity": "sha512-o/sd0nMof8kYff+TqcDx3VSrgBTcZpSvYcAHIfHhv5VAuNmisCxjhx6YmxS8PFEpb9z5WKWKPdzf0jM23ro3RQ==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "@types/debug": "^4.0.0", - "debug": "^4.0.0", - "decode-named-character-reference": "^1.0.0", - "devlop": "^1.0.0", - "micromark-core-commonmark": "^2.0.0", - "micromark-factory-space": "^2.0.0", - "micromark-util-character": "^2.0.0", - "micromark-util-chunked": "^2.0.0", - "micromark-util-combine-extensions": "^2.0.0", - "micromark-util-decode-numeric-character-reference": "^2.0.0", - "micromark-util-encode": "^2.0.0", - "micromark-util-normalize-identifier": "^2.0.0", - "micromark-util-resolve-all": "^2.0.0", - "micromark-util-sanitize-uri": "^2.0.0", - "micromark-util-subtokenize": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/mdast-util-gfm-table/node_modules/micromark-factory-space": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-2.0.0.tgz", - "integrity": "sha512-TKr+LIDX2pkBJXFLzpyPyljzYK3MtmllMUMODTQJIUfDGncESaqB90db9IAUcz4AZAJFdd8U9zOp9ty1458rxg==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-character": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/mdast-util-gfm-table/node_modules/micromark-util-character": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.0.tgz", - "integrity": "sha512-KvOVV+X1yLBfs9dCBSopq/+G1PcgT3lAK07mC4BzXi5E7ahzMAF8oIupDDJ6mievI6F+lAATkbQQlQixJfT3aQ==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/mdast-util-gfm-table/node_modules/micromark-util-symbol": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.0.tgz", - "integrity": "sha512-8JZt9ElZ5kyTnO94muPxIGS8oyElRJaiJO8EzV6ZSyGQ1Is8xwl4Q45qU5UOg+bGH4AikWziz0iN4sFLWs8PGw==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, - "node_modules/mdast-util-gfm-table/node_modules/micromark-util-types": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.0.tgz", - "integrity": "sha512-oNh6S2WMHWRZrmutsRmDDfkzKtxF+bc2VxLC9dvtrDIRFln627VsFP6fLMgTryGDljgLPjkrzQSDcPrjPyDJ5w==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, "node_modules/mdast-util-gfm-task-list-item": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/mdast-util-gfm-task-list-item/-/mdast-util-gfm-task-list-item-2.0.0.tgz", @@ -12843,286 +14349,6 @@ "url": "https://opencollective.com/unified" } }, - "node_modules/mdast-util-gfm-task-list-item/node_modules/@types/mdast": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz", - "integrity": "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==", - "license": "MIT", - "dependencies": { - "@types/unist": "*" - } - }, - "node_modules/mdast-util-gfm-task-list-item/node_modules/mdast-util-from-markdown": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-2.0.1.tgz", - "integrity": "sha512-aJEUyzZ6TzlsX2s5B4Of7lN7EQtAxvtradMMglCQDyaTFgse6CmtmdJ15ElnVRlCg1vpNyVtbem0PWzlNieZsA==", - "license": "MIT", - "dependencies": { - "@types/mdast": "^4.0.0", - "@types/unist": "^3.0.0", - "decode-named-character-reference": "^1.0.0", - "devlop": "^1.0.0", - "mdast-util-to-string": "^4.0.0", - "micromark": "^4.0.0", - "micromark-util-decode-numeric-character-reference": "^2.0.0", - "micromark-util-decode-string": "^2.0.0", - "micromark-util-normalize-identifier": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0", - "unist-util-stringify-position": "^4.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/mdast-util-gfm-task-list-item/node_modules/micromark": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/micromark/-/micromark-4.0.0.tgz", - "integrity": "sha512-o/sd0nMof8kYff+TqcDx3VSrgBTcZpSvYcAHIfHhv5VAuNmisCxjhx6YmxS8PFEpb9z5WKWKPdzf0jM23ro3RQ==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "@types/debug": "^4.0.0", - "debug": "^4.0.0", - "decode-named-character-reference": "^1.0.0", - "devlop": "^1.0.0", - "micromark-core-commonmark": "^2.0.0", - "micromark-factory-space": "^2.0.0", - "micromark-util-character": "^2.0.0", - "micromark-util-chunked": "^2.0.0", - "micromark-util-combine-extensions": "^2.0.0", - "micromark-util-decode-numeric-character-reference": "^2.0.0", - "micromark-util-encode": "^2.0.0", - "micromark-util-normalize-identifier": "^2.0.0", - "micromark-util-resolve-all": "^2.0.0", - "micromark-util-sanitize-uri": "^2.0.0", - "micromark-util-subtokenize": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/mdast-util-gfm-task-list-item/node_modules/micromark-factory-space": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-2.0.0.tgz", - "integrity": "sha512-TKr+LIDX2pkBJXFLzpyPyljzYK3MtmllMUMODTQJIUfDGncESaqB90db9IAUcz4AZAJFdd8U9zOp9ty1458rxg==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-character": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/mdast-util-gfm-task-list-item/node_modules/micromark-util-character": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.0.tgz", - "integrity": "sha512-KvOVV+X1yLBfs9dCBSopq/+G1PcgT3lAK07mC4BzXi5E7ahzMAF8oIupDDJ6mievI6F+lAATkbQQlQixJfT3aQ==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/mdast-util-gfm-task-list-item/node_modules/micromark-util-symbol": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.0.tgz", - "integrity": "sha512-8JZt9ElZ5kyTnO94muPxIGS8oyElRJaiJO8EzV6ZSyGQ1Is8xwl4Q45qU5UOg+bGH4AikWziz0iN4sFLWs8PGw==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, - "node_modules/mdast-util-gfm-task-list-item/node_modules/micromark-util-types": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.0.tgz", - "integrity": "sha512-oNh6S2WMHWRZrmutsRmDDfkzKtxF+bc2VxLC9dvtrDIRFln627VsFP6fLMgTryGDljgLPjkrzQSDcPrjPyDJ5w==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, - "node_modules/mdast-util-gfm/node_modules/@types/mdast": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz", - "integrity": "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==", - "license": "MIT", - "dependencies": { - "@types/unist": "*" - } - }, - "node_modules/mdast-util-gfm/node_modules/mdast-util-from-markdown": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-2.0.1.tgz", - "integrity": "sha512-aJEUyzZ6TzlsX2s5B4Of7lN7EQtAxvtradMMglCQDyaTFgse6CmtmdJ15ElnVRlCg1vpNyVtbem0PWzlNieZsA==", - "license": "MIT", - "dependencies": { - "@types/mdast": "^4.0.0", - "@types/unist": "^3.0.0", - "decode-named-character-reference": "^1.0.0", - "devlop": "^1.0.0", - "mdast-util-to-string": "^4.0.0", - "micromark": "^4.0.0", - "micromark-util-decode-numeric-character-reference": "^2.0.0", - "micromark-util-decode-string": "^2.0.0", - "micromark-util-normalize-identifier": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0", - "unist-util-stringify-position": "^4.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/mdast-util-gfm/node_modules/micromark": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/micromark/-/micromark-4.0.0.tgz", - "integrity": "sha512-o/sd0nMof8kYff+TqcDx3VSrgBTcZpSvYcAHIfHhv5VAuNmisCxjhx6YmxS8PFEpb9z5WKWKPdzf0jM23ro3RQ==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "@types/debug": "^4.0.0", - "debug": "^4.0.0", - "decode-named-character-reference": "^1.0.0", - "devlop": "^1.0.0", - "micromark-core-commonmark": "^2.0.0", - "micromark-factory-space": "^2.0.0", - "micromark-util-character": "^2.0.0", - "micromark-util-chunked": "^2.0.0", - "micromark-util-combine-extensions": "^2.0.0", - "micromark-util-decode-numeric-character-reference": "^2.0.0", - "micromark-util-encode": "^2.0.0", - "micromark-util-normalize-identifier": "^2.0.0", - "micromark-util-resolve-all": "^2.0.0", - "micromark-util-sanitize-uri": "^2.0.0", - "micromark-util-subtokenize": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/mdast-util-gfm/node_modules/micromark-factory-space": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-2.0.0.tgz", - "integrity": "sha512-TKr+LIDX2pkBJXFLzpyPyljzYK3MtmllMUMODTQJIUfDGncESaqB90db9IAUcz4AZAJFdd8U9zOp9ty1458rxg==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-character": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/mdast-util-gfm/node_modules/micromark-util-character": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.0.tgz", - "integrity": "sha512-KvOVV+X1yLBfs9dCBSopq/+G1PcgT3lAK07mC4BzXi5E7ahzMAF8oIupDDJ6mievI6F+lAATkbQQlQixJfT3aQ==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/mdast-util-gfm/node_modules/micromark-util-symbol": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.0.tgz", - "integrity": "sha512-8JZt9ElZ5kyTnO94muPxIGS8oyElRJaiJO8EzV6ZSyGQ1Is8xwl4Q45qU5UOg+bGH4AikWziz0iN4sFLWs8PGw==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, - "node_modules/mdast-util-gfm/node_modules/micromark-util-types": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.0.tgz", - "integrity": "sha512-oNh6S2WMHWRZrmutsRmDDfkzKtxF+bc2VxLC9dvtrDIRFln627VsFP6fLMgTryGDljgLPjkrzQSDcPrjPyDJ5w==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, "node_modules/mdast-util-mdx": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/mdast-util-mdx/-/mdast-util-mdx-3.0.0.tgz", @@ -13141,9 +14367,9 @@ } }, "node_modules/mdast-util-mdx-expression": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mdast-util-mdx-expression/-/mdast-util-mdx-expression-2.0.0.tgz", - "integrity": "sha512-fGCu8eWdKUKNu5mohVGkhBXCXGnOTLuFqOvGMvdikr+J1w7lDJgxThOKpwRWzzbyXAU2hhSwsmssOY4yTokluw==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/mdast-util-mdx-expression/-/mdast-util-mdx-expression-2.0.1.tgz", + "integrity": "sha512-J6f+9hUp+ldTZqKRSg7Vw5V6MqjATc+3E4gf3CFNcuZNWD8XdyI6zQ8GqH7f8169MM6P7hMBRDVGnn7oHB9kXQ==", "license": "MIT", "dependencies": { "@types/estree-jsx": "^1.0.0", @@ -13158,150 +14384,10 @@ "url": "https://opencollective.com/unified" } }, - "node_modules/mdast-util-mdx-expression/node_modules/@types/mdast": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz", - "integrity": "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==", - "license": "MIT", - "dependencies": { - "@types/unist": "*" - } - }, - "node_modules/mdast-util-mdx-expression/node_modules/mdast-util-from-markdown": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-2.0.1.tgz", - "integrity": "sha512-aJEUyzZ6TzlsX2s5B4Of7lN7EQtAxvtradMMglCQDyaTFgse6CmtmdJ15ElnVRlCg1vpNyVtbem0PWzlNieZsA==", - "license": "MIT", - "dependencies": { - "@types/mdast": "^4.0.0", - "@types/unist": "^3.0.0", - "decode-named-character-reference": "^1.0.0", - "devlop": "^1.0.0", - "mdast-util-to-string": "^4.0.0", - "micromark": "^4.0.0", - "micromark-util-decode-numeric-character-reference": "^2.0.0", - "micromark-util-decode-string": "^2.0.0", - "micromark-util-normalize-identifier": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0", - "unist-util-stringify-position": "^4.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/mdast-util-mdx-expression/node_modules/micromark": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/micromark/-/micromark-4.0.0.tgz", - "integrity": "sha512-o/sd0nMof8kYff+TqcDx3VSrgBTcZpSvYcAHIfHhv5VAuNmisCxjhx6YmxS8PFEpb9z5WKWKPdzf0jM23ro3RQ==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "@types/debug": "^4.0.0", - "debug": "^4.0.0", - "decode-named-character-reference": "^1.0.0", - "devlop": "^1.0.0", - "micromark-core-commonmark": "^2.0.0", - "micromark-factory-space": "^2.0.0", - "micromark-util-character": "^2.0.0", - "micromark-util-chunked": "^2.0.0", - "micromark-util-combine-extensions": "^2.0.0", - "micromark-util-decode-numeric-character-reference": "^2.0.0", - "micromark-util-encode": "^2.0.0", - "micromark-util-normalize-identifier": "^2.0.0", - "micromark-util-resolve-all": "^2.0.0", - "micromark-util-sanitize-uri": "^2.0.0", - "micromark-util-subtokenize": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/mdast-util-mdx-expression/node_modules/micromark-factory-space": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-2.0.0.tgz", - "integrity": "sha512-TKr+LIDX2pkBJXFLzpyPyljzYK3MtmllMUMODTQJIUfDGncESaqB90db9IAUcz4AZAJFdd8U9zOp9ty1458rxg==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-character": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/mdast-util-mdx-expression/node_modules/micromark-util-character": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.0.tgz", - "integrity": "sha512-KvOVV+X1yLBfs9dCBSopq/+G1PcgT3lAK07mC4BzXi5E7ahzMAF8oIupDDJ6mievI6F+lAATkbQQlQixJfT3aQ==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/mdast-util-mdx-expression/node_modules/micromark-util-symbol": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.0.tgz", - "integrity": "sha512-8JZt9ElZ5kyTnO94muPxIGS8oyElRJaiJO8EzV6ZSyGQ1Is8xwl4Q45qU5UOg+bGH4AikWziz0iN4sFLWs8PGw==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, - "node_modules/mdast-util-mdx-expression/node_modules/micromark-util-types": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.0.tgz", - "integrity": "sha512-oNh6S2WMHWRZrmutsRmDDfkzKtxF+bc2VxLC9dvtrDIRFln627VsFP6fLMgTryGDljgLPjkrzQSDcPrjPyDJ5w==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, "node_modules/mdast-util-mdx-jsx": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/mdast-util-mdx-jsx/-/mdast-util-mdx-jsx-3.1.3.tgz", - "integrity": "sha512-bfOjvNt+1AcbPLTFMFWY149nJz0OjmewJs3LQQ5pIyVGxP4CdOqNVJL6kTaM5c68p8q82Xv3nCyFfUnuEcH3UQ==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/mdast-util-mdx-jsx/-/mdast-util-mdx-jsx-3.2.0.tgz", + "integrity": "sha512-lj/z8v0r6ZtsN/cGNNtemmmfoLAFZnjMbNyLzBafjzikOM+glrjNHPlf6lQDOTccj9n5b0PPihEBbhneMyGs1Q==", "license": "MIT", "dependencies": { "@types/estree-jsx": "^1.0.0", @@ -13322,376 +14408,6 @@ "url": "https://opencollective.com/unified" } }, - "node_modules/mdast-util-mdx-jsx/node_modules/@types/mdast": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz", - "integrity": "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==", - "license": "MIT", - "dependencies": { - "@types/unist": "*" - } - }, - "node_modules/mdast-util-mdx-jsx/node_modules/character-entities-legacy": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-3.0.0.tgz", - "integrity": "sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/mdast-util-mdx-jsx/node_modules/character-reference-invalid": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-2.0.1.tgz", - "integrity": "sha512-iBZ4F4wRbyORVsu0jPV7gXkOsGYjGHPmAyv+HiHG8gi5PtC9KI2j1+v8/tlibRvjoWX027ypmG/n0HtO5t7unw==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/mdast-util-mdx-jsx/node_modules/is-alphabetical": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-2.0.1.tgz", - "integrity": "sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/mdast-util-mdx-jsx/node_modules/is-alphanumerical": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-2.0.1.tgz", - "integrity": "sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw==", - "license": "MIT", - "dependencies": { - "is-alphabetical": "^2.0.0", - "is-decimal": "^2.0.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/mdast-util-mdx-jsx/node_modules/is-decimal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-2.0.1.tgz", - "integrity": "sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/mdast-util-mdx-jsx/node_modules/is-hexadecimal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-2.0.1.tgz", - "integrity": "sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/mdast-util-mdx-jsx/node_modules/mdast-util-from-markdown": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-2.0.1.tgz", - "integrity": "sha512-aJEUyzZ6TzlsX2s5B4Of7lN7EQtAxvtradMMglCQDyaTFgse6CmtmdJ15ElnVRlCg1vpNyVtbem0PWzlNieZsA==", - "license": "MIT", - "dependencies": { - "@types/mdast": "^4.0.0", - "@types/unist": "^3.0.0", - "decode-named-character-reference": "^1.0.0", - "devlop": "^1.0.0", - "mdast-util-to-string": "^4.0.0", - "micromark": "^4.0.0", - "micromark-util-decode-numeric-character-reference": "^2.0.0", - "micromark-util-decode-string": "^2.0.0", - "micromark-util-normalize-identifier": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0", - "unist-util-stringify-position": "^4.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/mdast-util-mdx-jsx/node_modules/micromark": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/micromark/-/micromark-4.0.0.tgz", - "integrity": "sha512-o/sd0nMof8kYff+TqcDx3VSrgBTcZpSvYcAHIfHhv5VAuNmisCxjhx6YmxS8PFEpb9z5WKWKPdzf0jM23ro3RQ==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "@types/debug": "^4.0.0", - "debug": "^4.0.0", - "decode-named-character-reference": "^1.0.0", - "devlop": "^1.0.0", - "micromark-core-commonmark": "^2.0.0", - "micromark-factory-space": "^2.0.0", - "micromark-util-character": "^2.0.0", - "micromark-util-chunked": "^2.0.0", - "micromark-util-combine-extensions": "^2.0.0", - "micromark-util-decode-numeric-character-reference": "^2.0.0", - "micromark-util-encode": "^2.0.0", - "micromark-util-normalize-identifier": "^2.0.0", - "micromark-util-resolve-all": "^2.0.0", - "micromark-util-sanitize-uri": "^2.0.0", - "micromark-util-subtokenize": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/mdast-util-mdx-jsx/node_modules/micromark-factory-space": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-2.0.0.tgz", - "integrity": "sha512-TKr+LIDX2pkBJXFLzpyPyljzYK3MtmllMUMODTQJIUfDGncESaqB90db9IAUcz4AZAJFdd8U9zOp9ty1458rxg==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-character": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/mdast-util-mdx-jsx/node_modules/micromark-util-character": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.0.tgz", - "integrity": "sha512-KvOVV+X1yLBfs9dCBSopq/+G1PcgT3lAK07mC4BzXi5E7ahzMAF8oIupDDJ6mievI6F+lAATkbQQlQixJfT3aQ==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/mdast-util-mdx-jsx/node_modules/micromark-util-symbol": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.0.tgz", - "integrity": "sha512-8JZt9ElZ5kyTnO94muPxIGS8oyElRJaiJO8EzV6ZSyGQ1Is8xwl4Q45qU5UOg+bGH4AikWziz0iN4sFLWs8PGw==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, - "node_modules/mdast-util-mdx-jsx/node_modules/micromark-util-types": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.0.tgz", - "integrity": "sha512-oNh6S2WMHWRZrmutsRmDDfkzKtxF+bc2VxLC9dvtrDIRFln627VsFP6fLMgTryGDljgLPjkrzQSDcPrjPyDJ5w==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, - "node_modules/mdast-util-mdx-jsx/node_modules/parse-entities": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-4.0.1.tgz", - "integrity": "sha512-SWzvYcSJh4d/SGLIOQfZ/CoNv6BTlI6YEQ7Nj82oDVnRpwe/Z/F1EMx42x3JAOwGBlCjeCH0BRJQbQ/opHL17w==", - "license": "MIT", - "dependencies": { - "@types/unist": "^2.0.0", - "character-entities": "^2.0.0", - "character-entities-legacy": "^3.0.0", - "character-reference-invalid": "^2.0.0", - "decode-named-character-reference": "^1.0.0", - "is-alphanumerical": "^2.0.0", - "is-decimal": "^2.0.0", - "is-hexadecimal": "^2.0.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/mdast-util-mdx-jsx/node_modules/parse-entities/node_modules/@types/unist": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz", - "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==", - "license": "MIT" - }, - "node_modules/mdast-util-mdx/node_modules/@types/mdast": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz", - "integrity": "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==", - "license": "MIT", - "dependencies": { - "@types/unist": "*" - } - }, - "node_modules/mdast-util-mdx/node_modules/mdast-util-from-markdown": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-2.0.1.tgz", - "integrity": "sha512-aJEUyzZ6TzlsX2s5B4Of7lN7EQtAxvtradMMglCQDyaTFgse6CmtmdJ15ElnVRlCg1vpNyVtbem0PWzlNieZsA==", - "license": "MIT", - "dependencies": { - "@types/mdast": "^4.0.0", - "@types/unist": "^3.0.0", - "decode-named-character-reference": "^1.0.0", - "devlop": "^1.0.0", - "mdast-util-to-string": "^4.0.0", - "micromark": "^4.0.0", - "micromark-util-decode-numeric-character-reference": "^2.0.0", - "micromark-util-decode-string": "^2.0.0", - "micromark-util-normalize-identifier": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0", - "unist-util-stringify-position": "^4.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/mdast-util-mdx/node_modules/micromark": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/micromark/-/micromark-4.0.0.tgz", - "integrity": "sha512-o/sd0nMof8kYff+TqcDx3VSrgBTcZpSvYcAHIfHhv5VAuNmisCxjhx6YmxS8PFEpb9z5WKWKPdzf0jM23ro3RQ==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "@types/debug": "^4.0.0", - "debug": "^4.0.0", - "decode-named-character-reference": "^1.0.0", - "devlop": "^1.0.0", - "micromark-core-commonmark": "^2.0.0", - "micromark-factory-space": "^2.0.0", - "micromark-util-character": "^2.0.0", - "micromark-util-chunked": "^2.0.0", - "micromark-util-combine-extensions": "^2.0.0", - "micromark-util-decode-numeric-character-reference": "^2.0.0", - "micromark-util-encode": "^2.0.0", - "micromark-util-normalize-identifier": "^2.0.0", - "micromark-util-resolve-all": "^2.0.0", - "micromark-util-sanitize-uri": "^2.0.0", - "micromark-util-subtokenize": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/mdast-util-mdx/node_modules/micromark-factory-space": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-2.0.0.tgz", - "integrity": "sha512-TKr+LIDX2pkBJXFLzpyPyljzYK3MtmllMUMODTQJIUfDGncESaqB90db9IAUcz4AZAJFdd8U9zOp9ty1458rxg==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-character": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/mdast-util-mdx/node_modules/micromark-util-character": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.0.tgz", - "integrity": "sha512-KvOVV+X1yLBfs9dCBSopq/+G1PcgT3lAK07mC4BzXi5E7ahzMAF8oIupDDJ6mievI6F+lAATkbQQlQixJfT3aQ==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/mdast-util-mdx/node_modules/micromark-util-symbol": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.0.tgz", - "integrity": "sha512-8JZt9ElZ5kyTnO94muPxIGS8oyElRJaiJO8EzV6ZSyGQ1Is8xwl4Q45qU5UOg+bGH4AikWziz0iN4sFLWs8PGw==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, - "node_modules/mdast-util-mdx/node_modules/micromark-util-types": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.0.tgz", - "integrity": "sha512-oNh6S2WMHWRZrmutsRmDDfkzKtxF+bc2VxLC9dvtrDIRFln627VsFP6fLMgTryGDljgLPjkrzQSDcPrjPyDJ5w==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, "node_modules/mdast-util-mdxjs-esm": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/mdast-util-mdxjs-esm/-/mdast-util-mdxjs-esm-2.0.1.tgz", @@ -13710,43 +14426,185 @@ "url": "https://opencollective.com/unified" } }, - "node_modules/mdast-util-mdxjs-esm/node_modules/@types/mdast": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz", - "integrity": "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==", - "license": "MIT", - "dependencies": { - "@types/unist": "*" - } - }, - "node_modules/mdast-util-mdxjs-esm/node_modules/mdast-util-from-markdown": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-2.0.1.tgz", - "integrity": "sha512-aJEUyzZ6TzlsX2s5B4Of7lN7EQtAxvtradMMglCQDyaTFgse6CmtmdJ15ElnVRlCg1vpNyVtbem0PWzlNieZsA==", + "node_modules/mdast-util-phrasing": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/mdast-util-phrasing/-/mdast-util-phrasing-4.1.0.tgz", + "integrity": "sha512-TqICwyvJJpBwvGAMZjj4J2n0X8QWp21b9l0o7eXyVJ25YNWYbJDVIyD1bZXE6WtV6RmKJVYmQAKWa0zWOABz2w==", "license": "MIT", "dependencies": { "@types/mdast": "^4.0.0", - "@types/unist": "^3.0.0", - "decode-named-character-reference": "^1.0.0", - "devlop": "^1.0.0", - "mdast-util-to-string": "^4.0.0", - "micromark": "^4.0.0", - "micromark-util-decode-numeric-character-reference": "^2.0.0", - "micromark-util-decode-string": "^2.0.0", - "micromark-util-normalize-identifier": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0", - "unist-util-stringify-position": "^4.0.0" + "unist-util-is": "^6.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/unified" } }, - "node_modules/mdast-util-mdxjs-esm/node_modules/micromark": { + "node_modules/mdast-util-to-hast": { + "version": "13.2.1", + "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-13.2.1.tgz", + "integrity": "sha512-cctsq2wp5vTsLIcaymblUriiTcZd0CwWtCbLvrOzYCDZoWyMNV8sZ7krj09FSnsiJi3WVsHLM4k6Dq/yaPyCXA==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "@types/mdast": "^4.0.0", + "@ungap/structured-clone": "^1.0.0", + "devlop": "^1.0.0", + "micromark-util-sanitize-uri": "^2.0.0", + "trim-lines": "^3.0.0", + "unist-util-position": "^5.0.0", + "unist-util-visit": "^5.0.0", + "vfile": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-to-markdown": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/mdast-util-to-markdown/-/mdast-util-to-markdown-2.1.2.tgz", + "integrity": "sha512-xj68wMTvGXVOKonmog6LwyJKrYXZPvlwabaryTjLh9LuvovB/KAH+kvi8Gjj+7rJjsFi23nkUxRQv1KqSroMqA==", + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "@types/unist": "^3.0.0", + "longest-streak": "^3.0.0", + "mdast-util-phrasing": "^4.0.0", + "mdast-util-to-string": "^4.0.0", + "micromark-util-classify-character": "^2.0.0", + "micromark-util-decode-string": "^2.0.0", + "unist-util-visit": "^5.0.0", + "zwitch": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-to-string": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/micromark/-/micromark-4.0.0.tgz", - "integrity": "sha512-o/sd0nMof8kYff+TqcDx3VSrgBTcZpSvYcAHIfHhv5VAuNmisCxjhx6YmxS8PFEpb9z5WKWKPdzf0jM23ro3RQ==", + "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-4.0.0.tgz", + "integrity": "sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg==", + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdn-data": { + "version": "2.0.30", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz", + "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==", + "license": "CC0-1.0" + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/memfs": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/memfs/-/memfs-4.57.1.tgz", + "integrity": "sha512-WvzrWPwMQT+PtbX2Et64R4qXKK0fj/8pO85MrUCzymX3twwCiJCdvntW3HdhG1teLJcHDDLIKx5+c3HckWYZtQ==", + "license": "Apache-2.0", + "dependencies": { + "@jsonjoy.com/fs-core": "4.57.1", + "@jsonjoy.com/fs-fsa": "4.57.1", + "@jsonjoy.com/fs-node": "4.57.1", + "@jsonjoy.com/fs-node-builtins": "4.57.1", + "@jsonjoy.com/fs-node-to-fsa": "4.57.1", + "@jsonjoy.com/fs-node-utils": "4.57.1", + "@jsonjoy.com/fs-print": "4.57.1", + "@jsonjoy.com/fs-snapshot": "4.57.1", + "@jsonjoy.com/json-pack": "^1.11.0", + "@jsonjoy.com/util": "^1.9.0", + "glob-to-regex.js": "^1.0.1", + "thingies": "^2.5.0", + "tree-dump": "^1.0.3", + "tslib": "^2.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", + "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "license": "MIT" + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/mermaid": { + "version": "11.13.0", + "resolved": "https://registry.npmjs.org/mermaid/-/mermaid-11.13.0.tgz", + "integrity": "sha512-fEnci+Immw6lKMFI8sqzjlATTyjLkRa6axrEgLV2yHTfv8r+h1wjFbV6xeRtd4rUV1cS4EpR9rwp3Rci7TRWDw==", + "license": "MIT", + "dependencies": { + "@braintree/sanitize-url": "^7.1.1", + "@iconify/utils": "^3.0.2", + "@mermaid-js/parser": "^1.0.1", + "@types/d3": "^7.4.3", + "@upsetjs/venn.js": "^2.0.0", + "cytoscape": "^3.33.1", + "cytoscape-cose-bilkent": "^4.1.0", + "cytoscape-fcose": "^2.2.0", + "d3": "^7.9.0", + "d3-sankey": "^0.12.3", + "dagre-d3-es": "7.0.14", + "dayjs": "^1.11.19", + "dompurify": "^3.3.1", + "katex": "^0.16.25", + "khroma": "^2.1.0", + "lodash-es": "^4.17.23", + "marked": "^16.3.0", + "roughjs": "^4.6.6", + "stylis": "^4.3.6", + "ts-dedent": "^2.2.0", + "uuid": "^11.1.0" + } + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/micromark": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/micromark/-/micromark-4.0.2.tgz", + "integrity": "sha512-zpe98Q6kvavpCr1NPVSCMebCKfD7CA2NqZ+rykeNhONIJBpc1tFKt9hucLGwha3jNTNI8lHpctWJWoimVF4PfA==", "funding": [ { "type": "GitHub Sponsors", @@ -13778,738 +14636,10 @@ "micromark-util-types": "^2.0.0" } }, - "node_modules/mdast-util-mdxjs-esm/node_modules/micromark-factory-space": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-2.0.0.tgz", - "integrity": "sha512-TKr+LIDX2pkBJXFLzpyPyljzYK3MtmllMUMODTQJIUfDGncESaqB90db9IAUcz4AZAJFdd8U9zOp9ty1458rxg==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-character": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/mdast-util-mdxjs-esm/node_modules/micromark-util-character": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.0.tgz", - "integrity": "sha512-KvOVV+X1yLBfs9dCBSopq/+G1PcgT3lAK07mC4BzXi5E7ahzMAF8oIupDDJ6mievI6F+lAATkbQQlQixJfT3aQ==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/mdast-util-mdxjs-esm/node_modules/micromark-util-symbol": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.0.tgz", - "integrity": "sha512-8JZt9ElZ5kyTnO94muPxIGS8oyElRJaiJO8EzV6ZSyGQ1Is8xwl4Q45qU5UOg+bGH4AikWziz0iN4sFLWs8PGw==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, - "node_modules/mdast-util-mdxjs-esm/node_modules/micromark-util-types": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.0.tgz", - "integrity": "sha512-oNh6S2WMHWRZrmutsRmDDfkzKtxF+bc2VxLC9dvtrDIRFln627VsFP6fLMgTryGDljgLPjkrzQSDcPrjPyDJ5w==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, - "node_modules/mdast-util-phrasing": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/mdast-util-phrasing/-/mdast-util-phrasing-4.1.0.tgz", - "integrity": "sha512-TqICwyvJJpBwvGAMZjj4J2n0X8QWp21b9l0o7eXyVJ25YNWYbJDVIyD1bZXE6WtV6RmKJVYmQAKWa0zWOABz2w==", - "license": "MIT", - "dependencies": { - "@types/mdast": "^4.0.0", - "unist-util-is": "^6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/mdast-util-phrasing/node_modules/@types/mdast": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz", - "integrity": "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==", - "license": "MIT", - "dependencies": { - "@types/unist": "*" - } - }, - "node_modules/mdast-util-to-hast": { - "version": "13.2.0", - "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-13.2.0.tgz", - "integrity": "sha512-QGYKEuUsYT9ykKBCMOEDLsU5JRObWQusAolFMeko/tYPufNkRffBAQjIE+99jbA87xv6FgmjLtwjh9wBWajwAA==", - "license": "MIT", - "dependencies": { - "@types/hast": "^3.0.0", - "@types/mdast": "^4.0.0", - "@ungap/structured-clone": "^1.0.0", - "devlop": "^1.0.0", - "micromark-util-sanitize-uri": "^2.0.0", - "trim-lines": "^3.0.0", - "unist-util-position": "^5.0.0", - "unist-util-visit": "^5.0.0", - "vfile": "^6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/mdast-util-to-hast/node_modules/@types/mdast": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz", - "integrity": "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==", - "license": "MIT", - "dependencies": { - "@types/unist": "*" - } - }, - "node_modules/mdast-util-to-markdown": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mdast-util-to-markdown/-/mdast-util-to-markdown-2.1.0.tgz", - "integrity": "sha512-SR2VnIEdVNCJbP6y7kVTJgPLifdr8WEU440fQec7qHoHOUz/oJ2jmNRqdDQ3rbiStOXb2mCDGTuwsK5OPUgYlQ==", - "license": "MIT", - "dependencies": { - "@types/mdast": "^4.0.0", - "@types/unist": "^3.0.0", - "longest-streak": "^3.0.0", - "mdast-util-phrasing": "^4.0.0", - "mdast-util-to-string": "^4.0.0", - "micromark-util-decode-string": "^2.0.0", - "unist-util-visit": "^5.0.0", - "zwitch": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/mdast-util-to-markdown/node_modules/@types/mdast": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz", - "integrity": "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==", - "license": "MIT", - "dependencies": { - "@types/unist": "*" - } - }, - "node_modules/mdast-util-to-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-4.0.0.tgz", - "integrity": "sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg==", - "license": "MIT", - "dependencies": { - "@types/mdast": "^4.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/mdast-util-to-string/node_modules/@types/mdast": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz", - "integrity": "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==", - "license": "MIT", - "dependencies": { - "@types/unist": "*" - } - }, - "node_modules/mdn-data": { - "version": "2.0.30", - "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz", - "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==", - "license": "CC0-1.0" - }, - "node_modules/media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/memfs": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/memfs/-/memfs-3.5.3.tgz", - "integrity": "sha512-UERzLsxzllchadvbPs5aolHh65ISpKpM+ccLbOJ8/vvpBKmAWf+la7dXFy7Mr0ySHbdHrFv5kGFCUHHe6GFEmw==", - "license": "Unlicense", - "dependencies": { - "fs-monkey": "^1.0.4" - }, - "engines": { - "node": ">= 4.0.0" - } - }, - "node_modules/memoizee": { - "version": "0.4.17", - "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.17.tgz", - "integrity": "sha512-DGqD7Hjpi/1or4F/aYAspXKNm5Yili0QDAFAY4QYvpqpgiY6+1jOfqpmByzjxbWd/T9mChbCArXAbDAsTm5oXA==", - "dev": true, - "license": "ISC", - "dependencies": { - "d": "^1.0.2", - "es5-ext": "^0.10.64", - "es6-weak-map": "^2.0.3", - "event-emitter": "^0.3.5", - "is-promise": "^2.2.2", - "lru-queue": "^0.1.0", - "next-tick": "^1.1.0", - "timers-ext": "^0.1.7" - }, - "engines": { - "node": ">=0.12" - } - }, - "node_modules/merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==", - "license": "MIT" - }, - "node_modules/merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "license": "MIT" - }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "node_modules/mermaid": { - "version": "10.9.1", - "resolved": "https://registry.npmjs.org/mermaid/-/mermaid-10.9.1.tgz", - "integrity": "sha512-Mx45Obds5W1UkW1nv/7dHRsbfMM1aOKA2+Pxs/IGHNonygDHwmng8xTHyS9z4KWVi0rbko8gjiBmuwwXQ7tiNA==", - "license": "MIT", - "dependencies": { - "@braintree/sanitize-url": "^6.0.1", - "@types/d3-scale": "^4.0.3", - "@types/d3-scale-chromatic": "^3.0.0", - "cytoscape": "^3.28.1", - "cytoscape-cose-bilkent": "^4.1.0", - "d3": "^7.4.0", - "d3-sankey": "^0.12.3", - "dagre-d3-es": "7.0.10", - "dayjs": "^1.11.7", - "dompurify": "^3.0.5", - "elkjs": "^0.9.0", - "katex": "^0.16.9", - "khroma": "^2.0.0", - "lodash-es": "^4.17.21", - "mdast-util-from-markdown": "^1.3.0", - "non-layered-tidy-tree-layout": "^2.0.2", - "stylis": "^4.1.3", - "ts-dedent": "^2.2.0", - "uuid": "^9.0.0", - "web-worker": "^1.2.0" - } - }, - "node_modules/mermaid/node_modules/@types/unist": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz", - "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==", - "license": "MIT" - }, - "node_modules/mermaid/node_modules/mdast-util-from-markdown": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-1.3.1.tgz", - "integrity": "sha512-4xTO/M8c82qBcnQc1tgpNtubGUW/Y1tBQ1B0i5CtSoelOLKFYlElIr3bvgREYYO5iRqbMY1YuqZng0GVOI8Qww==", - "license": "MIT", - "dependencies": { - "@types/mdast": "^3.0.0", - "@types/unist": "^2.0.0", - "decode-named-character-reference": "^1.0.0", - "mdast-util-to-string": "^3.1.0", - "micromark": "^3.0.0", - "micromark-util-decode-numeric-character-reference": "^1.0.0", - "micromark-util-decode-string": "^1.0.0", - "micromark-util-normalize-identifier": "^1.0.0", - "micromark-util-symbol": "^1.0.0", - "micromark-util-types": "^1.0.0", - "unist-util-stringify-position": "^3.0.0", - "uvu": "^0.5.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/mermaid/node_modules/mdast-util-to-string": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-3.2.0.tgz", - "integrity": "sha512-V4Zn/ncyN1QNSqSBxTrMOLpjr+IKdHl2v3KVLoWmDPscP4r9GcCi71gjgvUV1SFSKh92AjAG4peFuBl2/YgCJg==", - "license": "MIT", - "dependencies": { - "@types/mdast": "^3.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/mermaid/node_modules/micromark": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/micromark/-/micromark-3.2.0.tgz", - "integrity": "sha512-uD66tJj54JLYq0De10AhWycZWGQNUvDI55xPgk2sQM5kn1JYlhbCMTtEeT27+vAhW2FBQxLlOmS3pmA7/2z4aA==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "@types/debug": "^4.0.0", - "debug": "^4.0.0", - "decode-named-character-reference": "^1.0.0", - "micromark-core-commonmark": "^1.0.1", - "micromark-factory-space": "^1.0.0", - "micromark-util-character": "^1.0.0", - "micromark-util-chunked": "^1.0.0", - "micromark-util-combine-extensions": "^1.0.0", - "micromark-util-decode-numeric-character-reference": "^1.0.0", - "micromark-util-encode": "^1.0.0", - "micromark-util-normalize-identifier": "^1.0.0", - "micromark-util-resolve-all": "^1.0.0", - "micromark-util-sanitize-uri": "^1.0.0", - "micromark-util-subtokenize": "^1.0.0", - "micromark-util-symbol": "^1.0.0", - "micromark-util-types": "^1.0.1", - "uvu": "^0.5.0" - } - }, - "node_modules/mermaid/node_modules/micromark-core-commonmark": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-core-commonmark/-/micromark-core-commonmark-1.1.0.tgz", - "integrity": "sha512-BgHO1aRbolh2hcrzL2d1La37V0Aoz73ymF8rAcKnohLy93titmv62E0gP8Hrx9PKcKrqCZ1BbLGbP3bEhoXYlw==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "decode-named-character-reference": "^1.0.0", - "micromark-factory-destination": "^1.0.0", - "micromark-factory-label": "^1.0.0", - "micromark-factory-space": "^1.0.0", - "micromark-factory-title": "^1.0.0", - "micromark-factory-whitespace": "^1.0.0", - "micromark-util-character": "^1.0.0", - "micromark-util-chunked": "^1.0.0", - "micromark-util-classify-character": "^1.0.0", - "micromark-util-html-tag-name": "^1.0.0", - "micromark-util-normalize-identifier": "^1.0.0", - "micromark-util-resolve-all": "^1.0.0", - "micromark-util-subtokenize": "^1.0.0", - "micromark-util-symbol": "^1.0.0", - "micromark-util-types": "^1.0.1", - "uvu": "^0.5.0" - } - }, - "node_modules/mermaid/node_modules/micromark-factory-destination": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-factory-destination/-/micromark-factory-destination-1.1.0.tgz", - "integrity": "sha512-XaNDROBgx9SgSChd69pjiGKbV+nfHGDPVYFs5dOoDd7ZnMAE+Cuu91BCpsY8RT2NP9vo/B8pds2VQNCLiu0zhg==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-character": "^1.0.0", - "micromark-util-symbol": "^1.0.0", - "micromark-util-types": "^1.0.0" - } - }, - "node_modules/mermaid/node_modules/micromark-factory-label": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-factory-label/-/micromark-factory-label-1.1.0.tgz", - "integrity": "sha512-OLtyez4vZo/1NjxGhcpDSbHQ+m0IIGnT8BoPamh+7jVlzLJBH98zzuCoUeMxvM6WsNeh8wx8cKvqLiPHEACn0w==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-character": "^1.0.0", - "micromark-util-symbol": "^1.0.0", - "micromark-util-types": "^1.0.0", - "uvu": "^0.5.0" - } - }, - "node_modules/mermaid/node_modules/micromark-factory-title": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-factory-title/-/micromark-factory-title-1.1.0.tgz", - "integrity": "sha512-J7n9R3vMmgjDOCY8NPw55jiyaQnH5kBdV2/UXCtZIpnHH3P6nHUKaH7XXEYuWwx/xUJcawa8plLBEjMPU24HzQ==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-factory-space": "^1.0.0", - "micromark-util-character": "^1.0.0", - "micromark-util-symbol": "^1.0.0", - "micromark-util-types": "^1.0.0" - } - }, - "node_modules/mermaid/node_modules/micromark-factory-whitespace": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-factory-whitespace/-/micromark-factory-whitespace-1.1.0.tgz", - "integrity": "sha512-v2WlmiymVSp5oMg+1Q0N1Lxmt6pMhIHD457whWM7/GUlEks1hI9xj5w3zbc4uuMKXGisksZk8DzP2UyGbGqNsQ==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-factory-space": "^1.0.0", - "micromark-util-character": "^1.0.0", - "micromark-util-symbol": "^1.0.0", - "micromark-util-types": "^1.0.0" - } - }, - "node_modules/mermaid/node_modules/micromark-util-chunked": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-chunked/-/micromark-util-chunked-1.1.0.tgz", - "integrity": "sha512-Ye01HXpkZPNcV6FiyoW2fGZDUw4Yc7vT0E9Sad83+bEDiCJ1uXu0S3mr8WLpsz3HaG3x2q0HM6CTuPdcZcluFQ==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-symbol": "^1.0.0" - } - }, - "node_modules/mermaid/node_modules/micromark-util-classify-character": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-classify-character/-/micromark-util-classify-character-1.1.0.tgz", - "integrity": "sha512-SL0wLxtKSnklKSUplok1WQFoGhUdWYKggKUiqhX+Swala+BtptGCu5iPRc+xvzJ4PXE/hwM3FNXsfEVgoZsWbw==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-character": "^1.0.0", - "micromark-util-symbol": "^1.0.0", - "micromark-util-types": "^1.0.0" - } - }, - "node_modules/mermaid/node_modules/micromark-util-combine-extensions": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-combine-extensions/-/micromark-util-combine-extensions-1.1.0.tgz", - "integrity": "sha512-Q20sp4mfNf9yEqDL50WwuWZHUrCO4fEyeDCnMGmG5Pr0Cz15Uo7KBs6jq+dq0EgX4DPwwrh9m0X+zPV1ypFvUA==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-chunked": "^1.0.0", - "micromark-util-types": "^1.0.0" - } - }, - "node_modules/mermaid/node_modules/micromark-util-decode-numeric-character-reference": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-decode-numeric-character-reference/-/micromark-util-decode-numeric-character-reference-1.1.0.tgz", - "integrity": "sha512-m9V0ExGv0jB1OT21mrWcuf4QhP46pH1KkfWy9ZEezqHKAxkj4mPCy3nIH1rkbdMlChLHX531eOrymlwyZIf2iw==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-symbol": "^1.0.0" - } - }, - "node_modules/mermaid/node_modules/micromark-util-decode-string": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-decode-string/-/micromark-util-decode-string-1.1.0.tgz", - "integrity": "sha512-YphLGCK8gM1tG1bd54azwyrQRjCFcmgj2S2GoJDNnh4vYtnL38JS8M4gpxzOPNyHdNEpheyWXCTnnTDY3N+NVQ==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "decode-named-character-reference": "^1.0.0", - "micromark-util-character": "^1.0.0", - "micromark-util-decode-numeric-character-reference": "^1.0.0", - "micromark-util-symbol": "^1.0.0" - } - }, - "node_modules/mermaid/node_modules/micromark-util-encode": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-1.1.0.tgz", - "integrity": "sha512-EuEzTWSTAj9PA5GOAs992GzNh2dGQO52UvAbtSOMvXTxv3Criqb6IOzJUBCmEqrrXSblJIJBbFFv6zPxpreiJw==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, - "node_modules/mermaid/node_modules/micromark-util-html-tag-name": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/micromark-util-html-tag-name/-/micromark-util-html-tag-name-1.2.0.tgz", - "integrity": "sha512-VTQzcuQgFUD7yYztuQFKXT49KghjtETQ+Wv/zUjGSGBioZnkA4P1XXZPT1FHeJA6RwRXSF47yvJ1tsJdoxwO+Q==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, - "node_modules/mermaid/node_modules/micromark-util-normalize-identifier": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-normalize-identifier/-/micromark-util-normalize-identifier-1.1.0.tgz", - "integrity": "sha512-N+w5vhqrBihhjdpM8+5Xsxy71QWqGn7HYNUvch71iV2PM7+E3uWGox1Qp90loa1ephtCxG2ftRV/Conitc6P2Q==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-symbol": "^1.0.0" - } - }, - "node_modules/mermaid/node_modules/micromark-util-resolve-all": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-resolve-all/-/micromark-util-resolve-all-1.1.0.tgz", - "integrity": "sha512-b/G6BTMSg+bX+xVCshPTPyAu2tmA0E4X98NSR7eIbeC6ycCqCeE7wjfDIgzEbkzdEVJXRtOG4FbEm/uGbCRouA==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-types": "^1.0.0" - } - }, - "node_modules/mermaid/node_modules/micromark-util-sanitize-uri": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-1.2.0.tgz", - "integrity": "sha512-QO4GXv0XZfWey4pYFndLUKEAktKkG5kZTdUNaTAkzbuJxn2tNBOr+QtxR2XpWaMhbImT2dPzyLrPXLlPhph34A==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-character": "^1.0.0", - "micromark-util-encode": "^1.0.0", - "micromark-util-symbol": "^1.0.0" - } - }, - "node_modules/mermaid/node_modules/micromark-util-subtokenize": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-subtokenize/-/micromark-util-subtokenize-1.1.0.tgz", - "integrity": "sha512-kUQHyzRoxvZO2PuLzMt2P/dwVsTiivCK8icYTeR+3WgbuPqfHgPPy7nFKbeqRivBvn/3N3GBiNC+JRTMSxEC7A==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-chunked": "^1.0.0", - "micromark-util-symbol": "^1.0.0", - "micromark-util-types": "^1.0.0", - "uvu": "^0.5.0" - } - }, - "node_modules/mermaid/node_modules/unist-util-stringify-position": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-3.0.3.tgz", - "integrity": "sha512-k5GzIBZ/QatR8N5X2y+drfpWG8IDBzdnVj6OInRNWm1oXrzydiaAT2OQiA8DPRRZyAKb9b6I2a6PxYklZD0gKg==", - "license": "MIT", - "dependencies": { - "@types/unist": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/micromark": { - "version": "2.11.4", - "resolved": "https://registry.npmjs.org/micromark/-/micromark-2.11.4.tgz", - "integrity": "sha512-+WoovN/ppKolQOFIAajxi7Lu9kInbPxFuTBVEavFcL8eAfVstoc5MocPmqBeAdBOJV00uaVjegzH4+MA0DN/uA==", - "dev": true, - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "debug": "^4.0.0", - "parse-entities": "^2.0.0" - } - }, "node_modules/micromark-core-commonmark": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-core-commonmark/-/micromark-core-commonmark-2.0.1.tgz", - "integrity": "sha512-CUQyKr1e///ZODyD1U3xit6zXwy1a8q2a1S1HKtIlmgvurrEpaw/Y9y6KSIbF8P59cn/NjzHyO+Q2fAyYLQrAA==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/micromark-core-commonmark/-/micromark-core-commonmark-2.0.3.tgz", + "integrity": "sha512-RDBrHEMSxVFLg6xvnXmb1Ayr2WzLAWjeSATAoxwKYJV94TeNavgoIdA0a9ytzDSVzBy2YKFK+emCPOEibLeCrg==", "funding": [ { "type": "GitHub Sponsors", @@ -14541,9 +14671,9 @@ } }, "node_modules/micromark-core-commonmark/node_modules/micromark-factory-space": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-2.0.0.tgz", - "integrity": "sha512-TKr+LIDX2pkBJXFLzpyPyljzYK3MtmllMUMODTQJIUfDGncESaqB90db9IAUcz4AZAJFdd8U9zOp9ty1458rxg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-2.0.1.tgz", + "integrity": "sha512-zRkxjtBxxLd2Sc0d+fbnEunsTj46SWXgXciZmHq0kDYGnck/ZSGj9/wULTV95uoeYiK5hRXP2mJ98Uo4cq/LQg==", "funding": [ { "type": "GitHub Sponsors", @@ -14561,9 +14691,9 @@ } }, "node_modules/micromark-core-commonmark/node_modules/micromark-util-character": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.0.tgz", - "integrity": "sha512-KvOVV+X1yLBfs9dCBSopq/+G1PcgT3lAK07mC4BzXi5E7ahzMAF8oIupDDJ6mievI6F+lAATkbQQlQixJfT3aQ==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.1.tgz", + "integrity": "sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==", "funding": [ { "type": "GitHub Sponsors", @@ -14581,25 +14711,9 @@ } }, "node_modules/micromark-core-commonmark/node_modules/micromark-util-symbol": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.0.tgz", - "integrity": "sha512-8JZt9ElZ5kyTnO94muPxIGS8oyElRJaiJO8EzV6ZSyGQ1Is8xwl4Q45qU5UOg+bGH4AikWziz0iN4sFLWs8PGw==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, - "node_modules/micromark-core-commonmark/node_modules/micromark-util-types": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.0.tgz", - "integrity": "sha512-oNh6S2WMHWRZrmutsRmDDfkzKtxF+bc2VxLC9dvtrDIRFln627VsFP6fLMgTryGDljgLPjkrzQSDcPrjPyDJ5w==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz", + "integrity": "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==", "funding": [ { "type": "GitHub Sponsors", @@ -14613,9 +14727,9 @@ "license": "MIT" }, "node_modules/micromark-extension-directive": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/micromark-extension-directive/-/micromark-extension-directive-3.0.1.tgz", - "integrity": "sha512-VGV2uxUzhEZmaP7NSFo2vtq7M2nUD+WfmYQD+d8i/1nHbzE+rMy9uzTvUybBbNiVbrhOZibg3gbyoARGqgDWyg==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/micromark-extension-directive/-/micromark-extension-directive-3.0.2.tgz", + "integrity": "sha512-wjcXHgk+PPdmvR58Le9d7zQYWy+vKEU9Se44p2CrCDPiLr2FMyiT4Fyb5UFKFC66wGB3kPlgD7q3TnoqPS7SZA==", "license": "MIT", "dependencies": { "devlop": "^1.0.0", @@ -14631,80 +14745,10 @@ "url": "https://opencollective.com/unified" } }, - "node_modules/micromark-extension-directive/node_modules/@types/unist": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz", - "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==", - "license": "MIT" - }, - "node_modules/micromark-extension-directive/node_modules/character-entities-legacy": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-3.0.0.tgz", - "integrity": "sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/micromark-extension-directive/node_modules/character-reference-invalid": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-2.0.1.tgz", - "integrity": "sha512-iBZ4F4wRbyORVsu0jPV7gXkOsGYjGHPmAyv+HiHG8gi5PtC9KI2j1+v8/tlibRvjoWX027ypmG/n0HtO5t7unw==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/micromark-extension-directive/node_modules/is-alphabetical": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-2.0.1.tgz", - "integrity": "sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/micromark-extension-directive/node_modules/is-alphanumerical": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-2.0.1.tgz", - "integrity": "sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw==", - "license": "MIT", - "dependencies": { - "is-alphabetical": "^2.0.0", - "is-decimal": "^2.0.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/micromark-extension-directive/node_modules/is-decimal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-2.0.1.tgz", - "integrity": "sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/micromark-extension-directive/node_modules/is-hexadecimal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-2.0.1.tgz", - "integrity": "sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, "node_modules/micromark-extension-directive/node_modules/micromark-factory-space": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-2.0.0.tgz", - "integrity": "sha512-TKr+LIDX2pkBJXFLzpyPyljzYK3MtmllMUMODTQJIUfDGncESaqB90db9IAUcz4AZAJFdd8U9zOp9ty1458rxg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-2.0.1.tgz", + "integrity": "sha512-zRkxjtBxxLd2Sc0d+fbnEunsTj46SWXgXciZmHq0kDYGnck/ZSGj9/wULTV95uoeYiK5hRXP2mJ98Uo4cq/LQg==", "funding": [ { "type": "GitHub Sponsors", @@ -14722,9 +14766,9 @@ } }, "node_modules/micromark-extension-directive/node_modules/micromark-util-character": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.0.tgz", - "integrity": "sha512-KvOVV+X1yLBfs9dCBSopq/+G1PcgT3lAK07mC4BzXi5E7ahzMAF8oIupDDJ6mievI6F+lAATkbQQlQixJfT3aQ==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.1.tgz", + "integrity": "sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==", "funding": [ { "type": "GitHub Sponsors", @@ -14742,9 +14786,9 @@ } }, "node_modules/micromark-extension-directive/node_modules/micromark-util-symbol": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.0.tgz", - "integrity": "sha512-8JZt9ElZ5kyTnO94muPxIGS8oyElRJaiJO8EzV6ZSyGQ1Is8xwl4Q45qU5UOg+bGH4AikWziz0iN4sFLWs8PGw==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz", + "integrity": "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==", "funding": [ { "type": "GitHub Sponsors", @@ -14757,42 +14801,6 @@ ], "license": "MIT" }, - "node_modules/micromark-extension-directive/node_modules/micromark-util-types": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.0.tgz", - "integrity": "sha512-oNh6S2WMHWRZrmutsRmDDfkzKtxF+bc2VxLC9dvtrDIRFln627VsFP6fLMgTryGDljgLPjkrzQSDcPrjPyDJ5w==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, - "node_modules/micromark-extension-directive/node_modules/parse-entities": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-4.0.1.tgz", - "integrity": "sha512-SWzvYcSJh4d/SGLIOQfZ/CoNv6BTlI6YEQ7Nj82oDVnRpwe/Z/F1EMx42x3JAOwGBlCjeCH0BRJQbQ/opHL17w==", - "license": "MIT", - "dependencies": { - "@types/unist": "^2.0.0", - "character-entities": "^2.0.0", - "character-entities-legacy": "^3.0.0", - "character-reference-invalid": "^2.0.0", - "decode-named-character-reference": "^1.0.0", - "is-alphanumerical": "^2.0.0", - "is-decimal": "^2.0.0", - "is-hexadecimal": "^2.0.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, "node_modules/micromark-extension-frontmatter": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/micromark-extension-frontmatter/-/micromark-extension-frontmatter-2.0.0.tgz", @@ -14810,9 +14818,9 @@ } }, "node_modules/micromark-extension-frontmatter/node_modules/micromark-util-character": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.0.tgz", - "integrity": "sha512-KvOVV+X1yLBfs9dCBSopq/+G1PcgT3lAK07mC4BzXi5E7ahzMAF8oIupDDJ6mievI6F+lAATkbQQlQixJfT3aQ==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.1.tgz", + "integrity": "sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==", "funding": [ { "type": "GitHub Sponsors", @@ -14830,25 +14838,9 @@ } }, "node_modules/micromark-extension-frontmatter/node_modules/micromark-util-symbol": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.0.tgz", - "integrity": "sha512-8JZt9ElZ5kyTnO94muPxIGS8oyElRJaiJO8EzV6ZSyGQ1Is8xwl4Q45qU5UOg+bGH4AikWziz0iN4sFLWs8PGw==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, - "node_modules/micromark-extension-frontmatter/node_modules/micromark-util-types": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.0.tgz", - "integrity": "sha512-oNh6S2WMHWRZrmutsRmDDfkzKtxF+bc2VxLC9dvtrDIRFln627VsFP6fLMgTryGDljgLPjkrzQSDcPrjPyDJ5w==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz", + "integrity": "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==", "funding": [ { "type": "GitHub Sponsors", @@ -14898,9 +14890,9 @@ } }, "node_modules/micromark-extension-gfm-autolink-literal/node_modules/micromark-util-character": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.0.tgz", - "integrity": "sha512-KvOVV+X1yLBfs9dCBSopq/+G1PcgT3lAK07mC4BzXi5E7ahzMAF8oIupDDJ6mievI6F+lAATkbQQlQixJfT3aQ==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.1.tgz", + "integrity": "sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==", "funding": [ { "type": "GitHub Sponsors", @@ -14918,25 +14910,9 @@ } }, "node_modules/micromark-extension-gfm-autolink-literal/node_modules/micromark-util-symbol": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.0.tgz", - "integrity": "sha512-8JZt9ElZ5kyTnO94muPxIGS8oyElRJaiJO8EzV6ZSyGQ1Is8xwl4Q45qU5UOg+bGH4AikWziz0iN4sFLWs8PGw==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, - "node_modules/micromark-extension-gfm-autolink-literal/node_modules/micromark-util-types": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.0.tgz", - "integrity": "sha512-oNh6S2WMHWRZrmutsRmDDfkzKtxF+bc2VxLC9dvtrDIRFln627VsFP6fLMgTryGDljgLPjkrzQSDcPrjPyDJ5w==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz", + "integrity": "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==", "funding": [ { "type": "GitHub Sponsors", @@ -14970,9 +14946,9 @@ } }, "node_modules/micromark-extension-gfm-footnote/node_modules/micromark-factory-space": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-2.0.0.tgz", - "integrity": "sha512-TKr+LIDX2pkBJXFLzpyPyljzYK3MtmllMUMODTQJIUfDGncESaqB90db9IAUcz4AZAJFdd8U9zOp9ty1458rxg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-2.0.1.tgz", + "integrity": "sha512-zRkxjtBxxLd2Sc0d+fbnEunsTj46SWXgXciZmHq0kDYGnck/ZSGj9/wULTV95uoeYiK5hRXP2mJ98Uo4cq/LQg==", "funding": [ { "type": "GitHub Sponsors", @@ -14990,9 +14966,9 @@ } }, "node_modules/micromark-extension-gfm-footnote/node_modules/micromark-util-character": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.0.tgz", - "integrity": "sha512-KvOVV+X1yLBfs9dCBSopq/+G1PcgT3lAK07mC4BzXi5E7ahzMAF8oIupDDJ6mievI6F+lAATkbQQlQixJfT3aQ==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.1.tgz", + "integrity": "sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==", "funding": [ { "type": "GitHub Sponsors", @@ -15010,25 +14986,9 @@ } }, "node_modules/micromark-extension-gfm-footnote/node_modules/micromark-util-symbol": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.0.tgz", - "integrity": "sha512-8JZt9ElZ5kyTnO94muPxIGS8oyElRJaiJO8EzV6ZSyGQ1Is8xwl4Q45qU5UOg+bGH4AikWziz0iN4sFLWs8PGw==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, - "node_modules/micromark-extension-gfm-footnote/node_modules/micromark-util-types": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.0.tgz", - "integrity": "sha512-oNh6S2WMHWRZrmutsRmDDfkzKtxF+bc2VxLC9dvtrDIRFln627VsFP6fLMgTryGDljgLPjkrzQSDcPrjPyDJ5w==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz", + "integrity": "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==", "funding": [ { "type": "GitHub Sponsors", @@ -15060,25 +15020,9 @@ } }, "node_modules/micromark-extension-gfm-strikethrough/node_modules/micromark-util-symbol": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.0.tgz", - "integrity": "sha512-8JZt9ElZ5kyTnO94muPxIGS8oyElRJaiJO8EzV6ZSyGQ1Is8xwl4Q45qU5UOg+bGH4AikWziz0iN4sFLWs8PGw==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, - "node_modules/micromark-extension-gfm-strikethrough/node_modules/micromark-util-types": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.0.tgz", - "integrity": "sha512-oNh6S2WMHWRZrmutsRmDDfkzKtxF+bc2VxLC9dvtrDIRFln627VsFP6fLMgTryGDljgLPjkrzQSDcPrjPyDJ5w==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz", + "integrity": "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==", "funding": [ { "type": "GitHub Sponsors", @@ -15092,9 +15036,9 @@ "license": "MIT" }, "node_modules/micromark-extension-gfm-table": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/micromark-extension-gfm-table/-/micromark-extension-gfm-table-2.1.0.tgz", - "integrity": "sha512-Ub2ncQv+fwD70/l4ou27b4YzfNaCJOvyX4HxXU15m7mpYY+rjuWzsLIPZHJL253Z643RpbcP1oeIJlQ/SKW67g==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-table/-/micromark-extension-gfm-table-2.1.1.tgz", + "integrity": "sha512-t2OU/dXXioARrC6yWfJ4hqB7rct14e8f7m0cbI5hUmDyyIlwv5vEtooptH8INkbLzOatzKuVbQmAYcbWoyz6Dg==", "license": "MIT", "dependencies": { "devlop": "^1.0.0", @@ -15109,9 +15053,9 @@ } }, "node_modules/micromark-extension-gfm-table/node_modules/micromark-factory-space": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-2.0.0.tgz", - "integrity": "sha512-TKr+LIDX2pkBJXFLzpyPyljzYK3MtmllMUMODTQJIUfDGncESaqB90db9IAUcz4AZAJFdd8U9zOp9ty1458rxg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-2.0.1.tgz", + "integrity": "sha512-zRkxjtBxxLd2Sc0d+fbnEunsTj46SWXgXciZmHq0kDYGnck/ZSGj9/wULTV95uoeYiK5hRXP2mJ98Uo4cq/LQg==", "funding": [ { "type": "GitHub Sponsors", @@ -15129,9 +15073,9 @@ } }, "node_modules/micromark-extension-gfm-table/node_modules/micromark-util-character": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.0.tgz", - "integrity": "sha512-KvOVV+X1yLBfs9dCBSopq/+G1PcgT3lAK07mC4BzXi5E7ahzMAF8oIupDDJ6mievI6F+lAATkbQQlQixJfT3aQ==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.1.tgz", + "integrity": "sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==", "funding": [ { "type": "GitHub Sponsors", @@ -15149,25 +15093,9 @@ } }, "node_modules/micromark-extension-gfm-table/node_modules/micromark-util-symbol": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.0.tgz", - "integrity": "sha512-8JZt9ElZ5kyTnO94muPxIGS8oyElRJaiJO8EzV6ZSyGQ1Is8xwl4Q45qU5UOg+bGH4AikWziz0iN4sFLWs8PGw==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, - "node_modules/micromark-extension-gfm-table/node_modules/micromark-util-types": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.0.tgz", - "integrity": "sha512-oNh6S2WMHWRZrmutsRmDDfkzKtxF+bc2VxLC9dvtrDIRFln627VsFP6fLMgTryGDljgLPjkrzQSDcPrjPyDJ5w==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz", + "integrity": "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==", "funding": [ { "type": "GitHub Sponsors", @@ -15193,22 +15121,6 @@ "url": "https://opencollective.com/unified" } }, - "node_modules/micromark-extension-gfm-tagfilter/node_modules/micromark-util-types": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.0.tgz", - "integrity": "sha512-oNh6S2WMHWRZrmutsRmDDfkzKtxF+bc2VxLC9dvtrDIRFln627VsFP6fLMgTryGDljgLPjkrzQSDcPrjPyDJ5w==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, "node_modules/micromark-extension-gfm-task-list-item": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/micromark-extension-gfm-task-list-item/-/micromark-extension-gfm-task-list-item-2.1.0.tgz", @@ -15227,9 +15139,9 @@ } }, "node_modules/micromark-extension-gfm-task-list-item/node_modules/micromark-factory-space": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-2.0.0.tgz", - "integrity": "sha512-TKr+LIDX2pkBJXFLzpyPyljzYK3MtmllMUMODTQJIUfDGncESaqB90db9IAUcz4AZAJFdd8U9zOp9ty1458rxg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-2.0.1.tgz", + "integrity": "sha512-zRkxjtBxxLd2Sc0d+fbnEunsTj46SWXgXciZmHq0kDYGnck/ZSGj9/wULTV95uoeYiK5hRXP2mJ98Uo4cq/LQg==", "funding": [ { "type": "GitHub Sponsors", @@ -15247,9 +15159,9 @@ } }, "node_modules/micromark-extension-gfm-task-list-item/node_modules/micromark-util-character": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.0.tgz", - "integrity": "sha512-KvOVV+X1yLBfs9dCBSopq/+G1PcgT3lAK07mC4BzXi5E7ahzMAF8oIupDDJ6mievI6F+lAATkbQQlQixJfT3aQ==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.1.tgz", + "integrity": "sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==", "funding": [ { "type": "GitHub Sponsors", @@ -15267,41 +15179,9 @@ } }, "node_modules/micromark-extension-gfm-task-list-item/node_modules/micromark-util-symbol": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.0.tgz", - "integrity": "sha512-8JZt9ElZ5kyTnO94muPxIGS8oyElRJaiJO8EzV6ZSyGQ1Is8xwl4Q45qU5UOg+bGH4AikWziz0iN4sFLWs8PGw==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, - "node_modules/micromark-extension-gfm-task-list-item/node_modules/micromark-util-types": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.0.tgz", - "integrity": "sha512-oNh6S2WMHWRZrmutsRmDDfkzKtxF+bc2VxLC9dvtrDIRFln627VsFP6fLMgTryGDljgLPjkrzQSDcPrjPyDJ5w==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, - "node_modules/micromark-extension-gfm/node_modules/micromark-util-types": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.0.tgz", - "integrity": "sha512-oNh6S2WMHWRZrmutsRmDDfkzKtxF+bc2VxLC9dvtrDIRFln627VsFP6fLMgTryGDljgLPjkrzQSDcPrjPyDJ5w==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz", + "integrity": "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==", "funding": [ { "type": "GitHub Sponsors", @@ -15315,9 +15195,9 @@ "license": "MIT" }, "node_modules/micromark-extension-mdx-expression": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/micromark-extension-mdx-expression/-/micromark-extension-mdx-expression-3.0.0.tgz", - "integrity": "sha512-sI0nwhUDz97xyzqJAbHQhp5TfaxEvZZZ2JDqUo+7NvyIYG6BZ5CPPqj2ogUoPJlmXHBnyZUzISg9+oUmU6tUjQ==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/micromark-extension-mdx-expression/-/micromark-extension-mdx-expression-3.0.1.tgz", + "integrity": "sha512-dD/ADLJ1AeMvSAKBwO22zG22N4ybhe7kFIZ3LsDI0GlsNr2A3KYxb0LdC1u5rj4Nw+CHKY0RVdnHX8vj8ejm4Q==", "funding": [ { "type": "GitHub Sponsors", @@ -15341,9 +15221,9 @@ } }, "node_modules/micromark-extension-mdx-expression/node_modules/micromark-factory-space": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-2.0.0.tgz", - "integrity": "sha512-TKr+LIDX2pkBJXFLzpyPyljzYK3MtmllMUMODTQJIUfDGncESaqB90db9IAUcz4AZAJFdd8U9zOp9ty1458rxg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-2.0.1.tgz", + "integrity": "sha512-zRkxjtBxxLd2Sc0d+fbnEunsTj46SWXgXciZmHq0kDYGnck/ZSGj9/wULTV95uoeYiK5hRXP2mJ98Uo4cq/LQg==", "funding": [ { "type": "GitHub Sponsors", @@ -15361,9 +15241,9 @@ } }, "node_modules/micromark-extension-mdx-expression/node_modules/micromark-util-character": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.0.tgz", - "integrity": "sha512-KvOVV+X1yLBfs9dCBSopq/+G1PcgT3lAK07mC4BzXi5E7ahzMAF8oIupDDJ6mievI6F+lAATkbQQlQixJfT3aQ==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.1.tgz", + "integrity": "sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==", "funding": [ { "type": "GitHub Sponsors", @@ -15381,25 +15261,9 @@ } }, "node_modules/micromark-extension-mdx-expression/node_modules/micromark-util-symbol": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.0.tgz", - "integrity": "sha512-8JZt9ElZ5kyTnO94muPxIGS8oyElRJaiJO8EzV6ZSyGQ1Is8xwl4Q45qU5UOg+bGH4AikWziz0iN4sFLWs8PGw==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, - "node_modules/micromark-extension-mdx-expression/node_modules/micromark-util-types": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.0.tgz", - "integrity": "sha512-oNh6S2WMHWRZrmutsRmDDfkzKtxF+bc2VxLC9dvtrDIRFln627VsFP6fLMgTryGDljgLPjkrzQSDcPrjPyDJ5w==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz", + "integrity": "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==", "funding": [ { "type": "GitHub Sponsors", @@ -15413,18 +15277,18 @@ "license": "MIT" }, "node_modules/micromark-extension-mdx-jsx": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/micromark-extension-mdx-jsx/-/micromark-extension-mdx-jsx-3.0.0.tgz", - "integrity": "sha512-uvhhss8OGuzR4/N17L1JwvmJIpPhAd8oByMawEKx6NVdBCbesjH4t+vjEp3ZXft9DwvlKSD07fCeI44/N0Vf2w==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/micromark-extension-mdx-jsx/-/micromark-extension-mdx-jsx-3.0.2.tgz", + "integrity": "sha512-e5+q1DjMh62LZAJOnDraSSbDMvGJ8x3cbjygy2qFEi7HCeUT4BDKCvMozPozcD6WmOt6sVvYDNBKhFSz3kjOVQ==", "license": "MIT", "dependencies": { - "@types/acorn": "^4.0.0", "@types/estree": "^1.0.0", "devlop": "^1.0.0", "estree-util-is-identifier-name": "^3.0.0", "micromark-factory-mdx-expression": "^2.0.0", "micromark-factory-space": "^2.0.0", "micromark-util-character": "^2.0.0", + "micromark-util-events-to-acorn": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0", "vfile-message": "^4.0.0" @@ -15435,9 +15299,9 @@ } }, "node_modules/micromark-extension-mdx-jsx/node_modules/micromark-factory-space": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-2.0.0.tgz", - "integrity": "sha512-TKr+LIDX2pkBJXFLzpyPyljzYK3MtmllMUMODTQJIUfDGncESaqB90db9IAUcz4AZAJFdd8U9zOp9ty1458rxg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-2.0.1.tgz", + "integrity": "sha512-zRkxjtBxxLd2Sc0d+fbnEunsTj46SWXgXciZmHq0kDYGnck/ZSGj9/wULTV95uoeYiK5hRXP2mJ98Uo4cq/LQg==", "funding": [ { "type": "GitHub Sponsors", @@ -15455,9 +15319,9 @@ } }, "node_modules/micromark-extension-mdx-jsx/node_modules/micromark-util-character": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.0.tgz", - "integrity": "sha512-KvOVV+X1yLBfs9dCBSopq/+G1PcgT3lAK07mC4BzXi5E7ahzMAF8oIupDDJ6mievI6F+lAATkbQQlQixJfT3aQ==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.1.tgz", + "integrity": "sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==", "funding": [ { "type": "GitHub Sponsors", @@ -15475,25 +15339,9 @@ } }, "node_modules/micromark-extension-mdx-jsx/node_modules/micromark-util-symbol": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.0.tgz", - "integrity": "sha512-8JZt9ElZ5kyTnO94muPxIGS8oyElRJaiJO8EzV6ZSyGQ1Is8xwl4Q45qU5UOg+bGH4AikWziz0iN4sFLWs8PGw==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, - "node_modules/micromark-extension-mdx-jsx/node_modules/micromark-util-types": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.0.tgz", - "integrity": "sha512-oNh6S2WMHWRZrmutsRmDDfkzKtxF+bc2VxLC9dvtrDIRFln627VsFP6fLMgTryGDljgLPjkrzQSDcPrjPyDJ5w==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz", + "integrity": "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==", "funding": [ { "type": "GitHub Sponsors", @@ -15519,22 +15367,6 @@ "url": "https://opencollective.com/unified" } }, - "node_modules/micromark-extension-mdx-md/node_modules/micromark-util-types": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.0.tgz", - "integrity": "sha512-oNh6S2WMHWRZrmutsRmDDfkzKtxF+bc2VxLC9dvtrDIRFln627VsFP6fLMgTryGDljgLPjkrzQSDcPrjPyDJ5w==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, "node_modules/micromark-extension-mdxjs": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/micromark-extension-mdxjs/-/micromark-extension-mdxjs-3.0.0.tgz", @@ -15577,9 +15409,9 @@ } }, "node_modules/micromark-extension-mdxjs-esm/node_modules/micromark-util-character": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.0.tgz", - "integrity": "sha512-KvOVV+X1yLBfs9dCBSopq/+G1PcgT3lAK07mC4BzXi5E7ahzMAF8oIupDDJ6mievI6F+lAATkbQQlQixJfT3aQ==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.1.tgz", + "integrity": "sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==", "funding": [ { "type": "GitHub Sponsors", @@ -15597,41 +15429,9 @@ } }, "node_modules/micromark-extension-mdxjs-esm/node_modules/micromark-util-symbol": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.0.tgz", - "integrity": "sha512-8JZt9ElZ5kyTnO94muPxIGS8oyElRJaiJO8EzV6ZSyGQ1Is8xwl4Q45qU5UOg+bGH4AikWziz0iN4sFLWs8PGw==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, - "node_modules/micromark-extension-mdxjs-esm/node_modules/micromark-util-types": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.0.tgz", - "integrity": "sha512-oNh6S2WMHWRZrmutsRmDDfkzKtxF+bc2VxLC9dvtrDIRFln627VsFP6fLMgTryGDljgLPjkrzQSDcPrjPyDJ5w==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, - "node_modules/micromark-extension-mdxjs/node_modules/micromark-util-types": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.0.tgz", - "integrity": "sha512-oNh6S2WMHWRZrmutsRmDDfkzKtxF+bc2VxLC9dvtrDIRFln627VsFP6fLMgTryGDljgLPjkrzQSDcPrjPyDJ5w==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz", + "integrity": "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==", "funding": [ { "type": "GitHub Sponsors", @@ -15645,9 +15445,9 @@ "license": "MIT" }, "node_modules/micromark-factory-destination": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-factory-destination/-/micromark-factory-destination-2.0.0.tgz", - "integrity": "sha512-j9DGrQLm/Uhl2tCzcbLhy5kXsgkHUrjJHg4fFAeoMRwJmJerT9aw4FEhIbZStWN8A3qMwOp1uzHr4UL8AInxtA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-factory-destination/-/micromark-factory-destination-2.0.1.tgz", + "integrity": "sha512-Xe6rDdJlkmbFRExpTOmRj9N3MaWmbAgdpSrBQvCFqhezUn4AHqJHbaEnfbVYYiexVSs//tqOdY/DxhjdCiJnIA==", "funding": [ { "type": "GitHub Sponsors", @@ -15666,9 +15466,9 @@ } }, "node_modules/micromark-factory-destination/node_modules/micromark-util-character": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.0.tgz", - "integrity": "sha512-KvOVV+X1yLBfs9dCBSopq/+G1PcgT3lAK07mC4BzXi5E7ahzMAF8oIupDDJ6mievI6F+lAATkbQQlQixJfT3aQ==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.1.tgz", + "integrity": "sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==", "funding": [ { "type": "GitHub Sponsors", @@ -15686,25 +15486,9 @@ } }, "node_modules/micromark-factory-destination/node_modules/micromark-util-symbol": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.0.tgz", - "integrity": "sha512-8JZt9ElZ5kyTnO94muPxIGS8oyElRJaiJO8EzV6ZSyGQ1Is8xwl4Q45qU5UOg+bGH4AikWziz0iN4sFLWs8PGw==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, - "node_modules/micromark-factory-destination/node_modules/micromark-util-types": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.0.tgz", - "integrity": "sha512-oNh6S2WMHWRZrmutsRmDDfkzKtxF+bc2VxLC9dvtrDIRFln627VsFP6fLMgTryGDljgLPjkrzQSDcPrjPyDJ5w==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz", + "integrity": "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==", "funding": [ { "type": "GitHub Sponsors", @@ -15718,9 +15502,9 @@ "license": "MIT" }, "node_modules/micromark-factory-label": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-factory-label/-/micromark-factory-label-2.0.0.tgz", - "integrity": "sha512-RR3i96ohZGde//4WSe/dJsxOX6vxIg9TimLAS3i4EhBAFx8Sm5SmqVfR8E87DPSR31nEAjZfbt91OMZWcNgdZw==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-factory-label/-/micromark-factory-label-2.0.1.tgz", + "integrity": "sha512-VFMekyQExqIW7xIChcXn4ok29YE3rnuyveW3wZQWWqF4Nv9Wk5rgJ99KzPvHjkmPXF93FXIbBp6YdW3t71/7Vg==", "funding": [ { "type": "GitHub Sponsors", @@ -15740,9 +15524,9 @@ } }, "node_modules/micromark-factory-label/node_modules/micromark-util-character": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.0.tgz", - "integrity": "sha512-KvOVV+X1yLBfs9dCBSopq/+G1PcgT3lAK07mC4BzXi5E7ahzMAF8oIupDDJ6mievI6F+lAATkbQQlQixJfT3aQ==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.1.tgz", + "integrity": "sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==", "funding": [ { "type": "GitHub Sponsors", @@ -15760,25 +15544,9 @@ } }, "node_modules/micromark-factory-label/node_modules/micromark-util-symbol": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.0.tgz", - "integrity": "sha512-8JZt9ElZ5kyTnO94muPxIGS8oyElRJaiJO8EzV6ZSyGQ1Is8xwl4Q45qU5UOg+bGH4AikWziz0iN4sFLWs8PGw==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, - "node_modules/micromark-factory-label/node_modules/micromark-util-types": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.0.tgz", - "integrity": "sha512-oNh6S2WMHWRZrmutsRmDDfkzKtxF+bc2VxLC9dvtrDIRFln627VsFP6fLMgTryGDljgLPjkrzQSDcPrjPyDJ5w==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz", + "integrity": "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==", "funding": [ { "type": "GitHub Sponsors", @@ -15792,9 +15560,9 @@ "license": "MIT" }, "node_modules/micromark-factory-mdx-expression": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-factory-mdx-expression/-/micromark-factory-mdx-expression-2.0.1.tgz", - "integrity": "sha512-F0ccWIUHRLRrYp5TC9ZYXmZo+p2AM13ggbsW4T0b5CRKP8KHVRB8t4pwtBgTxtjRmwrK0Irwm7vs2JOZabHZfg==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/micromark-factory-mdx-expression/-/micromark-factory-mdx-expression-2.0.3.tgz", + "integrity": "sha512-kQnEtA3vzucU2BkrIa8/VaSAsP+EJ3CKOvhMuJgOEGg9KDC6OAY6nSnNDVRiVNRqj7Y4SlSzcStaH/5jge8JdQ==", "funding": [ { "type": "GitHub Sponsors", @@ -15809,6 +15577,7 @@ "dependencies": { "@types/estree": "^1.0.0", "devlop": "^1.0.0", + "micromark-factory-space": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-events-to-acorn": "^2.0.0", "micromark-util-symbol": "^2.0.0", @@ -15817,10 +15586,30 @@ "vfile-message": "^4.0.0" } }, + "node_modules/micromark-factory-mdx-expression/node_modules/micromark-factory-space": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-2.0.1.tgz", + "integrity": "sha512-zRkxjtBxxLd2Sc0d+fbnEunsTj46SWXgXciZmHq0kDYGnck/ZSGj9/wULTV95uoeYiK5hRXP2mJ98Uo4cq/LQg==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-character": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, "node_modules/micromark-factory-mdx-expression/node_modules/micromark-util-character": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.0.tgz", - "integrity": "sha512-KvOVV+X1yLBfs9dCBSopq/+G1PcgT3lAK07mC4BzXi5E7ahzMAF8oIupDDJ6mievI6F+lAATkbQQlQixJfT3aQ==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.1.tgz", + "integrity": "sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==", "funding": [ { "type": "GitHub Sponsors", @@ -15838,25 +15627,9 @@ } }, "node_modules/micromark-factory-mdx-expression/node_modules/micromark-util-symbol": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.0.tgz", - "integrity": "sha512-8JZt9ElZ5kyTnO94muPxIGS8oyElRJaiJO8EzV6ZSyGQ1Is8xwl4Q45qU5UOg+bGH4AikWziz0iN4sFLWs8PGw==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, - "node_modules/micromark-factory-mdx-expression/node_modules/micromark-util-types": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.0.tgz", - "integrity": "sha512-oNh6S2WMHWRZrmutsRmDDfkzKtxF+bc2VxLC9dvtrDIRFln627VsFP6fLMgTryGDljgLPjkrzQSDcPrjPyDJ5w==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz", + "integrity": "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==", "funding": [ { "type": "GitHub Sponsors", @@ -15889,10 +15662,26 @@ "micromark-util-types": "^1.0.0" } }, + "node_modules/micromark-factory-space/node_modules/micromark-util-types": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-1.1.0.tgz", + "integrity": "sha512-ukRBgie8TIAcacscVHSiddHjO4k/q3pnedmzMQ4iwDcK0FtFCohKOlFbaOL/mPgfnPsL3C1ZyxJa4sbWrBl3jg==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT" + }, "node_modules/micromark-factory-title": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-factory-title/-/micromark-factory-title-2.0.0.tgz", - "integrity": "sha512-jY8CSxmpWLOxS+t8W+FG3Xigc0RDQA9bKMY/EwILvsesiRniiVMejYTE4wumNc2f4UbAa4WsHqe3J1QS1sli+A==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-factory-title/-/micromark-factory-title-2.0.1.tgz", + "integrity": "sha512-5bZ+3CjhAd9eChYTHsjy6TGxpOFSKgKKJPJxr293jTbfry2KDoWkhBb6TcPVB4NmzaPhMs1Frm9AZH7OD4Cjzw==", "funding": [ { "type": "GitHub Sponsors", @@ -15912,9 +15701,9 @@ } }, "node_modules/micromark-factory-title/node_modules/micromark-factory-space": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-2.0.0.tgz", - "integrity": "sha512-TKr+LIDX2pkBJXFLzpyPyljzYK3MtmllMUMODTQJIUfDGncESaqB90db9IAUcz4AZAJFdd8U9zOp9ty1458rxg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-2.0.1.tgz", + "integrity": "sha512-zRkxjtBxxLd2Sc0d+fbnEunsTj46SWXgXciZmHq0kDYGnck/ZSGj9/wULTV95uoeYiK5hRXP2mJ98Uo4cq/LQg==", "funding": [ { "type": "GitHub Sponsors", @@ -15932,9 +15721,9 @@ } }, "node_modules/micromark-factory-title/node_modules/micromark-util-character": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.0.tgz", - "integrity": "sha512-KvOVV+X1yLBfs9dCBSopq/+G1PcgT3lAK07mC4BzXi5E7ahzMAF8oIupDDJ6mievI6F+lAATkbQQlQixJfT3aQ==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.1.tgz", + "integrity": "sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==", "funding": [ { "type": "GitHub Sponsors", @@ -15952,25 +15741,9 @@ } }, "node_modules/micromark-factory-title/node_modules/micromark-util-symbol": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.0.tgz", - "integrity": "sha512-8JZt9ElZ5kyTnO94muPxIGS8oyElRJaiJO8EzV6ZSyGQ1Is8xwl4Q45qU5UOg+bGH4AikWziz0iN4sFLWs8PGw==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, - "node_modules/micromark-factory-title/node_modules/micromark-util-types": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.0.tgz", - "integrity": "sha512-oNh6S2WMHWRZrmutsRmDDfkzKtxF+bc2VxLC9dvtrDIRFln627VsFP6fLMgTryGDljgLPjkrzQSDcPrjPyDJ5w==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz", + "integrity": "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==", "funding": [ { "type": "GitHub Sponsors", @@ -15984,9 +15757,9 @@ "license": "MIT" }, "node_modules/micromark-factory-whitespace": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-factory-whitespace/-/micromark-factory-whitespace-2.0.0.tgz", - "integrity": "sha512-28kbwaBjc5yAI1XadbdPYHX/eDnqaUFVikLwrO7FDnKG7lpgxnvk/XGRhX/PN0mOZ+dBSZ+LgunHS+6tYQAzhA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-factory-whitespace/-/micromark-factory-whitespace-2.0.1.tgz", + "integrity": "sha512-Ob0nuZ3PKt/n0hORHyvoD9uZhr+Za8sFoP+OnMcnWK5lngSzALgQYKMr9RJVOWLqQYuyn6ulqGWSXdwf6F80lQ==", "funding": [ { "type": "GitHub Sponsors", @@ -16006,9 +15779,9 @@ } }, "node_modules/micromark-factory-whitespace/node_modules/micromark-factory-space": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-2.0.0.tgz", - "integrity": "sha512-TKr+LIDX2pkBJXFLzpyPyljzYK3MtmllMUMODTQJIUfDGncESaqB90db9IAUcz4AZAJFdd8U9zOp9ty1458rxg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-2.0.1.tgz", + "integrity": "sha512-zRkxjtBxxLd2Sc0d+fbnEunsTj46SWXgXciZmHq0kDYGnck/ZSGj9/wULTV95uoeYiK5hRXP2mJ98Uo4cq/LQg==", "funding": [ { "type": "GitHub Sponsors", @@ -16026,9 +15799,9 @@ } }, "node_modules/micromark-factory-whitespace/node_modules/micromark-util-character": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.0.tgz", - "integrity": "sha512-KvOVV+X1yLBfs9dCBSopq/+G1PcgT3lAK07mC4BzXi5E7ahzMAF8oIupDDJ6mievI6F+lAATkbQQlQixJfT3aQ==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.1.tgz", + "integrity": "sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==", "funding": [ { "type": "GitHub Sponsors", @@ -16046,25 +15819,9 @@ } }, "node_modules/micromark-factory-whitespace/node_modules/micromark-util-symbol": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.0.tgz", - "integrity": "sha512-8JZt9ElZ5kyTnO94muPxIGS8oyElRJaiJO8EzV6ZSyGQ1Is8xwl4Q45qU5UOg+bGH4AikWziz0iN4sFLWs8PGw==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, - "node_modules/micromark-factory-whitespace/node_modules/micromark-util-types": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.0.tgz", - "integrity": "sha512-oNh6S2WMHWRZrmutsRmDDfkzKtxF+bc2VxLC9dvtrDIRFln627VsFP6fLMgTryGDljgLPjkrzQSDcPrjPyDJ5w==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz", + "integrity": "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==", "funding": [ { "type": "GitHub Sponsors", @@ -16097,10 +15854,26 @@ "micromark-util-types": "^1.0.0" } }, + "node_modules/micromark-util-character/node_modules/micromark-util-types": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-1.1.0.tgz", + "integrity": "sha512-ukRBgie8TIAcacscVHSiddHjO4k/q3pnedmzMQ4iwDcK0FtFCohKOlFbaOL/mPgfnPsL3C1ZyxJa4sbWrBl3jg==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT" + }, "node_modules/micromark-util-chunked": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-chunked/-/micromark-util-chunked-2.0.0.tgz", - "integrity": "sha512-anK8SWmNphkXdaKgz5hJvGa7l00qmcaUQoMYsBwDlSKFKjc6gjGXPDw3FNL3Nbwq5L8gE+RCbGqTw49FK5Qyvg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-chunked/-/micromark-util-chunked-2.0.1.tgz", + "integrity": "sha512-QUNFEOPELfmvv+4xiNg2sRYeS/P84pTW0TCgP5zc9FpXetHY0ab7SxKyAQCNCc1eK0459uoLI1y5oO5Vc1dbhA==", "funding": [ { "type": "GitHub Sponsors", @@ -16117,9 +15890,9 @@ } }, "node_modules/micromark-util-chunked/node_modules/micromark-util-symbol": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.0.tgz", - "integrity": "sha512-8JZt9ElZ5kyTnO94muPxIGS8oyElRJaiJO8EzV6ZSyGQ1Is8xwl4Q45qU5UOg+bGH4AikWziz0iN4sFLWs8PGw==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz", + "integrity": "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==", "funding": [ { "type": "GitHub Sponsors", @@ -16133,9 +15906,9 @@ "license": "MIT" }, "node_modules/micromark-util-classify-character": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-classify-character/-/micromark-util-classify-character-2.0.0.tgz", - "integrity": "sha512-S0ze2R9GH+fu41FA7pbSqNWObo/kzwf8rN/+IGlW/4tC6oACOs8B++bh+i9bVyNnwCcuksbFwsBme5OCKXCwIw==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-classify-character/-/micromark-util-classify-character-2.0.1.tgz", + "integrity": "sha512-K0kHzM6afW/MbeWYWLjoHQv1sgg2Q9EccHEDzSkxiP/EaagNzCm7T/WMKZ3rjMbvIpvBiZgwR3dKMygtA4mG1Q==", "funding": [ { "type": "GitHub Sponsors", @@ -16154,9 +15927,9 @@ } }, "node_modules/micromark-util-classify-character/node_modules/micromark-util-character": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.0.tgz", - "integrity": "sha512-KvOVV+X1yLBfs9dCBSopq/+G1PcgT3lAK07mC4BzXi5E7ahzMAF8oIupDDJ6mievI6F+lAATkbQQlQixJfT3aQ==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.1.tgz", + "integrity": "sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==", "funding": [ { "type": "GitHub Sponsors", @@ -16174,25 +15947,9 @@ } }, "node_modules/micromark-util-classify-character/node_modules/micromark-util-symbol": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.0.tgz", - "integrity": "sha512-8JZt9ElZ5kyTnO94muPxIGS8oyElRJaiJO8EzV6ZSyGQ1Is8xwl4Q45qU5UOg+bGH4AikWziz0iN4sFLWs8PGw==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, - "node_modules/micromark-util-classify-character/node_modules/micromark-util-types": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.0.tgz", - "integrity": "sha512-oNh6S2WMHWRZrmutsRmDDfkzKtxF+bc2VxLC9dvtrDIRFln627VsFP6fLMgTryGDljgLPjkrzQSDcPrjPyDJ5w==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz", + "integrity": "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==", "funding": [ { "type": "GitHub Sponsors", @@ -16206,9 +15963,9 @@ "license": "MIT" }, "node_modules/micromark-util-combine-extensions": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-combine-extensions/-/micromark-util-combine-extensions-2.0.0.tgz", - "integrity": "sha512-vZZio48k7ON0fVS3CUgFatWHoKbbLTK/rT7pzpJ4Bjp5JjkZeasRfrS9wsBdDJK2cJLHMckXZdzPSSr1B8a4oQ==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-combine-extensions/-/micromark-util-combine-extensions-2.0.1.tgz", + "integrity": "sha512-OnAnH8Ujmy59JcyZw8JSbK9cGpdVY44NKgSM7E9Eh7DiLS2E9RNQf0dONaGDzEG9yjEl5hcqeIsj4hfRkLH/Bg==", "funding": [ { "type": "GitHub Sponsors", @@ -16225,26 +15982,10 @@ "micromark-util-types": "^2.0.0" } }, - "node_modules/micromark-util-combine-extensions/node_modules/micromark-util-types": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.0.tgz", - "integrity": "sha512-oNh6S2WMHWRZrmutsRmDDfkzKtxF+bc2VxLC9dvtrDIRFln627VsFP6fLMgTryGDljgLPjkrzQSDcPrjPyDJ5w==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, "node_modules/micromark-util-decode-numeric-character-reference": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-util-decode-numeric-character-reference/-/micromark-util-decode-numeric-character-reference-2.0.1.tgz", - "integrity": "sha512-bmkNc7z8Wn6kgjZmVHOX3SowGmVdhYS7yBpMnuMnPzDq/6xwVA604DuOXMZTO1lvq01g+Adfa0pE2UKGlxL1XQ==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/micromark-util-decode-numeric-character-reference/-/micromark-util-decode-numeric-character-reference-2.0.2.tgz", + "integrity": "sha512-ccUbYk6CwVdkmCQMyr64dXz42EfHGkPQlBj5p7YVGzq8I7CtjXZJrubAYezf7Rp+bjPseiROqe7G6foFd+lEuw==", "funding": [ { "type": "GitHub Sponsors", @@ -16261,9 +16002,9 @@ } }, "node_modules/micromark-util-decode-numeric-character-reference/node_modules/micromark-util-symbol": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.0.tgz", - "integrity": "sha512-8JZt9ElZ5kyTnO94muPxIGS8oyElRJaiJO8EzV6ZSyGQ1Is8xwl4Q45qU5UOg+bGH4AikWziz0iN4sFLWs8PGw==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz", + "integrity": "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==", "funding": [ { "type": "GitHub Sponsors", @@ -16277,9 +16018,9 @@ "license": "MIT" }, "node_modules/micromark-util-decode-string": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-decode-string/-/micromark-util-decode-string-2.0.0.tgz", - "integrity": "sha512-r4Sc6leeUTn3P6gk20aFMj2ntPwn6qpDZqWvYmAG6NgvFTIlj4WtrAudLi65qYoaGdXYViXYw2pkmn7QnIFasA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-decode-string/-/micromark-util-decode-string-2.0.1.tgz", + "integrity": "sha512-nDV/77Fj6eH1ynwscYTOsbK7rR//Uj0bZXBwJZRfaLEJ1iGBR6kIfNmlNqaqJf649EP0F3NWNdeJi03elllNUQ==", "funding": [ { "type": "GitHub Sponsors", @@ -16299,9 +16040,9 @@ } }, "node_modules/micromark-util-decode-string/node_modules/micromark-util-character": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.0.tgz", - "integrity": "sha512-KvOVV+X1yLBfs9dCBSopq/+G1PcgT3lAK07mC4BzXi5E7ahzMAF8oIupDDJ6mievI6F+lAATkbQQlQixJfT3aQ==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.1.tgz", + "integrity": "sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==", "funding": [ { "type": "GitHub Sponsors", @@ -16319,25 +16060,9 @@ } }, "node_modules/micromark-util-decode-string/node_modules/micromark-util-symbol": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.0.tgz", - "integrity": "sha512-8JZt9ElZ5kyTnO94muPxIGS8oyElRJaiJO8EzV6ZSyGQ1Is8xwl4Q45qU5UOg+bGH4AikWziz0iN4sFLWs8PGw==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, - "node_modules/micromark-util-decode-string/node_modules/micromark-util-types": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.0.tgz", - "integrity": "sha512-oNh6S2WMHWRZrmutsRmDDfkzKtxF+bc2VxLC9dvtrDIRFln627VsFP6fLMgTryGDljgLPjkrzQSDcPrjPyDJ5w==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz", + "integrity": "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==", "funding": [ { "type": "GitHub Sponsors", @@ -16351,9 +16076,9 @@ "license": "MIT" }, "node_modules/micromark-util-encode": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-2.0.0.tgz", - "integrity": "sha512-pS+ROfCXAGLWCOc8egcBvT0kf27GoWMqtdarNfDcjb6YLuV5cM3ioG45Ys2qOVqeqSbjaKg72vU+Wby3eddPsA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-2.0.1.tgz", + "integrity": "sha512-c3cVx2y4KqUnwopcO9b/SCdo2O67LwJJ/UyqGfbigahfegL9myoEFoDYZgkT7f36T0bLrM9hZTAaAyH+PCAXjw==", "funding": [ { "type": "GitHub Sponsors", @@ -16367,9 +16092,9 @@ "license": "MIT" }, "node_modules/micromark-util-events-to-acorn": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/micromark-util-events-to-acorn/-/micromark-util-events-to-acorn-2.0.2.tgz", - "integrity": "sha512-Fk+xmBrOv9QZnEDguL9OI9/NQQp6Hz4FuQ4YmCb/5V7+9eAh1s6AYSvL20kHkD67YIg7EpE54TiSlcsf3vyZgA==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/micromark-util-events-to-acorn/-/micromark-util-events-to-acorn-2.0.3.tgz", + "integrity": "sha512-jmsiEIiZ1n7X1Rr5k8wVExBQCg5jy4UXVADItHmNk1zkwEVhBuIUKRu3fqv+hs4nxLISi2DQGlqIOGiFxgbfHg==", "funding": [ { "type": "GitHub Sponsors", @@ -16382,7 +16107,6 @@ ], "license": "MIT", "dependencies": { - "@types/acorn": "^4.0.0", "@types/estree": "^1.0.0", "@types/unist": "^3.0.0", "devlop": "^1.0.0", @@ -16393,25 +16117,9 @@ } }, "node_modules/micromark-util-events-to-acorn/node_modules/micromark-util-symbol": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.0.tgz", - "integrity": "sha512-8JZt9ElZ5kyTnO94muPxIGS8oyElRJaiJO8EzV6ZSyGQ1Is8xwl4Q45qU5UOg+bGH4AikWziz0iN4sFLWs8PGw==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, - "node_modules/micromark-util-events-to-acorn/node_modules/micromark-util-types": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.0.tgz", - "integrity": "sha512-oNh6S2WMHWRZrmutsRmDDfkzKtxF+bc2VxLC9dvtrDIRFln627VsFP6fLMgTryGDljgLPjkrzQSDcPrjPyDJ5w==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz", + "integrity": "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==", "funding": [ { "type": "GitHub Sponsors", @@ -16425,9 +16133,9 @@ "license": "MIT" }, "node_modules/micromark-util-html-tag-name": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-html-tag-name/-/micromark-util-html-tag-name-2.0.0.tgz", - "integrity": "sha512-xNn4Pqkj2puRhKdKTm8t1YHC/BAjx6CEwRFXntTaRf/x16aqka6ouVoutm+QdkISTlT7e2zU7U4ZdlDLJd2Mcw==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-html-tag-name/-/micromark-util-html-tag-name-2.0.1.tgz", + "integrity": "sha512-2cNEiYDhCWKI+Gs9T0Tiysk136SnR13hhO8yW6BGNyhOC4qYFnwF1nKfD3HFAIXA5c45RrIG1ub11GiXeYd1xA==", "funding": [ { "type": "GitHub Sponsors", @@ -16441,9 +16149,9 @@ "license": "MIT" }, "node_modules/micromark-util-normalize-identifier": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-normalize-identifier/-/micromark-util-normalize-identifier-2.0.0.tgz", - "integrity": "sha512-2xhYT0sfo85FMrUPtHcPo2rrp1lwbDEEzpx7jiH2xXJLqBuy4H0GgXk5ToU8IEwoROtXuL8ND0ttVa4rNqYK3w==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-normalize-identifier/-/micromark-util-normalize-identifier-2.0.1.tgz", + "integrity": "sha512-sxPqmo70LyARJs0w2UclACPUUEqltCkJ6PhKdMIDuJ3gSf/Q+/GIe3WKl0Ijb/GyH9lOpUkRAO2wp0GVkLvS9Q==", "funding": [ { "type": "GitHub Sponsors", @@ -16460,9 +16168,9 @@ } }, "node_modules/micromark-util-normalize-identifier/node_modules/micromark-util-symbol": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.0.tgz", - "integrity": "sha512-8JZt9ElZ5kyTnO94muPxIGS8oyElRJaiJO8EzV6ZSyGQ1Is8xwl4Q45qU5UOg+bGH4AikWziz0iN4sFLWs8PGw==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz", + "integrity": "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==", "funding": [ { "type": "GitHub Sponsors", @@ -16476,9 +16184,9 @@ "license": "MIT" }, "node_modules/micromark-util-resolve-all": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-resolve-all/-/micromark-util-resolve-all-2.0.0.tgz", - "integrity": "sha512-6KU6qO7DZ7GJkaCgwBNtplXCvGkJToU86ybBAUdavvgsCiG8lSSvYxr9MhwmQ+udpzywHsl4RpGJsYWG1pDOcA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-resolve-all/-/micromark-util-resolve-all-2.0.1.tgz", + "integrity": "sha512-VdQyxFWFT2/FGJgwQnJYbe1jjQoNTS4RjglmSjTUlpUMa95Htx9NHeYW4rGDJzbjvCsl9eLjMQwGeElsqmzcHg==", "funding": [ { "type": "GitHub Sponsors", @@ -16494,26 +16202,10 @@ "micromark-util-types": "^2.0.0" } }, - "node_modules/micromark-util-resolve-all/node_modules/micromark-util-types": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.0.tgz", - "integrity": "sha512-oNh6S2WMHWRZrmutsRmDDfkzKtxF+bc2VxLC9dvtrDIRFln627VsFP6fLMgTryGDljgLPjkrzQSDcPrjPyDJ5w==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, "node_modules/micromark-util-sanitize-uri": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-2.0.0.tgz", - "integrity": "sha512-WhYv5UEcZrbAtlsnPuChHUAsu/iBPOVaEVsntLBIdpibO0ddy8OzavZz3iL2xVvBZOpolujSliP65Kq0/7KIYw==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-2.0.1.tgz", + "integrity": "sha512-9N9IomZ/YuGGZZmQec1MbgxtlgougxTodVwDzzEouPKo3qFWvymFHWcnDi2vzV1ff6kas9ucW+o3yzJK9YB1AQ==", "funding": [ { "type": "GitHub Sponsors", @@ -16532,9 +16224,9 @@ } }, "node_modules/micromark-util-sanitize-uri/node_modules/micromark-util-character": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.0.tgz", - "integrity": "sha512-KvOVV+X1yLBfs9dCBSopq/+G1PcgT3lAK07mC4BzXi5E7ahzMAF8oIupDDJ6mievI6F+lAATkbQQlQixJfT3aQ==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.1.tgz", + "integrity": "sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==", "funding": [ { "type": "GitHub Sponsors", @@ -16552,25 +16244,9 @@ } }, "node_modules/micromark-util-sanitize-uri/node_modules/micromark-util-symbol": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.0.tgz", - "integrity": "sha512-8JZt9ElZ5kyTnO94muPxIGS8oyElRJaiJO8EzV6ZSyGQ1Is8xwl4Q45qU5UOg+bGH4AikWziz0iN4sFLWs8PGw==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, - "node_modules/micromark-util-sanitize-uri/node_modules/micromark-util-types": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.0.tgz", - "integrity": "sha512-oNh6S2WMHWRZrmutsRmDDfkzKtxF+bc2VxLC9dvtrDIRFln627VsFP6fLMgTryGDljgLPjkrzQSDcPrjPyDJ5w==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz", + "integrity": "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==", "funding": [ { "type": "GitHub Sponsors", @@ -16584,9 +16260,9 @@ "license": "MIT" }, "node_modules/micromark-util-subtokenize": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-util-subtokenize/-/micromark-util-subtokenize-2.0.1.tgz", - "integrity": "sha512-jZNtiFl/1aY73yS3UGQkutD0UbhTt68qnRpw2Pifmz5wV9h8gOVsN70v+Lq/f1rKaU/W8pxRe8y8Q9FX1AOe1Q==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/micromark-util-subtokenize/-/micromark-util-subtokenize-2.1.0.tgz", + "integrity": "sha512-XQLu552iSctvnEcgXw6+Sx75GflAPNED1qx7eBJ+wydBb2KCbRZe+NwvIEEMM83uml1+2WSXpBAcp9IUCgCYWA==", "funding": [ { "type": "GitHub Sponsors", @@ -16606,25 +16282,9 @@ } }, "node_modules/micromark-util-subtokenize/node_modules/micromark-util-symbol": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.0.tgz", - "integrity": "sha512-8JZt9ElZ5kyTnO94muPxIGS8oyElRJaiJO8EzV6ZSyGQ1Is8xwl4Q45qU5UOg+bGH4AikWziz0iN4sFLWs8PGw==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, - "node_modules/micromark-util-subtokenize/node_modules/micromark-util-types": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.0.tgz", - "integrity": "sha512-oNh6S2WMHWRZrmutsRmDDfkzKtxF+bc2VxLC9dvtrDIRFln627VsFP6fLMgTryGDljgLPjkrzQSDcPrjPyDJ5w==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz", + "integrity": "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==", "funding": [ { "type": "GitHub Sponsors", @@ -16654,9 +16314,65 @@ "license": "MIT" }, "node_modules/micromark-util-types": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-1.1.0.tgz", - "integrity": "sha512-ukRBgie8TIAcacscVHSiddHjO4k/q3pnedmzMQ4iwDcK0FtFCohKOlFbaOL/mPgfnPsL3C1ZyxJa4sbWrBl3jg==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.2.tgz", + "integrity": "sha512-Yw0ECSpJoViF1qTU4DC6NwtC4aWGt1EkzaQB8KPPyCRR8z9TWeV0HbEFGTO+ZY1wB22zmxnJqhPyTpOVCpeHTA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT" + }, + "node_modules/micromark/node_modules/micromark-factory-space": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-2.0.1.tgz", + "integrity": "sha512-zRkxjtBxxLd2Sc0d+fbnEunsTj46SWXgXciZmHq0kDYGnck/ZSGj9/wULTV95uoeYiK5hRXP2mJ98Uo4cq/LQg==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-character": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark/node_modules/micromark-util-character": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.1.tgz", + "integrity": "sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark/node_modules/micromark-util-symbol": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz", + "integrity": "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==", "funding": [ { "type": "GitHub Sponsors", @@ -16737,9 +16453,9 @@ } }, "node_modules/mini-css-extract-plugin": { - "version": "2.9.1", - "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.9.1.tgz", - "integrity": "sha512-+Vyi+GCCOHnrJ2VPS+6aPoXN2k2jgUzDRhTFLjjTBn23qyXJXkjUWQgTL+mXpF5/A8ixLdCc6kWsoeOjKGejKQ==", + "version": "2.10.2", + "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.10.2.tgz", + "integrity": "sha512-AOSS0IdEB95ayVkxn5oGzNQwqAi2J0Jb/kKm43t7H73s8+f5873g0yuj0PNvK4dO75mu5DHg4nlgp4k6Kga8eg==", "license": "MIT", "dependencies": { "schema-utils": "^4.0.0", @@ -16763,9 +16479,9 @@ "license": "ISC" }, "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", + "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" @@ -16784,50 +16500,40 @@ } }, "node_modules/minipass": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", - "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz", + "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==", "dev": true, - "license": "ISC", + "license": "BlueOak-1.0.0", "engines": { "node": ">=16 || 14 >=14.17" } }, - "node_modules/mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "dev": true, + "node_modules/mlly": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.8.2.tgz", + "integrity": "sha512-d+ObxMQFmbt10sretNDytwt85VrbkhhUA/JBGm1MPaWJ65Cl4wOgLaB1NYvJSZ0Ef03MMEU/0xpPMXUIQ29UfA==", "license": "MIT", - "bin": { - "mkdirp": "bin/cmd.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/mri": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", - "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==", - "license": "MIT", - "engines": { - "node": ">=4" + "dependencies": { + "acorn": "^8.16.0", + "pathe": "^2.0.3", + "pkg-types": "^1.3.1", + "ufo": "^1.6.3" } }, "node_modules/mrmime": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.0.tgz", - "integrity": "sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.1.tgz", + "integrity": "sha512-Y3wQdFg2Va6etvQ5I82yUhGdsKrcYox6p7FfL1LbK2J4V01F9TGlepTIhnK24t7koZibmg82KGglhA1XK5IsLQ==", "license": "MIT", "engines": { "node": ">=10" } }, "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "license": "MIT" }, "node_modules/multicast-dns": { @@ -16853,22 +16559,10 @@ "mustache": "bin/mustache" } }, - "node_modules/mz": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", - "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "any-promise": "^1.0.0", - "object-assign": "^4.0.1", - "thenify-all": "^1.0.0" - } - }, "node_modules/nanoid": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", - "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "version": "3.3.11", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", + "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", "funding": [ { "type": "github", @@ -16887,13 +16581,13 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/negotiator": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", - "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.4.tgz", + "integrity": "sha512-myRT3DiWPHqho5PrJaIRyaMv2kgYf0mUVgBNOYMuCH5Ki1yEiQaf/ZJuQ62nvpc44wL5WDbTX7yGJi1Neevw8w==", "license": "MIT", "engines": { "node": ">= 0.6" @@ -16905,13 +16599,6 @@ "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", "license": "MIT" }, - "node_modules/next-tick": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", - "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==", - "dev": true, - "license": "ISC" - }, "node_modules/no-case": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz", @@ -16922,10 +16609,19 @@ "tslib": "^2.0.3" } }, + "node_modules/node-addon-api": { + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-8.7.0.tgz", + "integrity": "sha512-9MdFxmkKaOYVTV+XVRG8ArDwwQ77XIgIPyKASB1k3JPq3M8fGQQQE3YpMOrKm6g//Ktx8ivZr8xo1Qmtqub+GA==", + "license": "MIT", + "engines": { + "node": "^18 || ^20 || >= 21" + } + }, "node_modules/node-emoji": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/node-emoji/-/node-emoji-2.1.3.tgz", - "integrity": "sha512-E2WEOVsgs7O16zsURJ/eH8BqhF029wGpEOnv7Urwdo2wmQanOACwJQh0devF9D9RhoZru0+9JXIS0dBXIAz+lA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/node-emoji/-/node-emoji-2.2.0.tgz", + "integrity": "sha512-Z3lTE9pLaJF47NyMhd4ww1yFTAP8YhYI8SleJiHzM46Fgpm5cnNzSl9XfzFNqbaz+VlJrIj3fXQ4DeN1Rjm6cw==", "license": "MIT", "dependencies": { "@sindresorhus/is": "^4.6.0", @@ -16937,25 +16633,50 @@ "node": ">=18" } }, - "node_modules/node-forge": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz", - "integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==", - "license": "(BSD-3-Clause OR GPL-2.0)", + "node_modules/node-exports-info": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/node-exports-info/-/node-exports-info-1.6.0.tgz", + "integrity": "sha512-pyFS63ptit/P5WqUkt+UUfe+4oevH+bFeIiPPdfb0pFeYEu/1ELnJu5l+5EcTKYL5M7zaAa7S8ddywgXypqKCw==", + "dev": true, + "license": "MIT", + "dependencies": { + "array.prototype.flatmap": "^1.3.3", + "es-errors": "^1.3.0", + "object.entries": "^1.1.9", + "semver": "^6.3.1" + }, "engines": { - "node": ">= 6.13.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/node-exports-info/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/node-gyp-build": { + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.4.tgz", + "integrity": "sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==", + "license": "MIT", + "bin": { + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" } }, "node_modules/node-releases": { - "version": "2.0.18", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", - "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", - "license": "MIT" - }, - "node_modules/non-layered-tidy-tree-layout": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/non-layered-tidy-tree-layout/-/non-layered-tidy-tree-layout-2.0.2.tgz", - "integrity": "sha512-gkXMxRzUH+PB0ax9dUN0yYF0S25BqeAYqhgMaLUFmpXLEk7Fcu8f4emJuOAY0V8kjDICxROIKsTAKsV/v355xw==", + "version": "2.0.36", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.36.tgz", + "integrity": "sha512-TdC8FSgHz8Mwtw9g5L4gR/Sh9XhSP/0DEkQxfEFXOpiul5IiHgHan2VhYYb6agDSfp4KuvltmGApc8HMgUrIkA==", "license": "MIT" }, "node_modules/nopt": { @@ -16998,19 +16719,10 @@ "node": ">=0.10.0" } }, - "node_modules/normalize-range": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", - "integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/normalize-url": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-8.0.1.tgz", - "integrity": "sha512-IO9QvjUMWxPQQhs60oOu10CRkWCiZzSUkzbXGGV9pviYl1fXYcvkzQ5jV9z8Y6un8ARoVRl4EtC6v6jNqbaJ/w==", + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-8.1.1.tgz", + "integrity": "sha512-JYc0DPlpGWB40kH5g07gGTrYuMqV653k3uBKY6uITPWds3M0ov3GaWGp9lbE3Bzngx8+XkfzgvASb9vk9JDFXQ==", "license": "MIT", "engines": { "node": ">=14.16" @@ -17108,7 +16820,6 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/null-loader/-/null-loader-4.0.1.tgz", "integrity": "sha512-pxqVbi4U6N26lq+LmgIbB5XATP0VdZKOG25DhHi8btMmJJefGArFyDg1yc4U3hWCJbMqSrw0qyrz1UQX+qYXqg==", - "dev": true, "license": "MIT", "dependencies": { "loader-utils": "^2.0.0", @@ -17129,7 +16840,6 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", - "dev": true, "license": "MIT", "dependencies": { "@types/json-schema": "^7.0.8", @@ -17154,9 +16864,9 @@ } }, "node_modules/object-inspect": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", - "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", "license": "MIT", "engines": { "node": ">= 0.4" @@ -17175,14 +16885,16 @@ } }, "node_modules/object.assign": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", - "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", + "version": "4.1.7", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.7.tgz", + "integrity": "sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw==", "license": "MIT", "dependencies": { - "call-bind": "^1.0.5", + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", "define-properties": "^1.2.1", - "has-symbols": "^1.0.3", + "es-object-atoms": "^1.0.0", + "has-symbols": "^1.1.0", "object-keys": "^1.1.1" }, "engines": { @@ -17193,15 +16905,16 @@ } }, "node_modules/object.entries": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.8.tgz", - "integrity": "sha512-cmopxi8VwRIAw/fkijJohSfpef5PdN0pMQJN6VC/ZKvn0LIknWD8KtgY6KlQdEc4tIjcQ3HxSMmnvtzIscdaYQ==", + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.9.tgz", + "integrity": "sha512-8u/hfXFRBD1O0hPUjioLhoWFHRmt6tKA4/vZPyckBr18l1KE9uHrFaFaUi8MDRTpi4uak2goyPTSNJLXX2k2Hw==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" + "es-object-atoms": "^1.1.1" }, "engines": { "node": ">= 0.4" @@ -17227,13 +16940,14 @@ } }, "node_modules/object.values": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.0.tgz", - "integrity": "sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.1.tgz", + "integrity": "sha512-gXah6aZrcUxjWg2zR2MwouP2eHlCBzdV4pygudehaKXSGW4v2AsRQUK+lwwXhii6KFZcunEnmSUoYp5CXibxtA==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", "define-properties": "^1.2.1", "es-object-atoms": "^1.0.0" }, @@ -17263,9 +16977,9 @@ } }, "node_modules/on-headers": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", - "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.1.0.tgz", + "integrity": "sha512-737ZY3yNnXy37FHkQxPzt4UZ2UWPWiCZWLvFZ4fu5cueciegX0zGPnrlY6bwRg4FdQOe9YU8MkmJwGhoMybl8A==", "license": "MIT", "engines": { "node": ">= 0.8" @@ -17275,6 +16989,7 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, "license": "ISC", "dependencies": { "wrappy": "1" @@ -17325,7 +17040,7 @@ "version": "0.9.4", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "deep-is": "^0.1.3", @@ -17339,6 +17054,24 @@ "node": ">= 0.8.0" } }, + "node_modules/own-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/own-keys/-/own-keys-1.0.1.tgz", + "integrity": "sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.2.6", + "object-keys": "^1.1.1", + "safe-push-apply": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/p-cancelable": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-3.0.0.tgz", @@ -17348,10 +17081,20 @@ "node": ">=12.20" } }, + "node_modules/p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, "license": "MIT", "dependencies": { "yocto-queue": "^0.1.0" @@ -17367,6 +17110,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, "license": "MIT", "dependencies": { "p-limit": "^3.0.2" @@ -17393,17 +17137,37 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/p-retry": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-4.6.2.tgz", - "integrity": "sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ==", + "node_modules/p-queue": { + "version": "6.6.2", + "resolved": "https://registry.npmjs.org/p-queue/-/p-queue-6.6.2.tgz", + "integrity": "sha512-RwFpb72c/BhQLEXIZ5K2e+AhgNVmIejGlTgiB9MzZ0e93GRvqZ7uSi0dvRF7/XIXDeNkra2fNHBxTyPDGySpjQ==", "license": "MIT", "dependencies": { - "@types/retry": "0.12.0", - "retry": "^0.13.1" + "eventemitter3": "^4.0.4", + "p-timeout": "^3.2.0" }, "engines": { "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-retry": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-6.2.1.tgz", + "integrity": "sha512-hEt02O4hUct5wtwg4H4KcWgDdm+l1bOaEy/hWzd8xtXB9BqxTWBBhb+2ImAtH4Cv4rPjV76xN3Zumqk3k3AhhQ==", + "license": "MIT", + "dependencies": { + "@types/retry": "0.12.2", + "is-network-error": "^1.0.0", + "retry": "^0.13.1" + }, + "engines": { + "node": ">=16.17" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/p-retry/node_modules/retry": { @@ -17415,13 +17179,16 @@ "node": ">= 4" } }, - "node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "node_modules/p-timeout": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-3.2.0.tgz", + "integrity": "sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==", "license": "MIT", + "dependencies": { + "p-finally": "^1.0.0" + }, "engines": { - "node": ">=6" + "node": ">=8" } }, "node_modules/package-json": { @@ -17443,12 +17210,18 @@ } }, "node_modules/package-json-from-dist": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz", - "integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", "dev": true, "license": "BlueOak-1.0.0" }, + "node_modules/package-manager-detector": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/package-manager-detector/-/package-manager-detector-1.6.0.tgz", + "integrity": "sha512-61A5ThoTiDG/C8s8UMZwSorAGwMJ0ERVGj2OjoW5pAalsNOg15+iQiPzrLJ4jhZ1HJzmC2PIHT2oEiH3R5fzNA==", + "license": "MIT" + }, "node_modules/param-case": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/param-case/-/param-case-3.0.4.tgz", @@ -17472,34 +17245,29 @@ } }, "node_modules/parse-entities": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-2.0.0.tgz", - "integrity": "sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==", - "dev": true, + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-4.0.2.tgz", + "integrity": "sha512-GG2AQYWoLgL877gQIKeRPGO1xF9+eG1ujIb5soS5gPvLQ1y2o8FL90w2QWNdf9I361Mpp7726c+lj3U0qK1uGw==", "license": "MIT", "dependencies": { - "character-entities": "^1.0.0", - "character-entities-legacy": "^1.0.0", - "character-reference-invalid": "^1.0.0", - "is-alphanumerical": "^1.0.0", - "is-decimal": "^1.0.0", - "is-hexadecimal": "^1.0.0" + "@types/unist": "^2.0.0", + "character-entities-legacy": "^3.0.0", + "character-reference-invalid": "^2.0.0", + "decode-named-character-reference": "^1.0.0", + "is-alphanumerical": "^2.0.0", + "is-decimal": "^2.0.0", + "is-hexadecimal": "^2.0.0" }, "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/parse-entities/node_modules/character-entities": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.4.tgz", - "integrity": "sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==", - "dev": true, - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } + "node_modules/parse-entities/node_modules/@types/unist": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz", + "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==", + "license": "MIT" }, "node_modules/parse-json": { "version": "5.2.0", @@ -17526,30 +17294,42 @@ "license": "ISC" }, "node_modules/parse5": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", - "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==", + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.3.0.tgz", + "integrity": "sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw==", "license": "MIT", "dependencies": { - "entities": "^4.4.0" + "entities": "^6.0.0" }, "funding": { "url": "https://github.com/inikulin/parse5?sponsor=1" } }, "node_modules/parse5-htmlparser2-tree-adapter": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.0.0.tgz", - "integrity": "sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.1.0.tgz", + "integrity": "sha512-ruw5xyKs6lrpo9x9rCZqZZnIUntICjQAd0Wsmp396Ul9lN/h+ifgVV1x1gZHi8euej6wTfpqX8j+BFQxF0NS/g==", "license": "MIT", "dependencies": { - "domhandler": "^5.0.2", + "domhandler": "^5.0.3", "parse5": "^7.0.0" }, "funding": { "url": "https://github.com/inikulin/parse5?sponsor=1" } }, + "node_modules/parse5/node_modules/entities": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-6.0.1.tgz", + "integrity": "sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, "node_modules/parseurl": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", @@ -17569,10 +17349,17 @@ "tslib": "^2.0.3" } }, + "node_modules/path-data-parser": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/path-data-parser/-/path-data-parser-0.1.0.tgz", + "integrity": "sha512-NOnmBpt5Y2RWbuv0LMzsayp3lVylAHLPUTut412ZA3l+C4uw4ZVkQbjShYCQ8TCpUMdPapr4YjUqLYD6v68j+w==", + "license": "MIT" + }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -17582,6 +17369,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -17633,9 +17421,9 @@ "license": "ISC" }, "node_modules/path-to-regexp": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", - "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.9.0.tgz", + "integrity": "sha512-xIp7/apCFJuUHdDLWe8O1HIkb0kQrOMb/0u6FXQjemHn/ii5LrIzU6bdECnsiTF/GjZkMEKg1xdiZwNqDYlZ6g==", "license": "MIT", "dependencies": { "isarray": "0.0.1" @@ -17650,27 +17438,22 @@ "node": ">=8" } }, - "node_modules/periscopic": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/periscopic/-/periscopic-3.1.0.tgz", - "integrity": "sha512-vKiQ8RRtkl9P+r/+oefh25C3fhybptkHKCZSPlcXiJux2tJF55GnEj3BVn4A5gKfq9NWWXXrxkHBwVPUfH0opw==", - "license": "MIT", - "dependencies": { - "@types/estree": "^1.0.0", - "estree-walker": "^3.0.0", - "is-reference": "^3.0.0" - } + "node_modules/pathe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", + "license": "MIT" }, "node_modules/picocolors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", - "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", "license": "ISC" }, "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", "license": "MIT", "engines": { "node": ">=8.6" @@ -17765,9 +17548,9 @@ } }, "node_modules/pkg-dir/node_modules/yocto-queue": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.1.1.tgz", - "integrity": "sha512-b4JR1PFR10y1mKjhHY9LaGo6tmrgjit7hxVIeAmyMw3jegXR4dhYqLaQF5zMXZxY7tLpMyJeLjr1C4rLmkVe8g==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.2.2.tgz", + "integrity": "sha512-4LCcse/U2MHZ63HAJVE+v71o7yOdIe4cZ70Wpf8D/IyjDKYQLV5GD46B+hSTjJsvV5PztjvHoU580EftxjDZFQ==", "license": "MIT", "engines": { "node": ">=12.20" @@ -17776,83 +17559,54 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/pkg-up": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-3.1.0.tgz", - "integrity": "sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA==", + "node_modules/pkg-types": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.3.1.tgz", + "integrity": "sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==", "license": "MIT", "dependencies": { - "find-up": "^3.0.0" - }, - "engines": { - "node": ">=8" + "confbox": "^0.1.8", + "mlly": "^1.7.4", + "pathe": "^2.0.1" } }, - "node_modules/pkg-up/node_modules/find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "node_modules/pkijs": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/pkijs/-/pkijs-3.4.0.tgz", + "integrity": "sha512-emEcLuomt2j03vxD54giVB4SxTjnsqkU692xZOZXHDVoYyypEm+b3jpiTcc+Cf+myooc+/Ly0z01jqeNHVgJGw==", + "license": "BSD-3-Clause", + "dependencies": { + "@noble/hashes": "1.4.0", + "asn1js": "^3.0.6", + "bytestreamjs": "^2.0.1", + "pvtsutils": "^1.3.6", + "pvutils": "^1.1.3", + "tslib": "^2.8.1" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/points-on-curve": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/points-on-curve/-/points-on-curve-0.2.0.tgz", + "integrity": "sha512-0mYKnYYe9ZcqMCWhUjItv/oHjvgEsfKvnUTg8sAtnHr3GVy7rGkXCb6d5cSyqrWqL4k81b9CPg3urd+T7aop3A==", + "license": "MIT" + }, + "node_modules/points-on-path": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/points-on-path/-/points-on-path-0.2.1.tgz", + "integrity": "sha512-25ClnWWuw7JbWZcgqY/gJ4FQWadKxGWk+3kR/7kD0tCaDtPPMj7oHu2ToLaVhfpnHrZzYby2w6tUA0eOIuUg8g==", "license": "MIT", "dependencies": { - "locate-path": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/pkg-up/node_modules/locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "license": "MIT", - "dependencies": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/pkg-up/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/pkg-up/node_modules/p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "license": "MIT", - "dependencies": { - "p-limit": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/pkg-up/node_modules/path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", - "license": "MIT", - "engines": { - "node": ">=4" + "path-data-parser": "0.1.0", + "points-on-curve": "0.2.0" } }, "node_modules/possible-typed-array-names": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", - "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz", + "integrity": "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==", "dev": true, "license": "MIT", "engines": { @@ -17860,9 +17614,9 @@ } }, "node_modules/postcss": { - "version": "8.4.42", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.42.tgz", - "integrity": "sha512-hywKUQB9Ra4dR1mGhldy5Aj1X3MWDSIA1cEi+Uy0CjheLvP6Ual5RlwMCh8i/X121yEDLDIKBsrCQ8ba3FDMfQ==", + "version": "8.5.13", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.13.tgz", + "integrity": "sha512-qif0+jGGZoLWdHey3UFHHWP0H7Gbmsk8T5VEqyYFbWqPr1XqvLGBbk/sl8V5exGmcYJklJOhOQq1pV9IcsiFag==", "funding": [ { "type": "opencollective", @@ -17879,14 +17633,52 @@ ], "license": "MIT", "dependencies": { - "nanoid": "^3.3.7", - "picocolors": "^1.0.1", - "source-map-js": "^1.2.0" + "nanoid": "^3.3.11", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" }, "engines": { "node": "^10 || ^12 || >=14" } }, + "node_modules/postcss-attribute-case-insensitive": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/postcss-attribute-case-insensitive/-/postcss-attribute-case-insensitive-7.0.1.tgz", + "integrity": "sha512-Uai+SupNSqzlschRyNx3kbCTWgY/2hcwtHEI/ej2LJWc9JJ77qKgGptd8DHwY1mXtZ7Aoh4z4yxfwMBue9eNgw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT", + "dependencies": { + "postcss-selector-parser": "^7.0.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/postcss-attribute-case-insensitive/node_modules/postcss-selector-parser": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.1.tgz", + "integrity": "sha512-orRsuYpJVw8LdAwqqLykBj9ecS5/cRHlI5+nvTo8LcCKmzDmqVORXtOIYEEQuL9D4BxtA1lm5isAqzQZCoQ6Eg==", + "license": "MIT", + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/postcss-calc": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-9.0.1.tgz", @@ -17903,6 +17695,102 @@ "postcss": "^8.2.2" } }, + "node_modules/postcss-clamp": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/postcss-clamp/-/postcss-clamp-4.1.0.tgz", + "integrity": "sha512-ry4b1Llo/9zz+PKC+030KUnPITTJAHeOwjfAyyB60eT0AorGLdzp52s31OsPRHRf8NchkgFoG2y6fCfn1IV1Ow==", + "license": "MIT", + "dependencies": { + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": ">=7.6.0" + }, + "peerDependencies": { + "postcss": "^8.4.6" + } + }, + "node_modules/postcss-color-functional-notation": { + "version": "7.0.12", + "resolved": "https://registry.npmjs.org/postcss-color-functional-notation/-/postcss-color-functional-notation-7.0.12.tgz", + "integrity": "sha512-TLCW9fN5kvO/u38/uesdpbx3e8AkTYhMvDZYa9JpmImWuTE99bDQ7GU7hdOADIZsiI9/zuxfAJxny/khknp1Zw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "dependencies": { + "@csstools/css-color-parser": "^3.1.0", + "@csstools/css-parser-algorithms": "^3.0.5", + "@csstools/css-tokenizer": "^3.0.4", + "@csstools/postcss-progressive-custom-properties": "^4.2.1", + "@csstools/utilities": "^2.0.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/postcss-color-hex-alpha": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/postcss-color-hex-alpha/-/postcss-color-hex-alpha-10.0.0.tgz", + "integrity": "sha512-1kervM2cnlgPs2a8Vt/Qbe5cQ++N7rkYo/2rz2BkqJZIHQwaVuJgQH38REHrAi4uM0b1fqxMkWYmese94iMp3w==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT", + "dependencies": { + "@csstools/utilities": "^2.0.0", + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/postcss-color-rebeccapurple": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/postcss-color-rebeccapurple/-/postcss-color-rebeccapurple-10.0.0.tgz", + "integrity": "sha512-JFta737jSP+hdAIEhk1Vs0q0YF5P8fFcj+09pweS8ktuGuZ8pPlykHsk6mPxZ8awDl4TrcxUqJo9l1IhVr/OjQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "dependencies": { + "@csstools/utilities": "^2.0.0", + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, "node_modules/postcss-colormin": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-6.1.0.tgz", @@ -17937,6 +17825,142 @@ "postcss": "^8.4.31" } }, + "node_modules/postcss-custom-media": { + "version": "11.0.6", + "resolved": "https://registry.npmjs.org/postcss-custom-media/-/postcss-custom-media-11.0.6.tgz", + "integrity": "sha512-C4lD4b7mUIw+RZhtY7qUbf4eADmb7Ey8BFA2px9jUbwg7pjTZDl4KY4bvlUV+/vXQvzQRfiGEVJyAbtOsCMInw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT", + "dependencies": { + "@csstools/cascade-layer-name-parser": "^2.0.5", + "@csstools/css-parser-algorithms": "^3.0.5", + "@csstools/css-tokenizer": "^3.0.4", + "@csstools/media-query-list-parser": "^4.0.3" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/postcss-custom-properties": { + "version": "14.0.6", + "resolved": "https://registry.npmjs.org/postcss-custom-properties/-/postcss-custom-properties-14.0.6.tgz", + "integrity": "sha512-fTYSp3xuk4BUeVhxCSJdIPhDLpJfNakZKoiTDx7yRGCdlZrSJR7mWKVOBS4sBF+5poPQFMj2YdXx1VHItBGihQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT", + "dependencies": { + "@csstools/cascade-layer-name-parser": "^2.0.5", + "@csstools/css-parser-algorithms": "^3.0.5", + "@csstools/css-tokenizer": "^3.0.4", + "@csstools/utilities": "^2.0.0", + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/postcss-custom-selectors": { + "version": "8.0.5", + "resolved": "https://registry.npmjs.org/postcss-custom-selectors/-/postcss-custom-selectors-8.0.5.tgz", + "integrity": "sha512-9PGmckHQswiB2usSO6XMSswO2yFWVoCAuih1yl9FVcwkscLjRKjwsjM3t+NIWpSU2Jx3eOiK2+t4vVTQaoCHHg==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT", + "dependencies": { + "@csstools/cascade-layer-name-parser": "^2.0.5", + "@csstools/css-parser-algorithms": "^3.0.5", + "@csstools/css-tokenizer": "^3.0.4", + "postcss-selector-parser": "^7.0.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/postcss-custom-selectors/node_modules/postcss-selector-parser": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.1.tgz", + "integrity": "sha512-orRsuYpJVw8LdAwqqLykBj9ecS5/cRHlI5+nvTo8LcCKmzDmqVORXtOIYEEQuL9D4BxtA1lm5isAqzQZCoQ6Eg==", + "license": "MIT", + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-dir-pseudo-class": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/postcss-dir-pseudo-class/-/postcss-dir-pseudo-class-9.0.1.tgz", + "integrity": "sha512-tRBEK0MHYvcMUrAuYMEOa0zg9APqirBcgzi6P21OhxtJyJADo/SWBwY1CAwEohQ/6HDaa9jCjLRG7K3PVQYHEA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "dependencies": { + "postcss-selector-parser": "^7.0.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/postcss-dir-pseudo-class/node_modules/postcss-selector-parser": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.1.tgz", + "integrity": "sha512-orRsuYpJVw8LdAwqqLykBj9ecS5/cRHlI5+nvTo8LcCKmzDmqVORXtOIYEEQuL9D4BxtA1lm5isAqzQZCoQ6Eg==", + "license": "MIT", + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/postcss-discard-comments": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-6.0.2.tgz", @@ -18000,6 +18024,195 @@ "postcss": "^8.4.31" } }, + "node_modules/postcss-double-position-gradients": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/postcss-double-position-gradients/-/postcss-double-position-gradients-6.0.4.tgz", + "integrity": "sha512-m6IKmxo7FxSP5nF2l63QbCC3r+bWpFUWmZXZf096WxG0m7Vl1Q1+ruFOhpdDRmKrRS+S3Jtk+TVk/7z0+BVK6g==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "dependencies": { + "@csstools/postcss-progressive-custom-properties": "^4.2.1", + "@csstools/utilities": "^2.0.0", + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/postcss-focus-visible": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/postcss-focus-visible/-/postcss-focus-visible-10.0.1.tgz", + "integrity": "sha512-U58wyjS/I1GZgjRok33aE8juW9qQgQUNwTSdxQGuShHzwuYdcklnvK/+qOWX1Q9kr7ysbraQ6ht6r+udansalA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "dependencies": { + "postcss-selector-parser": "^7.0.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/postcss-focus-visible/node_modules/postcss-selector-parser": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.1.tgz", + "integrity": "sha512-orRsuYpJVw8LdAwqqLykBj9ecS5/cRHlI5+nvTo8LcCKmzDmqVORXtOIYEEQuL9D4BxtA1lm5isAqzQZCoQ6Eg==", + "license": "MIT", + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-focus-within": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/postcss-focus-within/-/postcss-focus-within-9.0.1.tgz", + "integrity": "sha512-fzNUyS1yOYa7mOjpci/bR+u+ESvdar6hk8XNK/TRR0fiGTp2QT5N+ducP0n3rfH/m9I7H/EQU6lsa2BrgxkEjw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "dependencies": { + "postcss-selector-parser": "^7.0.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/postcss-focus-within/node_modules/postcss-selector-parser": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.1.tgz", + "integrity": "sha512-orRsuYpJVw8LdAwqqLykBj9ecS5/cRHlI5+nvTo8LcCKmzDmqVORXtOIYEEQuL9D4BxtA1lm5isAqzQZCoQ6Eg==", + "license": "MIT", + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-font-variant": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/postcss-font-variant/-/postcss-font-variant-5.0.0.tgz", + "integrity": "sha512-1fmkBaCALD72CK2a9i468mA/+tr9/1cBxRRMXOUaZqO43oWPR5imcyPjXwuv7PXbCid4ndlP5zWhidQVVa3hmA==", + "license": "MIT", + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/postcss-gap-properties": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/postcss-gap-properties/-/postcss-gap-properties-6.0.0.tgz", + "integrity": "sha512-Om0WPjEwiM9Ru+VhfEDPZJAKWUd0mV1HmNXqp2C29z80aQ2uP9UVhLc7e3aYMIor/S5cVhoPgYQ7RtfeZpYTRw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/postcss-image-set-function": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/postcss-image-set-function/-/postcss-image-set-function-7.0.0.tgz", + "integrity": "sha512-QL7W7QNlZuzOwBTeXEmbVckNt1FSmhQtbMRvGGqqU4Nf4xk6KUEQhAoWuMzwbSv5jxiRiSZ5Tv7eiDB9U87znA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "dependencies": { + "@csstools/utilities": "^2.0.0", + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/postcss-lab-function": { + "version": "7.0.12", + "resolved": "https://registry.npmjs.org/postcss-lab-function/-/postcss-lab-function-7.0.12.tgz", + "integrity": "sha512-tUcyRk1ZTPec3OuKFsqtRzW2Go5lehW29XA21lZ65XmzQkz43VY2tyWEC202F7W3mILOjw0voOiuxRGTsN+J9w==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "dependencies": { + "@csstools/css-color-parser": "^3.1.0", + "@csstools/css-parser-algorithms": "^3.0.5", + "@csstools/css-tokenizer": "^3.0.4", + "@csstools/postcss-progressive-custom-properties": "^4.2.1", + "@csstools/utilities": "^2.0.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, "node_modules/postcss-loader": { "version": "7.3.4", "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-7.3.4.tgz", @@ -18022,6 +18235,31 @@ "webpack": "^5.0.0" } }, + "node_modules/postcss-logical": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/postcss-logical/-/postcss-logical-8.1.0.tgz", + "integrity": "sha512-pL1hXFQ2fEXNKiNiAgtfA005T9FBxky5zkX6s4GZM2D8RkVgRqz3f4g1JUoq925zXv495qk8UNldDwh8uGEDoA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "dependencies": { + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, "node_modules/postcss-merge-idents": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/postcss-merge-idents/-/postcss-merge-idents-6.0.3.tgz", @@ -18149,13 +18387,13 @@ } }, "node_modules/postcss-modules-local-by-default": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.5.tgz", - "integrity": "sha512-6MieY7sIfTK0hYfafw1OMEG+2bg8Q1ocHCpoWLqOKj3JXlKu4G7btkmM/B7lFubYkYWmRSPLZi5chid63ZaZYw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.2.0.tgz", + "integrity": "sha512-5kcJm/zk+GJDSfw+V/42fJ5fhjL5YbFDl8nVdXkJPLLW+Vf9mTD5Xe0wqIaDnLuL2U6cDNpTr+UQ+v2HWIBhzw==", "license": "MIT", "dependencies": { "icss-utils": "^5.0.0", - "postcss-selector-parser": "^6.0.2", + "postcss-selector-parser": "^7.0.0", "postcss-value-parser": "^4.1.0" }, "engines": { @@ -18165,13 +18403,26 @@ "postcss": "^8.1.0" } }, + "node_modules/postcss-modules-local-by-default/node_modules/postcss-selector-parser": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.1.tgz", + "integrity": "sha512-orRsuYpJVw8LdAwqqLykBj9ecS5/cRHlI5+nvTo8LcCKmzDmqVORXtOIYEEQuL9D4BxtA1lm5isAqzQZCoQ6Eg==", + "license": "MIT", + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/postcss-modules-scope": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.2.0.tgz", - "integrity": "sha512-oq+g1ssrsZOsx9M96c5w8laRmvEu9C3adDSjI8oTcbfkrTE8hx/zfyobUoWIxaKPO8bt6S62kxpw5GqypEw1QQ==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.2.1.tgz", + "integrity": "sha512-m9jZstCVaqGjTAuny8MdgE88scJnCiQSlSrOWcTQgM2t32UBe+MUmFSO5t7VMSfAf/FJKImAxBav8ooCHJXCJA==", "license": "ISC", "dependencies": { - "postcss-selector-parser": "^6.0.4" + "postcss-selector-parser": "^7.0.0" }, "engines": { "node": "^10 || ^12 || >= 14" @@ -18180,6 +18431,19 @@ "postcss": "^8.1.0" } }, + "node_modules/postcss-modules-scope/node_modules/postcss-selector-parser": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.1.tgz", + "integrity": "sha512-orRsuYpJVw8LdAwqqLykBj9ecS5/cRHlI5+nvTo8LcCKmzDmqVORXtOIYEEQuL9D4BxtA1lm5isAqzQZCoQ6Eg==", + "license": "MIT", + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/postcss-modules-values": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz", @@ -18195,6 +18459,90 @@ "postcss": "^8.1.0" } }, + "node_modules/postcss-nesting": { + "version": "13.0.2", + "resolved": "https://registry.npmjs.org/postcss-nesting/-/postcss-nesting-13.0.2.tgz", + "integrity": "sha512-1YCI290TX+VP0U/K/aFxzHzQWHWURL+CtHMSbex1lCdpXD1SoR2sYuxDu5aNI9lPoXpKTCggFZiDJbwylU0LEQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "dependencies": { + "@csstools/selector-resolve-nested": "^3.1.0", + "@csstools/selector-specificity": "^5.0.0", + "postcss-selector-parser": "^7.0.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/postcss-nesting/node_modules/@csstools/selector-resolve-nested": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@csstools/selector-resolve-nested/-/selector-resolve-nested-3.1.0.tgz", + "integrity": "sha512-mf1LEW0tJLKfWyvn5KdDrhpxHyuxpbNwTIwOYLIvsTffeyOf85j5oIzfG0yosxDgx/sswlqBnESYUcQH0vgZ0g==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss-selector-parser": "^7.0.0" + } + }, + "node_modules/postcss-nesting/node_modules/@csstools/selector-specificity": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-5.0.0.tgz", + "integrity": "sha512-PCqQV3c4CoVm3kdPhyeZ07VmBRdH2EpMFA/pd9OASpOEC3aXNGoqPDAZ80D0cLpMBxnmk0+yNhGsEx31hq7Gtw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss-selector-parser": "^7.0.0" + } + }, + "node_modules/postcss-nesting/node_modules/postcss-selector-parser": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.1.tgz", + "integrity": "sha512-orRsuYpJVw8LdAwqqLykBj9ecS5/cRHlI5+nvTo8LcCKmzDmqVORXtOIYEEQuL9D4BxtA1lm5isAqzQZCoQ6Eg==", + "license": "MIT", + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/postcss-normalize-charset": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-6.0.2.tgz", @@ -18328,6 +18676,28 @@ "postcss": "^8.4.31" } }, + "node_modules/postcss-opacity-percentage": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/postcss-opacity-percentage/-/postcss-opacity-percentage-3.0.0.tgz", + "integrity": "sha512-K6HGVzyxUxd/VgZdX04DCtdwWJ4NGLG212US4/LA1TLAbHgmAsTWVR86o+gGIbFtnTkfOpb9sCRBx8K7HO66qQ==", + "funding": [ + { + "type": "kofi", + "url": "https://ko-fi.com/mrcgrtz" + }, + { + "type": "liberapay", + "url": "https://liberapay.com/mrcgrtz" + } + ], + "license": "MIT", + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, "node_modules/postcss-ordered-values": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-6.0.2.tgz", @@ -18344,6 +18714,198 @@ "postcss": "^8.4.31" } }, + "node_modules/postcss-overflow-shorthand": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/postcss-overflow-shorthand/-/postcss-overflow-shorthand-6.0.0.tgz", + "integrity": "sha512-BdDl/AbVkDjoTofzDQnwDdm/Ym6oS9KgmO7Gr+LHYjNWJ6ExORe4+3pcLQsLA9gIROMkiGVjjwZNoL/mpXHd5Q==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "dependencies": { + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/postcss-page-break": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/postcss-page-break/-/postcss-page-break-3.0.4.tgz", + "integrity": "sha512-1JGu8oCjVXLa9q9rFTo4MbeeA5FMe00/9C7lN4va606Rdb+HkxXtXsmEDrIraQ11fGz/WvKWa8gMuCKkrXpTsQ==", + "license": "MIT", + "peerDependencies": { + "postcss": "^8" + } + }, + "node_modules/postcss-place": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/postcss-place/-/postcss-place-10.0.0.tgz", + "integrity": "sha512-5EBrMzat2pPAxQNWYavwAfoKfYcTADJ8AXGVPcUZ2UkNloUTWzJQExgrzrDkh3EKzmAx1evfTAzF9I8NGcc+qw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "dependencies": { + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/postcss-preset-env": { + "version": "10.6.1", + "resolved": "https://registry.npmjs.org/postcss-preset-env/-/postcss-preset-env-10.6.1.tgz", + "integrity": "sha512-yrk74d9EvY+W7+lO9Aj1QmjWY9q5NsKjK2V9drkOPZB/X6KZ0B3igKsHUYakb7oYVhnioWypQX3xGuePf89f3g==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "dependencies": { + "@csstools/postcss-alpha-function": "^1.0.1", + "@csstools/postcss-cascade-layers": "^5.0.2", + "@csstools/postcss-color-function": "^4.0.12", + "@csstools/postcss-color-function-display-p3-linear": "^1.0.1", + "@csstools/postcss-color-mix-function": "^3.0.12", + "@csstools/postcss-color-mix-variadic-function-arguments": "^1.0.2", + "@csstools/postcss-content-alt-text": "^2.0.8", + "@csstools/postcss-contrast-color-function": "^2.0.12", + "@csstools/postcss-exponential-functions": "^2.0.9", + "@csstools/postcss-font-format-keywords": "^4.0.0", + "@csstools/postcss-gamut-mapping": "^2.0.11", + "@csstools/postcss-gradients-interpolation-method": "^5.0.12", + "@csstools/postcss-hwb-function": "^4.0.12", + "@csstools/postcss-ic-unit": "^4.0.4", + "@csstools/postcss-initial": "^2.0.1", + "@csstools/postcss-is-pseudo-class": "^5.0.3", + "@csstools/postcss-light-dark-function": "^2.0.11", + "@csstools/postcss-logical-float-and-clear": "^3.0.0", + "@csstools/postcss-logical-overflow": "^2.0.0", + "@csstools/postcss-logical-overscroll-behavior": "^2.0.0", + "@csstools/postcss-logical-resize": "^3.0.0", + "@csstools/postcss-logical-viewport-units": "^3.0.4", + "@csstools/postcss-media-minmax": "^2.0.9", + "@csstools/postcss-media-queries-aspect-ratio-number-values": "^3.0.5", + "@csstools/postcss-nested-calc": "^4.0.0", + "@csstools/postcss-normalize-display-values": "^4.0.1", + "@csstools/postcss-oklab-function": "^4.0.12", + "@csstools/postcss-position-area-property": "^1.0.0", + "@csstools/postcss-progressive-custom-properties": "^4.2.1", + "@csstools/postcss-property-rule-prelude-list": "^1.0.0", + "@csstools/postcss-random-function": "^2.0.1", + "@csstools/postcss-relative-color-syntax": "^3.0.12", + "@csstools/postcss-scope-pseudo-class": "^4.0.1", + "@csstools/postcss-sign-functions": "^1.1.4", + "@csstools/postcss-stepped-value-functions": "^4.0.9", + "@csstools/postcss-syntax-descriptor-syntax-production": "^1.0.1", + "@csstools/postcss-system-ui-font-family": "^1.0.0", + "@csstools/postcss-text-decoration-shorthand": "^4.0.3", + "@csstools/postcss-trigonometric-functions": "^4.0.9", + "@csstools/postcss-unset-value": "^4.0.0", + "autoprefixer": "^10.4.23", + "browserslist": "^4.28.1", + "css-blank-pseudo": "^7.0.1", + "css-has-pseudo": "^7.0.3", + "css-prefers-color-scheme": "^10.0.0", + "cssdb": "^8.6.0", + "postcss-attribute-case-insensitive": "^7.0.1", + "postcss-clamp": "^4.1.0", + "postcss-color-functional-notation": "^7.0.12", + "postcss-color-hex-alpha": "^10.0.0", + "postcss-color-rebeccapurple": "^10.0.0", + "postcss-custom-media": "^11.0.6", + "postcss-custom-properties": "^14.0.6", + "postcss-custom-selectors": "^8.0.5", + "postcss-dir-pseudo-class": "^9.0.1", + "postcss-double-position-gradients": "^6.0.4", + "postcss-focus-visible": "^10.0.1", + "postcss-focus-within": "^9.0.1", + "postcss-font-variant": "^5.0.0", + "postcss-gap-properties": "^6.0.0", + "postcss-image-set-function": "^7.0.0", + "postcss-lab-function": "^7.0.12", + "postcss-logical": "^8.1.0", + "postcss-nesting": "^13.0.2", + "postcss-opacity-percentage": "^3.0.0", + "postcss-overflow-shorthand": "^6.0.0", + "postcss-page-break": "^3.0.4", + "postcss-place": "^10.0.0", + "postcss-pseudo-class-any-link": "^10.0.1", + "postcss-replace-overflow-wrap": "^4.0.0", + "postcss-selector-not": "^8.0.1" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/postcss-pseudo-class-any-link": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/postcss-pseudo-class-any-link/-/postcss-pseudo-class-any-link-10.0.1.tgz", + "integrity": "sha512-3el9rXlBOqTFaMFkWDOkHUTQekFIYnaQY55Rsp8As8QQkpiSgIYEcF/6Ond93oHiDsGb4kad8zjt+NPlOC1H0Q==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "dependencies": { + "postcss-selector-parser": "^7.0.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/postcss-pseudo-class-any-link/node_modules/postcss-selector-parser": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.1.tgz", + "integrity": "sha512-orRsuYpJVw8LdAwqqLykBj9ecS5/cRHlI5+nvTo8LcCKmzDmqVORXtOIYEEQuL9D4BxtA1lm5isAqzQZCoQ6Eg==", + "license": "MIT", + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/postcss-reduce-idents": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/postcss-reduce-idents/-/postcss-reduce-idents-6.0.3.tgz", @@ -18390,6 +18952,53 @@ "postcss": "^8.4.31" } }, + "node_modules/postcss-replace-overflow-wrap": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/postcss-replace-overflow-wrap/-/postcss-replace-overflow-wrap-4.0.0.tgz", + "integrity": "sha512-KmF7SBPphT4gPPcKZc7aDkweHiKEEO8cla/GjcBK+ckKxiZslIu3C4GCRW3DNfL0o7yW7kMQu9xlZ1kXRXLXtw==", + "license": "MIT", + "peerDependencies": { + "postcss": "^8.0.3" + } + }, + "node_modules/postcss-selector-not": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/postcss-selector-not/-/postcss-selector-not-8.0.1.tgz", + "integrity": "sha512-kmVy/5PYVb2UOhy0+LqUYAhKj7DUGDpSWa5LZqlkWJaaAV+dxxsOG3+St0yNLu6vsKD7Dmqx+nWQt0iil89+WA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT", + "dependencies": { + "postcss-selector-parser": "^7.0.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/postcss-selector-not/node_modules/postcss-selector-parser": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.1.tgz", + "integrity": "sha512-orRsuYpJVw8LdAwqqLykBj9ecS5/cRHlI5+nvTo8LcCKmzDmqVORXtOIYEEQuL9D4BxtA1lm5isAqzQZCoQ6Eg==", + "license": "MIT", + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/postcss-selector-parser": { "version": "6.1.2", "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz", @@ -18486,23 +19095,23 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">= 0.8.0" } }, "node_modules/prettier": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", - "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "version": "3.8.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.8.1.tgz", + "integrity": "sha512-UOnG6LftzbdaHZcKoPFtOcCKztrQ57WkHDeRD9t/PTQtmT0NHSeWWepj6pS0z/N7+08BHFDQVUrfmfMRcZwbMg==", "dev": true, "license": "MIT", "bin": { - "prettier": "bin-prettier.js" + "prettier": "bin/prettier.cjs" }, "engines": { - "node": ">=10.13.0" + "node": ">=14" }, "funding": { "url": "https://github.com/prettier/prettier?sponsor=1" @@ -18528,9 +19137,9 @@ } }, "node_modules/prism-react-renderer": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/prism-react-renderer/-/prism-react-renderer-2.4.0.tgz", - "integrity": "sha512-327BsVCD/unU4CNLZTWVHyUHKnsqcvj2qbPlQ8MiBE2eq2rgctjigPA1Gp9HLF83kZ20zNN6jgizHJeEsyFYOw==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/prism-react-renderer/-/prism-react-renderer-2.4.1.tgz", + "integrity": "sha512-ey8Ls/+Di31eqzUxC46h8MksNuGx/n0AAC8uKpwFau4RPDYLuE3EXTp8N8G2vX2N7UC/+IXeNUnlWBGGcAG+Ig==", "license": "MIT", "dependencies": { "@types/prismjs": "^1.26.0", @@ -18541,9 +19150,9 @@ } }, "node_modules/prismjs": { - "version": "1.29.0", - "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.29.0.tgz", - "integrity": "sha512-Kx/1w86q/epKcmte75LNrEoT+lX8pBpavuAbvJWRXar7Hz8jrtF+e3vY751p0R8H9HdArwaCTNDDzHg/ScJK1Q==", + "version": "1.30.0", + "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.30.0.tgz", + "integrity": "sha512-DEvV2ZF2r2/63V+tK8hQvrR2ZGn10srHbXviTlcv7Kpzw8jWiNTqbVgjO3IY8RxrrOUF8VPMQQFysYYYv0YZxw==", "license": "MIT", "engines": { "node": ">=6" @@ -18611,9 +19220,9 @@ } }, "node_modules/property-information": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/property-information/-/property-information-6.5.0.tgz", - "integrity": "sha512-PgTgs/BlvHxOu8QuEN7wi5A0OmXaBcHpmCSTehcs6Uuu9IkDIEo13Hy7n898RHfrQ49vKCoGeWZSaAK01nwVig==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/property-information/-/property-information-7.1.0.tgz", + "integrity": "sha512-TwEZ+X+yCJmYfL7TPUOcvBZ4QfoT5YenQiJuX//0th53DE6w0xxLEtfK3iyryQFddXuvkIk51EEgrJQ0WJkOmQ==", "license": "MIT", "funding": { "type": "github", @@ -18649,15 +19258,18 @@ } }, "node_modules/punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==", - "license": "MIT" + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "license": "MIT", + "engines": { + "node": ">=6" + } }, "node_modules/pupa": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/pupa/-/pupa-3.1.0.tgz", - "integrity": "sha512-FLpr4flz5xZTSJxSeaheeMKN/EDzMdK7b8PTOC6a5PYFKTucWbdqjgqaEyH0shFiSJrVB1+Qqi4Tk19ccU6Aug==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/pupa/-/pupa-3.3.0.tgz", + "integrity": "sha512-LjgDO2zPtoXP2wJpDjZrGdojii1uqO0cnwKoIoUzkfS98HDmbeiGmYiXo3lXeFlq2xvne1QFQhwYXSUCLKtEuA==", "license": "MIT", "dependencies": { "escape-goat": "^4.0.0" @@ -18669,13 +19281,31 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/pvtsutils": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/pvtsutils/-/pvtsutils-1.3.6.tgz", + "integrity": "sha512-PLgQXQ6H2FWCaeRak8vvk1GW462lMxB5s3Jm673N82zI4vqtVUPuZdffdZbPDFRoU8kAhItWFtPCWiPpp4/EDg==", + "license": "MIT", + "dependencies": { + "tslib": "^2.8.1" + } + }, + "node_modules/pvutils": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/pvutils/-/pvutils-1.1.5.tgz", + "integrity": "sha512-KTqnxsgGiQ6ZAzZCVlJH5eOjSnvlyEgx1m8bkRJfOhmGRqfo5KLvmAlACQkrjEtOQ4B7wF9TdSLIs9O90MX9xA==", + "license": "MIT", + "engines": { + "node": ">=16.0.0" + } + }, "node_modules/qs": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", - "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "version": "6.15.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.15.2.tgz", + "integrity": "sha512-Rzq0KEyX/w/tEybncDgdkZrJgVUsUMk3xjh3t5bv3S1HTAtg+uOYt72+ZfwiQwKdysThkTBdL/rTi6HDmX9Ddw==", "license": "BSD-3-Clause", "dependencies": { - "side-channel": "^1.0.4" + "side-channel": "^1.1.0" }, "engines": { "node": ">=0.6" @@ -18684,15 +19314,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/queue": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/queue/-/queue-6.0.2.tgz", - "integrity": "sha512-iHZWu+q3IdFZFX36ro/lKBkSvfkztY5Y7HMiPlOUjhupPcG2JMfst2KKEpu5XndviX/3UhFbRngUPNKtgvtZiA==", - "license": "MIT", - "dependencies": { - "inherits": "~2.0.3" - } - }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -18744,15 +19365,15 @@ } }, "node_modules/raw-body": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", - "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.3.tgz", + "integrity": "sha512-s4VSOf6yN0rvbRZGxs8Om5CWj6seneMwK3oDb4lWDH0UPhWcxwOWw5+qk24bxq87szX1ydrwylIOp2uG1ojUpA==", "license": "MIT", "dependencies": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" + "bytes": "~3.1.2", + "http-errors": "~2.0.1", + "iconv-lite": "~0.4.24", + "unpipe": "~1.0.0" }, "engines": { "node": ">= 0.8" @@ -18794,6 +19415,12 @@ "rc": "cli.js" } }, + "node_modules/rc/node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "license": "ISC" + }, "node_modules/rc/node_modules/strip-json-comments": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", @@ -18825,60 +19452,16 @@ } }, "node_modules/react-copy-to-clipboard": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/react-copy-to-clipboard/-/react-copy-to-clipboard-5.1.0.tgz", - "integrity": "sha512-k61RsNgAayIJNoy9yDsYzDe/yAZAzEbEgcz3DZMhF686LEyukcE1hzurxe85JandPUG+yTfGVFzuEw3xt8WP/A==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/react-copy-to-clipboard/-/react-copy-to-clipboard-5.1.1.tgz", + "integrity": "sha512-s+HrzLyJBxrpGTYXF15dTgMjAJpEPZT/Yp6NytAtZMRngejxt6Pt5WrfFxLAcsqUDU6sY1Jz6tyHwIicE1U2Xg==", "license": "MIT", "dependencies": { - "copy-to-clipboard": "^3.3.1", + "copy-to-clipboard": "^3.3.3", "prop-types": "^15.8.1" }, "peerDependencies": { - "react": "^15.3.0 || 16 || 17 || 18" - } - }, - "node_modules/react-dev-utils": { - "version": "12.0.1", - "resolved": "https://registry.npmjs.org/react-dev-utils/-/react-dev-utils-12.0.1.tgz", - "integrity": "sha512-84Ivxmr17KjUupyqzFode6xKhjwuEJDROWKJy/BthkL7Wn6NJ8h4WE6k/exAv6ImS+0oZLRRW5j/aINMHyeGeQ==", - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.16.0", - "address": "^1.1.2", - "browserslist": "^4.18.1", - "chalk": "^4.1.2", - "cross-spawn": "^7.0.3", - "detect-port-alt": "^1.1.6", - "escape-string-regexp": "^4.0.0", - "filesize": "^8.0.6", - "find-up": "^5.0.0", - "fork-ts-checker-webpack-plugin": "^6.5.0", - "global-modules": "^2.0.0", - "globby": "^11.0.4", - "gzip-size": "^6.0.0", - "immer": "^9.0.7", - "is-root": "^2.1.0", - "loader-utils": "^3.2.0", - "open": "^8.4.0", - "pkg-up": "^3.1.0", - "prompts": "^2.4.2", - "react-error-overlay": "^6.0.11", - "recursive-readdir": "^2.2.2", - "shell-quote": "^1.7.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" - }, - "engines": { - "node": ">=14" - } - }, - "node_modules/react-dev-utils/node_modules/loader-utils": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-3.3.1.tgz", - "integrity": "sha512-FMJTLMXfCLMLfJxcX9PFqX5qD88Z5MRGaZCVzfuqeZSPsyiBzs+pahDQjbIWz2QIzPZz0NX9Zy4FX3lmK6YHIg==", - "license": "MIT", - "engines": { - "node": ">= 12.13.0" + "react": ">=15.3.0" } }, "node_modules/react-dom": { @@ -18894,12 +19477,6 @@ "react": "^18.3.1" } }, - "node_modules/react-error-overlay": { - "version": "6.0.11", - "resolved": "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-6.0.11.tgz", - "integrity": "sha512-/6UZ2qgEyH2aqzYZgQPxEnz33NJ2gNsnHA2o5+o4wW9bLM/JYQitNP9xPhsXwC08hMMovfGe/8retsdDsczPRg==", - "license": "MIT" - }, "node_modules/react-fast-compare": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/react-fast-compare/-/react-fast-compare-3.2.2.tgz", @@ -18907,9 +19484,10 @@ "license": "MIT" }, "node_modules/react-helmet-async": { + "name": "@slorber/react-helmet-async", "version": "1.3.0", - "resolved": "https://registry.npmjs.org/react-helmet-async/-/react-helmet-async-1.3.0.tgz", - "integrity": "sha512-9jZ57/dAn9t3q6hneQS0wukqC2ENOBgMNVEhb/ZG9ZSxUetzVIw4iAmEU38IaVg3QGYauQPhSeUTuIUtFglWpg==", + "resolved": "https://registry.npmjs.org/@slorber/react-helmet-async/-/react-helmet-async-1.3.0.tgz", + "integrity": "sha512-e9/OK8VhwUSc67diWI8Rb3I0YgI9/SBQtnhe9aEuK6MhZm7ntZZimXgwXnd8W96YTmSOb9M4d8LwhRZyhWr/1A==", "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.12.5", @@ -18919,8 +19497,8 @@ "shallowequal": "^1.1.0" }, "peerDependencies": { - "react": "^16.6.0 || ^17.0.0 || ^18.0.0", - "react-dom": "^16.6.0 || ^17.0.0 || ^18.0.0" + "react": "^16.6.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^16.6.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "node_modules/react-is": { @@ -18930,15 +19508,15 @@ "license": "MIT" }, "node_modules/react-json-view-lite": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/react-json-view-lite/-/react-json-view-lite-1.4.0.tgz", - "integrity": "sha512-wh6F6uJyYAmQ4fK0e8dSQMEWuvTs2Wr3el3sLD9bambX1+pSWUVXIz1RFaoy3TI1mZ0FqdpKq9YgbgTTgyrmXA==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/react-json-view-lite/-/react-json-view-lite-2.5.0.tgz", + "integrity": "sha512-tk7o7QG9oYyELWHL8xiMQ8x4WzjCzbWNyig3uexmkLb54r8jO0yH3WCWx8UZS0c49eSA4QUmG5caiRJ8fAn58g==", "license": "MIT", "engines": { - "node": ">=14" + "node": ">=18" }, "peerDependencies": { - "react": "^16.13.1 || ^17.0.0 || ^18.0.0" + "react": "^18.0.0 || ^19.0.0" } }, "node_modules/react-loadable": { @@ -18955,9 +19533,9 @@ } }, "node_modules/react-loadable-ssr-addon-v5-slorber": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/react-loadable-ssr-addon-v5-slorber/-/react-loadable-ssr-addon-v5-slorber-1.0.1.tgz", - "integrity": "sha512-lq3Lyw1lGku8zUEJPDxsNm1AfYHBrO9Y1+olAYwpUJ2IGFBskM0DMKok97A6LWUpHm+o7IvQBOWu9MLenp9Z+A==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/react-loadable-ssr-addon-v5-slorber/-/react-loadable-ssr-addon-v5-slorber-1.0.3.tgz", + "integrity": "sha512-GXfh9VLwB5ERaCsU6RULh7tkemeX15aNh6wuMEBtfdyMa7fFG8TXrhXlx1SoEK2Ty/l6XIkzzYIQmyaWW3JgdQ==", "license": "MIT", "dependencies": { "@babel/runtime": "^7.10.3" @@ -19022,9 +19600,9 @@ } }, "node_modules/react-toastify": { - "version": "10.0.5", - "resolved": "https://registry.npmjs.org/react-toastify/-/react-toastify-10.0.5.tgz", - "integrity": "sha512-mNKt2jBXJg4O7pSdbNUfDdTsK9FIdikfsIE/yUCxbAEXl4HMyJaivrVFcn3Elvt5xvCQYhUZm+hqTIu1UXM3Pw==", + "version": "10.0.6", + "resolved": "https://registry.npmjs.org/react-toastify/-/react-toastify-10.0.6.tgz", + "integrity": "sha512-yYjp+omCDf9lhZcrZHKbSq7YMuK0zcYkDFTzfRFgTXkTFHZ1ToxwAonzA4JI5CxA91JpjFLmwEsZEgfYfOqI1A==", "license": "MIT", "dependencies": { "clsx": "^2.1.0" @@ -19084,49 +19662,94 @@ "node": ">=8.10.0" } }, - "node_modules/reading-time": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/reading-time/-/reading-time-1.5.0.tgz", - "integrity": "sha512-onYyVhBNr4CmAxFsKS7bz+uTLRakypIe4R+5A824vBSkQy/hB3fZepoVEf8OVAxzLvK+H/jm9TzpI3ETSm64Kg==", - "license": "MIT" - }, - "node_modules/rechoir": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==", - "dependencies": { - "resolve": "^1.1.6" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/recursive-readdir": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/recursive-readdir/-/recursive-readdir-2.2.3.tgz", - "integrity": "sha512-8HrF5ZsXk5FAH9dgsx3BlUer73nIhuj+9OrQwEbLTPOBzGkL1lsFCR01am+v+0m2Cmbs1nP12hLDl5FA7EszKA==", + "node_modules/recma-build-jsx": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/recma-build-jsx/-/recma-build-jsx-1.0.0.tgz", + "integrity": "sha512-8GtdyqaBcDfva+GUKDr3nev3VpKAhup1+RvkMvUxURHpW7QyIvk9F5wz7Vzo06CEMSilw6uArgRqhpiUcWp8ew==", "license": "MIT", "dependencies": { - "minimatch": "^3.0.5" + "@types/estree": "^1.0.0", + "estree-util-build-jsx": "^3.0.0", + "vfile": "^6.0.0" }, - "engines": { - "node": ">=6.0.0" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, + "node_modules/recma-jsx": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/recma-jsx/-/recma-jsx-1.0.1.tgz", + "integrity": "sha512-huSIy7VU2Z5OLv6oFLosQGGDqPqdO1iq6bWNAdhzMxSJP7RAso4fCZ1cKu8j9YHCZf3TPrq4dw3okhrylgcd7w==", + "license": "MIT", + "dependencies": { + "acorn-jsx": "^5.0.0", + "estree-util-to-js": "^2.0.0", + "recma-parse": "^1.0.0", + "recma-stringify": "^1.0.0", + "unified": "^11.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + }, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/recma-parse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/recma-parse/-/recma-parse-1.0.0.tgz", + "integrity": "sha512-OYLsIGBB5Y5wjnSnQW6t3Xg7q3fQ7FWbw/vcXtORTnyaSFscOtABg+7Pnz6YZ6c27fG1/aN8CjfwoUEUIdwqWQ==", + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0", + "esast-util-from-js": "^2.0.0", + "unified": "^11.0.0", + "vfile": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/recma-stringify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/recma-stringify/-/recma-stringify-1.0.0.tgz", + "integrity": "sha512-cjwII1MdIIVloKvC9ErQ+OgAtwHBmcZ0Bg4ciz78FtbT8In39aAYbaA7zvxQ61xVMSPE8WxhLwLbhif4Js2C+g==", + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0", + "estree-util-to-js": "^2.0.0", + "unified": "^11.0.0", + "vfile": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/reflect-metadata": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.2.2.tgz", + "integrity": "sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q==", + "license": "Apache-2.0" + }, "node_modules/reflect.getprototypeof": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.6.tgz", - "integrity": "sha512-fmfw4XgoDke3kdI6h4xcUz1dG8uaiv5q9gcEwLS4Pnth2kxT+GZ7YehS1JTMGBQmtV7Y4GFGbs2re2NqhdozUg==", + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz", + "integrity": "sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", "define-properties": "^1.2.1", - "es-abstract": "^1.23.1", + "es-abstract": "^1.23.9", "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4", - "globalthis": "^1.0.3", - "which-builtin-type": "^1.1.3" + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.7", + "get-proto": "^1.0.1", + "which-builtin-type": "^1.2.1" }, "engines": { "node": ">= 0.4" @@ -19142,9 +19765,9 @@ "license": "MIT" }, "node_modules/regenerate-unicode-properties": { - "version": "10.1.1", - "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.1.tgz", - "integrity": "sha512-X007RyZLsCJVVrjgEFVpLUTZwyOZk3oiL75ZcuYjlIWd6rNJtOjkBwQc5AsRrpbKVkxN6sklw/k/9m2jJYOf8Q==", + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.2.2.tgz", + "integrity": "sha512-m03P+zhBeQd1RGnYxrGyDAPpWX/epKirLrp8e3qevZdVkKtnCrjjWczIbYc8+xd6vcTStVlqfycTx1KR4LOr0g==", "license": "MIT", "dependencies": { "regenerate": "^1.4.2" @@ -19153,32 +19776,19 @@ "node": ">=4" } }, - "node_modules/regenerator-runtime": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", - "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", - "license": "MIT" - }, - "node_modules/regenerator-transform": { - "version": "0.15.2", - "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.15.2.tgz", - "integrity": "sha512-hfMp2BoF0qOk3uc5V20ALGDS2ddjQaLrdl7xrGXvAIow7qeWRM2VA2HuCHkUKk9slq3VwEwLNK3DFBqDfPGYtg==", - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.8.4" - } - }, "node_modules/regexp.prototype.flags": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", - "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==", + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz", + "integrity": "sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.6", + "call-bind": "^1.0.8", "define-properties": "^1.2.1", "es-errors": "^1.3.0", - "set-function-name": "^2.0.1" + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "set-function-name": "^2.0.2" }, "engines": { "node": ">= 0.4" @@ -19188,29 +19798,29 @@ } }, "node_modules/regexpu-core": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.3.2.tgz", - "integrity": "sha512-RAM5FlZz+Lhmo7db9L298p2vHP5ZywrVXmVXpmAD9GuL5MPH6t9ROw1iA/wfHkQ76Qe7AaPF0nGuim96/IrQMQ==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-6.4.0.tgz", + "integrity": "sha512-0ghuzq67LI9bLXpOX/ISfve/Mq33a4aFRzoQYhnnok1JOFpmE/A2TBGkNVenOGEeSBCjIiWcc6MVOG5HEQv0sA==", "license": "MIT", "dependencies": { - "@babel/regjsgen": "^0.8.0", "regenerate": "^1.4.2", - "regenerate-unicode-properties": "^10.1.0", - "regjsparser": "^0.9.1", + "regenerate-unicode-properties": "^10.2.2", + "regjsgen": "^0.8.0", + "regjsparser": "^0.13.0", "unicode-match-property-ecmascript": "^2.0.0", - "unicode-match-property-value-ecmascript": "^2.1.0" + "unicode-match-property-value-ecmascript": "^2.2.1" }, "engines": { "node": ">=4" } }, "node_modules/registry-auth-token": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-5.0.2.tgz", - "integrity": "sha512-o/3ikDxtXaA59BmZuZrJZDJv8NMDGSj+6j6XaeBmHw8eY1i1qd9+6H+LjVvQXx3HN6aRCGa1cUdJ9RaJZUugnQ==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-5.1.1.tgz", + "integrity": "sha512-P7B4+jq8DeD2nMsAcdfaqHbssgHtZ7Z5+++a5ask90fvmJ8p5je4mOa+wzu+DB4vQ5tdJV/xywY+UnVFeQLV5Q==", "license": "MIT", "dependencies": { - "@pnpm/npm-conf": "^2.1.0" + "@pnpm/npm-conf": "^3.0.2" }, "engines": { "node": ">=14" @@ -19231,26 +19841,24 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/regjsgen": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.8.0.tgz", + "integrity": "sha512-RvwtGe3d7LvWiDQXeQw8p5asZUmfU1G/l6WbUXeHta7Y2PEIvBTwH6E2EfmYUK8pxcxEdEmaomqyp0vZZ7C+3Q==", + "license": "MIT" + }, "node_modules/regjsparser": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.9.1.tgz", - "integrity": "sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ==", + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.13.0.tgz", + "integrity": "sha512-NZQZdC5wOE/H3UT28fVGL+ikOZcEzfMGk/c3iN9UGxzWHMa1op7274oyiUVrAG4B2EuFhus8SvkaYnhvW92p9Q==", "license": "BSD-2-Clause", "dependencies": { - "jsesc": "~0.5.0" + "jsesc": "~3.1.0" }, "bin": { "regjsparser": "bin/parser" } }, - "node_modules/regjsparser/node_modules/jsesc": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", - "integrity": "sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==", - "bin": { - "jsesc": "bin/jsesc" - } - }, "node_modules/rehype-raw": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/rehype-raw/-/rehype-raw-7.0.0.tgz", @@ -19266,6 +19874,21 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/rehype-recma": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/rehype-recma/-/rehype-recma-1.0.0.tgz", + "integrity": "sha512-lqA4rGUf1JmacCNWWZx0Wv1dHqMwxzsDWYMTowuplHF3xH0N/MmrZ/G3BDZnzAkRmxDadujCjaKM2hqYdCBOGw==", + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0", + "@types/hast": "^3.0.0", + "hast-util-to-estree": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/relateurl": { "version": "0.2.7", "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", @@ -19276,9 +19899,9 @@ } }, "node_modules/remark-directive": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/remark-directive/-/remark-directive-3.0.0.tgz", - "integrity": "sha512-l1UyWJ6Eg1VPU7Hm/9tt0zKtReJQNOA4+iDMAxTyZNWnJnFlbS/7zhiel/rogTLQ2vMYwDzSJa4BiVNqGlqIMA==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/remark-directive/-/remark-directive-3.0.1.tgz", + "integrity": "sha512-gwglrEQEZcZYgVyG1tQuA+h58EZfq5CSULw7J90AFuCTyib1thgHPoqQ+h9iFvU6R+vnZ5oNFQR5QKgGpk741A==", "license": "MIT", "dependencies": { "@types/mdast": "^4.0.0", @@ -19291,15 +19914,6 @@ "url": "https://opencollective.com/unified" } }, - "node_modules/remark-directive/node_modules/@types/mdast": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz", - "integrity": "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==", - "license": "MIT", - "dependencies": { - "@types/unist": "*" - } - }, "node_modules/remark-emoji": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/remark-emoji/-/remark-emoji-4.0.1.tgz", @@ -19316,15 +19930,6 @@ "node": "^12.20.0 || ^14.13.1 || >=16.0.0" } }, - "node_modules/remark-emoji/node_modules/@types/mdast": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz", - "integrity": "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==", - "license": "MIT", - "dependencies": { - "@types/unist": "*" - } - }, "node_modules/remark-frontmatter": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/remark-frontmatter/-/remark-frontmatter-5.0.0.tgz", @@ -19341,19 +19946,10 @@ "url": "https://opencollective.com/unified" } }, - "node_modules/remark-frontmatter/node_modules/@types/mdast": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz", - "integrity": "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==", - "license": "MIT", - "dependencies": { - "@types/unist": "*" - } - }, "node_modules/remark-gfm": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/remark-gfm/-/remark-gfm-4.0.0.tgz", - "integrity": "sha512-U92vJgBPkbw4Zfu/IiW2oTZLSL3Zpv+uI7My2eq8JxKgqraFdU8YUGicEJCEgSbeaG+QDFqIcwwfMTOEelPxuA==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/remark-gfm/-/remark-gfm-4.0.1.tgz", + "integrity": "sha512-1quofZ2RQ9EWdeN34S79+KExV1764+wCUGop5CPL1WGdD0ocPpu91lzPGbwWMECpEpd42kJGQwzRfyov9j4yNg==", "license": "MIT", "dependencies": { "@types/mdast": "^4.0.0", @@ -19368,19 +19964,10 @@ "url": "https://opencollective.com/unified" } }, - "node_modules/remark-gfm/node_modules/@types/mdast": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz", - "integrity": "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==", - "license": "MIT", - "dependencies": { - "@types/unist": "*" - } - }, "node_modules/remark-mdx": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/remark-mdx/-/remark-mdx-3.0.1.tgz", - "integrity": "sha512-3Pz3yPQ5Rht2pM5R+0J2MrGoBSrzf+tJG94N+t/ilfdh8YLyyKYtidAYwTveB20BoHAcwIopOUqhcmh2F7hGYA==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/remark-mdx/-/remark-mdx-3.1.1.tgz", + "integrity": "sha512-Pjj2IYlUY3+D8x00UJsIOg5BEvfMyeI+2uLPn9VO9Wg4MEtN/VTIq2NEJQfde9PnX15KgtHyl9S0BcTnWrIuWg==", "license": "MIT", "dependencies": { "mdast-util-mdx": "^3.0.0", @@ -19407,150 +19994,10 @@ "url": "https://opencollective.com/unified" } }, - "node_modules/remark-parse/node_modules/@types/mdast": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz", - "integrity": "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==", - "license": "MIT", - "dependencies": { - "@types/unist": "*" - } - }, - "node_modules/remark-parse/node_modules/mdast-util-from-markdown": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-2.0.1.tgz", - "integrity": "sha512-aJEUyzZ6TzlsX2s5B4Of7lN7EQtAxvtradMMglCQDyaTFgse6CmtmdJ15ElnVRlCg1vpNyVtbem0PWzlNieZsA==", - "license": "MIT", - "dependencies": { - "@types/mdast": "^4.0.0", - "@types/unist": "^3.0.0", - "decode-named-character-reference": "^1.0.0", - "devlop": "^1.0.0", - "mdast-util-to-string": "^4.0.0", - "micromark": "^4.0.0", - "micromark-util-decode-numeric-character-reference": "^2.0.0", - "micromark-util-decode-string": "^2.0.0", - "micromark-util-normalize-identifier": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0", - "unist-util-stringify-position": "^4.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/remark-parse/node_modules/micromark": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/micromark/-/micromark-4.0.0.tgz", - "integrity": "sha512-o/sd0nMof8kYff+TqcDx3VSrgBTcZpSvYcAHIfHhv5VAuNmisCxjhx6YmxS8PFEpb9z5WKWKPdzf0jM23ro3RQ==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "@types/debug": "^4.0.0", - "debug": "^4.0.0", - "decode-named-character-reference": "^1.0.0", - "devlop": "^1.0.0", - "micromark-core-commonmark": "^2.0.0", - "micromark-factory-space": "^2.0.0", - "micromark-util-character": "^2.0.0", - "micromark-util-chunked": "^2.0.0", - "micromark-util-combine-extensions": "^2.0.0", - "micromark-util-decode-numeric-character-reference": "^2.0.0", - "micromark-util-encode": "^2.0.0", - "micromark-util-normalize-identifier": "^2.0.0", - "micromark-util-resolve-all": "^2.0.0", - "micromark-util-sanitize-uri": "^2.0.0", - "micromark-util-subtokenize": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/remark-parse/node_modules/micromark-factory-space": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-2.0.0.tgz", - "integrity": "sha512-TKr+LIDX2pkBJXFLzpyPyljzYK3MtmllMUMODTQJIUfDGncESaqB90db9IAUcz4AZAJFdd8U9zOp9ty1458rxg==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-character": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/remark-parse/node_modules/micromark-util-character": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.0.tgz", - "integrity": "sha512-KvOVV+X1yLBfs9dCBSopq/+G1PcgT3lAK07mC4BzXi5E7ahzMAF8oIupDDJ6mievI6F+lAATkbQQlQixJfT3aQ==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/remark-parse/node_modules/micromark-util-symbol": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.0.tgz", - "integrity": "sha512-8JZt9ElZ5kyTnO94muPxIGS8oyElRJaiJO8EzV6ZSyGQ1Is8xwl4Q45qU5UOg+bGH4AikWziz0iN4sFLWs8PGw==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, - "node_modules/remark-parse/node_modules/micromark-util-types": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.0.tgz", - "integrity": "sha512-oNh6S2WMHWRZrmutsRmDDfkzKtxF+bc2VxLC9dvtrDIRFln627VsFP6fLMgTryGDljgLPjkrzQSDcPrjPyDJ5w==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, "node_modules/remark-rehype": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/remark-rehype/-/remark-rehype-11.1.0.tgz", - "integrity": "sha512-z3tJrAs2kIs1AqIIy6pzHmAHlF1hWQ+OdY4/hv+Wxe35EhyLKcajL33iUEn3ScxtFox9nUvRufR/Zre8Q08H/g==", + "version": "11.1.2", + "resolved": "https://registry.npmjs.org/remark-rehype/-/remark-rehype-11.1.2.tgz", + "integrity": "sha512-Dh7l57ianaEoIpzbp0PC9UKAdCSVklD8E5Rpw7ETfbTl3FqcOOgq5q2LVDhgGCkaBv7p24JXikPdvhhmHvKMsw==", "license": "MIT", "dependencies": { "@types/hast": "^3.0.0", @@ -19564,15 +20011,6 @@ "url": "https://opencollective.com/unified" } }, - "node_modules/remark-rehype/node_modules/@types/mdast": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz", - "integrity": "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==", - "license": "MIT", - "dependencies": { - "@types/unist": "*" - } - }, "node_modules/remark-stringify": { "version": "11.0.0", "resolved": "https://registry.npmjs.org/remark-stringify/-/remark-stringify-11.0.0.tgz", @@ -19588,15 +20026,6 @@ "url": "https://opencollective.com/unified" } }, - "node_modules/remark-stringify/node_modules/@types/mdast": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz", - "integrity": "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==", - "license": "MIT", - "dependencies": { - "@types/unist": "*" - } - }, "node_modules/renderkid": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/renderkid/-/renderkid-3.0.0.tgz", @@ -19721,18 +20150,21 @@ "license": "MIT" }, "node_modules/resolve": { - "version": "1.22.8", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", - "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "version": "1.22.11", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.11.tgz", + "integrity": "sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ==", "license": "MIT", "dependencies": { - "is-core-module": "^2.13.0", + "is-core-module": "^2.16.1", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, "bin": { "resolve": "bin/resolve" }, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -19784,42 +20216,32 @@ } }, "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", "license": "MIT", "engines": { "iojs": ">=1.0.0", "node": ">=0.10.0" } }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "deprecated": "Rimraf versions prior to v4 are no longer supported", - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/robust-predicates": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/robust-predicates/-/robust-predicates-3.0.2.tgz", - "integrity": "sha512-IXgzBWvWQwE6PrDI05OvmXUIruQTcoMDzRsOd5CDvHCVLcLHMTSYvOK5Cm46kWqlV3yAbuSpBZdJ5oP5OUoStg==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/robust-predicates/-/robust-predicates-3.0.3.tgz", + "integrity": "sha512-NS3levdsRIUOmiJ8FZWCP7LG3QpJyrs/TE0Zpf1yvZu8cAJJ6QMW92H1c7kWpdIHo8RvmLxN/o2JXTKHp74lUA==", "license": "Unlicense" }, - "node_modules/rtl-detect": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/rtl-detect/-/rtl-detect-1.1.2.tgz", - "integrity": "sha512-PGMBq03+TTG/p/cRB7HCLKJ1MgDIi07+QU1faSjiYRfmY5UsAttV9Hs08jDAHVwcOwmVLcSJkpwyfXszVjWfIQ==", - "license": "BSD-3-Clause" + "node_modules/roughjs": { + "version": "4.6.6", + "resolved": "https://registry.npmjs.org/roughjs/-/roughjs-4.6.6.tgz", + "integrity": "sha512-ZUz/69+SYpFN/g/lUlo2FXcIjRkSu3nDarreVdGGndHEBJ6cXPdKguS8JGxwj5HA5xIbVKSmLgr5b3AWxtRfvQ==", + "license": "MIT", + "dependencies": { + "hachure-fill": "^0.5.2", + "path-data-parser": "^0.1.0", + "points-on-curve": "^0.2.0", + "points-on-path": "^0.2.1" + } }, "node_modules/rtlcss": { "version": "4.3.0", @@ -19839,6 +20261,18 @@ "node": ">=12.0.0" } }, + "node_modules/run-applescript": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-7.1.0.tgz", + "integrity": "sha512-DPe5pVFaAsinSaV6QjQ6gdiedWDcRCbUuiQfQa2wmWV7+xC9bGulGI8+TdRmoFkAPaBXk8CrAbnlY2ISniJ47Q==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -19868,28 +20302,17 @@ "integrity": "sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ==", "license": "BSD-3-Clause" }, - "node_modules/sade": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/sade/-/sade-1.8.1.tgz", - "integrity": "sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==", - "license": "MIT", - "dependencies": { - "mri": "^1.1.0" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/safe-array-concat": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", - "integrity": "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.3.tgz", + "integrity": "sha512-AURm5f0jYEOydBj7VQlVvDrjeFgthDdEF5H1dP+6mNpoXOMo1quQqJ4wvJDyRZ9+pO3kGWoOdmV08cSv2aJV6Q==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", - "get-intrinsic": "^1.2.4", - "has-symbols": "^1.0.3", + "call-bind": "^1.0.8", + "call-bound": "^1.0.2", + "get-intrinsic": "^1.2.6", + "has-symbols": "^1.1.0", "isarray": "^2.0.5" }, "engines": { @@ -19926,16 +20349,40 @@ ], "license": "MIT" }, - "node_modules/safe-regex-test": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", - "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==", + "node_modules/safe-push-apply": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-push-apply/-/safe-push-apply-1.0.0.tgz", + "integrity": "sha512-iKE9w/Z7xCzUMIZqdBsp6pEQvwuEebH4vdpjcDWnyzaI6yl6O9FHvVpmGelvEHNsoY6wGblkxR6Zty/h00WiSA==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.6", "es-errors": "^1.3.0", - "is-regex": "^1.1.4" + "isarray": "^2.0.5" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-push-apply/node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true, + "license": "MIT" + }, + "node_modules/safe-regex-test": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz", + "integrity": "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "is-regex": "^1.2.1" }, "engines": { "node": ">= 0.4" @@ -19951,10 +20398,13 @@ "license": "MIT" }, "node_modules/sax": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.1.tgz", - "integrity": "sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==", - "license": "ISC" + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.6.0.tgz", + "integrity": "sha512-6R3J5M4AcbtLUdZmRv2SygeVaM7IhrLXu9BmnOGmmACak8fiUtOsYNWUS4uK7upbmHIBbLBeFeI//477BKLBzA==", + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=11.0.0" + } }, "node_modules/scheduler": { "version": "0.23.2", @@ -19965,10 +20415,16 @@ "loose-envify": "^1.1.0" } }, + "node_modules/schema-dts": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/schema-dts/-/schema-dts-1.1.5.tgz", + "integrity": "sha512-RJr9EaCmsLzBX2NDiO5Z3ux2BVosNZN5jo0gWgsyKvxKIUL5R3swNvoorulAeL9kLB0iTSX7V6aokhla2m7xbg==", + "license": "Apache-2.0" + }, "node_modules/schema-utils": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.2.0.tgz", - "integrity": "sha512-L0jRsrPpjdckP3oPug3/VxNKt2trR8TcabrM6FOAAlvC/9Phcmm+cuAgTlxBqdBR1WJx7Naj9WHw+aOmheSVbw==", + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.3.3.tgz", + "integrity": "sha512-eflK8wEtyOE6+hsaRVPxvUKYCpRgzLqDTb8krvAsRIwOGlHoSgYLgBXoubGgLd2fT41/OUYdb48v4k4WWHQurA==", "license": "MIT", "dependencies": { "@types/json-schema": "^7.0.9", @@ -19977,7 +20433,7 @@ "ajv-keywords": "^5.1.0" }, "engines": { - "node": ">= 12.13.0" + "node": ">= 10.13.0" }, "funding": { "type": "opencollective", @@ -19985,9 +20441,9 @@ } }, "node_modules/schema-utils/node_modules/ajv": { - "version": "8.17.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", - "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.18.0.tgz", + "integrity": "sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A==", "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.3", @@ -20019,9 +20475,9 @@ "license": "MIT" }, "node_modules/search-insights": { - "version": "2.17.0", - "resolved": "https://registry.npmjs.org/search-insights/-/search-insights-2.17.0.tgz", - "integrity": "sha512-AskayU3QNsXQzSL6v4LTYST7NNfs2HWyHHB+sdORP9chsytAhro5XRfToAMI/LAVYgNbzowVZTMfBRodgbUHKg==", + "version": "2.17.3", + "resolved": "https://registry.npmjs.org/search-insights/-/search-insights-2.17.3.tgz", + "integrity": "sha512-RQPdCYTa8A68uM2jwxoY842xDhvx3E5LFL1LxvxCNMev4o5mLuokczhzjAgGwUZBAmOKZknArSxLKmXtIi2AxQ==", "license": "MIT", "peer": true }, @@ -20045,22 +20501,22 @@ "license": "MIT" }, "node_modules/selfsigned": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-2.4.1.tgz", - "integrity": "sha512-th5B4L2U+eGLq1TVh7zNRGBapioSORUeymIydxgFpwww9d2qyKvtuPU2jJuHvYAwwqi2Y596QBL3eEqcPEYL8Q==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-5.5.0.tgz", + "integrity": "sha512-ftnu3TW4+3eBfLRFnDEkzGxSF/10BJBkaLJuBHZX0kiPS7bRdlpZGu6YGt4KngMkdTwJE6MbjavFpqHvqVt+Ew==", "license": "MIT", "dependencies": { - "@types/node-forge": "^1.3.0", - "node-forge": "^1" + "@peculiar/x509": "^1.14.2", + "pkijs": "^3.3.3" }, "engines": { - "node": ">=10" + "node": ">=18" } }, "node_modules/semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", + "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", "license": "ISC", "bin": { "semver": "bin/semver.js" @@ -20085,24 +20541,24 @@ } }, "node_modules/send": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", - "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/send/-/send-0.19.2.tgz", + "integrity": "sha512-VMbMxbDeehAxpOtWJXlcUS5E8iXh6QmN+BkRX1GARS3wRaXEEgzCcB10gTQazO42tpNIya8xIyNx8fll1OFPrg==", "license": "MIT", "dependencies": { "debug": "2.6.9", "depd": "2.0.0", "destroy": "1.2.0", - "encodeurl": "~1.0.2", + "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "2.0.0", + "fresh": "~0.5.2", + "http-errors": "~2.0.1", "mime": "1.6.0", "ms": "2.1.3", - "on-finished": "2.4.1", + "on-finished": "~2.4.1", "range-parser": "~1.2.1", - "statuses": "2.0.1" + "statuses": "~2.0.2" }, "engines": { "node": ">= 0.8.0" @@ -20123,12 +20579,6 @@ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "license": "MIT" }, - "node_modules/send/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "license": "MIT" - }, "node_modules/send/node_modules/range-parser": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", @@ -20148,43 +20598,46 @@ } }, "node_modules/serve-handler": { - "version": "6.1.5", - "resolved": "https://registry.npmjs.org/serve-handler/-/serve-handler-6.1.5.tgz", - "integrity": "sha512-ijPFle6Hwe8zfmBxJdE+5fta53fdIY0lHISJvuikXB3VYFafRjMRpOffSPvCYsbKyBA7pvy9oYr/BT1O3EArlg==", + "version": "6.1.7", + "resolved": "https://registry.npmjs.org/serve-handler/-/serve-handler-6.1.7.tgz", + "integrity": "sha512-CinAq1xWb0vR3twAv9evEU8cNWkXCb9kd5ePAHUKJBkOsUpR1wt/CvGdeca7vqumL1U5cSaeVQ6zZMxiJ3yWsg==", "license": "MIT", "dependencies": { "bytes": "3.0.0", "content-disposition": "0.5.2", - "fast-url-parser": "1.1.3", "mime-types": "2.1.18", - "minimatch": "3.1.2", + "minimatch": "3.1.5", "path-is-inside": "1.0.2", - "path-to-regexp": "2.2.1", + "path-to-regexp": "3.3.0", "range-parser": "1.2.0" } }, "node_modules/serve-handler/node_modules/path-to-regexp": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-2.2.1.tgz", - "integrity": "sha512-gu9bD6Ta5bwGrrU8muHzVOBFFREpp2iRkVfhBJahwJ6p6Xw20SjT0MxLnwkjOibQmGSYhiUnf2FLe7k+jcFmGQ==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-3.3.0.tgz", + "integrity": "sha512-qyCH421YQPS2WFDxDjftfc1ZR5WKQzVzqsp4n9M2kQhVOo/ByahFoUNJfl58kOcEGfQ//7weFTDhm+ss8Ecxgw==", "license": "MIT" }, "node_modules/serve-index": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", - "integrity": "sha512-pXHfKNP4qujrtteMrSBb0rc8HJ9Ms/GrXwcUtUtD5s4ewDJI8bT3Cz2zTVRMKtri49pLx2e0Ya8ziP5Ya2pZZw==", + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.2.tgz", + "integrity": "sha512-KDj11HScOaLmrPxl70KYNW1PksP4Nb/CLL2yvC+Qd2kHMPEEpfc4Re2e4FOay+bC/+XQl/7zAcWON3JVo5v3KQ==", "license": "MIT", "dependencies": { - "accepts": "~1.3.4", + "accepts": "~1.3.8", "batch": "0.6.1", "debug": "2.6.9", "escape-html": "~1.0.3", - "http-errors": "~1.6.2", - "mime-types": "~2.1.17", - "parseurl": "~1.3.2" + "http-errors": "~1.8.0", + "mime-types": "~2.1.35", + "parseurl": "~1.3.3" }, "engines": { "node": ">= 0.8.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/serve-index/node_modules/debug": { @@ -20206,25 +20659,41 @@ } }, "node_modules/serve-index/node_modules/http-errors": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", - "integrity": "sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.8.1.tgz", + "integrity": "sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==", "license": "MIT", "dependencies": { "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.0", - "statuses": ">= 1.4.0 < 2" + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.1" }, "engines": { "node": ">= 0.6" } }, - "node_modules/serve-index/node_modules/inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==", - "license": "ISC" + "node_modules/serve-index/node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/serve-index/node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } }, "node_modules/serve-index/node_modules/ms": { "version": "2.0.0", @@ -20232,12 +20701,6 @@ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "license": "MIT" }, - "node_modules/serve-index/node_modules/setprototypeof": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", - "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", - "license": "ISC" - }, "node_modules/serve-index/node_modules/statuses": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", @@ -20248,15 +20711,15 @@ } }, "node_modules/serve-static": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", - "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", + "version": "1.16.3", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.3.tgz", + "integrity": "sha512-x0RTqQel6g5SY7Lg6ZreMmsOzncHFU7nhnRWkKgWuMTu5NN0DR5oruckMqRvacAN9d5w6ARnRBXl9xhDCgfMeA==", "license": "MIT", "dependencies": { - "encodeurl": "~1.0.2", + "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "parseurl": "~1.3.3", - "send": "0.18.0" + "send": "~0.19.1" }, "engines": { "node": ">= 0.8.0" @@ -20295,6 +20758,21 @@ "node": ">= 0.4" } }, + "node_modules/set-proto": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/set-proto/-/set-proto-1.0.0.tgz", + "integrity": "sha512-RJRdvCo6IAnPdsvP/7m6bsQqNnn1FCBX5ZNtFL98MmFF/4xAIJTIg1YbHW5DC2W5SKZanrC6i4HsJqlajw/dZw==", + "dev": true, + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/setprototypeof": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", @@ -20341,41 +20819,81 @@ } }, "node_modules/shell-quote": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.1.tgz", - "integrity": "sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==", + "version": "1.8.4", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.4.tgz", + "integrity": "sha512-VsC6n6vz1ihYYyZZwX7YZSF5l5x36ca17OC+a69h94YqB7X6XLwf+5MOgynYir2SLFUbl8gIYvBo8K8RoNQ6bQ==", "license": "MIT", + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/shelljs": { - "version": "0.8.5", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", - "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", - "license": "BSD-3-Clause", - "dependencies": { - "glob": "^7.0.0", - "interpret": "^1.0.0", - "rechoir": "^0.6.2" - }, - "bin": { - "shjs": "bin/shjs" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/side-channel": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", - "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4", - "object-inspect": "^1.13.1" + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" }, "engines": { "node": ">= 0.4" @@ -20411,9 +20929,9 @@ "license": "MIT" }, "node_modules/sitemap": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/sitemap/-/sitemap-7.1.2.tgz", - "integrity": "sha512-ARCqzHJ0p4gWt+j7NlU5eDlIO9+Rkr/JhPFZKKQ1l5GCus7rJH4UdrlVAh0xC/gDS/Qir2UMxqYNHtsKr2rpCw==", + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/sitemap/-/sitemap-7.1.3.tgz", + "integrity": "sha512-tAjEd+wt/YwnEbfNB2ht51ybBJxbEWwe5ki/Z//Wh0rpBFTCUSj46GnxUKEWzhfuJTsee8x3lybHxFgUMig2hw==", "license": "MIT", "dependencies": { "@types/node": "^17.0.5", @@ -20496,18 +21014,18 @@ } }, "node_modules/source-map": { - "version": "0.7.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", - "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==", + "version": "0.7.6", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.6.tgz", + "integrity": "sha512-i5uvt8C3ikiWeNZSVZNWcfZPItFQOsYTUAOkcUPGd8DqDy1uOUikjt5dG+uRlwyvR108Fb9DOd4GvXfT0N2/uQ==", "license": "BSD-3-Clause", "engines": { - "node": ">= 8" + "node": ">= 12" } }, "node_modules/source-map-js": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", - "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" @@ -20572,9 +21090,9 @@ } }, "node_modules/spdx-license-ids": { - "version": "3.0.20", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.20.tgz", - "integrity": "sha512-jg25NiDV/1fLtSgEgyvVyDunvaNHbuwF9lfNV17gSmPFAlYzdfNBlLtLzXTevwkPj7DhGbmN9VnmJIgLnhvaBw==", + "version": "3.0.23", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.23.tgz", + "integrity": "sha512-CWLcCCH7VLu13TgOH+r8p1O/Znwhqv/dbb6lqWy67G+pT1kHmeD/+V36AVb/vq8QMIQwVShJ6Ssl5FPh0fuSdw==", "dev": true, "license": "CC0-1.0" }, @@ -20627,20 +21145,34 @@ } }, "node_modules/statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz", + "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==", "license": "MIT", "engines": { "node": ">= 0.8" } }, "node_modules/std-env": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.7.0.tgz", - "integrity": "sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==", + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.10.0.tgz", + "integrity": "sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg==", "license": "MIT" }, + "node_modules/stop-iteration-iterator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.1.0.tgz", + "integrity": "sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "internal-slot": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/string_decoder": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", @@ -20651,38 +21183,21 @@ } }, "node_modules/string-replace-loader": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-replace-loader/-/string-replace-loader-3.1.0.tgz", - "integrity": "sha512-5AOMUZeX5HE/ylKDnEa/KKBqvlnFmRZudSOjVJHxhoJg9QYTwl1rECx7SLR8BBH7tfxb4Rp7EM2XVfQFxIhsbQ==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/string-replace-loader/-/string-replace-loader-3.3.0.tgz", + "integrity": "sha512-AZ3y7ktSHhd/Ebipczkp6vdfp01d2kQVwFujCGAgmogTB8t4dRhbsRGDKnyZAYqBbIA9QW7+D/IsACVJOOpcBg==", "dev": true, "license": "MIT", "dependencies": { - "loader-utils": "^2.0.0", - "schema-utils": "^3.0.0" + "schema-utils": "^4" + }, + "engines": { + "node": ">=4" }, "peerDependencies": { "webpack": "^5" } }, - "node_modules/string-replace-loader/node_modules/schema-utils": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", - "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, "node_modules/string-width": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", @@ -20724,9 +21239,9 @@ "license": "MIT" }, "node_modules/string-width/node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", "license": "MIT", "engines": { "node": ">=12" @@ -20736,12 +21251,12 @@ } }, "node_modules/string-width/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz", + "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==", "license": "MIT", "dependencies": { - "ansi-regex": "^6.0.1" + "ansi-regex": "^6.2.2" }, "engines": { "node": ">=12" @@ -20751,24 +21266,25 @@ } }, "node_modules/string.prototype.matchall": { - "version": "4.0.11", - "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.11.tgz", - "integrity": "sha512-NUdh0aDavY2og7IbBPenWqR9exH+E26Sv8e0/eTe1tltDGZL+GtBkDAnnyBtmekfK6/Dq3MkcGtzXFEd1LQrtg==", + "version": "4.0.12", + "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.12.tgz", + "integrity": "sha512-6CC9uyBL+/48dYizRf7H7VAYCMCNTBeM78x/VTUe9bFEaxBepPJDa1Ow99LqI/1yF7kuy7Q3cQsYMrcjGUcskA==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", + "es-abstract": "^1.23.6", "es-errors": "^1.3.0", "es-object-atoms": "^1.0.0", - "get-intrinsic": "^1.2.4", - "gopd": "^1.0.1", - "has-symbols": "^1.0.3", - "internal-slot": "^1.0.7", - "regexp.prototype.flags": "^1.5.2", + "get-intrinsic": "^1.2.6", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "internal-slot": "^1.1.0", + "regexp.prototype.flags": "^1.5.3", "set-function-name": "^2.0.2", - "side-channel": "^1.0.6" + "side-channel": "^1.1.0" }, "engines": { "node": ">= 0.4" @@ -20789,16 +21305,19 @@ } }, "node_modules/string.prototype.trim": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", - "integrity": "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==", + "version": "1.2.10", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.10.tgz", + "integrity": "sha512-Rs66F0P/1kedk5lyYyH9uBzuiI/kNRmwJAR9quK6VOtIpZ2G+hMZd+HQbbv25MgCA6gEffoMZYxlTod4WcdrKA==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.2", + "define-data-property": "^1.1.4", "define-properties": "^1.2.1", - "es-abstract": "^1.23.0", - "es-object-atoms": "^1.0.0" + "es-abstract": "^1.23.5", + "es-object-atoms": "^1.0.0", + "has-property-descriptors": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -20808,16 +21327,20 @@ } }, "node_modules/string.prototype.trimend": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz", - "integrity": "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==", + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.9.tgz", + "integrity": "sha512-G7Ok5C6E/j4SGfyLCloXTrngQIQU3PWtXGst3yM7Bea9FRURf1S42ZHlZZtsNque2FN2PoUhfZXYLNWwEr4dLQ==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.2", "define-properties": "^1.2.1", "es-object-atoms": "^1.0.0" }, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -20854,16 +21377,6 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/stringify-entities/node_modules/character-entities-legacy": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-3.0.0.tgz", - "integrity": "sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, "node_modules/stringify-object": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/stringify-object/-/stringify-object-3.3.0.tgz", @@ -20934,13 +21447,22 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/style-to-object": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-0.4.4.tgz", - "integrity": "sha512-HYNoHZa2GorYNyqiCaBgsxvcJIn7OHq6inEga+E6Ke3m5JkoqpQbnFssk4jwe+K7AhGa2fcha4wSOf1Kn01dMg==", + "node_modules/style-to-js": { + "version": "1.1.21", + "resolved": "https://registry.npmjs.org/style-to-js/-/style-to-js-1.1.21.tgz", + "integrity": "sha512-RjQetxJrrUJLQPHbLku6U/ocGtzyjbJMP9lCNK7Ag0CNh690nSH8woqWH9u16nMjYBAok+i7JO1NP2pOy8IsPQ==", "license": "MIT", "dependencies": { - "inline-style-parser": "0.1.1" + "style-to-object": "1.0.14" + } + }, + "node_modules/style-to-object": { + "version": "1.0.14", + "resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-1.0.14.tgz", + "integrity": "sha512-LIN7rULI0jBscWQYaSswptyderlarFkjQ+t79nzty8tcIAceVomEVlLzH5VP4Cmsv6MtKhs7qaAiwlcp+Mgaxw==", + "license": "MIT", + "dependencies": { + "inline-style-parser": "0.2.7" } }, "node_modules/stylehacks": { @@ -20960,9 +21482,9 @@ } }, "node_modules/stylis": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.3.4.tgz", - "integrity": "sha512-osIBl6BGUmSfDkyH2mB7EFvCJntXDrLhKjHTRj/rK6xLH0yuPrHULDRQzKokSOD4VoorhtKpfcfW1GAntu8now==", + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.3.6.tgz", + "integrity": "sha512-yQ3rwFWRfwNUY7H5vpU0wfdkNSnvnJinhF9830Swlaxl03zsOjCfmX0ugac+3LtK0lYSgwL/KXc8oYL3mG4YFQ==", "license": "MIT" }, "node_modules/supports-color": { @@ -20996,18 +21518,18 @@ "license": "MIT" }, "node_modules/svgo": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/svgo/-/svgo-3.3.2.tgz", - "integrity": "sha512-OoohrmuUlBs8B8o6MB2Aevn+pRIH9zDALSR+6hhqVfa6fRwG/Qw9VUMSMW9VNg2CFc/MTIfabtdOVl9ODIJjpw==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/svgo/-/svgo-3.3.3.tgz", + "integrity": "sha512-+wn7I4p7YgJhHs38k2TNjy1vCfPIfLIJWR5MnCStsN8WuuTcBnRKcMHQLMM2ijxGZmDoZwNv8ipl5aTTen62ng==", "license": "MIT", "dependencies": { - "@trysound/sax": "0.2.0", "commander": "^7.2.0", "css-select": "^5.1.0", "css-tree": "^2.3.1", "css-what": "^6.1.0", "csso": "^5.0.5", - "picocolors": "^1.0.0" + "picocolors": "^1.0.0", + "sax": "^1.5.0" }, "bin": { "svgo": "bin/svgo" @@ -21030,39 +21552,42 @@ } }, "node_modules/synckit": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.9.1.tgz", - "integrity": "sha512-7gr8p9TQP6RAHusBOSLs46F4564ZrjV8xFmw5zCmgmhGUcw2hxsShhJ6CEiHQMgPDwAQ1fWHPM0ypc4RMAig4A==", + "version": "0.11.12", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.11.12.tgz", + "integrity": "sha512-Bh7QjT8/SuKUIfObSXNHNSK6WHo6J1tHCqJsuaFDP7gP0fkzSfTxI8y85JrppZ0h8l0maIgc2tfuZQ6/t3GtnQ==", "dev": true, "license": "MIT", "dependencies": { - "@pkgr/core": "^0.1.0", - "tslib": "^2.6.2" + "@pkgr/core": "^0.2.9" }, "engines": { "node": "^14.18.0 || >=16.0.0" }, "funding": { - "url": "https://opencollective.com/unts" + "url": "https://opencollective.com/synckit" } }, "node_modules/tapable": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", - "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.2.tgz", + "integrity": "sha512-1MOpMXuhGzGL5TTCZFItxCc0AARf1EZFQkGqMm7ERKj8+Hgr5oLvJOVFcC+lRmR8hCe2S3jC4T5D7Vg/d7/fhA==", "license": "MIT", "engines": { "node": ">=6" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" } }, "node_modules/terser": { - "version": "5.31.6", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.31.6.tgz", - "integrity": "sha512-PQ4DAriWzKj+qgehQ7LK5bQqCFNMmlhjR2PFFLuqGCpuCAauxemVBWwWOxo3UIwWQx8+Pr61Df++r76wDmkQBg==", + "version": "5.46.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.46.1.tgz", + "integrity": "sha512-vzCjQO/rgUuK9sf8VJZvjqiqiHFaZLnOiimmUuOKODxWL8mm/xua7viT7aqX7dgPY60otQjUotzFMmCB4VdmqQ==", "license": "BSD-2-Clause", "dependencies": { "@jridgewell/source-map": "^0.3.3", - "acorn": "^8.8.2", + "acorn": "^8.15.0", "commander": "^2.20.0", "source-map-support": "~0.5.20" }, @@ -21074,16 +21599,15 @@ } }, "node_modules/terser-webpack-plugin": { - "version": "5.3.10", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz", - "integrity": "sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.4.0.tgz", + "integrity": "sha512-Bn5vxm48flOIfkdl5CaD2+1CiUVbonWQ3KQPyP7/EuIl9Gbzq/gQFOzaMFUEgVjB1396tcK0SG8XcNJ/2kDH8g==", "license": "MIT", "dependencies": { - "@jridgewell/trace-mapping": "^0.3.20", + "@jridgewell/trace-mapping": "^0.3.25", "jest-worker": "^27.4.5", - "schema-utils": "^3.1.1", - "serialize-javascript": "^6.0.1", - "terser": "^5.26.0" + "schema-utils": "^4.3.0", + "terser": "^5.31.1" }, "engines": { "node": ">= 10.13.0" @@ -21121,24 +21645,6 @@ "node": ">= 10.13.0" } }, - "node_modules/terser-webpack-plugin/node_modules/schema-utils": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", - "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", - "license": "MIT", - "dependencies": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, "node_modules/terser-webpack-plugin/node_modules/supports-color": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", @@ -21160,33 +21666,20 @@ "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "license": "MIT" }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "license": "MIT" - }, - "node_modules/thenify": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", - "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", - "dev": true, + "node_modules/thingies": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/thingies/-/thingies-2.6.0.tgz", + "integrity": "sha512-rMHRjmlFLM1R96UYPvpmnc3LYtdFrT33JIB7L9hetGue1qAPfn1N2LJeEjxUSidu1Iku+haLZXDuEXUHNGO/lg==", "license": "MIT", - "dependencies": { - "any-promise": "^1.0.0" - } - }, - "node_modules/thenify-all": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", - "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", - "dev": true, - "license": "MIT", - "dependencies": { - "thenify": ">= 3.1.0 < 4" - }, "engines": { - "node": ">=0.8" + "node": ">=10.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "^2" } }, "node_modules/thunky": { @@ -21195,20 +21688,6 @@ "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==", "license": "MIT" }, - "node_modules/timers-ext": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.8.tgz", - "integrity": "sha512-wFH7+SEAcKfJpfLPkrgMPvvwnEtj8W4IurvEyrKsDleXnKLCDw71w8jltvfLa8Rm4qQxxT4jmDBYbJG/z7qoww==", - "dev": true, - "license": "ISC", - "dependencies": { - "es5-ext": "^0.10.64", - "next-tick": "^1.1.0" - }, - "engines": { - "node": ">=0.12" - } - }, "node_modules/tiny-invariant": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.3.tgz", @@ -21221,13 +21700,70 @@ "integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==", "license": "MIT" }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "node_modules/tinyexec": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.0.4.tgz", + "integrity": "sha512-u9r3uZC0bdpGOXtlxUIdwf9pkmvhqJdrVCH9fapQtgy/OeTTMZ1nqH7agtvEfmGui6e1XxjcdrlxvxJvc3sMqw==", "license": "MIT", "engines": { - "node": ">=4" + "node": ">=18" + } + }, + "node_modules/tinyglobby": { + "version": "0.2.15", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", + "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.3" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tinyglobby/node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/tinyglobby/node_modules/picomatch": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz", + "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/tinypool": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.1.1.tgz", + "integrity": "sha512-Zba82s87IFq9A9XmjiX5uZA/ARWDrB03OHlq+Vw1fSdt0I+4/Kutwy8BP4Y/y/aORMo61FQ0vIb5j44vSo5Pkg==", + "license": "MIT", + "engines": { + "node": "^18.0.0 || >=20.0.0" } }, "node_modules/to-regex-range": { @@ -21266,6 +21802,53 @@ "node": ">=6" } }, + "node_modules/tree-dump": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/tree-dump/-/tree-dump-1.1.0.tgz", + "integrity": "sha512-rMuvhU4MCDbcbnleZTFezWsaZXRFemSqAM+7jPnzUl1fo9w3YEKOxAeui0fz3OI4EU4hf23iyA7uQRVko+UaBA==", + "license": "Apache-2.0", + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/tree-sitter": { + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/tree-sitter/-/tree-sitter-0.21.1.tgz", + "integrity": "sha512-7dxoA6kYvtgWw80265MyqJlkRl4yawIjO7S5MigytjELkX43fV2WsAXzsNfO7sBpPPCF5Gp0+XzHk0DwLCq3xQ==", + "hasInstallScript": true, + "license": "MIT", + "peer": true, + "dependencies": { + "node-addon-api": "^8.0.0", + "node-gyp-build": "^4.8.0" + } + }, + "node_modules/tree-sitter-devicetree": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/tree-sitter-devicetree/-/tree-sitter-devicetree-0.12.1.tgz", + "integrity": "sha512-JccTH8TmgO9B4tAaCEZ8O7yOEtoixBRRnNZYO8W9tnNsv29Y+avsN6V8li2CfwooB1eqZIEbsPLKxN/e7bG+Cg==", + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "node-addon-api": "^8.2.1", + "node-gyp-build": "^4.8.2" + }, + "peerDependencies": { + "tree-sitter": "^0.21.0" + }, + "peerDependenciesMeta": { + "tree_sitter": { + "optional": true + } + } + }, "node_modules/trim-lines": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/trim-lines/-/trim-lines-3.0.1.tgz", @@ -21286,6 +21869,19 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/ts-api-utils": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.5.0.tgz", + "integrity": "sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.12" + }, + "peerDependencies": { + "typescript": ">=4.8.4" + } + }, "node_modules/ts-dedent": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/ts-dedent/-/ts-dedent-2.2.0.tgz", @@ -21296,23 +21892,34 @@ } }, "node_modules/tslib": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", - "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==", + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", "license": "0BSD" }, - "node_modules/type": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/type/-/type-2.7.3.tgz", - "integrity": "sha512-8j+1QmAbPvLZow5Qpi6NCaN8FB60p/6x8/vfNqOk/hC+HuvFZhL4+WfekuhQLiqFZXOgQdrs3B+XxEmCc6b3FQ==", - "dev": true, - "license": "ISC" + "node_modules/tsyringe": { + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/tsyringe/-/tsyringe-4.10.0.tgz", + "integrity": "sha512-axr3IdNuVIxnaK5XGEUFTu3YmAQ6lllgrvqfEoR16g/HGnYY/6We4oWENtAnzK6/LpJ2ur9PAb80RBt7/U4ugw==", + "license": "MIT", + "dependencies": { + "tslib": "^1.9.3" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/tsyringe/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "license": "0BSD" }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1" @@ -21368,32 +21975,32 @@ } }, "node_modules/typed-array-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", - "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz", + "integrity": "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bound": "^1.0.3", "es-errors": "^1.3.0", - "is-typed-array": "^1.1.13" + "is-typed-array": "^1.1.14" }, "engines": { "node": ">= 0.4" } }, "node_modules/typed-array-byte-length": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz", - "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.3.tgz", + "integrity": "sha512-BaXgOuIxz8n8pIq3e7Atg/7s+DpiYrxn4vdot3w9KbnBhcRQq6o3xemQdIfynqSeXeDrF32x+WvfzmOjPiY9lg==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-proto": "^1.0.3", - "is-typed-array": "^1.1.13" + "gopd": "^1.2.0", + "has-proto": "^1.2.0", + "is-typed-array": "^1.1.14" }, "engines": { "node": ">= 0.4" @@ -21403,18 +22010,19 @@ } }, "node_modules/typed-array-byte-offset": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz", - "integrity": "sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.4.tgz", + "integrity": "sha512-bTlAFB/FBYMcuX81gbL4OcpH5PmlFHqlCCpAl8AlEzMz5k53oNDvN8p1PNOWLEmI2x4orp3raOFB51tv9X+MFQ==", "dev": true, "license": "MIT", "dependencies": { "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-proto": "^1.0.3", - "is-typed-array": "^1.1.13" + "gopd": "^1.2.0", + "has-proto": "^1.2.0", + "is-typed-array": "^1.1.15", + "reflect.getprototypeof": "^1.0.9" }, "engines": { "node": ">= 0.4" @@ -21424,18 +22032,18 @@ } }, "node_modules/typed-array-length": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.6.tgz", - "integrity": "sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.7.tgz", + "integrity": "sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==", "dev": true, "license": "MIT", "dependencies": { "call-bind": "^1.0.7", "for-each": "^0.3.3", "gopd": "^1.0.1", - "has-proto": "^1.0.3", "is-typed-array": "^1.1.13", - "possible-typed-array-names": "^1.0.0" + "possible-typed-array-names": "^1.0.0", + "reflect.getprototypeof": "^1.0.6" }, "engines": { "node": ">= 0.4" @@ -21461,9 +22069,10 @@ } }, "node_modules/typescript": { - "version": "5.5.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", - "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "devOptional": true, "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", @@ -21473,32 +22082,65 @@ "node": ">=14.17" } }, - "node_modules/unbox-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", - "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "node_modules/typescript-eslint": { + "version": "8.57.2", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.57.2.tgz", + "integrity": "sha512-VEPQ0iPgWO/sBaZOU1xo4nuNdODVOajPnTIbog2GKYr31nIlZ0fWPoCQgGfF3ETyBl1vn63F/p50Um9Z4J8O8A==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", + "@typescript-eslint/eslint-plugin": "8.57.2", + "@typescript-eslint/parser": "8.57.2", + "@typescript-eslint/typescript-estree": "8.57.2", + "@typescript-eslint/utils": "8.57.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/ufo": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.6.3.tgz", + "integrity": "sha512-yDJTmhydvl5lJzBmy/hyOAA0d+aqCBuwl818haVdYCRrWV84o7YyeVm4QlVHStqNrrJSTb6jKuFAVqAFsr+K3Q==", + "license": "MIT" + }, + "node_modules/unbox-primitive": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.1.0.tgz", + "integrity": "sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", "has-bigints": "^1.0.2", - "has-symbols": "^1.0.3", - "which-boxed-primitive": "^1.0.2" + "has-symbols": "^1.1.0", + "which-boxed-primitive": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/undici-types": { - "version": "6.19.8", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", - "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.18.2.tgz", + "integrity": "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==", "license": "MIT" }, "node_modules/unicode-canonical-property-names-ecmascript": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", - "integrity": "sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.1.tgz", + "integrity": "sha512-dA8WbNeb2a6oQzAQ55YlT5vQAWGV9WXOsi3SskE3bcCdM0P4SDd+24zS/OCacdRq5BkdsRj9q3Pg6YyQoxIGqg==", "license": "MIT", "engines": { "node": ">=4" @@ -21527,18 +22169,18 @@ } }, "node_modules/unicode-match-property-value-ecmascript": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.1.0.tgz", - "integrity": "sha512-qxkjQt6qjg/mYscYMC0XKRn3Rh0wFPlfxB0xkt9CfyTvpX1Ra0+rAmdX2QyAobptSEvuy4RtpPRui6XkV+8wjA==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.2.1.tgz", + "integrity": "sha512-JQ84qTuMg4nVkx8ga4A16a1epI9H6uTXAknqxkGF/aFfRLw1xC/Bp24HNLaZhHSkWd3+84t8iXnp1J0kYcZHhg==", "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/unicode-property-aliases-ecmascript": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz", - "integrity": "sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.2.0.tgz", + "integrity": "sha512-hpbDzxUY9BFwX+UeBnxv3Sh1q7HFxj48DTmXchNgRa46lO8uj3/1iEn3MiNUYTg1g9ctIqXCCERn8gYZhHC5lQ==", "license": "MIT", "engines": { "node": ">=4" @@ -21564,22 +22206,22 @@ } }, "node_modules/unified-engine": { - "version": "11.2.1", - "resolved": "https://registry.npmjs.org/unified-engine/-/unified-engine-11.2.1.tgz", - "integrity": "sha512-xBAdZ8UY2X4R9Hm6X6kMne4Nz0PlpOc1oE6DPeqJnewr5Imkb8uT5Eyvy1h7xNekPL3PSWh3ZJyNrMW6jnNQBg==", + "version": "11.2.2", + "resolved": "https://registry.npmjs.org/unified-engine/-/unified-engine-11.2.2.tgz", + "integrity": "sha512-15g/gWE7qQl9tQ3nAEbMd5h9HV1EACtFs6N9xaRBZICoCwnNGbal1kOs++ICf4aiTdItZxU2s/kYWhW7htlqJg==", "dev": true, "license": "MIT", "dependencies": { "@types/concat-stream": "^2.0.0", "@types/debug": "^4.0.0", "@types/is-empty": "^1.0.0", - "@types/node": "^20.0.0", + "@types/node": "^22.0.0", "@types/unist": "^3.0.0", "concat-stream": "^2.0.0", "debug": "^4.0.0", "extend": "^3.0.0", "glob": "^10.0.0", - "ignore": "^5.0.0", + "ignore": "^6.0.0", "is-empty": "^1.0.0", "is-plain-obj": "^4.0.0", "load-plugin": "^6.0.0", @@ -21598,19 +22240,19 @@ } }, "node_modules/unified-engine/node_modules/@types/node": { - "version": "20.16.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.16.2.tgz", - "integrity": "sha512-91s/n4qUPV/wg8eE9KHYW1kouTfDk2FPGjXbBMfRWP/2vg1rCXNQL1OCabwGs0XSdukuK+MwCDXE30QpSeMUhQ==", + "version": "22.19.15", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.19.15.tgz", + "integrity": "sha512-F0R/h2+dsy5wJAUe3tAU6oqa2qbWY5TpNfL/RGmo1y38hiyO1w3x2jPtt76wmuaJI4DQnOBu21cNXQ2STIUUWg==", "dev": true, "license": "MIT", "dependencies": { - "undici-types": "~6.19.2" + "undici-types": "~6.21.0" } }, "node_modules/unified-engine/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.3.tgz", + "integrity": "sha512-MCV/fYJEbqx68aE58kv2cA/kiky1G8vux3OR6/jbS+jIMe/6fJWa0DTzJU7dqijOWYwHi1t29FlfYI9uytqlpA==", "dev": true, "license": "MIT", "dependencies": { @@ -21618,9 +22260,10 @@ } }, "node_modules/unified-engine/node_modules/glob": { - "version": "10.4.5", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", - "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz", + "integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", "dev": true, "license": "ISC", "dependencies": { @@ -21638,6 +22281,16 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/unified-engine/node_modules/ignore": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-6.0.2.tgz", + "integrity": "sha512-InwqeHHN2XpumIkMvpl/DCJVrAHgCsG5+cn1XlnLWGwtZBm8QJfSusItfrwx81CTp5agNZqpKU2J/ccC5nGT4A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, "node_modules/unified-engine/node_modules/json-parse-even-better-errors": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.2.tgz", @@ -21659,13 +22312,13 @@ } }, "node_modules/unified-engine/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "version": "9.0.9", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.9.tgz", + "integrity": "sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==", "dev": true, "license": "ISC", "dependencies": { - "brace-expansion": "^2.0.1" + "brace-expansion": "^2.0.2" }, "engines": { "node": ">=16 || 14 >=14.17" @@ -21707,6 +22360,13 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/unified-engine/node_modules/undici-types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "dev": true, + "license": "MIT" + }, "node_modules/unique-string": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-3.0.0.tgz", @@ -21737,9 +22397,9 @@ } }, "node_modules/unist-util-is": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-6.0.0.tgz", - "integrity": "sha512-2qCTHimwdxLfz+YzdGfkqNlH0tLi9xjTnHddPmJwtIG9MGsdbutfTc4P+haPD7l7Cjxf/WZj+we5qfVPvvxfYw==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-6.0.1.tgz", + "integrity": "sha512-LsiILbtBETkDz8I9p1dQ0uyRUWuaQzd/cuEeS1hoRSyW5E5XGmTzlwY1OrNzzakGowI9Dr/I8HVaw4hTtnxy8g==", "license": "MIT", "dependencies": { "@types/unist": "^3.0.0" @@ -21789,9 +22449,9 @@ } }, "node_modules/unist-util-visit": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-5.0.0.tgz", - "integrity": "sha512-MR04uvD+07cwl/yhVuVWAtw+3GOR/knlL55Nd/wAdblk27GCVt3lqpTivy/tkJcZoNPzTwS1Y+KMojlLDhoTzg==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-5.1.0.tgz", + "integrity": "sha512-m+vIdyeCOpdr/QeQCu2EzxX/ohgS8KbnPDgFni4dQsfSCtpz8UqDyY5GjRru8PDKuYn7Fq19j1CQ+nJSsGKOzg==", "license": "MIT", "dependencies": { "@types/unist": "^3.0.0", @@ -21804,9 +22464,9 @@ } }, "node_modules/unist-util-visit-parents": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-6.0.1.tgz", - "integrity": "sha512-L/PqWzfTP9lzzEa6CKs0k2nARxTdZduw3zyh8d2NVBnsyvHjSX4TWse388YrrQKbvI8w20fGjGlhgT96WwKykw==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-6.0.2.tgz", + "integrity": "sha512-goh1s1TBrqSqukSc8wrjwWhL0hiJxgA8m4kFxGlQ+8FYQ3C/m11FcTs4YYem7V664AhHVvgoQLk890Ssdsr2IQ==", "license": "MIT", "dependencies": { "@types/unist": "^3.0.0", @@ -21836,9 +22496,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.0.tgz", - "integrity": "sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz", + "integrity": "sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==", "funding": [ { "type": "opencollective", @@ -21855,8 +22515,8 @@ ], "license": "MIT", "dependencies": { - "escalade": "^3.1.2", - "picocolors": "^1.0.1" + "escalade": "^3.2.0", + "picocolors": "^1.1.1" }, "bin": { "update-browserslist-db": "cli.js" @@ -21928,9 +22588,9 @@ } }, "node_modules/update-notifier/node_modules/chalk": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", - "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.6.2.tgz", + "integrity": "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==", "license": "MIT", "engines": { "node": "^12.17.0 || ^14.13 || >=16.0.0" @@ -21948,15 +22608,6 @@ "punycode": "^2.1.0" } }, - "node_modules/uri-js/node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/url-loader": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/url-loader/-/url-loader-4.1.1.tgz", @@ -22054,43 +22705,16 @@ } }, "node_modules/uuid": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", - "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.1.0.tgz", + "integrity": "sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A==", "funding": [ "https://github.com/sponsors/broofa", "https://github.com/sponsors/ctavan" ], "license": "MIT", "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/uvu": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/uvu/-/uvu-0.5.6.tgz", - "integrity": "sha512-+g8ENReyr8YsOc6fv/NVJs2vFdHBnBNdfE49rshrTzDWOlUx4Gq7KOS2GD8eqhy2j+Ejq29+SbKH8yjkAqXqoA==", - "license": "MIT", - "dependencies": { - "dequal": "^2.0.0", - "diff": "^5.0.0", - "kleur": "^4.0.3", - "sade": "^1.7.3" - }, - "bin": { - "uvu": "bin.js" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/uvu/node_modules/kleur": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", - "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", - "license": "MIT", - "engines": { - "node": ">=6" + "uuid": "dist/esm/bin/uuid" } }, "node_modules/validate-npm-package-license": { @@ -22158,9 +22782,9 @@ } }, "node_modules/vfile-message": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-4.0.2.tgz", - "integrity": "sha512-jRDZ1IMLttGj41KcZvlrYAaI3CfqpLpfpf+Mfig13viT6NKvRzWZ+lXz0Y5D60w6uJIBAOGq9mSHf0gktF0duw==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-4.0.3.tgz", + "integrity": "sha512-QTHzsGd1EhbZs4AsQ20JX1rC3cOlt/IWJruk893DfLRr57lcnOeMaWG4K0JrRta4mIJZKth2Au3mM3u03/JWKw==", "license": "MIT", "dependencies": { "@types/unist": "^3.0.0", @@ -22193,9 +22817,9 @@ } }, "node_modules/vfile-reporter/node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", "dev": true, "license": "MIT", "engines": { @@ -22206,9 +22830,9 @@ } }, "node_modules/vfile-reporter/node_modules/emoji-regex": { - "version": "10.4.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz", - "integrity": "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==", + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz", + "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==", "dev": true, "license": "MIT" }, @@ -22231,13 +22855,13 @@ } }, "node_modules/vfile-reporter/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz", + "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==", "dev": true, "license": "MIT", "dependencies": { - "ansi-regex": "^6.0.1" + "ansi-regex": "^6.2.2" }, "engines": { "node": ">=12" @@ -22289,6 +22913,55 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/vscode-jsonrpc": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.2.0.tgz", + "integrity": "sha512-C+r0eKJUIfiDIfwJhria30+TYWPtuHJXHtI7J0YlOmKAo7ogxP20T0zxB7HZQIFhIyvoBPwWskjxrvAtfjyZfA==", + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/vscode-languageserver": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-9.0.1.tgz", + "integrity": "sha512-woByF3PDpkHFUreUa7Hos7+pUWdeWMXRd26+ZX2A8cFx6v/JPTtd4/uN0/jB6XQHYaOlHbio03NTHCqrgG5n7g==", + "license": "MIT", + "dependencies": { + "vscode-languageserver-protocol": "3.17.5" + }, + "bin": { + "installServerIntoExtension": "bin/installServerIntoExtension" + } + }, + "node_modules/vscode-languageserver-protocol": { + "version": "3.17.5", + "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.5.tgz", + "integrity": "sha512-mb1bvRJN8SVznADSGWM9u/b07H7Ecg0I3OgXDuLdn307rl/J3A9YD6/eYOssqhecL27hK1IPZAsaqh00i/Jljg==", + "license": "MIT", + "dependencies": { + "vscode-jsonrpc": "8.2.0", + "vscode-languageserver-types": "3.17.5" + } + }, + "node_modules/vscode-languageserver-textdocument": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.12.tgz", + "integrity": "sha512-cxWNPesCnQCcMPeenjKKsOCKQZ/L6Tv19DTRIGuLWe32lyzWhihGVJ/rcckZXJxfdKCFvRLS3fpBIsV/ZGX4zA==", + "license": "MIT" + }, + "node_modules/vscode-languageserver-types": { + "version": "3.17.5", + "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.5.tgz", + "integrity": "sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==", + "license": "MIT" + }, + "node_modules/vscode-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.1.0.tgz", + "integrity": "sha512-/BpdSx+yCQGnCvecbyXdxHDkuk55/G3xwnC0GqY4gmQ3j+A+g8kzzgB4Nk/SINjqn6+waqw3EgbVF2QKExkRxQ==", + "license": "MIT" + }, "node_modules/walk-up-path": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/walk-up-path/-/walk-up-path-3.0.1.tgz", @@ -22297,9 +22970,9 @@ "license": "ISC" }, "node_modules/watchpack": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.2.tgz", - "integrity": "sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw==", + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.5.1.tgz", + "integrity": "sha512-Zn5uXdcFNIA1+1Ei5McRd+iRzfhENPCe7LeABkJtNulSxjma+l7ltNx55BWZkRlwRnpOgHqxnjyaDgJnNXnqzg==", "license": "MIT", "dependencies": { "glob-to-regexp": "^0.4.1", @@ -22329,45 +23002,42 @@ } }, "node_modules/web-tree-sitter": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/web-tree-sitter/-/web-tree-sitter-0.23.0.tgz", - "integrity": "sha512-p1T+ju2H30fpVX2q5yr+Wv/NfdMMWMjQp9Q+4eEPrHAJpPFh9DPfI2Yr9L1f5SA5KPE+g1cNUqPbpihxUDzmVw==" - }, - "node_modules/web-worker": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/web-worker/-/web-worker-1.3.0.tgz", - "integrity": "sha512-BSR9wyRsy/KOValMgd5kMyr3JzpdeoR9KVId8u5GVlTTAtNChlsE4yTxeY7zMdNSyOmoKBv8NH2qeRY9Tg+IaA==", - "license": "Apache-2.0" + "version": "0.24.7", + "resolved": "https://registry.npmjs.org/web-tree-sitter/-/web-tree-sitter-0.24.7.tgz", + "integrity": "sha512-CdC/TqVFbXqR+C51v38hv6wOPatKEUGxa39scAeFSm98wIhZxAYonhRQPSMmfZ2w7JDI0zQDdzdmgtNk06/krQ==", + "license": "MIT" }, "node_modules/webpack": { - "version": "5.94.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.94.0.tgz", - "integrity": "sha512-KcsGn50VT+06JH/iunZJedYGUJS5FGjow8wb9c0v5n1Om8O1g4L6LjtfxwlXIATopoQu+vOXXa7gYisWxCoPyg==", + "version": "5.105.4", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.105.4.tgz", + "integrity": "sha512-jTywjboN9aHxFlToqb0K0Zs9SbBoW4zRUlGzI2tYNxVYcEi/IPpn+Xi4ye5jTLvX2YeLuic/IvxNot+Q1jMoOw==", "license": "MIT", "dependencies": { - "@types/estree": "^1.0.5", - "@webassemblyjs/ast": "^1.12.1", - "@webassemblyjs/wasm-edit": "^1.12.1", - "@webassemblyjs/wasm-parser": "^1.12.1", - "acorn": "^8.7.1", - "acorn-import-attributes": "^1.9.5", - "browserslist": "^4.21.10", + "@types/eslint-scope": "^3.7.7", + "@types/estree": "^1.0.8", + "@types/json-schema": "^7.0.15", + "@webassemblyjs/ast": "^1.14.1", + "@webassemblyjs/wasm-edit": "^1.14.1", + "@webassemblyjs/wasm-parser": "^1.14.1", + "acorn": "^8.16.0", + "acorn-import-phases": "^1.0.3", + "browserslist": "^4.28.1", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.17.1", - "es-module-lexer": "^1.2.1", + "enhanced-resolve": "^5.20.0", + "es-module-lexer": "^2.0.0", "eslint-scope": "5.1.1", "events": "^3.2.0", "glob-to-regexp": "^0.4.1", "graceful-fs": "^4.2.11", "json-parse-even-better-errors": "^2.3.1", - "loader-runner": "^4.2.0", + "loader-runner": "^4.3.1", "mime-types": "^2.1.27", "neo-async": "^2.6.2", - "schema-utils": "^3.2.0", - "tapable": "^2.1.1", - "terser-webpack-plugin": "^5.3.10", - "watchpack": "^2.4.1", - "webpack-sources": "^3.2.3" + "schema-utils": "^4.3.3", + "tapable": "^2.3.0", + "terser-webpack-plugin": "^5.3.17", + "watchpack": "^2.5.1", + "webpack-sources": "^3.3.4" }, "bin": { "webpack": "bin/webpack.js" @@ -22421,47 +23091,57 @@ } }, "node_modules/webpack-dev-middleware": { - "version": "5.3.4", - "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-5.3.4.tgz", - "integrity": "sha512-BVdTqhhs+0IfoeAf7EoH5WE+exCmqGerHfDM0IL096Px60Tq2Mn9MAbnaGUe6HiMa41KMCYF19gyzZmBcq/o4Q==", + "version": "7.4.5", + "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-7.4.5.tgz", + "integrity": "sha512-uxQ6YqGdE4hgDKNf7hUiPXOdtkXvBJXrfEGYSx7P7LC8hnUYGK70X6xQXUvXeNyBDDcsiQXpG2m3G9vxowaEuA==", "license": "MIT", "dependencies": { "colorette": "^2.0.10", - "memfs": "^3.4.3", - "mime-types": "^2.1.31", + "memfs": "^4.43.1", + "mime-types": "^3.0.1", + "on-finished": "^2.4.1", "range-parser": "^1.2.1", "schema-utils": "^4.0.0" }, "engines": { - "node": ">= 12.13.0" + "node": ">= 18.12.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/webpack" }, "peerDependencies": { - "webpack": "^4.0.0 || ^5.0.0" + "webpack": "^5.0.0" + }, + "peerDependenciesMeta": { + "webpack": { + "optional": true + } } }, "node_modules/webpack-dev-middleware/node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "version": "1.54.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", + "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", "license": "MIT", "engines": { "node": ">= 0.6" } }, "node_modules/webpack-dev-middleware/node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.2.tgz", + "integrity": "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==", "license": "MIT", "dependencies": { - "mime-db": "1.52.0" + "mime-db": "^1.54.0" }, "engines": { - "node": ">= 0.6" + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/webpack-dev-middleware/node_modules/range-parser": { @@ -22474,54 +23154,52 @@ } }, "node_modules/webpack-dev-server": { - "version": "4.15.2", - "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-4.15.2.tgz", - "integrity": "sha512-0XavAZbNJ5sDrCbkpWL8mia0o5WPOd2YGtxrEiZkBK9FjLppIUK2TgxK6qGD2P3hUXTJNNPVibrerKcx5WkR1g==", + "version": "5.2.5", + "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-5.2.5.tgz", + "integrity": "sha512-4wZtCquSuv9CKX8oybo+mqxtxZqWz47uM1Ch94lxowBztOhWCbhqvRbfC/mODOwxgV2brY+JGZpHq58/SuVFYg==", "license": "MIT", "dependencies": { - "@types/bonjour": "^3.5.9", - "@types/connect-history-api-fallback": "^1.3.5", - "@types/express": "^4.17.13", - "@types/serve-index": "^1.9.1", - "@types/serve-static": "^1.13.10", - "@types/sockjs": "^0.3.33", - "@types/ws": "^8.5.5", + "@types/bonjour": "^3.5.13", + "@types/connect-history-api-fallback": "^1.5.4", + "@types/express": "^4.17.25", + "@types/express-serve-static-core": "^4.17.21", + "@types/serve-index": "^1.9.4", + "@types/serve-static": "^1.15.5", + "@types/sockjs": "^0.3.36", + "@types/ws": "^8.5.10", "ansi-html-community": "^0.0.8", - "bonjour-service": "^1.0.11", - "chokidar": "^3.5.3", + "bonjour-service": "^1.2.1", + "chokidar": "^3.6.0", "colorette": "^2.0.10", - "compression": "^1.7.4", + "compression": "^1.8.1", "connect-history-api-fallback": "^2.0.0", - "default-gateway": "^6.0.3", - "express": "^4.17.3", + "express": "^4.22.1", "graceful-fs": "^4.2.6", - "html-entities": "^2.3.2", - "http-proxy-middleware": "^2.0.3", - "ipaddr.js": "^2.0.1", - "launch-editor": "^2.6.0", - "open": "^8.0.9", - "p-retry": "^4.5.0", - "rimraf": "^3.0.2", - "schema-utils": "^4.0.0", - "selfsigned": "^2.1.1", + "http-proxy-middleware": "^2.0.9", + "ipaddr.js": "^2.1.0", + "launch-editor": "^2.6.1", + "open": "^10.0.3", + "p-retry": "^6.2.0", + "schema-utils": "^4.2.0", + "selfsigned": "^5.5.0", "serve-index": "^1.9.1", "sockjs": "^0.3.24", "spdy": "^4.0.2", - "webpack-dev-middleware": "^5.3.4", - "ws": "^8.13.0" + "webpack-dev-middleware": "^7.4.2", + "ws": "^8.18.0" }, "bin": { "webpack-dev-server": "bin/webpack-dev-server.js" }, "engines": { - "node": ">= 12.13.0" + "node": ">= 18.12.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/webpack" }, "peerDependencies": { - "webpack": "^4.37.0 || ^5.0.0" + "webpack": "^5.0.0" }, "peerDependenciesMeta": { "webpack": { @@ -22532,10 +23210,40 @@ } } }, + "node_modules/webpack-dev-server/node_modules/define-lazy-prop": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", + "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/webpack-dev-server/node_modules/open": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/open/-/open-10.2.0.tgz", + "integrity": "sha512-YgBpdJHPyQ2UE5x+hlSXcnejzAvD0b22U2OuAP+8OnlJT+PjWPxtgmGqKKc+RgTM63U9gN0YzrYc71R2WT/hTA==", + "license": "MIT", + "dependencies": { + "default-browser": "^5.2.1", + "define-lazy-prop": "^3.0.0", + "is-inside-container": "^1.0.0", + "wsl-utils": "^0.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/webpack-dev-server/node_modules/ws": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", - "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", + "version": "8.21.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.21.0.tgz", + "integrity": "sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g==", "license": "MIT", "engines": { "node": ">=10.0.0" @@ -22554,23 +23262,23 @@ } }, "node_modules/webpack-merge": { - "version": "5.10.0", - "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.10.0.tgz", - "integrity": "sha512-+4zXKdx7UnO+1jaN4l2lHVD+mFvnlZQP/6ljaJVb4SZiwIKeUnrT5l0gkT8z+n4hKpC+jpOv6O9R+gLtag7pSA==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-6.0.1.tgz", + "integrity": "sha512-hXXvrjtx2PLYx4qruKl+kyRSLc52V+cCvMxRjmKwoA+CBbbF5GfIBtR6kCvl0fYGqTUPKB+1ktVmTHqMOzgCBg==", "license": "MIT", "dependencies": { "clone-deep": "^4.0.1", "flat": "^5.0.2", - "wildcard": "^2.0.0" + "wildcard": "^2.0.1" }, "engines": { - "node": ">=10.0.0" + "node": ">=18.0.0" } }, "node_modules/webpack-sources": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", - "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.3.4.tgz", + "integrity": "sha512-7tP1PdV4vF+lYPnkMR0jMY5/la2ub5Fc/8VQrrU+lXkiM6C4TjVfGw7iKfyhnTQOsD+6Q/iKw0eFciziRgD58Q==", "license": "MIT", "engines": { "node": ">=10.13.0" @@ -22619,40 +23327,31 @@ "node": ">= 0.6" } }, - "node_modules/webpack/node_modules/schema-utils": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", - "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", - "license": "MIT", - "dependencies": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, "node_modules/webpackbar": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/webpackbar/-/webpackbar-5.0.2.tgz", - "integrity": "sha512-BmFJo7veBDgQzfWXl/wwYXr/VFus0614qZ8i9znqcl9fnEdiVkdbi0TedLQ6xAK92HZHDJ0QmyQ0fmuZPAgCYQ==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/webpackbar/-/webpackbar-7.0.0.tgz", + "integrity": "sha512-aS9soqSO2iCHgqHoCrj4LbfGQUboDCYJPSFOAchEK+9psIjNrfSWW4Y0YEz67MKURNvMmfo0ycOg9d/+OOf9/Q==", "license": "MIT", "dependencies": { - "chalk": "^4.1.0", - "consola": "^2.15.3", + "ansis": "^3.2.0", + "consola": "^3.2.3", "pretty-time": "^1.1.0", - "std-env": "^3.0.1" + "std-env": "^3.7.0" }, "engines": { - "node": ">=12" + "node": ">=14.21.3" }, "peerDependencies": { + "@rspack/core": "*", "webpack": "3 || 4 || 5" + }, + "peerDependenciesMeta": { + "@rspack/core": { + "optional": true + }, + "webpack": { + "optional": true + } } }, "node_modules/websocket-driver": { @@ -22694,41 +23393,45 @@ } }, "node_modules/which-boxed-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", - "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.1.1.tgz", + "integrity": "sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA==", "dev": true, "license": "MIT", "dependencies": { - "is-bigint": "^1.0.1", - "is-boolean-object": "^1.1.0", - "is-number-object": "^1.0.4", - "is-string": "^1.0.5", - "is-symbol": "^1.0.3" + "is-bigint": "^1.1.0", + "is-boolean-object": "^1.2.1", + "is-number-object": "^1.1.1", + "is-string": "^1.1.1", + "is-symbol": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/which-builtin-type": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.1.4.tgz", - "integrity": "sha512-bppkmBSsHFmIMSl8BO9TbsyzsvGjVoppt8xUiGzwiu/bhDCGxnpOKCxgqj6GuyHE0mINMDecBFPlOm2hzY084w==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.2.1.tgz", + "integrity": "sha512-6iBczoX+kDQ7a3+YJBnh3T+KZRxM/iYNPXicqk66/Qfm1b93iu+yOImkg0zHbj5LNOcNv1TEADiZ0xa34B4q6Q==", "dev": true, "license": "MIT", "dependencies": { + "call-bound": "^1.0.2", "function.prototype.name": "^1.1.6", "has-tostringtag": "^1.0.2", "is-async-function": "^2.0.0", - "is-date-object": "^1.0.5", - "is-finalizationregistry": "^1.0.2", + "is-date-object": "^1.1.0", + "is-finalizationregistry": "^1.1.0", "is-generator-function": "^1.0.10", - "is-regex": "^1.1.4", + "is-regex": "^1.2.1", "is-weakref": "^1.0.2", "isarray": "^2.0.5", - "which-boxed-primitive": "^1.0.2", + "which-boxed-primitive": "^1.1.0", "which-collection": "^1.0.2", - "which-typed-array": "^1.1.15" + "which-typed-array": "^1.1.16" }, "engines": { "node": ">= 0.4" @@ -22764,16 +23467,18 @@ } }, "node_modules/which-typed-array": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", - "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", + "version": "1.1.20", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.20.tgz", + "integrity": "sha512-LYfpUkmqwl0h9A2HL09Mms427Q1RZWuOHsukfVcKRq9q95iQxdw0ix1JQrqbcDR9PH1QDwf5Qo8OZb5lksZ8Xg==", "dev": true, "license": "MIT", "dependencies": { "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.7", - "for-each": "^0.3.3", - "gopd": "^1.0.1", + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "for-each": "^0.3.5", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", "has-tostringtag": "^1.0.2" }, "engines": { @@ -22808,7 +23513,7 @@ "version": "1.2.5", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -22873,9 +23578,9 @@ } }, "node_modules/wrap-ansi/node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", "license": "MIT", "engines": { "node": ">=12" @@ -22885,9 +23590,9 @@ } }, "node_modules/wrap-ansi/node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", "license": "MIT", "engines": { "node": ">=12" @@ -22897,12 +23602,12 @@ } }, "node_modules/wrap-ansi/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz", + "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==", "license": "MIT", "dependencies": { - "ansi-regex": "^6.0.1" + "ansi-regex": "^6.2.2" }, "engines": { "node": ">=12" @@ -22915,6 +23620,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true, "license": "ISC" }, "node_modules/write-file-atomic": { @@ -22930,9 +23636,9 @@ } }, "node_modules/ws": { - "version": "7.5.10", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", - "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", + "version": "7.5.11", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.11.tgz", + "integrity": "sha512-zS54Oen9bITtp7kp2XM3AydrCIq1D+HwJOuH+c+e4LfpL/lotP5osijd+UoMnxwAam1GN8R4KtLAyIrIcBNpiA==", "license": "MIT", "engines": { "node": ">=8.3.0" @@ -22950,6 +23656,36 @@ } } }, + "node_modules/wsl-utils": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/wsl-utils/-/wsl-utils-0.1.0.tgz", + "integrity": "sha512-h3Fbisa2nKGPxCpm89Hk33lBLsnaGBvctQopaBSOW/uIs6FTe1ATyAnKFJrzVs9vpGdsTe73WF3V4lIsk4Gacw==", + "license": "MIT", + "dependencies": { + "is-wsl": "^3.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/wsl-utils/node_modules/is-wsl": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-3.1.1.tgz", + "integrity": "sha512-e6rvdUCiQCAuumZslxRJWR/Doq4VpPR82kqclvcS0efgt430SlGIk05vdCN58+VrzgtIcfNODjozVielycD4Sw==", + "license": "MIT", + "dependencies": { + "is-inside-container": "^1.0.0" + }, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/xdg-basedir": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-5.1.0.tgz", @@ -22981,22 +23717,26 @@ "license": "ISC" }, "node_modules/yaml": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.5.0.tgz", - "integrity": "sha512-2wWLbGbYDiSqqIKoPjar3MPgB94ErzCtrNE1FdqGuaO0pi2JGjmE8aW8TDZwzU7vuxcGRdL/4gPQwQ7hD5AMSw==", + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.3.tgz", + "integrity": "sha512-AvbaCLOO2Otw/lW5bmh9d/WEdcDFdQp2Z2ZUH3pX9U2ihyUY0nvLv7J6TrWowklRGPYbB/IuIMfYgxaCPg5Bpg==", "dev": true, "license": "ISC", "bin": { "yaml": "bin.mjs" }, "engines": { - "node": ">= 14" + "node": ">= 14.6" + }, + "funding": { + "url": "https://github.com/sponsors/eemeli" } }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, "license": "MIT", "engines": { "node": ">=10" diff --git a/docs/package.json b/docs/package.json index 3f0efe58..da9745fe 100644 --- a/docs/package.json +++ b/docs/package.json @@ -9,27 +9,28 @@ "swizzle": "docusaurus swizzle", "deploy": "docusaurus deploy", "clear": "docusaurus clear", - "lint": "eslint . --ext js,jsx,md,mdx", + "lint": "eslint", "prettier:check": "prettier --check .", "prettier:format": "prettier --write .", "typecheck": "tsc" }, "dependencies": { - "@docusaurus/core": "^3.0.0", - "@docusaurus/preset-classic": "^3.0.0", - "@docusaurus/theme-mermaid": "^3.0.0", - "@fortawesome/fontawesome-svg-core": "^6.4.2", - "@fortawesome/free-solid-svg-icons": "^6.4.0", + "@docusaurus/core": "^3.10.1", + "@docusaurus/preset-classic": "^3.10.1", + "@docusaurus/theme-mermaid": "^3.10.1", + "@fortawesome/fontawesome-svg-core": "^6.7.1", + "@fortawesome/free-solid-svg-icons": "^6.7.1", "@fortawesome/react-fontawesome": "^0.2.0", - "@mdx-js/react": "^3.0.0", + "@mdx-js/react": "^3.1.0", "classnames": "^2.2.6", - "js-yaml": "^4.1.0", + "js-yaml": "^4.1.1", "react": "^18.0.0", "react-async": "^10.0.1", "react-copy-to-clipboard": "^5.0.3", "react-dom": "^18.0.0", - "react-toastify": "^10.0.5", - "web-tree-sitter": "^0.23.0" + "react-toastify": "^10.0.6", + "tree-sitter-devicetree": "^0.12.1", + "web-tree-sitter": "^0.24.3" }, "browserslist": { "production": [ @@ -44,24 +45,27 @@ ] }, "devDependencies": { - "@docusaurus/module-type-aliases": "^3.0.0", - "@docusaurus/types": "^3.0.0", - "@docusaurus/tsconfig": "^3.0.0", + "@docusaurus/module-type-aliases": "^3.9.2", + "@docusaurus/tsconfig": "^3.9.2", + "@docusaurus/types": "^3.9.2", + "@eslint/js": "^9.39.2", + "@types/glob": "^8.1.0", "@types/js-yaml": "^4.0.5", - "@types/react": "^18.2.29", + "@types/react": "^18.3.12", "@types/react-helmet": "^6.1.6", "@types/react-router-dom": "^5.1.7", - "eslint": "^8.39.0", - "eslint-config-prettier": "^8.8.0", - "eslint-plugin-mdx": "^3.1.5", - "eslint-plugin-react": "^7.33.2", - "json-schema-to-typescript": "^13.1.1", + "eslint": "^9.39.2", + "eslint-plugin-mdx": "^3.6.2", + "eslint-plugin-react": "^7.37.5", + "globals": "^17.6.0", + "json-schema-to-typescript": "^15.0.3", "mustache": "^4.2.0", "null-loader": "^4.0.0", "prebuild-webpack-plugin": "^1.1.1", - "prettier": "^2.8.7", - "string-replace-loader": "^3.1.0", - "typescript": "^5.0.4", - "webpack": "^5.94.0" + "prettier": "^3.7.4", + "string-replace-loader": "^3.3.0", + "typescript": "^5.9.3", + "typescript-eslint": "^8.52.0", + "webpack": "^5.104.1" } } diff --git a/docs/sidebars.js b/docs/sidebars.js index daff5c7f..167527f5 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -13,6 +13,7 @@ module.exports = { "faq", "user-setup", "customization", + "zmk-cli", { type: "category", label: "Troubleshooting", @@ -25,6 +26,7 @@ module.exports = { "troubleshooting/building-issues", "troubleshooting/flashing-issues", "troubleshooting/connection-issues", + "troubleshooting/hardware-issues", ], }, ], @@ -36,11 +38,12 @@ module.exports = { "features/split-keyboards", "features/debouncing", "features/battery", - "features/soft-off", + "features/led-indicators", + "features/low-power-states", "features/encoders", + "features/pointing", "features/displays", - "features/backlight", - "features/underglow", + "features/lighting", "features/studio", ], }, @@ -66,7 +69,6 @@ module.exports = { "keymaps/behaviors/layers", "keymaps/behaviors/misc", "keymaps/behaviors/hold-tap", - "keymaps/behaviors/mod-tap", "keymaps/behaviors/mod-morph", "keymaps/behaviors/macros", "keymaps/behaviors/key-toggle", @@ -91,6 +93,23 @@ module.exports = { "keymaps/combos", "keymaps/conditional-layers", "keymaps/list-of-keycodes", + { + type: "category", + label: "Input Processors", + link: { + type: "doc", + id: "keymaps/input-processors/index", + }, + collapsed: true, + items: [ + "keymaps/input-processors/usage", + "keymaps/input-processors/scaler", + "keymaps/input-processors/transformer", + "keymaps/input-processors/code-mapper", + "keymaps/input-processors/temp-layer", + "keymaps/input-processors/behaviors", + ], + }, ], }, { @@ -102,40 +121,87 @@ module.exports = { }, collapsed: true, items: [ - "config/backlight", "config/battery", "config/behaviors", "config/bluetooth", + "config/bootloader", "config/combos", "config/displays", "config/encoders", + "config/led-indicators", + "config/lighting", + "config/pointing", "config/keymap", + "config/layout", "config/kscan", "config/power", - "config/underglow", + "config/settings", + "config/split", "config/system", "config/studio", ], }, + { + type: "category", + label: "Hardware Integration", + link: { + type: "doc", + id: "hardware-integration/index", + }, + collapsed: true, + items: [ + "hardware-integration/new-board", + "hardware-integration/new-shield", + "hardware-integration/physical-layouts", + "hardware-integration/hardware-metadata-files", + "hardware-integration/pinctrl", + "hardware-integration/dongle", + "hardware-integration/shift-registers", + "hardware-integration/encoders", + "hardware-integration/soft-off-setup", + "hardware-integration/pointing", + "hardware-integration/battery", + { + type: "category", + label: "Bootloader", + link: { + type: "doc", + id: "hardware-integration/bootloader/index", + }, + collapsed: true, + items: [ + "hardware-integration/bootloader/adafruit-nrf52", + "hardware-integration/bootloader/tinyuf2", + "hardware-integration/bootloader/samd21-uf2", + "hardware-integration/bootloader/rp2", + "hardware-integration/bootloader/stm32", + ], + }, + { + type: "category", + label: "Lighting", + link: { + type: "doc", + id: "hardware-integration/lighting/index", + }, + collapsed: true, + items: [ + "hardware-integration/lighting/underglow", + "hardware-integration/lighting/backlight", + "hardware-integration/lighting/led-indicators", + ], + }, + ], + }, { Development: [ - { - type: "category", - label: "Hardware Integration", - collapsed: true, - items: [ - "development/hardware-integration/new-shield", - "development/hardware-integration/hardware-metadata-files", - "development/hardware-integration/boards-shields-keymaps", - "development/hardware-integration/studio-setup", - ], - }, { type: "category", label: "Contributing", collapsed: true, items: [ "development/contributing/clean-room", + "development/contributing/pull-requests", "development/contributing/documentation", ], }, @@ -153,7 +219,7 @@ module.exports = { }, collapsed: true, items: [ - "development/local-toolchain/setup/docker", + "development/local-toolchain/setup/container", "development/local-toolchain/setup/native", ], }, @@ -164,9 +230,12 @@ module.exports = { "development/local-toolchain/posix-board", ], }, + "development/module-creation", "development/usb-logging", + "development/devicetree", "development/studio-rpc-protocol", "development/new-behavior", + "development/events", ], }, ], diff --git a/docs/src/components/KeymapUpgrader/styles.module.css b/docs/src/components/KeymapUpgrader/styles.module.css index 31e06b97..f44cf323 100644 --- a/docs/src/components/KeymapUpgrader/styles.module.css +++ b/docs/src/components/KeymapUpgrader/styles.module.css @@ -9,6 +9,7 @@ font-size: var(--ifm-font-size-base); line-height: var(--ifm-pre-line-height); tab-size: 4; + resize: vertical; color: var(--ifm-pre-color); background-color: var(--ifm-pre-background); diff --git a/docs/src/components/columns.tsx b/docs/src/components/columns.tsx new file mode 100644 index 00000000..09172c2c --- /dev/null +++ b/docs/src/components/columns.tsx @@ -0,0 +1,32 @@ +import { ReactNode, CSSProperties } from "react"; +import clsx from "clsx"; + +interface ColumnsProps { + children: ReactNode; + className?: string; + style?: CSSProperties; +} +// className will allow you to pass either your custom classes or the native infima classes https://infima.dev/docs/layout/grid. +// style will allow you to either pass your custom styles directly, which can be an alternative to the "styles.module.css" file in certain cases. +export function Columns({ children, className, style }: ColumnsProps) { + return ( +
+
+ {children} +
+
+ ); +} + +interface ColumnProps { + children: ReactNode; + className?: string; + style?: CSSProperties; +} +export function Column({ children, className, style }: ColumnProps) { + return ( +
+ {children} +
+ ); +} diff --git a/docs/src/components/hardware-list.tsx b/docs/src/components/hardware-list.tsx index 86f9a9d0..e027df3b 100644 --- a/docs/src/components/hardware-list.tsx +++ b/docs/src/components/hardware-list.tsx @@ -18,12 +18,11 @@ function itemHasMultiple(item: HardwareMetadata) { function itemIds(item: HardwareMetadata) { if (item.type == "board" || item.type == "shield") { - let nodes = (item.siblings ?? [item.id]) - .map((id) => {id}) - .reduce( - (prev, curr, index) => [...prev, index > 0 ? ", " : "", curr], - [] as ElementOrString[] - ); + const nodes = (item.siblings ?? [item.id]) + .map((id) => {id}) + .reduce< + ElementOrString[] + >((prev, curr, index) => [...prev, index > 0 ? ", " : "", curr], []); return {nodes}; } else { return {item.id}; @@ -81,10 +80,38 @@ function mapInterconnect({ } function HardwareList({ items }: HardwareListProps) { - let grouped = groupedMetadata(items); + const grouped = groupedMetadata(items); return ( <> +
+ + Composite Keyboards + +

+ Composite keyboards are composed of two main PCBs: a small controller{" "} + board with exposed pads, and a larger keyboard PCB (a{" "} + shield, in ZMK lingo) with switch footprints. The + board and shield share the same interconnect{" "} + standard, which defines the physical and electrical specifications for + the PCB-to-PCB connection. +

+

+ Boards and shields that share the same interconnect are usually + compatible with each other but not always. Check hardware + compatibility before connecting them. +

+

+ Designing a custom composite keyboard with an off-the-shelf controller + board? Check out the{" "} + + New Keyboard Shield + {" "} + guide. +

+ + {Object.values(grouped.interconnects).map(mapInterconnect)} +
Onboard Controller Keyboards @@ -94,6 +121,10 @@ function HardwareList({ items }: HardwareListProps) { the components of a keyboard, including the controller chip, switch footprints, etc.

+

+ Designing a custom keyboard with an onboard controller? Check out the{" "} + New Board guide. +

    {grouped["onboard"] .sort((a, b) => a.name.localeCompare(b.name)) @@ -102,19 +133,6 @@ function HardwareList({ items }: HardwareListProps) { ))}
-
- - Composite Keyboards - -

- Composite keyboards are composed of two main PCBs: a small controller - board with exposed pads, and a larger keyboard PCB (a shield, in ZMK - lingo) with switch footprints and a location where the controller is - added. This location is called an interconnect. Multiple interconnects - can be found below. -

- {Object.values(grouped.interconnects).map(mapInterconnect)} -
); } diff --git a/docs/src/components/hardware-utils.ts b/docs/src/components/hardware-utils.ts index 76452dc3..f6454bfb 100644 --- a/docs/src/components/hardware-utils.ts +++ b/docs/src/components/hardware-utils.ts @@ -21,7 +21,7 @@ function groupedBoard(agg: GroupedMetadata, board: Board) { agg.onboard.push(board); } else if (board.exposes) { board.exposes.forEach((element) => { - let ic = agg.interconnects[element] ?? { + const ic = agg.interconnects[element] ?? { boards: [], shields: [], }; @@ -37,12 +37,12 @@ function groupedBoard(agg: GroupedMetadata, board: Board) { function groupedShield(agg: GroupedMetadata, shield: Shield) { shield.requires.forEach((id) => { - let ic = agg.interconnects[id] ?? { boards: [], shields: [] }; + const ic = agg.interconnects[id] ?? { boards: [], shields: [] }; ic.shields.push(shield); agg.interconnects[id] = ic; }); shield.exposes?.forEach((id) => { - let ic = agg.interconnects[id] ?? { boards: [], shields: [] }; + const ic = agg.interconnects[id] ?? { boards: [], shields: [] }; ic.shields.push(shield); agg.interconnects[id] = ic; }); @@ -50,7 +50,7 @@ function groupedShield(agg: GroupedMetadata, shield: Shield) { } function groupedInterconnect(agg: GroupedMetadata, item: Interconnect) { - let ic = agg.interconnects[item.id] ?? { boards: [], shields: [] }; + const ic = agg.interconnects[item.id] ?? { boards: [], shields: [] }; ic.interconnect = item; agg.interconnects[item.id] = ic; diff --git a/docs/src/components/interconnect-tabs.tsx b/docs/src/components/interconnect-tabs.tsx index 8a7a0a4e..f76b0215 100644 --- a/docs/src/components/interconnect-tabs.tsx +++ b/docs/src/components/interconnect-tabs.tsx @@ -2,29 +2,29 @@ import Tabs from "@theme/Tabs"; import TabItem from "@theme/TabItem"; import { HardwareMetadata, Interconnect } from "../hardware-metadata"; -import { groupedMetadata, InterconnectDetails } from "./hardware-utils"; +import { groupedMetadata } from "./hardware-utils"; interface InterconnectTabsProps { items: HardwareMetadata[]; + gpio: boolean; } -function mapInterconnect(interconnect: Interconnect) { - let content = require(`@site/src/data/interconnects/${interconnect.id}/design_guideline.md`); - let imageUrl = require(`@site/docs/assets/interconnects/${interconnect.id}/pinout.png`); - +function mapInterconnect(interconnect: Interconnect, gpio: boolean) { + const content = require( + `@site/src/data/interconnects/${interconnect.id}/design_guideline.md` + ); + const imageUrl = require( + `@site/docs/assets/interconnects/${interconnect.id}/pinout.png` + ); return ( - - - - {interconnect.node_labels && ( + {gpio && } + {interconnect.node_labels && !gpio && ( <> +

The following node labels are available:
    -
  • - GPIO: &{interconnect.node_labels.gpio} -
  • {interconnect.node_labels.i2c && (
  • I2C bus: &{interconnect.node_labels.i2c} @@ -56,15 +56,19 @@ function mapInterconnectValue(interconnect: Interconnect) { return { label: `${interconnect.name} Shields`, value: interconnect.id }; } -function InterconnectTabs({ items }: InterconnectTabsProps) { - let grouped = Object.values(groupedMetadata(items).interconnects) +function InterconnectTabs({ items, gpio }: InterconnectTabsProps) { + const grouped = Object.values(groupedMetadata(items).interconnects) .map((i) => i?.interconnect as Interconnect) .filter((i) => i?.design_guideline) .sort((a, b) => a.id.localeCompare(b.id)); return ( - - {grouped.map(mapInterconnect)} + + {grouped.map((items) => mapInterconnect(items, gpio))} ); } diff --git a/docs/src/css/custom.css b/docs/src/css/custom.css index 99920d54..a0150549 100644 --- a/docs/src/css/custom.css +++ b/docs/src/css/custom.css @@ -7,26 +7,44 @@ /* You can override the default Infima variables here. */ :root { - --ifm-color-primary: #026fc5; - --ifm-color-primary-dark: #0264b1; - --ifm-color-primary-darker: #025ea7; - --ifm-color-primary-darkest: #014e8a; - --ifm-color-primary-light: #027ad9; - --ifm-color-primary-lighter: #0280e3; - --ifm-color-primary-lightest: #0690fc; --ifm-code-font-size: 95%; --docusaurus-highlighted-code-line-bg: rgb(0 0 0 / 8%); + --docusaurus-highlighted-code-line-border-width: 5px; + --docusaurus-highlighted-code-line-border-color: var(--ifm-color-primary); } [data-theme="dark"] { --docusaurus-highlighted-code-line-bg: rgb(255 255 255 / 8%); } -.docusaurus-highlight-code-line { - display: block; - margin: 0 calc(-1 * var(--ifm-pre-padding)); - padding: 0 var(--ifm-pre-padding); +.header-github-link::before { + content: ""; + width: 24px; + height: 24px; + display: flex; + background-color: var(--ifm-navbar-link-color); + mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E"); + transition: background-color var(--ifm-transition-fast) + var(--ifm-transition-timing-default); +} + +.header-github-link:hover::before { + background-color: var(--ifm-navbar-link-hover-color); +} + +.theme-code-block .theme-code-block-highlighted-line { + /* Line numbers have a solid color background which would cover the highlighted line */ + --ifm-pre-background: transparent; + + /* Add a colored block to the left of any highlighted lines */ + border-left: var(--docusaurus-highlighted-code-line-border-width) solid + var(--docusaurus-highlighted-code-line-border-color); + + padding-left: calc( + var(--ifm-pre-padding) - + var(--docusaurus-highlighted-code-line-border-width) + ); } .video-container { @@ -50,3 +68,8 @@ .secrettabs { display: none; } + +.full-width-table table { + width: 100%; + display: table; +} diff --git a/docs/src/css/power-estimate.css b/docs/src/css/power-estimate.css index e876ec28..7da6a872 100644 --- a/docs/src/css/power-estimate.css +++ b/docs/src/css/power-estimate.css @@ -15,7 +15,8 @@ .powerEstimateBar { height: 64px; width: 100%; - box-shadow: rgba(0, 0, 0, 0.03) 0px 10px 20px 0px, + box-shadow: + rgba(0, 0, 0, 0.03) 0px 10px 20px 0px, rgba(0, 0, 0, 0.1) 0px 1px 4px 0px; border-radius: 64px; display: flex; diff --git a/docs/src/css/power-profiler.css b/docs/src/css/power-profiler.css index a0c18928..0d5f8a25 100644 --- a/docs/src/css/power-profiler.css +++ b/docs/src/css/power-profiler.css @@ -9,7 +9,8 @@ padding: 10px 20px; background: var(--ifm-background-surface-color); border-radius: 4px; - box-shadow: rgba(0, 0, 0, 0.03) 0px 10px 20px 0px, + box-shadow: + rgba(0, 0, 0, 0.03) 0px 10px 20px 0px, rgba(0, 0, 0, 0.1) 0px 1px 4px 0px; } @@ -40,7 +41,8 @@ span[data-tooltip]::before { background: var(--ifm-background-surface-color); opacity: 0; visibility: hidden; - box-shadow: rgba(0, 0, 0, 0.03) 0px 10px 20px 0px, + box-shadow: + rgba(0, 0, 0, 0.03) 0px 10px 20px 0px, rgba(0, 0, 0, 0.1) 0px 1px 4px 0px; transition: opacity 0.2s ease; transform: translate(-50%, -100%); @@ -180,7 +182,8 @@ select > option { padding: 20px 20px; background: var(--ifm-background-surface-color); border-radius: 4px; - box-shadow: rgba(0, 0, 0, 0.03) 0px 10px 20px 0px, + box-shadow: + rgba(0, 0, 0, 0.03) 0px 10px 20px 0px, rgba(0, 0, 0, 0.1) 0px 1px 4px 0px; width: 500px; } diff --git a/docs/src/data/footnotes.js b/docs/src/data/footnotes.js index af041390..5b7ccab2 100644 --- a/docs/src/data/footnotes.js +++ b/docs/src/data/footnotes.js @@ -4,16 +4,24 @@ * SPDX-License-Identifier: CC-BY-NC-SA-4.0 */ +import macosLanguage from "@site/docs/keymaps/_footnotes/macos-language.mdx"; +import macosInternational from "@site/docs/keymaps/_footnotes/macos-international.mdx"; import example from "@site/docs/keymaps/_footnotes/example.mdx"; import iosApplication from "@site/docs/keymaps/_footnotes/ios-application.mdx"; import iosPower from "@site/docs/keymaps/_footnotes/ios-power.mdx"; +import macosEditing from "@site/docs/keymaps/_footnotes/macos-editing.mdx"; import macosPower from "@site/docs/keymaps/_footnotes/macos-power.mdx"; +import macosUndoRedo from "@site/docs/keymaps/_footnotes/macos-undo-redo.mdx"; import globe from "@site/docs/keymaps/_footnotes/globe.mdx"; export default { + macosLanguage, + macosInternational, example, iosApplication, iosPower, + macosEditing, macosPower, + macosUndoRedo, globe, }; diff --git a/docs/src/data/hid.js b/docs/src/data/hid.js index 92b5021f..f094dd6f 100644 --- a/docs/src/data/hid.js +++ b/docs/src/data/hid.js @@ -1378,7 +1378,7 @@ export default [ }, { names: ["TILDE2"], - description: "~ [Tilde]", + description: "~ [Tilde] using shift and non-US hash/pound", context: "Keyboard", clarify: false, usages: [ @@ -2376,7 +2376,7 @@ export default [ }, { names: ["KP_NUMBER_1", "KP_N1"], - description: "1", + description: "Keypad 1 and End", context: "Keypad", clarify: false, usages: [ @@ -2397,7 +2397,7 @@ export default [ }, { names: ["KP_NUMBER_2", "KP_N2"], - description: "2", + description: "Keypad 2 and Down Arrow", context: "Keypad", clarify: false, usages: [ @@ -2418,7 +2418,7 @@ export default [ }, { names: ["KP_NUMBER_3", "KP_N3"], - description: "3", + description: "Keypad 3 and Page Down", context: "Keypad", clarify: false, usages: [ @@ -2439,7 +2439,7 @@ export default [ }, { names: ["KP_NUMBER_4", "KP_N4"], - description: "4", + description: "Keypad 4 and Left Arrow", context: "Keypad", clarify: false, usages: [ @@ -2460,7 +2460,7 @@ export default [ }, { names: ["KP_NUMBER_5", "KP_N5"], - description: "5", + description: "Keypad 5", context: "Keypad", clarify: false, usages: [ @@ -2481,7 +2481,7 @@ export default [ }, { names: ["KP_NUMBER_6", "KP_N6"], - description: "6", + description: "Keypad 6 and Right Arrow", context: "Keypad", clarify: false, usages: [ @@ -2502,7 +2502,7 @@ export default [ }, { names: ["KP_NUMBER_7", "KP_N7"], - description: "7", + description: "Keypad 7 and Home", context: "Keypad", clarify: false, usages: [ @@ -2523,7 +2523,7 @@ export default [ }, { names: ["KP_NUMBER_8", "KP_N8"], - description: "8", + description: "Keypad 8 and Up Arrow", context: "Keypad", clarify: false, usages: [ @@ -2544,7 +2544,7 @@ export default [ }, { names: ["KP_NUMBER_9", "KP_N9"], - description: "9", + description: "Keypad 9 and Page Up", context: "Keypad", clarify: false, usages: [ @@ -2565,7 +2565,7 @@ export default [ }, { names: ["KP_NUMBER_0", "KP_N0"], - description: "0", + description: "Keypad 0 and Insert", context: "Keypad", clarify: false, usages: [ @@ -2586,7 +2586,7 @@ export default [ }, { names: ["KP_DOT"], - description: ". [Dot]", + description: ". [Dot] and Delete", context: "Keypad", clarify: false, usages: [ @@ -2628,7 +2628,7 @@ export default [ }, { names: ["PIPE2"], - description: "| [Pipe]", + description: "| [Pipe] using shift and non-US backslash", context: "Keyboard", clarify: false, usages: [ @@ -3092,10 +3092,12 @@ export default [ windows: false, linux: true, android: false, - macos: null, + macos: true, ios: null, }, - footnotes: {}, + footnotes: { + macos: ["macosEditing"], + }, }, { names: ["K_UNDO"], @@ -3113,10 +3115,12 @@ export default [ windows: false, linux: true, android: false, - macos: null, + macos: true, ios: null, }, - footnotes: {}, + footnotes: { + macos: ["macosEditing"], + }, }, { names: ["K_CUT"], @@ -3134,10 +3138,12 @@ export default [ windows: false, linux: true, android: false, - macos: null, + macos: true, ios: null, }, - footnotes: {}, + footnotes: { + macos: ["macosEditing"], + }, }, { names: ["K_COPY"], @@ -3155,10 +3161,12 @@ export default [ windows: false, linux: true, android: false, - macos: null, + macos: true, ios: null, }, - footnotes: {}, + footnotes: { + macos: ["macosEditing"], + }, }, { names: ["K_PASTE"], @@ -3176,10 +3184,12 @@ export default [ windows: false, linux: true, android: false, - macos: null, + macos: true, ios: null, }, - footnotes: {}, + footnotes: { + macos: ["macosEditing"], + }, }, { names: ["K_FIND"], @@ -3239,7 +3249,7 @@ export default [ windows: false, linux: true, android: true, - macos: false, + macos: true, ios: null, }, footnotes: {}, @@ -3260,7 +3270,7 @@ export default [ windows: false, linux: true, android: true, - macos: false, + macos: true, ios: null, }, footnotes: {}, @@ -3386,10 +3396,12 @@ export default [ windows: false, linux: true, android: false, - macos: null, + macos: true, ios: null, }, - footnotes: {}, + footnotes: { + macos: ["macosInternational"], + }, }, { names: ["INTERNATIONAL_2", "INT2", "INT_KATAKANAHIRAGANA", "INT_KANA"], @@ -3407,7 +3419,7 @@ export default [ windows: false, linux: true, android: false, - macos: null, + macos: true, ios: null, }, footnotes: {}, @@ -3428,10 +3440,12 @@ export default [ windows: false, linux: true, android: false, - macos: null, + macos: true, ios: null, }, - footnotes: {}, + footnotes: { + macos: ["macosInternational"], + }, }, { names: ["INTERNATIONAL_4", "INT4", "INT_HENKAN"], @@ -3449,7 +3463,7 @@ export default [ windows: false, linux: true, android: false, - macos: null, + macos: true, ios: null, }, footnotes: {}, @@ -3470,7 +3484,7 @@ export default [ windows: false, linux: true, android: false, - macos: null, + macos: true, ios: null, }, footnotes: {}, @@ -3491,7 +3505,7 @@ export default [ windows: false, linux: true, android: false, - macos: null, + macos: true, ios: null, }, footnotes: {}, @@ -3512,7 +3526,7 @@ export default [ windows: null, linux: false, android: false, - macos: null, + macos: true, ios: null, }, footnotes: {}, @@ -3533,7 +3547,7 @@ export default [ windows: null, linux: false, android: false, - macos: null, + macos: true, ios: null, }, footnotes: {}, @@ -3554,7 +3568,7 @@ export default [ windows: null, linux: false, android: false, - macos: null, + macos: true, ios: null, }, footnotes: {}, @@ -3575,10 +3589,12 @@ export default [ windows: true, linux: true, android: false, - macos: null, + macos: true, ios: null, }, - footnotes: {}, + footnotes: { + macos: ["macosLanguage"], + }, }, { names: ["LANGUAGE_2", "LANG2", "LANG_HANJA"], @@ -3596,10 +3612,12 @@ export default [ windows: true, linux: true, android: false, - macos: null, + macos: true, ios: null, }, - footnotes: {}, + footnotes: { + macos: ["macosLanguage"], + }, }, { names: ["LANGUAGE_3", "LANG3", "LANG_KATAKANA"], @@ -3617,7 +3635,7 @@ export default [ windows: false, linux: true, android: false, - macos: null, + macos: true, ios: null, }, footnotes: {}, @@ -3638,7 +3656,7 @@ export default [ windows: false, linux: true, android: false, - macos: null, + macos: true, ios: null, }, footnotes: {}, @@ -3659,7 +3677,7 @@ export default [ windows: false, linux: true, android: false, - macos: null, + macos: true, ios: null, }, footnotes: {}, @@ -3680,7 +3698,7 @@ export default [ windows: null, linux: false, android: false, - macos: null, + macos: true, ios: null, }, footnotes: {}, @@ -3701,7 +3719,7 @@ export default [ windows: null, linux: false, android: false, - macos: null, + macos: true, ios: null, }, footnotes: {}, @@ -3722,7 +3740,7 @@ export default [ windows: null, linux: false, android: false, - macos: null, + macos: true, ios: null, }, footnotes: {}, @@ -3743,7 +3761,7 @@ export default [ windows: null, linux: false, android: false, - macos: null, + macos: true, ios: null, }, footnotes: {}, @@ -5024,7 +5042,7 @@ export default [ os: { windows: false, linux: true, - android: null, + android: true, macos: null, ios: null, }, @@ -5150,7 +5168,7 @@ export default [ os: { windows: false, linux: true, - android: null, + android: false, macos: null, ios: null, }, @@ -5171,7 +5189,7 @@ export default [ os: { windows: true, linux: true, - android: null, + android: true, macos: true, ios: true, }, @@ -5192,7 +5210,7 @@ export default [ os: { windows: true, linux: true, - android: null, + android: true, macos: true, ios: true, }, @@ -5213,7 +5231,7 @@ export default [ os: { windows: false, linux: true, - android: null, + android: false, macos: null, ios: null, }, @@ -5234,7 +5252,7 @@ export default [ os: { windows: false, linux: true, - android: null, + android: false, macos: null, ios: null, }, @@ -5255,7 +5273,7 @@ export default [ os: { windows: false, linux: true, - android: null, + android: false, macos: null, ios: null, }, @@ -5276,7 +5294,7 @@ export default [ os: { windows: false, linux: true, - android: null, + android: false, macos: null, ios: null, }, @@ -6011,7 +6029,7 @@ export default [ os: { windows: false, linux: true, - android: null, + android: false, macos: null, ios: null, }, @@ -6179,7 +6197,7 @@ export default [ os: { windows: false, linux: true, - android: null, + android: false, macos: null, ios: null, }, @@ -6453,8 +6471,8 @@ export default [ windows: null, linux: true, android: true, - macos: null, - ios: null, + macos: false, + ios: false, }, footnotes: {}, }, @@ -6537,8 +6555,8 @@ export default [ windows: null, linux: true, android: true, - macos: null, - ios: null, + macos: false, + ios: false, }, footnotes: {}, }, @@ -7146,7 +7164,7 @@ export default [ windows: false, linux: true, android: false, - macos: null, + macos: false, ios: null, }, footnotes: {}, @@ -7167,7 +7185,7 @@ export default [ windows: false, linux: true, android: false, - macos: null, + macos: false, ios: null, }, footnotes: {}, @@ -7188,7 +7206,7 @@ export default [ windows: false, linux: true, android: false, - macos: null, + macos: false, ios: null, }, footnotes: {}, @@ -7209,7 +7227,7 @@ export default [ windows: false, linux: true, android: false, - macos: null, + macos: false, ios: null, }, footnotes: {}, @@ -7629,7 +7647,7 @@ export default [ windows: false, linux: true, android: false, - macos: null, + macos: false, ios: null, }, footnotes: {}, @@ -7755,7 +7773,7 @@ export default [ windows: null, linux: true, android: null, - macos: null, + macos: false, ios: null, }, footnotes: {}, @@ -7776,7 +7794,7 @@ export default [ windows: null, linux: true, android: null, - macos: null, + macos: false, ios: null, }, footnotes: {}, @@ -7797,7 +7815,7 @@ export default [ windows: null, linux: true, android: null, - macos: null, + macos: false, ios: null, }, footnotes: {}, @@ -7818,7 +7836,7 @@ export default [ windows: null, linux: true, android: null, - macos: null, + macos: false, ios: null, }, footnotes: {}, @@ -7839,7 +7857,7 @@ export default [ windows: null, linux: true, android: null, - macos: null, + macos: false, ios: null, }, footnotes: {}, @@ -7860,7 +7878,7 @@ export default [ windows: null, linux: true, android: null, - macos: null, + macos: false, ios: null, }, footnotes: {}, @@ -7879,7 +7897,7 @@ export default [ documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=153", os: { windows: null, - linux: null, + linux: false, android: null, macos: true, ios: true, diff --git a/docs/src/hardware-metadata-static-plugin/index.js b/docs/src/hardware-metadata-static-plugin/index.js index 7fb6ad83..6d475bc0 100644 --- a/docs/src/hardware-metadata-static-plugin/index.js +++ b/docs/src/hardware-metadata-static-plugin/index.js @@ -22,9 +22,9 @@ const METADATA_GLOB = path.posix.join(BASE_DIR, "app/boards/**/*.zmk.yml"); * @param {string} file */ async function readMetadata(file) { - /** @type HardwareMetadata[] */ - // @ts-ignore - const documents = yaml.loadAll(await fs.readFile(file, "utf-8")); + const documents = /** @type HardwareMetadata[] */ ( + yaml.loadAll(await fs.readFile(file, "utf-8")) + ); return documents.map( (metadata) => diff --git a/docs/src/keymap-upgrade/headers.ts b/docs/src/keymap-upgrade/headers.ts index 8aa1928f..628ca19b 100644 --- a/docs/src/keymap-upgrade/headers.ts +++ b/docs/src/keymap-upgrade/headers.ts @@ -1,4 +1,4 @@ -import type { SyntaxNode, Tree } from "web-tree-sitter"; +import type { Tree } from "web-tree-sitter"; import { Devicetree, findCapture } from "./parser"; import { getUpgradeEdits, MatchFunc, ReplaceFunc, TextEdit } from "./textedit"; diff --git a/docs/src/keymap-upgrade/keycodes.ts b/docs/src/keymap-upgrade/keycodes.ts index 5fc3e66a..e1bc2100 100644 --- a/docs/src/keymap-upgrade/keycodes.ts +++ b/docs/src/keymap-upgrade/keycodes.ts @@ -142,7 +142,7 @@ function findBehaviorNodes(paramNode: SyntaxNode) { } // Walk forward from the behavior to collect all its parameters. - let nodes = [behavior]; + const nodes = [behavior]; let param = behavior.nextNamedSibling; while (param && param.type !== "reference") { nodes.push(param); diff --git a/docs/src/keymap-upgrade/parser.ts b/docs/src/keymap-upgrade/parser.ts index 52d6e981..1fca0ae7 100644 --- a/docs/src/keymap-upgrade/parser.ts +++ b/docs/src/keymap-upgrade/parser.ts @@ -5,6 +5,11 @@ const TREE_SITTER_WASM_URL = new URL( import.meta.url ); +const TREE_SITTER_DEVICETREE_WASM_URL = new URL( + "/node_modules/tree-sitter-devicetree/tree-sitter-devicetree.wasm", + import.meta.url +); + export let Devicetree: Parser.Language; export async function initParser() { @@ -17,7 +22,7 @@ export async function initParser() { return prefix + path; }, }); - Devicetree = await Parser.Language.load("/tree-sitter-devicetree.wasm"); + Devicetree = await Parser.Language.load(TREE_SITTER_DEVICETREE_WASM_URL.href); } export function createParser() { @@ -128,7 +133,9 @@ export function findDevicetreeProperty( `(property name: (identifier) @name (#eq? @name "${name}")) @prop` ); const matches = query.matches(node); - const props = matches.map(({ captures }) => findCapture("prop", captures)!); + const props = matches + .map(({ captures }) => findCapture("prop", captures)) + .filter((node) => node !== null); if (options?.recursive) { return props; diff --git a/docs/src/keymap-upgrade/textedit.ts b/docs/src/keymap-upgrade/textedit.ts index 263b2ab8..2b8c5fc9 100644 --- a/docs/src/keymap-upgrade/textedit.ts +++ b/docs/src/keymap-upgrade/textedit.ts @@ -1,7 +1,10 @@ import type { SyntaxNode } from "web-tree-sitter"; export class Range { - constructor(public startIndex: number, public endIndex: number) {} + constructor( + public startIndex: number, + public endIndex: number + ) {} } export class TextEdit extends Range { @@ -94,7 +97,7 @@ export function applyEdits(text: string, edits: TextEdit[]) { const chunks: TextChunk[] = []; let currentIndex = 0; - for (let edit of edits) { + for (const edit of edits) { if (edit.startIndex < currentIndex) { console.warn("discarding overlapping edit", edit); continue; diff --git a/docs/src/pages/index.js b/docs/src/pages/index.js index fa7f641e..40aa06a7 100644 --- a/docs/src/pages/index.js +++ b/docs/src/pages/index.js @@ -37,7 +37,7 @@ function Feature({ imageUrl, title, description }) {
    {imgUrl && (
    - {title} +
    )}

    {title}

    diff --git a/docs/src/setup-script-generation-plugin/index.js b/docs/src/setup-script-generation-plugin/index.js deleted file mode 100644 index 87e77141..00000000 --- a/docs/src/setup-script-generation-plugin/index.js +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) 2021 The ZMK Contributors - * - * SPDX-License-Identifier: MIT - */ - -var PrebuildPlugin = require("prebuild-webpack-plugin"); -const path = require("path"); -const fs = require("fs"); -const glob = require("glob"); -const yaml = require("js-yaml"); -const Mustache = require("mustache"); - -function generateSetupScripts() { - return glob("../app/boards/**/*.zmk.yml", (error, files) => { - const aggregated = files.map((f) => ({ - ...yaml.load(fs.readFileSync(f, "utf8")), - __base_dir: path.basename(path.dirname(f)), - })); - - const data = aggregated.reduce( - (agg, item) => { - switch (item.type) { - case "shield": - item.compatible = true; - item.split = item.siblings?.length > 1; - agg.keyboards.push(item); - break; - case "board": - if (item.features?.includes("keys")) { - agg.keyboards.push(item); - } else { - item.usb_only = !item.outputs?.includes("ble"); - agg.boards.push(item); - } - break; - } - return agg; - }, - { keyboards: [], boards: [] } - ); - - data.keyboards.sort((a, b) => a.name.localeCompare(b.name)); - data.boards.sort((a, b) => a.name.localeCompare(b.name)); - - for (let script_ext of ["sh", "ps1"]) { - const templateBuffer = fs.readFileSync( - `src/templates/setup.${script_ext}.mustache`, - "utf8" - ); - const script = Mustache.render(templateBuffer, data); - fs.writeFileSync(`static/setup.${script_ext}`, script); - } - }); -} - -module.exports = function () { - return { - name: "setup-script-generation-plugin", - configureWebpack() { - return { - plugins: [ - new PrebuildPlugin({ - build: generateSetupScripts, - }), - ], - }; - }, - }; -}; diff --git a/docs/src/templates/setup.ps1.mustache b/docs/src/templates/setup.ps1.mustache deleted file mode 100644 index 33a4be38..00000000 --- a/docs/src/templates/setup.ps1.mustache +++ /dev/null @@ -1,313 +0,0 @@ -# Copyright (c) 2020 The ZMK Contributors -# SPDX-License-Identifier: MIT - -$ErrorActionPreference = "Stop" - -function Get-Choice-From-Options { - param( - [String[]] $Options, - [String] $Prompt - ) - - while ($true) { - for ($i = 0; $i -lt $Options.length; $i++) { - Write-Host "$($i + 1)) $($Options[$i])" - } - - Write-Host "$($Options.length + 1)) Quit" - $selection = (Read-Host $Prompt) -as [int] - - if ($selection -eq $Options.length + 1) { - Write-Host "Goodbye!" - exit 1 - } - elseif ($selection -le $Options.length -and $selection -gt 0) { - $choice = $($selection - 1) - break - } - else { - Write-Host "Invalid Option. Try another one." - } - } - - return $choice -} - -function Test-Git-Config { - param( - [String] $Option, - [String] $ErrMsg - ) - - git config $Option | Out-Null - - if ($lastExitCode -ne 0) { - Write-Host $ErrMsg - exit 1 - } -} - -try { - git | Out-Null -} -catch [System.Management.Automation.CommandNotFoundException] { - Write-Host "Git is not installed, and is required for this script!" - exit 1 -} - -Test-Git-Config -Option "user.name" -ErrMsg "Git username not set!`nRun: git config --global user.name 'My Name'" -Test-Git-Config -Option "user.email" -ErrMsg "Git email not set!`nRun: git config --global user.email 'example@myemail.com'" - -function Test-CommandExists { - param ($command) - - $oldPreference = $ErrorActionPreference - $ErrorActionPreference = "stop" - - try { - if(Get-Command $command){ return $true } - } Catch { return $false } - Finally { $ErrorActionPreference=$oldPreference } -} - -if (Test-CommandExists Get-Acl) { - $permission = (Get-Acl $pwd).Access | - ?{$_.IdentityReference -match $env:UserName ` - -and $_.FileSystemRights -match "FullControl" ` - -or $_.FileSystemRights -match "Write" } | - Select IdentityReference,FileSystemRights - - If (-Not $permission){ - Write-Host "Sorry, you do not have write permissions in this directory." - Write-Host "Please try running this script again from a directory that you do have write permissions for." - exit 1 - } -} - -$repo_path = "https://github.com/zmkfirmware/unified-zmk-config-template.git" - -$title = "ZMK Config Setup:" -Write-Host "" -Write-Host "Keyboard Shield Selection:" -$prompt = "Pick a keyboard" - -$keyboards = [ordered]@{ - {{#keyboards}} - "{{id}}" = @{ - name = "{{{name}}}"; - type = "{{type}}"; - basedir = "{{__base_dir}}"; - split = "{{split}}"; - arch = "{{arch}}"; - siblings = {{#siblings.0}}@( - {{#siblings}} - "{{.}}" - {{/siblings}} - ){{/siblings.0}}{{^siblings.0}}( "{{id}}" ){{/siblings.0}}; - } - {{/keyboards}} -} -# TODO: Add support for "Other" and linking to docs on adding custom shields in user config repos. - -$choice = Get-Choice-From-Options -Options ($keyboards.values | % { $_['name'] }) -Prompt $prompt -$keyboard = $($($keyboards.keys)[$choice]) -$keyboard_title = $keyboards[$keyboard].name -$basedir = $keyboards[$keyboard].basedir -$keyboard_split = $keyboards[$keyboard].split -$keyboard_arch = $keyboards[$keyboard].arch -$keyboard_siblings = $keyboards[$keyboard].siblings -$keyboard_type = $keyboards[$keyboard].type - -if ($keyboard_type -eq "shield") { - $prompt = "Pick an MCU board" - $boards = [ordered]@{ - {{#boards}} - {{id}} = "{{{name}}}"; - {{/boards}} - } - $boards_usb_only = [ordered]@{ - {{#boards}} - {{id}} = "{{usb_only}}"; - {{/boards}} - } - - $boards_revisions = [ordered]@{ - {{#boards}} - {{id}} = @({{#revisions}} - "{{.}}"{{/revisions}}); - {{/boards}} - } - - $boards_default_revision=[ordered]@{ - {{#boards}} - {{id}} = "{{{default_revision}}}"; - {{/boards}} - } - - Write-Host "$title" - Write-Host "" - Write-Host "MCU Board Selection:" - - $choice = Get-Choice-From-Options -Options $boards.values -Prompt $prompt - - if ($keyboard_split -eq "true" -and $($($boards_usb_only.values)[$choice]) -eq "true") { - Write-Host "Wired split is not yet supported by ZMK." - exit 1 - } - - $shields = $keyboard_siblings - $board = $($($boards.keys)[$choice]) - $boards = ( $board ) - - if ($($($boards_revisions.values)[$choice]).count -gt 0) { - $valid_revisions = $($($boards_revisions.values)[$choice]) - $revision_choices = @() + $valid_revisions - - for ($i = 0; $i -lt $valid_revisions.count; $i += 1) { - if ($valid_revisions[$i] -eq $($($boards_default_revision.values)[$choice])) { - $revision_choices[$i] += " (default)" - } - } - - $revision_choice = Get-Choice-From-Options -Options $revision_choices -Prompt $prompt - $board = $board + "@" + $valid_revisions[$revision_choice] - $boards = ( $board ) - } - -} else { - $boards = ( $keyboard_siblings ) - $shields = @( ) -} - -$copy_keymap = Read-Host "Copy in the stock keymap for customisation? [Yn]" - -if ($copy_keymap -eq "" -or $copy_keymap -eq "Y" -or $copy_keymap -eq "y") { - $copy_keymap = "yes" -} - -$github_user = Read-Host "GitHub Username (leave empty to skip GitHub repo creation)" - -if ($github_user -ne "") { - $repo_name = Read-Host "GitHub Repo Name [zmk-config]" - - if ($repo_name -eq "") { - $repo_name = "zmk-config" - } - - $github_repo = Read-Host "GitHub Repo [https://github.com/$github_user/$repo_name.git]" - - if ($github_repo -eq "") { - $github_repo = "https://github.com/$github_user/$repo_name.git" - } -} -else { - $repo_name = "zmk-config" - $github_repo = "" -} - -Write-Host "" -Write-Host "Preparing a user config for:" -if ($keyboard_type -eq "shield") { - Write-Host "* MCU Board: ${boards}" - Write-Host "* Shield(s): ${shields}" -} else { - Write-Host "* Board(s): ${boards}" -} - -if ($copy_keymap -eq "yes") { - Write-Host "* Copy Keymap?: Yes" -} -else { - Write-Host "* Copy Keymap?: No" -} - -if ($github_repo -ne "") { - Write-Host "* GitHub Repo to Push (please create this in GH first!): $github_repo" -} - -Write-Host "" -$do_it = Read-Host "Continue? [Yn]" - -if ($do_it -ne "" -and $do_it -ne "Y" -and $do_it -ne "y") { - Write-Host "Aborting..." - exit 1 -} - -git clone --single-branch "$repo_path" "$repo_name" -Set-Location "$repo_name" - -Push-Location config - -if ($keyboard_type -eq "shield") { - $url_base = "https://raw.githubusercontent.com/zmkfirmware/zmk/main/app/boards/shields/${basedir}" -} else { - $url_base = "https://raw.githubusercontent.com/zmkfirmware/zmk/main/app/boards/${keyboard_arch}/${basedir}" -} - -Write-Host "Downloading config file (${url_base}/${keyboard}.conf)" -Try { - Invoke-RestMethod -Uri "${url_base}/${keyboard}.conf" -OutFile "${keyboard}.conf" -} Catch { - Try { - Write-Host "Could not find it, falling back to ${url_base}/${basedir}.conf" - Invoke-RestMethod -Uri "${url_base}/${basedir}.conf" -OutFile "${basedir}.conf" - } Catch { - Set-Content -Path "${keyboard}.conf" "# Put configuration options here" - } -} - -if ($copy_keymap -eq "yes") { - Write-Host "Downloading keymap file (${url_base}/${keyboard}.keymap)" - Try { - Invoke-RestMethod -Uri "${url_base}/${keyboard}.keymap" -OutFile "${keyboard}.keymap" - } Catch { - Write-Host "Could not find it, falling back to ${url_base}/${basedir}.keymap" - Try { - Invoke-RestMethod -Uri "${url_base}/${basedir}.keymap" -OutFile "${basedir}.keymap" - } Catch { - Write-Host "Warning: Could not find a keymap file to download!" - } - } -} - -Pop-Location - -Add-Content -Path "build.yaml" -Value "include:" -foreach ($b in ${boards}) { - if ($keyboard_type -eq "shield") { - foreach ($s in ${shields}) { - Add-Content -Path "build.yaml" -Value " - board: $b" - Add-Content -Path "build.yaml" -Value " shield: $s" - } - } else { - Add-Content -Path "build.yaml" -Value " - board: $b" - } -} - -Remove-Item -Recurse -Force .git -git init . -git add . -git commit -m "Initial User Config." - -if ($github_repo -ne "") { - git remote add origin "$github_repo" - - git push --set-upstream origin $(git symbolic-ref --short HEAD) - - # If push failed, assume that the origin was incorrect and give instructions on fixing. - if ($lastExitCode -ne 0) { - Write-Host "Remote repository $github_repo not found..." - Write-Host "Check GitHub URL, and try adding again." - Write-Host "Run the following: " - Write-Host " git remote rm origin" - Write-Host " git remote add origin FIXED_URL" - Write-Host " git push --set-upstream origin $(git symbolic-ref --short HEAD)" - Write-Host "Once pushed, your firmware should be available from GitHub Actions at: $actions" - exit 1 - } - - if ($github_repo -imatch "https") { - $actions = "$($github_repo.substring(0, $github_repo.length - 4))/actions" - Write-Host "Your firmware should be available from GitHub Actions shortly: $actions" - } -} diff --git a/docs/src/templates/setup.sh.mustache b/docs/src/templates/setup.sh.mustache deleted file mode 100644 index cde3a8a1..00000000 --- a/docs/src/templates/setup.sh.mustache +++ /dev/null @@ -1,304 +0,0 @@ -#!/bin/bash - -# Copyright (c) 2020 The ZMK Contributors -# SPDX-License-Identifier: MIT - -set -e - -check_exists() { - command_to_run=$1 - error_message=$2 - local __resultvar=$3 - - if ! eval "$command_to_run" &> /dev/null; then - if [[ "$__resultvar" != "" ]]; then - eval $__resultvar="'false'" - else - printf "%s\n" "$error_message" - exit 1 - fi - else - if [[ "$__resultvar" != "" ]]; then - eval $__resultvar="'true'" - fi - fi -} - -check_exists "command -v git" "git is not installed, and is required for this script!" -check_exists "command -v curl" "curl is not installed, and is required for this script!" curl_exists -check_exists "command -v wget" "wget is not installed, and is required for this script!" wget_exists - -check_exists "git config user.name" "Git username not set!\nRun: git config --global user.name 'My Name'" -check_exists "git config user.email" "Git email not set!\nRun: git config --global user.email 'example@myemail.com'" - -# Check to see if the user has write permissions in this directory to prevent a cryptic error later on -if [ ! -w `pwd` ]; then - echo 'Sorry, you do not have write permissions in this directory.'; - echo 'Please try running this script again from a directory that you do have write permissions for.'; - exit 1 -fi - -# Parse all commandline options -while [[ "$#" -gt 0 ]]; do - case $1 in - -w|--wget) force_wget="true"; break;; - *) echo "Unknown parameter: $1"; exit 1;; - esac - shift -done - -if [[ $curl_exists == "true" && $wget_exists == "true" ]]; then - if [[ $force_wget == "true" ]]; then - download_command="wget " - else - download_command="curl -fsOL " - fi -elif [[ $curl_exists == "true" ]]; then - download_command="curl -fsOL " -elif [[ $wget_exists == "true" ]]; then - download_command="wget " -else - echo 'Neither curl nor wget are installed. One of the two is required for this script!' - exit 1 -fi - -repo_path="https://github.com/zmkfirmware/unified-zmk-config-template.git" -title="ZMK Config Setup:" - -echo "" -echo "Keyboard Selection:" -PS3="Pick a keyboard: " -options=({{#keyboards}}"{{{name}}}" {{/keyboards}}) -keyboards_id=({{#keyboards}}"{{id}}" {{/keyboards}}) -keyboards_type=({{#keyboards}}"{{type}}" {{/keyboards}}) -keyboards_arch=({{#keyboards}}"{{arch}}" {{/keyboards}}) -keyboards_basedir=({{#keyboards}}"{{__base_dir}}" {{/keyboards}}) -keyboards_split=({{#keyboards}}"{{#split}}y{{/split}}{{^split}}n{{/split}}" {{/keyboards}}) -keyboards_shield=({{#keyboards}}"{{#compatible}}y{{/compatible}}{{^compatible}}n{{/compatible}}" {{/keyboards}}) - -{{#keyboards}} -{{#siblings.0}} -{{id}}_siblings=({{#siblings}}"{{.}}" {{/siblings}}) -{{/siblings.0}} -{{/keyboards}} - -select opt in "${options[@]}" "Quit"; do - case "$REPLY" in - ''|*[!0-9]*) echo "Invalid option. Try another one."; continue;; - - $(( ${#options[@]}+1 )) ) echo "Goodbye!"; exit 1;; - *) - if [ $REPLY -gt $(( ${#options[@]}+1 )) ] || [ $REPLY -lt 0 ]; then - echo "Invalid option. Try another one." - continue - fi - keyboard_index=$(( $REPLY-1 )) - keyboard=${keyboards_id[$keyboard_index]} - keyboard_arch=${keyboards_arch[$keyboard_index]} - keyboard_basedir=${keyboards_basedir[$keyboard_index]} - keyboard_title=${options[$keyboard_index]} - keyboard_sibling_var=${keyboard}_siblings[@] - keyboard_sibling_first=${keyboard}_siblings[0] - if [ -n "${!keyboard_sibling_first}" ]; then - keyboard_siblings=${!keyboard_sibling_var} - else - keyboard_siblings=( "${keyboard}" ) - fi - split=${keyboards_split[$keyboard_index]} - keyboard_shield=${keyboards_shield[$keyboard_index]} - break - ;; - - esac -done - -if [ "$keyboard_shield" == "y" ]; then - shields=$keyboard_siblings - shield=${keyboard} - shield_title=${keyboard_title} - - prompt="Pick an MCU board:" - options=({{#boards}}"{{{name}}}" {{/boards}}) - board_ids=({{#boards}}"{{id}}" {{/boards}}) - boards_usb_only=({{#boards}}"{{#usb_only}}y{{/usb_only}}{{^usb_only}}n{{/usb_only}}" {{/boards}}) - - boards_revisions=({{#boards}}"{{#revisions}}{{.}} {{/revisions}}" {{/boards}}) - boards_default_revision=({{#boards}}"{{{default_revision}}}" {{/boards}}) - - echo "" - echo "MCU Board Selection:" - PS3="$prompt " - select opt in "${options[@]}" "Quit"; do - case "$REPLY" in - ''|*[!0-9]*) echo "Invalid option. Try another one."; continue;; - - $(( ${#options[@]}+1 )) ) echo "Goodbye!"; exit 1;; - *) - if [ $REPLY -gt $(( ${#options[@]}+1 )) ] || [ $REPLY -lt 0 ]; then - echo "Invalid option. Try another one." - continue - fi - - board_index=$(( $REPLY-1 )) - - if [ -n "${!keyboard_sibling_first}" ] && [ "${boards_usb_only[$board_index]}" = "y" ] ; then - echo "Wired split is not yet supported by ZMK." - exit 1 - fi - - board=${board_ids[$board_index]} - board_title=${options[$board_index]} - boards=( "${board}" ) - break - ;; - - esac - done - - if [ -n "${boards_revisions[$board_index]}" ]; then - read -a _valid_revisions <<< "${boards_revisions[$board_index]}" - - _rev_choices=("${_valid_revisions[@]}") - for (( _i=0; _i<${#_valid_revisions}; _i++ )); do - if [ "${boards_default_revision[board_index]}" = "${_valid_revisions[_i]}" ]; then - _rev_choices[_i]+=" (default)" - fi - done - - echo "" - echo "MCU Board Revision:" - select opt in "${_rev_choices[@]}" "Quit"; do - case "$REPLY" in - ''|*[!0-9]*) echo "Invalid option. Try another one."; continue;; - - $(( ${#_valid_revisions[@]}+1 )) ) echo "Goodbye!"; exit 1;; - *) - if [ $REPLY -gt $(( ${#_valid_revisions[@]}+1 )) ] || [ $REPLY -lt 0 ]; then - echo "Invalid option. Try another one." - continue - fi - - _rev_index=$(( $REPLY-1 )) - board="${board_ids[$board_index]}@${_valid_revisions[_rev_index]}" - boards=( "${board}" ) - break - ;; - esac - done - fi -else - board=${keyboard} - boards=$keyboard_siblings -fi - -read -r -e -p "Copy in the stock keymap for customization? [Yn]: " copy_keymap - -if [ -z "$copy_keymap" ] || [ "$copy_keymap" == "Y" ] || [ "$copy_keymap" == "y" ]; then copy_keymap="yes"; fi - -read -r -e -p "GitHub Username (leave empty to skip GitHub repo creation): " github_user -if [ -n "$github_user" ]; then - read -r -p "GitHub Repo Name [zmk-config]: " repo_name - if [ -z "$repo_name" ]; then repo_name="zmk-config"; fi - - read -r -p "GitHub Repo [https://github.com/${github_user}/${repo_name}.git]: " github_repo - - if [ -z "$github_repo" ]; then github_repo="https://github.com/${github_user}/${repo_name}.git"; fi -else - repo_name="zmk-config" -fi - -echo "" -echo "Preparing a user config for:" -if [ "$keyboard_shield" == "y" ]; then - echo "* MCU Board: ${boards}" - echo "* Shield(s): ${shields}" -else - echo "* Board(s): ${boards}" -fi - -if [ "$copy_keymap" == "yes" ]; then - echo "* Copy Keymap?: ✓" -else - echo "* Copy Keymap?: ❌" -fi - -if [ -n "$github_repo" ]; then - echo "* GitHub Repo To Push (please create this in GH first!): ${github_repo}" -fi - -echo "" -read -r -p "Continue? [Yn]: " do_it - -if [ -n "$do_it" ] && [ "$do_it" != "y" ] && [ "$do_it" != "Y" ]; then - echo "Aborting..." - exit 1 -fi - -git clone --single-branch $repo_path ${repo_name} -cd ${repo_name} - -pushd config - -if [ "$keyboard_shield" == "y" ]; then - url_base="https://raw.githubusercontent.com/zmkfirmware/zmk/main/app/boards/shields/${keyboard_basedir}" -else - url_base="https://raw.githubusercontent.com/zmkfirmware/zmk/main/app/boards/${keyboard_arch}/${keyboard_basedir}" -fi - -echo "Downloading config file (${url_base}/${keyboard}.conf)" -if ! $download_command "${url_base}/${keyboard}.conf"; then - echo "Could not find it, falling back to ${url_base}/${keyboard_basedir}.conf" - $download_command "${url_base}/${keyboard_basedir}.conf" || echo "# Put configuration options here" > "${keyboard}.conf" -fi - -if [ "$copy_keymap" == "yes" ]; then - echo "Downloading keymap file (${url_base}/${keyboard}.keymap)" - if ! $download_command "${url_base}/${keyboard}.keymap"; then - echo "Could not find it, falling back to ${url_base}/${keyboard_basedir}.keymap" - $download_command "${url_base}/${keyboard_basedir}.keymap" || echo "Warning: Could not find a keymap file to download!" - fi -fi - -popd - -echo "include:" >> build.yaml - -for b in ${boards}; do - if [ -n "${shields}" ]; - then - for s in ${shields}; do - echo " - board: ${b}" >> build.yaml - echo " shield: ${s}" >> build.yaml - done - else - echo " - board: ${b}" >> build.yaml - fi -done - -rm -rf .git -git init . -git add . -git commit -m "Initial User Config." - -if [ -n "$github_repo" ]; then - git remote add origin "$github_repo" - git push --set-upstream origin "$(git symbolic-ref --short HEAD)" - push_return_code=$? - - # If push failed, assume that the origin was incorrect and give instructions on fixing. - if [ ${push_return_code} -ne 0 ]; then - echo "Remote repository $github_repo not found..." - echo "Check GitHub URL, and try adding again." - echo "Run the following: " - echo " git remote rm origin" - echo " git remote add origin FIXED_URL" - echo " git push --set-upstream origin $(git symbolic-ref --short HEAD)" - echo "Once pushed, your firmware should be available from GitHub Actions at: ${github_repo%.git}/actions" - exit 1 - fi - - # TODO: Support determining the actions URL when non-https:// repo URL is used. - if [ "${github_repo}" != "${github_repo#https://}" ]; then - echo "Your firmware should be available from GitHub Actions shortly: ${github_repo%.git}/actions" - fi -fi diff --git a/docs/src/theme/DocVersionBanner/index.tsx b/docs/src/theme/DocVersionBanner/index.tsx new file mode 100644 index 00000000..2e7fe133 --- /dev/null +++ b/docs/src/theme/DocVersionBanner/index.tsx @@ -0,0 +1,60 @@ +import { type ReactNode } from "react"; +import clsx from "clsx"; +import useDocusaurusContext from "@docusaurus/useDocusaurusContext"; +import Link from "@docusaurus/Link"; +import { ThemeClassNames } from "@docusaurus/theme-common"; +import type { Props } from "@theme/DocVersionBanner"; + +function ZMKReleaseLink({ version }: { version: string }): ReactNode { + return ( + + v{version} + + ); +} + +function DevWarningBanner({ + className, + latestVersion, +}: Props & { latestVersion: string }): ReactNode { + return ( +
    + You're viewing the documentation for the development version of ZMK. You + may want the latest release . +
    + ); +} + +export default function DocVersionBanner({ className }: Props): ReactNode { + const { + siteConfig: { customFields }, + } = useDocusaurusContext(); + + if ( + !customFields?.releaseVersions || + !Array.isArray(customFields.releaseVersions) + ) { + return null; + } + + const releaseVersions: [string] = customFields.releaseVersions as [string]; + + if (customFields.isDevelopmentVersion) { + return ( + + ); + } + return null; +} diff --git a/docs/src/theme/prism-include-languages.js b/docs/src/theme/prism-include-languages.js index c073923b..f740d828 100644 --- a/docs/src/theme/prism-include-languages.js +++ b/docs/src/theme/prism-include-languages.js @@ -12,7 +12,6 @@ export default function prismIncludeLanguages(PrismObject) { // long as you don't re-assign it globalThis.Prism = PrismObject; additionalLanguages.forEach((lang) => { - // eslint-disable-next-line global-require require(`prismjs/components/prism-${lang}`); }); diff --git a/docs/static/.gitignore b/docs/static/.gitignore deleted file mode 100644 index fc7d2745..00000000 --- a/docs/static/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ - -# Ignore generated setup script - -setup.ps1 -setup.sh diff --git a/docs/static/_redirects b/docs/static/_redirects index f5e8da26..1de2aba9 100644 --- a/docs/static/_redirects +++ b/docs/static/_redirects @@ -2,19 +2,26 @@ /docs/features/keymaps /docs/keymaps 301 /docs/features/combos /docs/keymaps/combos 301 /docs/features/conditional-layers /docs/keymaps/conditional-layers 301 -/docs/features/encoders /docs/keymaps/encoders 301 +/docs/features/underglow /docs/features/lighting#rgb-underglow 301 +/docs/features/backlight /docs/features/lighting#backlight 301 /docs/codes/modifiers /docs/keymaps/modifiers 301 /docs/codes/* /docs/keymaps/list-of-keycodes 301 +/docs/config/backlight /docs/config/lighting#backlight 301 +/docs/config/underglow /docs/config/lighting#rgb-underglow 301 /docs/features/beta-testing /docs/features/modules#beta-testing 301 /docs/development/setup /docs/development/local-toolchain/setup 301 -/docs/development/boards-shields-keymaps /docs/development/hardware-integration/boards-shields-keymaps 301 -/docs/development/hardware-metadata-files /docs/development/hardware-integration/hardware-metadata-files 301 +/docs/development/boards-shields-keymaps /docs/hardware-integration 301 +/docs/development/hardware-metadata-files /docs/hardware-integration/hardware-metadata-files 301 /docs/development/clean-room /docs/development/contributing/clean-room 301 /docs/development/documentation /docs/development/contributing/documentation 301 -/docs/development/new-shield /docs/development/hardware-integration/new-shield 301 +/docs/development/new-shield /docs/hardware-integration/new-shield 301 /docs/development/build-flash /docs/development/local-toolchain/build-flash 301 /docs/development/ide-integration /docs/development/local-toolchain/ide-integration 301 /docs/development/posix-board /docs/development/local-toolchain/posix-board 301 /docs/development/pre-commit /docs/development/local-toolchain/pre-commit 301 /docs/development/tests /docs/development/local-toolchain/tests 301 -/docs/development/guides/new-behavior /docs/development/new-behavior 301 \ No newline at end of file +/docs/development/guides/new-behavior /docs/development/new-behavior 301 +/docs/development/hardware-integration/studio-setup /docs/hardware-integration/physical-layouts 301 +/docs/keymaps/behaviors/mod-tap /docs/keymaps/behaviors/hold-tap#mod-tap +/docs/user-setup-cli /docs/user-setup 301 +/docs/development/hardware-integration/* /docs/hardware-integration/:splat 301 diff --git a/docs/static/setup.ps1 b/docs/static/setup.ps1 new file mode 100644 index 00000000..c54f6a51 --- /dev/null +++ b/docs/static/setup.ps1 @@ -0,0 +1,3 @@ +# setup.ps1 +Write-Host "This setup script has been removed. Please use the ZMK CLI instead." +Write-Host "Visit https://zmk.dev/docs/user-setup for more information." \ No newline at end of file diff --git a/docs/static/setup.sh b/docs/static/setup.sh new file mode 100644 index 00000000..ed5bd9dc --- /dev/null +++ b/docs/static/setup.sh @@ -0,0 +1,2 @@ +echo "This setup script has been removed. Please use the ZMK CLI instead." +echo "Visit https://zmk.dev/docs/user-setup for more information." \ No newline at end of file diff --git a/docs/static/tree-sitter-devicetree.wasm b/docs/static/tree-sitter-devicetree.wasm deleted file mode 100644 index 885c5274..00000000 Binary files a/docs/static/tree-sitter-devicetree.wasm and /dev/null differ diff --git a/docs/tsconfig.json b/docs/tsconfig.json index e3f649ee..8ecf7553 100644 --- a/docs/tsconfig.json +++ b/docs/tsconfig.json @@ -3,10 +3,13 @@ "include": ["src/"], "compilerOptions": { "types": ["node", "@docusaurus/theme-classic"], + "moduleResolution": "Bundler", + "module": "esnext", "esModuleInterop": true, "resolveJsonModule": true, "strict": true, "noEmit": true, + "jsx": "react-jsx", "target": "ES6", "lib": ["ES2022", "DOM", "DOM.Iterable"] } diff --git a/docs/zmk-release-versions.json b/docs/zmk-release-versions.json new file mode 100644 index 00000000..45d0cd61 --- /dev/null +++ b/docs/zmk-release-versions.json @@ -0,0 +1,3 @@ +{ + "releaseVersions": ["0.3"] +} diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 00000000..d09fb986 --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,9 @@ +{ + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", + "bootstrap-sha": "2ded7919ebd63e0174bf5a412f6f01d6af0061c6", + "release-type": "simple", + "extra-files": ["app/VERSION"], + "packages": { + ".": {} + } +} diff --git a/schema/hardware-metadata.schema.json b/schema/hardware-metadata.schema.json index 9710c792..85ba0c93 100644 --- a/schema/hardware-metadata.schema.json +++ b/schema/hardware-metadata.schema.json @@ -16,7 +16,7 @@ "$defs": { "id": { "type": "string", - "pattern": "^[a-z0-9_]+(@([A-Z]|[0-9]+|([0-9]+(\\.[0-9]+){1,2})))?$" + "pattern": "^[a-z0-9_/]+(@([A-Z]|[0-9]+|([0-9]+(\\.[0-9]+){1,2})))?$" }, "revision": { "type": "string", @@ -57,7 +57,8 @@ "encoder", "underglow", "backlight", - "pointer" + "pointer", + "studio" ] } },