Diff of what is probably the running config #1
|
@ -0,0 +1 @@
|
|||
Adv360-Pro-KeymapEditor/.git
|
|
@ -1,2 +1,9 @@
|
|||
/firmware/*.uf2
|
||||
.west/
|
||||
zephyr/
|
||||
modules/
|
||||
zmk/
|
||||
firmware/*
|
||||
dist/
|
||||
target/
|
||||
Adv360-Pro-KeymapEditor/
|
||||
.DS_Store
|
||||
|
|
|
@ -0,0 +1,119 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Run npm in a docker container to build keymap-editor-web (Adv369-Pro-KeymapEditor)
|
||||
#
|
||||
|
||||
set -e
|
||||
shopt -s expand_aliases
|
||||
|
||||
alias ls='ls --color=always'
|
||||
alias grep='grep --color=always'
|
||||
|
||||
NAME="keymap-editor-web"
|
||||
SRC_PATH="Adv360-Pro-KeymapEditor"
|
||||
SRC_REPO_URL="https://github.com/KinesisCorporation/Adv360-Pro-KeymapEditor/"
|
||||
REPO_NAME=$(git rev-parse --show-toplevel | xargs basename)
|
||||
if [[ -z "${REPO_NAME}" ]]; then
|
||||
echo "undefined: 'REPO_NAME'"
|
||||
exit 1
|
||||
elif [[ -z "${VERSION}" ]]; then
|
||||
VERSION=$(date -I | tr '-' '.')-SNAPSHOT
|
||||
elif [[ ! -d "./${SRC_PATH}" ]]; then
|
||||
git clone //github.com/KinesisCorporation/Adv360-Pro-KeymapEditor/ $(git rev-parse --show-toplevel)/Adv360-Pro-KeymapEditor
|
||||
fi
|
||||
|
||||
# the /home/node dir is explicitly owned by uid 1000, and npm wants to write to $HOME/.npm (some logs)
|
||||
# best way seems to be to bind mount 'node_modules' from the source dir (npm expects it in its pwd).
|
||||
|
||||
CACHE_DIR="$HOME/.cache/npm-docker/builds/${REPO_NAME}/${NAME}/.npm"
|
||||
NODE_MODULES_DIR="$HOME/.cache/npm-docker/builds/${REPO_NAME}/${NAME}/node_modules"
|
||||
OUTPUT_DIR=target/${NAME}
|
||||
|
||||
BUILD_UID=$(id -u)
|
||||
BUILD_GID=$(id -g)
|
||||
|
||||
echo "Cleaning up..."
|
||||
if [[ -d "./${OUTPUT_DIR}" ]]; then
|
||||
echo "removing: '${OUTPUT_DIR}'"
|
||||
rm -r ./${OUTPUT_DIR}
|
||||
fi
|
||||
find dist/ -name "${NAME}_${VERSION}.zip" -print -delete
|
||||
|
||||
mkdir -pv $CACHE_DIR $NODE_MODULES_DIR $OUTPUT_DIR
|
||||
|
||||
echo
|
||||
echo "Directories mounted to the npm container to build ${NAME} (working around the container expecting to run as uid=1000"
|
||||
echo "CACHE_DIR: ${CACHE_DIR}"
|
||||
echo "NODE_MODULES_DIR: ${NODE_MODULES_DIR}"
|
||||
|
||||
echo
|
||||
echo "Directory mounted to write the build output to:"
|
||||
echo "OUTPUT_DIR: ${OUTPUT_DIR}"
|
||||
|
||||
echo
|
||||
echo "Running npm container as uid=${BUILD_UID}, gid=${BUILD_GID}"
|
||||
echo
|
||||
|
||||
if [[ -t 1 ]]; then
|
||||
# run docker container with -t if we are in a TTY
|
||||
DOCKER_OPT_TTY="-t"
|
||||
fi
|
||||
|
||||
# the package.json file on the SRC repo root invokes application/package.json
|
||||
# the one in the root is for running dev sever
|
||||
#
|
||||
|
||||
(
|
||||
# https://github.com/KinesisCorporation/Adv360-Pro-KeymapEditor/blob/master/running-locally.md
|
||||
#
|
||||
|
||||
set -e
|
||||
set -x
|
||||
ls -1 dist/
|
||||
docker pull node:latest
|
||||
docker run \
|
||||
--rm \
|
||||
$DOCKER_OPT_TTY \
|
||||
-w /${NAME} \
|
||||
-e "HOME=/home/node" \
|
||||
-v ./${SRC_PATH}:/${NAME} \
|
||||
-v ./config:/${NAME}/config \
|
||||
-v ./${OUTPUT_DIR}:/${OUTPUT_DIR} \
|
||||
-v ${CACHE_DIR}:/home/node/.npm \
|
||||
-v ${NODE_MODULES_DIR}:/${REPO_NAME}-server/web-src/node_modules \
|
||||
-e FORCE_COLOR=1 \
|
||||
-e TERM="xterm256-color" \
|
||||
-e NPM_CONFIG_PREFIX=/home/node/.npm \
|
||||
-e NODE_PATH=/home/node/.npm/node_modules \
|
||||
-e NODE_MODULES=/home/node/.npm/node_modules \
|
||||
-e NODE_INSTALL_PATH=/home/node/.npm/node_modules \
|
||||
-e OUTPUT_DIR=${OUTPUT_DIR} \
|
||||
--user "${BUILD_UID}:${BUILD_GID}" \
|
||||
node:latest bash -c "
|
||||
set -ex && \
|
||||
npm ci && \
|
||||
npm install && \
|
||||
cd application && \
|
||||
npm install
|
||||
"
|
||||
|
||||
# npm run build (was last)
|
||||
# npm run build -- --minify=false --outDir=/${OUTPUT_DIR} --emptyOutDir
|
||||
# the docs say:
|
||||
# npm install
|
||||
# npm run dev
|
||||
# which would presumably start a dev server. lets see how this works first
|
||||
|
||||
ls -lah dist/
|
||||
)
|
||||
|
||||
#(
|
||||
# set -e
|
||||
# pushd $OUTPUT_DIR
|
||||
# echo
|
||||
# echo "creating zip file from '${OUTPUT_DIR}'"
|
||||
# zip -r ../../dist/${NAME}_${VERSION}.zip ./
|
||||
#)
|
||||
|
||||
echo
|
||||
ls -1 dist/
|
34
Dockerfile
34
Dockerfile
|
@ -1,16 +1,30 @@
|
|||
FROM docker.io/zmkfirmware/zmk-build-arm:stable
|
||||
MAINTAINER Ben <pkg@sudo.is>
|
||||
|
||||
WORKDIR /app
|
||||
ENV TZ=UTC
|
||||
ENV TERM=xterm-256color
|
||||
|
||||
COPY config/west.yml config/west.yml
|
||||
ARG USER_UID=1337
|
||||
ARG USER_GID=1337
|
||||
|
||||
# West Init
|
||||
RUN west init -l config
|
||||
# West Update
|
||||
RUN west update
|
||||
# West Zephyr export
|
||||
RUN west zephyr-export
|
||||
RUN set -xe && \
|
||||
groupadd -g ${USER_GID} user && \
|
||||
useradd -u ${USER_UID} -g ${USER_GID} -d /usr/local/src --system user && \
|
||||
chown -R user:user /usr/local/src
|
||||
|
||||
COPY bin/build.sh ./
|
||||
WORKDIR /usr/local/src
|
||||
USER user
|
||||
|
||||
CMD ["./build.sh"]
|
||||
COPY --chown=user:user config/west.yml /usr/local/src/config/west.yml
|
||||
|
||||
RUN set -x && \
|
||||
west init -l config && \
|
||||
west update && \
|
||||
west zephyr-export && \
|
||||
echo python3 -m pip install --user -r zephyr/scripts/requirements.txt
|
||||
|
||||
COPY bin/entrypoint.sh /usr/local/bin/
|
||||
COPY bin/build.sh /usr/local/bin
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
||||
CMD []
|
||||
|
|
|
@ -0,0 +1,73 @@
|
|||
// https://zmk.dev/docs/development/setup#install-west
|
||||
|
||||
pipeline {
|
||||
agent any
|
||||
options {
|
||||
timestamps()
|
||||
ansiColor("xterm-256color")
|
||||
disableConcurrentBuilds()
|
||||
buildDiscarder(logRotator(daysToKeepStr: '30', numToKeepStr: '10', artifactNumToKeepStr: '1'))
|
||||
}
|
||||
environment {
|
||||
VENV = "${env.WORKSPACE}@tmp/cache/venv"
|
||||
PATH = "${env.VENV}/bin:${HOME}/.local/bin:${PATH}"
|
||||
}
|
||||
stages {
|
||||
stage('checkout') {
|
||||
steps {
|
||||
script {
|
||||
sh "git remote add github https://www.github.com/benediktkr/kinesis360"
|
||||
sh "git pull --rebase github main"
|
||||
sh "git config --global color.ui true"
|
||||
sh "git --no-pager log HEAD^..HEAD"
|
||||
//sh "git push origin main"
|
||||
env.VERSION = sh(script: "date -I", returnStdout: true).trim().replace("-",".")
|
||||
currentBuild.description = env.VERSION
|
||||
sh "ls --color=always -l"
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('virtualenv') {
|
||||
steps {
|
||||
sh "python3 -m venv ${env.VENV}"
|
||||
sh "pip install -U west"
|
||||
}
|
||||
}
|
||||
stage('make') {
|
||||
steps {
|
||||
sh "make"
|
||||
}
|
||||
}
|
||||
stage('keymap-editor-web') {
|
||||
steps {
|
||||
script {
|
||||
dir("Adv360-Pro-KeymapEditor") {
|
||||
git "https://github.com/KinesisCorporation/Adv360-Pro-KeymapEditor"
|
||||
}
|
||||
sh ".pipeline/build-keymap-editor-web.sh"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
post {
|
||||
success {
|
||||
archiveArtifacts(
|
||||
artifacts: "firmware/Adv360-firmware_${env.VERSION}.tar.gz,firmware/*.sha256.txt",
|
||||
fingerprint: true
|
||||
)
|
||||
withCredentials([string(credentialsId: "gitea-user-ben-full-token", variable: 'GITEA_SECRET')]) {
|
||||
sh 'curl -i -H "Authorization: token $GITEA_SECRET" --upload-file firmware/Adv360-firmware_${VERSION}.tar.gz https://git.sudo.is/api/packages/ben/generic/kinesis360/${VERSION}/Adv360-firmware_${VERSION}.tar.gz'
|
||||
// add -s -f to silence and fail on errors
|
||||
}
|
||||
}
|
||||
always {
|
||||
//sh "which python3 python pip hatch"
|
||||
sh "python3 --version"
|
||||
//sh "hatch --version"
|
||||
}
|
||||
cleanup {
|
||||
cleanWs(deleteDirs: true, disableDeferredWipeout: true, notFailBuild: true)
|
||||
}
|
||||
}
|
||||
}
|
25
Makefile
25
Makefile
|
@ -1,5 +1,6 @@
|
|||
DOCKER := $(shell { command -v podman || command -v docker; })
|
||||
TIMESTAMP := $(shell date -u +"%Y%m%d%H%M%S")
|
||||
USER_UID := $(shell id -u)
|
||||
USER_GID := $(shell id -g)
|
||||
detected_OS := $(shell uname) # Classify UNIX OS
|
||||
ifeq ($(strip $(detected_OS)),Darwin) #We only care if it's OS X
|
||||
SELINUX1 :=
|
||||
|
@ -12,13 +13,23 @@ endif
|
|||
.PHONY: all clean
|
||||
|
||||
all:
|
||||
$(DOCKER) build --tag zmk --file Dockerfile .
|
||||
$(DOCKER) run --rm -it --name zmk \
|
||||
-v $(PWD)/firmware:/app/firmware$(SELINUX1) \
|
||||
-v $(PWD)/config:/app/config:ro$(SELINUX2) \
|
||||
-e TIMESTAMP=$(TIMESTAMP) \
|
||||
echo "using uid=${USER_UID},gid=${USER_GID} for the build"
|
||||
$(DOCKER) build \
|
||||
--pull \
|
||||
--build-arg "USER_UID=${USER_UID}" \
|
||||
--build-arg "USER_GID=${USER_GID}" \
|
||||
--tag zmk \
|
||||
--file Dockerfile .
|
||||
|
||||
$(DOCKER) run \
|
||||
--rm \
|
||||
--name zmk \
|
||||
-e VERSION="${VERSION}" \
|
||||
-v $(PWD)/firmware:/usr/local/src/firmware$(SELINUX1) \
|
||||
-v $(PWD)/config:/usr/local/src/config:ro$(SELINUX2) \
|
||||
zmk
|
||||
|
||||
clean:
|
||||
rm -f firmware/*.uf2
|
||||
rm -vf firmware/*.uf2
|
||||
rm -vf firmware/Adv360-firmware_*.tar.gz firmware/*.txt
|
||||
$(DOCKER) image rm zmk docker.io/zmkfirmware/zmk-build-arm:stable
|
||||
|
|
12
README.md
12
README.md
|
@ -1,5 +1,17 @@
|
|||
# ADV360-PRO-ZMK
|
||||
|
||||
* GitHub: [`benediktkr/kinesis360`](https://github.com/benediktkr/kinesis360)
|
||||
* Forked from: [`KinesisCorporation/Adv360-Pro-ZMK`](https://github.com/KinesisCorporation/Adv360-Pro-ZMK)
|
||||
|
||||
|
||||
## Use Tap-Dance
|
||||
|
||||
Tap-Dance: https://zmk.dev/docs/behaviors/tap-dance
|
||||
|
||||
* Both: `tap` `C` -> `C`
|
||||
* Normal layer: `tap,tap` `C` -> `ctrl C`
|
||||
* Mac layer: `tap,tap` `C` -> `cmd C`
|
||||
|
||||
## Modifying the keymap
|
||||
|
||||
[The ZMK documentation](https://zmk.dev/docs) covers both basic and advanced functionality and has a table of OS compatibility for keycodes. Please note that the RGB Underglow, Backlight and Power Management sections are not relevant to the Advantage 360 Pro's custom ZMK fork. For more information see [this note](#note)
|
||||
|
|
28
bin/build.sh
28
bin/build.sh
|
@ -1,17 +1,21 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -eu
|
||||
set -x
|
||||
|
||||
PWD=$(pwd)
|
||||
TIMESTAMP="${TIMESTAMP:-$(date -u +"%Y%m%d%H%M%S")}"
|
||||
|
||||
# West Build (left)
|
||||
west build -s zmk/app -d build/left -b adv360_left -- -DZMK_CONFIG="${PWD}/config"
|
||||
# Adv360 Left Kconfig file
|
||||
cat build/left/zephyr/.config | grep -v "^#" | grep -v "^$"
|
||||
# West Build (right)
|
||||
west build -s zmk/app -d build/right -b adv360_right -- -DZMK_CONFIG="${PWD}/config"
|
||||
# Adv360 Right Kconfig file
|
||||
cat build/right/zephyr/.config | grep -v "^#" | grep -v "^$"
|
||||
# Rename zmk.uf2
|
||||
cp build/left/zephyr/zmk.uf2 ./firmware/${TIMESTAMP}-left.uf2 && cp build/right/zephyr/zmk.uf2 ./firmware/${TIMESTAMP}-right.uf2
|
||||
west build -s zmk/app -d build/left -b adv360_left -- -DZMK_CONFIG="$(pwd)/config"
|
||||
west build -s zmk/app -d build/right -b adv360_right -- -DZMK_CONFIG="$(pwd)/config"
|
||||
|
||||
|
||||
TARFILE="Adv360-firmware_${VERSION}.tar.gz"
|
||||
|
||||
tar czf \
|
||||
firmware/${TARFILE} \
|
||||
--transform='flags=r;s|build/left/zephyr/zmk.uf2|left.uf2|' \
|
||||
--transform='flags=r;s|build/right/zephyr/zmk.uf2|right.uf2|' \
|
||||
build/left/zephyr/zmk.uf2 \
|
||||
build/right/zephyr/zmk.uf2
|
||||
|
||||
|
||||
sha256sum firmware/${TARFILE} > firmware/${TARFILE}.sha256.txt
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
|
||||
if [[ -z "${VERSION}" ]]; then
|
||||
export VERSION="$(date -I)-SNAPSHOT"
|
||||
fi
|
||||
|
||||
if [[ "${1}" == "bash" || "${1}" == "shell" ]]; then
|
||||
exec -l /bin/bash
|
||||
elif [[ -z "${1}" || "${1}" == "build" ]]; then
|
||||
/usr/local/bin/build.sh
|
||||
else
|
||||
$@
|
||||
fi
|
||||
|
||||
|
|
@ -12,6 +12,16 @@
|
|||
* edit it directly.
|
||||
*/
|
||||
|
||||
/*
|
||||
*
|
||||
* Use Tap-Dance: https://zmk.dev/docs/behaviors/tap-dance
|
||||
*
|
||||
* Both: tap C -> C
|
||||
* Normal layer: tap,tap C -> ctrl C
|
||||
* Mac layer: tap,tap C -> cmd C
|
||||
*
|
||||
*/
|
||||
|
||||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/keys.h>
|
||||
#include <dt-bindings/zmk/bt.h>
|
||||
|
@ -21,6 +31,7 @@
|
|||
/ {
|
||||
behaviors {
|
||||
#include "macros.dtsi"
|
||||
#include "version.dtsi"
|
||||
|
||||
hm: homerow_mods {
|
||||
compatible = "zmk,behavior-hold-tap";
|
||||
|
@ -39,21 +50,21 @@
|
|||
|
||||
default_layer {
|
||||
bindings = <
|
||||
&kp EQUAL &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &tog 1 &mo 3 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS
|
||||
&kp TAB &kp Q &kp W &kp E &kp R &kp T &none &none &kp Y &kp U &kp I &kp O &kp P &kp BSLH
|
||||
&kp ESC &kp A &kp S &kp D &kp F &kp G &kp GRAVE &kp LCTRL &kp LALT &kp LGUI &kp RCTRL &none &kp H &kp J &kp K &kp L &kp SEMI &kp SQT
|
||||
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp HOME &kp PG_UP &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT
|
||||
&mo 2 &none &none &kp LEFT &kp RIGHT &kp BSPC &kp DEL &kp END &kp PG_DN &kp ENTER &kp SPACE &kp UP &kp DOWN &kp LBKT &kp RBKT &tog 4
|
||||
&kp EQUAL &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &tog 1 &mo 3 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS
|
||||
&kp TAB &kp Q &kp W &kp E &kp R &kp T &none &kp LEFT_BRACKET &kp Y &kp U &kp I &kp O &kp P &kp BSLH
|
||||
&kp ESC &kp A &kp S &kp D &kp F &kp G &kp GRAVE &kp LCTRL &kp LALT &kp LGUI &kp RCTRL &kp RIGHT_BRACKET &kp H &kp J &kp K &kp L &kp SEMI &kp SQT
|
||||
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp HOME &kp PG_UP &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT
|
||||
&mo 2 ¯o_mac_profile1 &kp PRINTSCREEN &kp LEFT &kp RIGHT &kp BSPC &kp DEL &kp END &kp PG_DN &kp ENTER &kp SPACE &kp UP &kp DOWN &kp LBKT &kp RBKT &mo 2
|
||||
>;
|
||||
};
|
||||
|
||||
layer_keypad {
|
||||
bindings = <
|
||||
&kp EQUAL &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &trans &mo 3 &kp N6 &kp KP_NUM &kp KP_EQUAL &kp KP_DIVIDE &kp KP_MULTIPLY &kp MINUS
|
||||
&kp TAB &kp Q &kp W &kp E &kp R &kp T &none &none &kp Y &kp KP_N7 &kp KP_N8 &kp KP_N9 &kp KP_MINUS &kp BSLH
|
||||
&kp ESC &kp A &kp S &kp D &kp F &kp G &none &kp LCTRL &kp LALT &kp LGUI &kp RCTRL &none &kp H &kp KP_N4 &kp KP_N5 &kp KP_N6 &kp KP_PLUS &kp SQT
|
||||
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp HOME &kp PG_UP &kp N &kp KP_N1 &kp KP_N2 &kp KP_N3 &kp KP_ENTER &kp RSHFT
|
||||
&mo 2 &kp GRAVE &kp CAPS &kp LEFT &kp RIGHT &kp BSPC &kp DEL &kp END &kp PG_DN &kp ENTER &kp KP_N0 &kp UP &kp DOWN &kp KP_DOT &kp RBKT &trans
|
||||
&kp EQUAL &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &trans &mo 3 &kp N6 &kp KP_NUM &kp KP_EQUAL &kp KP_DIVIDE &kp KP_MULTIPLY &kp MINUS
|
||||
&kp TAB &kp Q &kp W &kp E &kp R &kp T &none &none &kp Y &kp KP_N7 &kp KP_N8 &kp KP_N9 &kp KP_MINUS &kp BSLH
|
||||
&kp ESC &kp A &kp S &kp D &kp F &kp G &none &kp LCTRL &kp LALT &kp LGUI &kp RCTRL &none &kp H &kp KP_N4 &kp KP_N5 &kp KP_N6 &kp KP_PLUS &kp SQT
|
||||
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp HOME &kp PG_UP &kp N &kp KP_N1 &kp KP_N2 &kp KP_N3 &kp KP_ENTER &kp RSHFT
|
||||
&trans &trans &trans &kp LEFT &kp RIGHT &kp BSPC &kp DEL &kp END &kp PG_DN &kp ENTER &kp KP_N0 &kp UP &kp DOWN &kp KP_DOT &kp RBKT &trans
|
||||
>;
|
||||
};
|
||||
|
||||
|
@ -69,21 +80,21 @@
|
|||
|
||||
layer_mod {
|
||||
bindings = <
|
||||
&none &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &none &trans &none &none &none &none &none &none
|
||||
&none &none &none &none &none &none &bootloader &bootloader &none &none &none &none &none &none
|
||||
&none &none &none &none &none &none &none &none &none &bt BT_CLR &none &rgb_ug RGB_MEFS_CMD 5 &none &none &none &none &none &none
|
||||
&none &none &none &none &none &none &none &none &none &none &none &none &none &none
|
||||
&none &none &none &none &none &none &none &none &none &bl BL_TOG &rgb_ug RGB_TOG &bl BL_INC &bl BL_DEC &none &none &none
|
||||
&none &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &none &trans &none &none &none &none &none &none
|
||||
&none &none &none &none &none &none &bootloader &bootloader &none &none &none &none &none &none
|
||||
&none &none &none &none &none &none &none &none &none &bt BT_CLR &none &rgb_ug RGB_MEFS_CMD 5 &none &none &none &none &none &none
|
||||
&none &none &none &none &none &none &none &none &none &none &none &none &none &none
|
||||
&none ¯o_mac_profile1 ¯o_mac_profile3 &none &none &none &none &none &none &bl BL_TOG &rgb_ug RGB_TOG &bl BL_INC &bl BL_DEC &none &none ¯o_linux_profile0
|
||||
>;
|
||||
};
|
||||
|
||||
layer_MAC {
|
||||
bindings = <
|
||||
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
||||
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
||||
&trans &trans &trans &trans &trans &trans &trans &kp LEFT_COMMAND &kp LEFT_ALT &trans &kp RCTRL &trans &trans &trans &trans &trans &trans &trans
|
||||
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
||||
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
||||
&trans &trans &trans &trans &trans &trans &trans &mo 3 &trans &trans &trans &trans &trans &trans
|
||||
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
||||
&trans &trans &trans &trans &trans &trans &trans &kp LEFT_COMMAND &kp LEFT_ALT &kp LGUI &kp RCTRL &trans &trans &trans &trans &trans &trans &trans
|
||||
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
||||
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans ¯o_linux_profile0
|
||||
>;
|
||||
};
|
||||
|
||||
|
|
|
@ -55,6 +55,10 @@ CONFIG_BT_PERIPHERAL_PREF_TIMEOUT=600
|
|||
CONFIG_BT_PERIPHERAL_PREF_MIN_INT=12
|
||||
CONFIG_BT_PERIPHERAL_PREF_MAX_INT=24
|
||||
CONFIG_BT_PERIPHERAL_PREF_LATENCY=30
|
||||
# Battery reporting
|
||||
# https://zmk.dev/docs/config/system#bluetooth
|
||||
# https://github.com/KinesisCorporation/Adv360-Pro-ZMK/pull/248/files
|
||||
CONFIG_BT_BAS=y
|
||||
|
||||
#Misc configuration
|
||||
CONFIG_USB_DEVICE_VID=0x29EA
|
||||
|
|
|
@ -11,17 +11,17 @@
|
|||
],
|
||||
"layers": [
|
||||
[
|
||||
"&kp EQUAL", "&kp N1", "&kp N2", "&kp N3", "&kp N4", "&kp N5", "&tog 1", "&mo 3", "&kp N6", "&kp N7", "&kp N8", "&kp N9", "&kp N0", "&kp MINUS",
|
||||
"&kp TAB", "&kp Q", "&kp W", "&kp E", "&kp R", "&kp T", "&none", "&none", "&kp Y", "&kp U", "&kp I", "&kp O", "&kp P", "&kp BSLH",
|
||||
"&kp ESC", "&kp A", "&kp S", "&kp D", "&kp F", "&kp G", "&kp GRAVE", "&kp LCTRL", "&kp LALT", "&kp LGUI", "&kp RCTRL", "&none", "&kp H", "&kp J", "&kp K", "&kp L", "&kp SEMI", "&kp SQT",
|
||||
"&kp LSHFT", "&kp Z", "&kp X", "&kp C", "&kp V", "&kp B", "&kp HOME", "&kp PG_UP", "&kp N", "&kp M", "&kp COMMA", "&kp DOT", "&kp FSLH", "&kp RSHFT",
|
||||
"&mo 2", "&none", "&none", "&kp LEFT", "&kp RIGHT", "&kp BSPC", "&kp DEL", "&kp END", "&kp PG_DN", "&kp ENTER", "&kp SPACE", "&kp UP", "&kp DOWN", "&kp LBKT", "&kp RBKT", "&tog 4"
|
||||
"&kp EQUAL", "&kp N1", "&kp N2", "&kp N3", "&kp N4", "&kp N5", "&tog 1", "&mo 3", "&kp N6", "&kp N7", "&kp N8", "&kp N9", "&kp N0", "&kp MINUS",
|
||||
"&kp TAB", "&kp Q", "&kp W", "&kp E", "&kp R", "&kp T", "&none", "&kp LEFT_BRACKET", "&kp Y", "&kp U", "&kp I", "&kp O", "&kp P", "&kp BSLH",
|
||||
"&kp ESC", "&kp A", "&kp S", "&kp D", "&kp F", "&kp G", "&kp GRAVE", "&kp LCTRL", "&kp LALT", "&kp LGUI", "&kp RCTRL", "&kp RIGHT_BRACKET", "&kp H", "&kp J", "&kp K", "&kp L", "&kp SEMI", "&kp SQT",
|
||||
"&kp LSHFT", "&kp Z", "&kp X", "&kp C", "&kp V", "&kp B", "&kp HOME", "&kp PG_UP", "&kp N", "&kp M", "&kp COMMA", "&kp DOT", "&kp FSLH", "&kp RSHFT",
|
||||
"&mo 2", "¯o_mac_profile1", "&kp PRINTSCREEN", "&kp LEFT", "&kp RIGHT", "&kp BSPC", "&kp DEL", "&kp END", "&kp PG_DN", "&kp ENTER", "&kp SPACE", "&kp UP", "&kp DOWN", "&kp LBKT", "&kp RBKT", "&mo 2"
|
||||
], [
|
||||
"&kp EQUAL", "&kp N1", "&kp N2", "&kp N3", "&kp N4", "&kp N5", "&trans", "&mo 3", "&kp N6", "&kp KP_NUM", "&kp KP_EQUAL", "&kp KP_DIVIDE", "&kp KP_MULTIPLY", "&kp MINUS",
|
||||
"&kp TAB", "&kp Q", "&kp W", "&kp E", "&kp R", "&kp T", "&none", "&none", "&kp Y", "&kp KP_N7", "&kp KP_N8", "&kp KP_N9", "&kp KP_MINUS", "&kp BSLH",
|
||||
"&kp ESC", "&kp A", "&kp S", "&kp D", "&kp F", "&kp G", "&none", "&kp LCTRL", "&kp LALT", "&kp LGUI", "&kp RCTRL", "&none", "&kp H", "&kp KP_N4", "&kp KP_N5", "&kp KP_N6", "&kp KP_PLUS", "&kp SQT",
|
||||
"&kp LSHFT", "&kp Z", "&kp X", "&kp C", "&kp V", "&kp B", "&kp HOME", "&kp PG_UP", "&kp N", "&kp KP_N1", "&kp KP_N2", "&kp KP_N3", "&kp KP_ENTER", "&kp RSHFT",
|
||||
"&mo 2", "&kp GRAVE", "&kp CAPS", "&kp LEFT", "&kp RIGHT", "&kp BSPC", "&kp DEL", "&kp END", "&kp PG_DN", "&kp ENTER", "&kp KP_N0", "&kp UP", "&kp DOWN", "&kp KP_DOT", "&kp RBKT", "&trans"
|
||||
"&kp EQUAL", "&kp N1", "&kp N2", "&kp N3", "&kp N4", "&kp N5", "&trans", "&mo 3", "&kp N6", "&kp KP_NUM", "&kp KP_EQUAL", "&kp KP_DIVIDE", "&kp KP_MULTIPLY", "&kp MINUS",
|
||||
"&kp TAB", "&kp Q", "&kp W", "&kp E", "&kp R", "&kp T", "&none", "&none", "&kp Y", "&kp KP_N7", "&kp KP_N8", "&kp KP_N9", "&kp KP_MINUS", "&kp BSLH",
|
||||
"&kp ESC", "&kp A", "&kp S", "&kp D", "&kp F", "&kp G", "&none", "&kp LCTRL", "&kp LALT", "&kp LGUI", "&kp RCTRL", "&none", "&kp H", "&kp KP_N4", "&kp KP_N5", "&kp KP_N6", "&kp KP_PLUS", "&kp SQT",
|
||||
"&kp LSHFT", "&kp Z", "&kp X", "&kp C", "&kp V", "&kp B", "&kp HOME", "&kp PG_UP", "&kp N", "&kp KP_N1", "&kp KP_N2", "&kp KP_N3", "&kp KP_ENTER", "&kp RSHFT",
|
||||
"&trans", "&trans", "&trans", "&kp LEFT", "&kp RIGHT", "&kp BSPC", "&kp DEL", "&kp END", "&kp PG_DN", "&kp ENTER", "&kp KP_N0", "&kp UP", "&kp DOWN", "&kp KP_DOT", "&kp RBKT", "&trans"
|
||||
], [
|
||||
"&kp F1", "&kp F2", "&kp F3", "&kp F4", "&kp F5", "&kp F6", "&tog 1", "&mo 3", "&kp F7", "&kp F8", "&kp F9", "&kp F10", "&kp F11", "&kp F12",
|
||||
"&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&none", "&none", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans",
|
||||
|
@ -29,17 +29,17 @@
|
|||
"&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans",
|
||||
"&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans"
|
||||
], [
|
||||
"&none", "&bt BT_SEL 0", "&bt BT_SEL 1", "&bt BT_SEL 2", "&bt BT_SEL 3", "&bt BT_SEL 4", "&none", "&trans", "&none", "&none", "&none", "&none", "&none", "&none",
|
||||
"&none", "&none", "&none", "&none", "&none", "&none", "&bootloader", "&bootloader", "&none", "&none", "&none", "&none", "&none", "&none",
|
||||
"&none", "&none", "&none", "&none", "&none", "&none", "&none", "&none", "&none", "&bt BT_CLR", "&none", "&rgb_ug RGB_MEFS_CMD 5", "&none", "&none", "&none", "&none", "&none", "&none",
|
||||
"&none", "&none", "&none", "&none", "&none", "&none", "&none", "&none", "&none", "&none", "&none", "&none", "&none", "&none",
|
||||
"&none", "&none", "&none", "&none", "&none", "&none", "&none", "&none", "&none", "&bl BL_TOG", "&rgb_ug RGB_TOG", "&bl BL_INC", "&bl BL_DEC", "&none", "&none", "&none"
|
||||
"&none", "&bt BT_SEL 0", "&bt BT_SEL 1", "&bt BT_SEL 2", "&bt BT_SEL 3", "&bt BT_SEL 4", "&none", "&trans", "&none", "&none", "&none", "&none", "&none", "&none",
|
||||
"&none", "&none", "&none", "&none", "&none", "&none", "&bootloader", "&bootloader", "&none", "&none", "&none", "&none", "&none", "&none",
|
||||
"&none", "&none", "&none", "&none", "&none", "&none", "&none", "&none", "&none", "&bt BT_CLR", "&none", "&rgb_ug RGB_MEFS_CMD 5", "&none", "&none", "&none", "&none", "&none", "&none",
|
||||
"&none", "&none", "&none", "&none", "&none", "&none", "&none", "&none", "&none", "&none", "&none", "&none", "&none", "&none",
|
||||
"&none", "¯o_mac_profile1", "¯o_mac_profile3", "&none", "&none", "&none", "&none", "&none", "&none", "&bl BL_TOG", "&rgb_ug RGB_TOG", "&bl BL_INC", "&bl BL_DEC", "&none", "&none", "¯o_linux_profile0"
|
||||
], [
|
||||
"&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans",
|
||||
"&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans",
|
||||
"&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&kp LEFT_COMMAND", "&kp LEFT_ALT", "&trans", "&kp RCTRL", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans",
|
||||
"&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans",
|
||||
"&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans"
|
||||
"&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&mo 3", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans",
|
||||
"&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans",
|
||||
"&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&kp LEFT_COMMAND", "&kp LEFT_ALT", "&kp LGUI", "&kp RCTRL", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans",
|
||||
"&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans",
|
||||
"&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", "¯o_linux_profile0"
|
||||
]
|
||||
]
|
||||
}
|
|
@ -1,3 +1,45 @@
|
|||
macro_mac_profile3: macro_mac_profile3{
|
||||
compatible = "zmk,behavior-macro";
|
||||
label = "macro_mac_profile3";
|
||||
#binding-cells = <0>;
|
||||
bindings = <&bt BT_SEL 3>, <&tog 4>;
|
||||
};
|
||||
macro_mac_profile1: macro_mac_profile1{
|
||||
compatible = "zmk,behavior-macro";
|
||||
label = "macro_mac_profile1";
|
||||
#binding-cells = <0>;
|
||||
bindings = <&bt BT_SEL 1>, <&tog 4>;
|
||||
};
|
||||
macro_linux_profile0: macro_linux_profile0{
|
||||
compatible = "zmk,behavior-macro";
|
||||
label = "macro_linux_profile0";
|
||||
#binding-cells = <0>;
|
||||
bindings = <&tog 4>, <&bt BT_SEL 0>;
|
||||
};
|
||||
macro_command_v: macro_command_v{
|
||||
compatible = "zmk,behavior-macro";
|
||||
label = "macro_command_v";
|
||||
#binding-cells = <0>;
|
||||
bindings = <&kp LEFT_COMMAND>, <&kp V>;
|
||||
};
|
||||
macro_command_x: macro_command_x{
|
||||
compatible = "zmk,behavior-macro";
|
||||
label = "macro_command_x";
|
||||
#binding-cells = <0>;
|
||||
bindings = <&kp LEFT_COMMAND>, <&kp X>;
|
||||
};
|
||||
macro_command_c: macro_command_c{
|
||||
compatible = "zmk,behavior-macro";
|
||||
label = "macro_command_c";
|
||||
#binding-cells = <0>;
|
||||
bindings = <&kp LEFT_COMMAND>, <&kp C>;
|
||||
};
|
||||
macro_command_t: macro_command_t{
|
||||
compatible = "zmk,behavior-macro";
|
||||
label = "macro_command_t";
|
||||
#binding-cells = <0>;
|
||||
bindings = <&kp LEFT_COMMAND>, <&kp T>;
|
||||
};
|
||||
macro_quotes: macro_quotes{
|
||||
compatible = "zmk,behavior-macro";
|
||||
label = "macro_quotes";
|
||||
|
|
Loading…
Reference in New Issue