diff --git a/docs/src/setup-script-generation-plugin/index.js b/docs/src/setup-script-generation-plugin/index.js index 908ac659..87e77141 100644 --- a/docs/src/setup-script-generation-plugin/index.js +++ b/docs/src/setup-script-generation-plugin/index.js @@ -30,6 +30,7 @@ function generateSetupScripts() { if (item.features?.includes("keys")) { agg.keyboards.push(item); } else { + item.usb_only = !item.outputs?.includes("ble"); agg.boards.push(item); } break; diff --git a/docs/src/templates/setup.ps1.mustache b/docs/src/templates/setup.ps1.mustache index 4af4d79d..54c5ae82 100644 --- a/docs/src/templates/setup.ps1.mustache +++ b/docs/src/templates/setup.ps1.mustache @@ -125,12 +125,23 @@ if ($keyboard_type -eq "shield") { {{id}} = "{{{name}}}"; {{/boards}} } + $boards_usb_only = [ordered]@{ + {{#boards}} + {{id}} = "{{usb_only}}"; + {{/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 ) diff --git a/docs/src/templates/setup.sh.mustache b/docs/src/templates/setup.sh.mustache index cec164a2..a8a2da22 100644 --- a/docs/src/templates/setup.sh.mustache +++ b/docs/src/templates/setup.sh.mustache @@ -120,6 +120,7 @@ if [ "$keyboard_shield" == "y" ]; then 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}}) echo "" echo "MCU Board Selection:" @@ -134,6 +135,12 @@ if [ "$keyboard_shield" == "y" ]; then echo "Invalid option. Try another one." continue fi + + 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_index=$(( $REPLY-1 )) board=${board_ids[$board_index]} board_title=${options[$board_index]}