diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d7011283..9cb66450 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -60,6 +60,7 @@ jobs: - splitreus62_right - tg4x - tidbit + - bluehand cmake-args: [""] include: - board: bdn9_rev2 diff --git a/app/boards/shields/bluehand/Kconfig.defconfig b/app/boards/shields/bluehand/Kconfig.defconfig new file mode 100644 index 00000000..d1bd2c79 --- /dev/null +++ b/app/boards/shields/bluehand/Kconfig.defconfig @@ -0,0 +1,6 @@ +if SHIELD_BLUEHAND + +config ZMK_KEYBOARD_NAME + default "BlueHand" + +endif \ No newline at end of file diff --git a/app/boards/shields/bluehand/Kconfig.shield b/app/boards/shields/bluehand/Kconfig.shield new file mode 100644 index 00000000..abb23d28 --- /dev/null +++ b/app/boards/shields/bluehand/Kconfig.shield @@ -0,0 +1,5 @@ +# Copyright (c) 2021 Mike "KemoNine" Crosson +# SPDX-License-Identifier: MIT + +config SHIELD_BLUEHAND + def_bool $(shields_list_contains,bluehand) diff --git a/app/boards/shields/bluehand/bluehand.conf b/app/boards/shields/bluehand/bluehand.conf new file mode 100644 index 00000000..051acebe --- /dev/null +++ b/app/boards/shields/bluehand/bluehand.conf @@ -0,0 +1,3 @@ +# Turn on deep sleep +CONFIG_ZMK_SLEEP=y +CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=900000 \ No newline at end of file diff --git a/app/boards/shields/bluehand/bluehand.keymap b/app/boards/shields/bluehand/bluehand.keymap new file mode 100644 index 00000000..ebf82328 --- /dev/null +++ b/app/boards/shields/bluehand/bluehand.keymap @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include +#include +#include + +/ { + keymap { + compatible = "zmk,keymap"; + + default_layer { +// ------------------- +// | F13 | F14 | F15 | F16 | +// | MO(1) | F17 | F18 | F19 | +// ---------------------- + bindings = < + &kp F13 &kp F14 &kp F15 &kp F16 + &mo 1 &kp F17 &kp F18 &kp F19 + >; + }; + + nav_layer { +// ----------------------- +// | F20 | F21 | F22 | F23 | +// | _ | F24 | - | - | +// ----------------------- + bindings = < + &kp F20 &kp F21 &kp F22 &kp F23 + &trans &kp F24 &trans &trans + >; + }; + }; +}; diff --git a/app/boards/shields/bluehand/bluehand.overlay b/app/boards/shields/bluehand/bluehand.overlay new file mode 100644 index 00000000..3c58fb64 --- /dev/null +++ b/app/boards/shields/bluehand/bluehand.overlay @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2021 Mike "KemoNine" Crosson + * + * SPDX-License-Identifier: MIT + */ + +#include + +/ { + chosen { + zmk,kscan = &kscan0; + }; + + kscan0: kscan_0 { + compatible = "zmk,kscan-gpio-direct"; + + label = "KSCAN"; + + input-gpios + = <&gpio0 29 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&gpio0 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&gpio0 28 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&gpio0 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&gpio0 13 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&gpio0 24 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&gpio0 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&gpio0 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + ; + + }; + + leds { + compatible = "gpio-leds"; + actled: led_a { + gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>; + label = "ACT LED"; + }; + powerled: led_p { + gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>; + label = "PWR LED"; + }; + }; +}; \ No newline at end of file diff --git a/docs/docs/hardware.md b/docs/docs/hardware.md index 0dc17782..99696e70 100644 --- a/docs/docs/hardware.md +++ b/docs/docs/hardware.md @@ -40,6 +40,7 @@ That being said, there are currently only a few specific [boards](/docs/faq#what - [tidbit](https://nullbits.co/tidbit/) (`tidbit`) - [Eek!](https://www.cbkbd.com/product/eek-keyboard) (`eek`) - [BFO-9000](https://keeb.io/products/bfo-9000-keyboard-customizable-full-size-split-ortholinear) (`bfo9000_left` and `bfo9000_right`) +- [Bluehand](http://nrf52.jpconstantineau.com/docs/macropad/bluehand/) (`bluehand`) ## Other Hardware diff --git a/docs/static/setup.ps1 b/docs/static/setup.ps1 index bcea9f7a..efbed952 100644 --- a/docs/static/setup.ps1 +++ b/docs/static/setup.ps1 @@ -58,11 +58,11 @@ catch [System.Management.Automation.CommandNotFoundException] { 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'" -$permission = (Get-Acl $pwd).Access | +$permission = (Get-Acl $pwd).Access | ?{$_.IdentityReference -match $env:UserName ` -and $_.FileSystemRights -match "FullControl" ` - -or $_.FileSystemRights -match "Write" } | - + -or $_.FileSystemRights -match "Write" } | + Select IdentityReference,FileSystemRights If (-Not $permission){ @@ -91,7 +91,7 @@ $prompt = "Pick a keyboard" # TODO: Add support for "Other" and linking to docs on adding custom shields in user config repos. $options = "Kyria", "Lily58", "Corne", "Splitreus62", "Sofle", "Iris", "Reviung41", "RoMac", "RoMac+", "makerdiary M60", "Microdox", "TG4X", "QAZ", "NIBBLE", "Jorne", "Jian", "CRBN", "Tidbit", "Eek!", "BFO-9000", "Helix" -$names = "kyria", "lily58", "corne", "splitreus62", "sofle", "iris", "reviung41", "romac", "romac_plus", "m60", "microdox", "tg4x", "qaz", "nibble", "jorne", "jian", "crbn", "tidbit", "eek", "bfo9000", "helix" +$names = "kyria", "lily58", "corne", "splitreus62", "sofle", "iris", "reviung41", "romac", "romac_plus", "m60", "microdox", "tg4x", "qaz", "nibble", "jorne", "jian", "crbn", "tidbit", "eek", "bfo9000", "helix", "bluehand" $splits = "y", "y", "y", "y", "y", "y", "n", "n", "n", "n", "y", "n", "n", "n", "y", "y", "n", "n", "n", "n", "y" $choice = Get-Choice-From-Options -Options $options -Prompt $prompt diff --git a/docs/static/setup.sh b/docs/static/setup.sh index 2078ff3e..1e290e12 100644 --- a/docs/static/setup.sh +++ b/docs/static/setup.sh @@ -91,7 +91,7 @@ echo "" echo "Keyboard Shield Selection:" prompt="Pick an keyboard:" -options=("Kyria" "Lily58" "Corne" "Splitreus62" "Sofle" "Iris" "Reviung41" "RoMac" "RoMac+" "makerdiary M60" "Microdox" "TG4X" "QAZ" "NIBBLE" "Jorne" "Jian" "CRBN" "Tidbit" "Eek!" "BFO-9000" "Helix") +options=("Kyria" "Lily58" "Corne" "Splitreus62" "Sofle" "Iris" "Reviung41" "RoMac" "RoMac+" "makerdiary M60" "Microdox" "TG4X" "QAZ" "NIBBLE" "Jorne" "Jian" "CRBN" "Tidbit" "Eek!" "BFO-9000" "Helix" "Bluehand") PS3="$prompt " # TODO: Add support for "Other" and linking to docs on adding custom shields in user config repos. @@ -121,6 +121,7 @@ select opt in "${options[@]}" "Quit"; do 19 ) shield_title="Eek!" shield="eek"; split="n" break;; 20 ) shield_title="BFO-9000" shield="bfo9000"; split="y"; break;; 21 ) shield_title="Helix" shield="helix"; split="y"; break;; + 22 ) shield_title="Bluehand" shield "bluehand"; split="n"; break;; # Add link to docs on adding your own custom shield in your ZMK config! # $(( ${#options[@]}+1 )) ) echo "Other!"; break;;