From 3a698c66dd59f2a8eebea3cc81aab5a1ba6f63ab Mon Sep 17 00:00:00 2001 From: Ben Kristinsson Date: Thu, 29 Aug 2024 10:47:34 +0200 Subject: [PATCH 1/7] Test sticky-key on mac layer, move LCMD to right-hand cluster, move RCTRL to LGUI (right-hand cluster). --- config/adv360.keymap | 11 ++++++++++- config/keymap.json | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/config/adv360.keymap b/config/adv360.keymap index fecc082..9dde9fb 100644 --- a/config/adv360.keymap +++ b/config/adv360.keymap @@ -29,6 +29,15 @@ }; }; + &sk { + # https://zmk.dev/docs/keymaps/behaviors/sticky-key + # default (1s) + release-after-ms = <1000>; + # activate stick key rightbefore the other key is pressed, prevents host + # from seeing anything during sticky-key timeout (useful for mouse + # interactions) + lazy; } + keymap { compatible = "zmk,keymap"; @@ -45,7 +54,7 @@ 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 LCMD &kp LALT &trans &kp RCTRL &trans &trans &trans &trans &trans &trans &trans + &trans &trans &trans &trans &trans &trans &trans &kp LCMD &kp LALT &sk RCTRL &sk LCMD &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 >; diff --git a/config/keymap.json b/config/keymap.json index 2be1c49..c6df008 100644 --- a/config/keymap.json +++ b/config/keymap.json @@ -18,7 +18,7 @@ ], [ "&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 LCMD ", "&kp LALT", "&trans", "&kp RCTRL", "&trans ", "&trans", "&trans", "&trans", "&trans", "&trans", "&trans", + "&trans", "&trans", "&trans", "&trans", "&trans", "&trans ", "&trans", "&kp LCMD ", "&kp LALT", "&sk RCTRL", "&sk LCMD", "&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" ], [ -- 2.40.1 From 3a39a84ce6d39eceb6829b905de42b170bf12911 Mon Sep 17 00:00:00 2001 From: Ben Kristinsson Date: Thu, 29 Aug 2024 10:56:27 +0200 Subject: [PATCH 2/7] Use sticky-layer to enable mod layer. --- config/adv360.keymap | 13 +++++++++---- config/keymap.json | 4 ++-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/config/adv360.keymap b/config/adv360.keymap index 9dde9fb..31bd573 100644 --- a/config/adv360.keymap +++ b/config/adv360.keymap @@ -31,19 +31,24 @@ &sk { # https://zmk.dev/docs/keymaps/behaviors/sticky-key - # default (1s) + # default: 1000ms (1s) release-after-ms = <1000>; # activate stick key rightbefore the other key is pressed, prevents host # from seeing anything during sticky-key timeout (useful for mouse # interactions) - lazy; } + lazy; + } + &sl { + # default: 1000ms (1s) + release-after-ms = <1500>; + } keymap { compatible = "zmk,keymap"; 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 EQUAL &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &tog 1 &sl 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 @@ -61,7 +66,7 @@ }; fn { bindings = < - &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 + &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &tog 1 &trans &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 &trans &trans &trans &trans &trans &trans &none &trans &trans &trans &trans &none &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans diff --git a/config/keymap.json b/config/keymap.json index c6df008..bc1c2a7 100644 --- a/config/keymap.json +++ b/config/keymap.json @@ -10,7 +10,7 @@ ], "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 EQUAL", "&kp N1 ", "&kp N2 ", "&kp N3 ", "&kp N4 ", "&kp N5 ", "&tog 1 ", "&sl 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 ", @@ -22,7 +22,7 @@ "&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 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", + "&kp F1 ", "&kp F2 ", "&kp F3 ", "&kp F4 ", "&kp F5 ", "&kp F6 ", "&tog 1 ", "&trans ", "&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 ", "&trans ", "&trans ", "&trans ", "&trans ", "&trans ", "&trans ", "&none ", "&trans ", "&trans ", "&trans ", "&trans ", "&none ", "&trans ", "&trans ", "&trans ", "&trans ", "&trans ", "&trans ", "&trans ", "&trans ", "&trans ", "&trans ", "&trans ", "&trans ", "&trans ", "&trans ", "&trans ", "&trans ", "&trans ", "&trans ", "&trans ", "&trans ", -- 2.40.1 From c29efcd3d2efa017ba31e9746af9c8aaff3185fc Mon Sep 17 00:00:00 2001 From: Ben Kristinsson Date: Thu, 29 Aug 2024 11:01:30 +0200 Subject: [PATCH 3/7] Align whitespace in fn layer definitons after replacing redundant key with '&trans' --- config/adv360.keymap | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config/adv360.keymap b/config/adv360.keymap index 31bd573..be86b0e 100644 --- a/config/adv360.keymap +++ b/config/adv360.keymap @@ -67,10 +67,10 @@ fn { bindings = < &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &tog 1 &trans &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 - &trans &trans &trans &trans &trans &trans &none &trans &trans &trans &trans &none &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 &none &none &trans &trans &trans &trans &trans &trans + &trans &trans &trans &trans &trans &trans &none &trans &trans &trans &trans &none &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 >; }; mod { -- 2.40.1 From 0995c0a246d9fec4b38d0a97e44b69853cff13fe Mon Sep 17 00:00:00 2001 From: Ben Kristinsson Date: Thu, 29 Aug 2024 11:03:21 +0200 Subject: [PATCH 4/7] Replace redundant 'tog 1' in fn layer with '&trans'. --- config/adv360.keymap | 2 +- config/keymap.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/adv360.keymap b/config/adv360.keymap index be86b0e..4723f13 100644 --- a/config/adv360.keymap +++ b/config/adv360.keymap @@ -66,7 +66,7 @@ }; fn { bindings = < - &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &tog 1 &trans &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 + &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &trans &trans &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 &trans &trans &trans &trans &trans &trans &none &trans &trans &trans &trans &none &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans diff --git a/config/keymap.json b/config/keymap.json index bc1c2a7..63dcd2c 100644 --- a/config/keymap.json +++ b/config/keymap.json @@ -22,7 +22,7 @@ "&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 F1 ", "&kp F2 ", "&kp F3 ", "&kp F4 ", "&kp F5 ", "&kp F6 ", "&tog 1 ", "&trans ", "&kp F7 ", "&kp F8 ", "&kp F9 ", "&kp F10 ", "&kp F11 ", "&kp F12", + "&kp F1 ", "&kp F2 ", "&kp F3 ", "&kp F4 ", "&kp F5 ", "&kp F6 ", "&trans ", "&trans ", "&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 ", "&trans ", "&trans ", "&trans ", "&trans ", "&trans ", "&trans ", "&none ", "&trans ", "&trans ", "&trans ", "&trans ", "&none ", "&trans ", "&trans ", "&trans ", "&trans ", "&trans ", "&trans ", "&trans ", "&trans ", "&trans ", "&trans ", "&trans ", "&trans ", "&trans ", "&trans ", "&trans ", "&trans ", "&trans ", "&trans ", "&trans ", "&trans ", -- 2.40.1 From 096cd854f4220762d9c6a15ebf65c3fd45dc5a81 Mon Sep 17 00:00:00 2001 From: Ben Kristinsson Date: Thu, 29 Aug 2024 11:04:39 +0200 Subject: [PATCH 5/7] Fix syntax in .keymap file --- config/adv360.keymap | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/config/adv360.keymap b/config/adv360.keymap index 4723f13..b427876 100644 --- a/config/adv360.keymap +++ b/config/adv360.keymap @@ -5,6 +5,23 @@ #include #include +// https://zmk.dev/docs/keymaps/behaviors/sticky-key +&sk { + // default: 1000ms (1s) + release-after-ms = <1000>; + // Activate stick key rightbefore the other key is pressed, prevents host + // from seeing anything during sticky-key timeout (useful for mouse + // interactions) + lazy; +}; + +// https://zmk.dev/docs/keymaps/behaviors/sticky-layer +&sl { + // default: 1000ms (1s) + release-after-ms = <1500>; +}; + + / { behaviors { #include "macros.dtsi" @@ -29,20 +46,6 @@ }; }; - &sk { - # https://zmk.dev/docs/keymaps/behaviors/sticky-key - # default: 1000ms (1s) - release-after-ms = <1000>; - # activate stick key rightbefore the other key is pressed, prevents host - # from seeing anything during sticky-key timeout (useful for mouse - # interactions) - lazy; - } - &sl { - # default: 1000ms (1s) - release-after-ms = <1500>; - } - keymap { compatible = "zmk,keymap"; -- 2.40.1 From 104a94b3ce30dfbd172dbebe0e0f146c186f9e2b Mon Sep 17 00:00:00 2001 From: Ben Kristinsson Date: Thu, 29 Aug 2024 11:23:07 +0200 Subject: [PATCH 6/7] Disable 'lazy' configuration for 'sk', ZMK might be too old --- config/adv360.keymap | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/adv360.keymap b/config/adv360.keymap index b427876..fc27f2f 100644 --- a/config/adv360.keymap +++ b/config/adv360.keymap @@ -12,7 +12,8 @@ // Activate stick key rightbefore the other key is pressed, prevents host // from seeing anything during sticky-key timeout (useful for mouse // interactions) - lazy; + // NOTE: doesn't compile, ZMK might be too old for the feature. + //lazy; }; // https://zmk.dev/docs/keymaps/behaviors/sticky-layer -- 2.40.1 From 4912ee111bbeaedf90ab06999eb86ff837933a97 Mon Sep 17 00:00:00 2001 From: Ben Kristinsson Date: Thu, 29 Aug 2024 11:26:46 +0200 Subject: [PATCH 7/7] Move publish steps to a stage --- Jenkinsfile | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index ef1b746..a623cef 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -45,19 +45,23 @@ pipeline { // } // } //} - - } - post { - success { - archiveArtifacts( - artifacts: "dist/firmware/Adv360-firmware_${env.VERSION}.tar.gz,dist/firmware/Adv360_firmware_${env.VERSION}.tar.gz.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 dist/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 + stage('publish') { + when { + branch "main" + } + steps { + archiveArtifacts( + artifacts: "dist/firmware/Adv360-firmware_${env.VERSION}.tar.gz,dist/firmware/Adv360_firmware_${env.VERSION}.tar.gz.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 dist/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 + } } } + } + post { always { sh "docker image ls" } -- 2.40.1