Commit 2d0cd0f2f413

Vincent Demeester <vincent@sbr.pm>
2025-06-27 16:27:40
keyboards: start importing keyboards configurations here
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent 82a93bf
keyboards/keyboards/eyelash_corne/config/eyelash_corne.conf
@@ -0,0 +1,32 @@
+#
+# Copyright (c) 2024 The ZMK Contributors
+# SPDX-License-Identifier: MIT
+#
+
+CONFIG_WS2812_STRIP=y
+CONFIG_ZMK_RGB_UNDERGLOW=y
+CONFIG_ZMK_RGB_UNDERGLOW_ON_START=y
+
+CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_IDLE=y
+CONFIG_ZMK_RGB_UNDERGLOW_HUE_START=160
+CONFIG_ZMK_RGB_UNDERGLOW_EFF_START=3
+
+# Uncomment the following line to enable NKRO
+#CONFIG_ZMK_HID_REPORT_TYPE_NKRO=y
+
+# Some operating systems have problems with full support for consumer keycodes.
+# Uncomment the following line if keycodes labeled "consumer" like C_AC_SEARCH don't work
+#CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y
+
+#EC11 enable
+CONFIG_EC11=y
+CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
+
+# Mouse enable
+CONFIG_ZMK_MOUSE=y
+
+CONFIG_ZMK_BACKLIGHT=y
+CONFIG_ZMK_BACKLIGHT_BRT_START=100
+
+# Uncomment the following line to increase the keyboard's wireless range
+#CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
keyboards/keyboards/eyelash_corne/config/eyelash_corne.json
@@ -0,0 +1,72 @@
+{
+  "id": "eyelash_corne",
+  "name": "Eyelash Corne",
+  "layouts": {
+    "default_layout": {
+      "name": "default_layout",
+      "layout": [
+        { "row": 0, "col":  0, "x":     0, "y": 0.37 },
+        { "row": 0, "col":  1, "x":     1, "y": 0.37 },
+        { "row": 0, "col":  2, "x":     2, "y": 0.12 },
+        { "row": 0, "col":  3, "x":     3, "y":    0 },
+        { "row": 0, "col":  4, "x":     4, "y": 0.12 },
+        { "row": 0, "col":  5, "x":     5, "y": 0.24 },
+        { "row": 0, "col":  9, "x":  9.25, "y": 0.24, "label":    "5-way up" },
+        { "row": 0, "col": 11, "x":  11.5, "y": 0.24 },
+        { "row": 0, "col": 12, "x":  12.5, "y": 0.12 },
+        { "row": 0, "col": 13, "x":  13.5, "y":    0 },
+        { "row": 0, "col": 14, "x":  14.5, "y": 0.12 },
+        { "row": 0, "col": 15, "x":  15.5, "y": 0.37 },
+        { "row": 0, "col": 16, "x":  16.5, "y": 0.37 },
+
+        { "row": 1, "col":  0, "x":     0, "y": 1.37 },
+        { "row": 1, "col":  1, "x":     1, "y": 1.37 },
+        { "row": 1, "col":  2, "x":     2, "y": 1.12 },
+        { "row": 1, "col":  3, "x":     3, "y":    1 },
+        { "row": 1, "col":  4, "x":     4, "y": 1.12 },
+        { "row": 1, "col":  5, "x":     5, "y": 1.24 },
+        { "row": 1, "col":  8, "x":  8.25, "y": 1.24, "label":  "5-way left" },
+        { "row": 1, "col":  9, "x":  9.25, "y": 1.24, "label": "5-way press" },
+        { "row": 1, "col": 10, "x": 10.25, "y": 1.24, "label": "5-way right" },
+        { "row": 1, "col": 11, "x":  11.5, "y": 1.24 },
+        { "row": 1, "col": 12, "x":  12.5, "y": 1.12 },
+        { "row": 1, "col": 13, "x":  13.5, "y":    1 },
+        { "row": 1, "col": 14, "x":  14.5, "y": 1.12 },
+        { "row": 1, "col": 15, "x":  15.5, "y": 1.37 },
+        { "row": 1, "col": 16, "x":  16.5, "y": 1.37 },
+
+        { "row": 2, "col":  0, "x":     0, "y": 2.37 },
+        { "row": 2, "col":  1, "x":     1, "y": 2.37 },
+        { "row": 2, "col":  2, "x":     2, "y": 2.12 },
+        { "row": 2, "col":  3, "x":     3, "y":    2 },
+        { "row": 2, "col":  4, "x":     4, "y": 2.12 },
+        { "row": 2, "col":  5, "x":     5, "y": 2.24 },
+        { "row": 2, "col":  6, "x":  6.25, "y": 2.24, "label":        "4\n2" },
+        { "row": 2, "col":  9, "x":  9.25, "y": 2.24, "label":  "5-way down" },
+        { "row": 2, "col": 11, "x":  11.5, "y": 2.24 },
+        { "row": 2, "col": 12, "x":  12.5, "y": 2.12 },
+        { "row": 2, "col": 13, "x":  13.5, "y":    2 },
+        { "row": 2, "col": 14, "x":  14.5, "y": 2.12 },
+        { "row": 2, "col": 15, "x":  15.5, "y": 2.37 },
+        { "row": 2, "col": 16, "x":  16.5, "y": 2.37 },
+
+        { "row": 3, "col":  3, "x":   3.5, "y": 3.12 },
+        { "row": 3, "col":  4, "x":   4.5, "y": 3.12,                         "r":  12, "rx":  4.5, "ry": 4.12 },
+        { "row": 3, "col":  5, "x":   5.5, "y": 3.12,                         "r":  24, "rx": 5.15, "ry": 4.33 },
+        { "row": 3, "col": 11, "x":    11, "y": 3.12,                         "r": -24, "rx": 12.3, "ry": 4.33 },
+        { "row": 3, "col": 12, "x":    12, "y": 3.12,                         "r": -12, "rx":   13, "ry": 4.12 },
+        { "row": 3, "col": 13, "x":    13, "y": 3.12 }
+      ]
+    }
+  },
+  "sensors": [
+    {
+      "ref": "left_encoder",
+      "name": "encoder_left",
+      "identifier": "encoder_left",
+      "compatible": "alps,ec11",
+      "label": "LEFT_ENCODER",
+      "enabled": true
+    }
+  ]
+}
keyboards/keyboards/eyelash_corne/config/eyelash_corne.keymap
@@ -0,0 +1,176 @@
+#include <dt-bindings/zmk/mouse.h>
+#include <input/processors.dtsi>
+#include <behaviors.dtsi>
+#include <dt-bindings/zmk/bt.h>
+#include <dt-bindings/zmk/keys.h>
+#include <dt-bindings/zmk/outputs.h>
+#include <dt-bindings/zmk/pointing.h>
+#include <dt-bindings/zmk/pointing.h>
+#include <dt-bindings/zmk/pointing.h>
+#include <dt-bindings/zmk/rgb.h>
+
+/*
+
+   &mmv_input_listener {
+       input-processors = <&zip_xy_scaler 2 1>;
+   };
+
+   &msc_input_listener {
+       input-processors = <&zip_xy_scaler 2 1>;
+   };
+
+ */
+
+/*
+    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
+*/
+
+#define RM0 22
+#define RM1 23
+#define RM2 24
+#define RM3 25
+#define LT5 0
+#define LM4 14
+#define RT5 12
+#define RM4 26
+
+
+#define KEYS_L                                                                 \
+  0 1 2 3 4 5 13 14 15 16 17 18 28 29 30 31 32 33  // left hand
+#define KEYS_R                                                                 \
+  7 8 9 10 11 12 22 23 24 25 26 27 36 37 38 39 40 41 // right hand
+
+#define LH0 42
+#define LH1 43
+#define LH2 44
+#define RH0 47
+#define RH1 46
+#define RH2 45
+#define COMBO_CAPS_1 LH2
+#define COMBO_CAPS_2 RH2
+#define THUMBS 42 43 44 45 46 47 // thumbs on 36+ keys
+
+#define ZMK_MOUSE_DEFAULT_MOVE_VAL 1200  // 600
+#define ZMK_MOUSE_DEFAULT_SCRL_VAL 20    // 10
+#define QUICK_TAP_MS 200
+#define TAPPING_TERM_MS 200
+#define IDLE_MS 125
+
+/ {
+    behaviors {
+        td0: td0 {
+            compatible = "zmk,behavior-tap-dance";
+            display-name = "Shift/Caps Lock Tap Dance";
+            #binding-cells = <0>;
+            bindings = <&kp LEFT_SHIFT>, <&kp CAPS>;
+        };
+        hml: homerow_mods_left {
+            compatible = "zmk,behavior-hold-tap";
+            flavor = "balanced";
+            tapping-term-ms = <TAPPING_TERM_MS>;
+            quick-tap-ms = <QUICK_TAP_MS>;
+            require-prior-idle-ms = <IDLE_MS>;
+            bindings = <&kp>, <&kp>;
+            #binding-cells = <2>; 
+            hold-trigger-key-positions = <KEYS_R THUMBS>;
+        };
+
+        hmr: homerow_mods_right {
+            compatible = "zmk,behavior-hold-tap";
+            flavor = "balanced";
+            tapping-term-ms = <TAPPING_TERM_MS>;
+            quick-tap-ms = <QUICK_TAP_MS>;
+            require-prior-idle-ms = <IDLE_MS>;
+            bindings = <&kp>, <&kp>;
+            #binding-cells = <2>; 
+            hold-trigger-key-positions = <KEYS_L THUMBS>;
+        };
+        hm: homerow_mods {
+            compatible = "zmk,behavior-hold-tap";
+            #binding-cells = <2>;
+            tapping-term-ms = <TAPPING_TERM_MS>;
+            quick-tap-ms = <QUICK_TAP_MS>;
+            flavor = "balanced";
+            bindings = <&kp>, <&kp>;
+        };
+    };
+
+    rgb_bri_encoder: rgb_bri_encoder {
+        compatible = "zmk,behavior-sensor-rotate";
+        #sensor-binding-cells = <0>;
+        bindings = <&rgb_ug RGB_BRI>, <&rgb_ug RGB_BRD>;
+    };
+    rgb_hue_encoder: rgb_hue_encoder {
+        compatible = "zmk,behavior-sensor-rotate";
+        #sensor-binding-cells = <0>;
+        bindings = <&rgb_ug RGB_HUI>, <&rgb_ug RGB_HUD>;
+    };
+    rgb_sat_encoder: rgb_sat_encoder {
+        compatible = "zmk,behavior-sensor-rotate";
+        #sensor-binding-cells = <0>;
+        bindings = <&rgb_ug RGB_SAI>, <&rgb_ug RGB_SAD>;
+    };
+
+    scroll_encoder: scroll_encoder {
+        compatible = "zmk,behavior-sensor-rotate";
+        #sensor-binding-cells = <0>;
+        bindings = <&msc SCRL_DOWN>, <&msc SCRL_UP>;
+
+        tap-ms = <30>;
+    };
+
+    keymap {
+        compatible = "zmk,keymap";
+
+        default_layer {
+            display-name = "QWERTY";
+            bindings = <
+&kp TAB     &kp Q           &kp W           &kp E             &kp R        &kp T                               &kp UP                &kp Y        &kp U        &kp I              &kp O            &kp P       &kp LBKT
+&kp = EQUAL &hml LEFT_GUI A  &hml LEFT_ALT S  &hml LEFT_SHIFT D  &hml LCTRL F  &kp G                     &kp LEFT  &kp ENTER  &kp RIGHT  &kp H        &hmr RCTRL J  &hmr RIGHT_SHIFT K  &hmr RIGHT_ALT L  &hmr RIGHT_GUI SEMICOLON  &kp SQT
+	      &kp GRAVE   &kp Z           &kp X           &kp C             &kp V        &kp B        &kp SPACE              &kp DOWN              &kp N        &kp M        &kp COMMA          &kp DOT          &kp FSLH                 &kp RBKT
+                                            &lt1 SPACE          &lt 2 BSPC        &kp MINUS                                               &kp RCTRL  &kp LEFT_SHIFT        &lt 3 ENTER
+            >;
+
+            sensor-bindings = <&inc_dec_kp C_VOLUME_UP C_VOLUME_DOWN>;
+        };
+
+        lower_layer {
+            display-name = "NUMBER";
+            bindings = <
+&trans  &kp N1           &kp N2          &kp N3        &kp N4        &kp N5                                         &mmv MOVE_UP                     &kp N6           &kp N7           &kp N8           &kp N9           &kp N0    &kp BSPC
+&trans  &trans   &bt BT_SEL 0    &bt BT_SEL 1  &bt BT_SEL 2  &bt BT_SEL 3                   &mmv MOVE_LEFT  &mkp LCLK       &mmv MOVE_RIGHT  &kp LEFT         &kp DOWN         &kp UP           &kp RIGHT        &kp HOME  &kp PG_UP
+&trans  &rgb_ug RGB_OFF  &rgb_ug RGB_ON  &trans        &trans        &rgb_ug RGB_EFF  &kp C_MUTE                    &mmv MOVE_DOWN                   &rgb_ug RGB_EFR  &rgb_ug RGB_SPI  &rgb_ug RGB_BRI  &rgb_ug RGB_BRD  &kp END   &kp PG_DN
+                                         &trans        &trans        &trans                                                                          &kp INS          &kp DEL          &trans
+            >;
+
+            sensor-bindings = <&rgb_hue_encoder>;
+        };
+
+        raise_layer {
+            display-name = "SYMBOL";
+            bindings = <
+&trans  &kp EXCL      &kp AT        &kp HASH   &kp DLLR   &kp PRCNT                            &mmv MOVE_UP                     &kp CARET  &kp AMPS   &kp ASTRK  &kp LPAR  &kp RPAR  &kp BSPC
+&trans  &bt BT_CLR    &mkp LCLK     &mkp MCLK  &mkp RCLK  &mkp MB4             &mmv MOVE_LEFT  &mkp LCLK       &mmv MOVE_RIGHT  &kp MINUS  &kp EQUAL  &kp LBKT   &kp RBKT  &kp BSLH  &kp GRAVE
+&trans  &out OUT_USB  &out OUT_BLE  &none      &none      &mkp MB5   &trans                    &mmv MOVE_DOWN                   &kp UNDER  &kp PLUS   &kp LBRC   &kp RBRC  &kp PIPE  &kp TILDE
+                                    &trans     &trans     &kp SPACE                                                             &kp RET    &trans     &trans
+            >;
+
+            sensor-bindings = <&rgb_sat_encoder>;
+        };
+
+        layer_3 {
+            display-name = "Fn";
+            bindings = <
+&studio_unlock  &kp F1      &kp F2     &kp F3       &kp F4     &kp F5                                  &mmv MOVE_UP                     &kp F6       &kp F7     &kp F8       &kp F9      &kp F10          &kp F11
+&trans          &bt BT_CLR_ALL      &mkp LCLK  &mkp MCLK    &mkp RCLK  &mkp MB4                &mmv MOVE_LEFT  &mkp LCLK       &mmv MOVE_RIGHT  &bootloader  &mkp LCLK  &mkp MCLK    &mkp RCLK   &kp PRINTSCREEN  &kp F12
+&trans          &sys_reset  &trans     &bootloader  &trans     &mkp MB5  &kp C_MUTE                    &mmv MOVE_DOWN                   &trans       &trans     &bootloader  &sys_reset  &kp SCROLLLOCK   &kp PAUSE_BREAK
+                                       &trans       &trans     &trans                                                                   &trans       &trans     &trans
+            >;
+
+            sensor-bindings = <&scroll_encoder>;
+        };
+    };
+};
keyboards/keyboards/eyelash_corne/config/west.yml
@@ -0,0 +1,18 @@
+manifest:
+  remotes:
+    - name: zmkfirmware
+      url-base: https://github.com/zmkfirmware
+      # Additional modules containing boards/shields/custom code can be listed here as well.
+      # See:
+      # - https://zmk.dev/docs/features/modules
+      # - https://docs.zephyrproject.org/3.5.0/develop/west/manifest.html#projects
+  projects:
+    - name: eyelash_corne
+      url: https://github.com/a741725193/zmk-new_corne
+      revision: main
+    - name: zmk
+      remote: zmkfirmware
+      revision: main
+      import: app/west.yml
+  self:
+    path: config
keyboards/keyboards/eyelash_corne/zephyr/module.yml
@@ -0,0 +1,3 @@
+build:
+  settings:
+     board_root: .
keyboards/keyboards/eyelash_corne/build.yaml
@@ -0,0 +1,17 @@
+---
+include:
+  - board: eyelash_corne_left
+    shield: nice_view
+    #snippet: zmk-usb-logging    # Uncomment to log over USB.
+  - board: eyelash_corne_right
+    shield: nice_view
+    #snippet: zmk-usb-logging
+  - board: eyelash_corne_left
+    shield: nice_view
+    snippet: studio-rpc-usb-uart
+    cmake-args: -DCONFIG_ZMK_STUDIO=y -DCONFIG_ZMK_STUDIO_LOCKING=n
+    artifact-name: eyelash_corne_studio_left
+  - board: eyelash_corne_left
+    shield: settings_reset
+    #snippet: zmk-usb-logging
+ 
keyboards/lib/functions.sh
@@ -0,0 +1,25 @@
+#!/usr/bin/env bash
+# Author: Chmouel Boudjnah <chmouel@chmouel.com>
+
+if [[ -e config/includes/local.h ]]; then
+  cat <<EOF >config/includes/local.h
+#define MYDEBUG_PASTE_MACRO &kp D &kp E &kp B &kp U &kp G
+#define MYDEBUG_PASTE_MACRO_2 &kp STAR &kp SPACE &kp D &kp E &kp B &kp U &kp G &kp SPACE &kp STAR
+EOF
+fi
+
+function echo_red() {
+  echo -e "\033[0;31m$1\033[0m"
+}
+
+function echo_green() {
+  echo -e "\033[0;32m$1\033[0m"
+}
+
+function echo_blue() {
+  echo -e "\033[0;34m$1\033[0m"
+}
+
+function echo_yellow() {
+  echo -e "\033[0;33m$1\033[0m"
+}
keyboards/eyelash_corne.sh
@@ -0,0 +1,35 @@
+#!/usr/bin/env bash
+# shellcheck disable=SC1091
+set -eufo pipefail
+
+cPWD="$(dirname $(readlink -f $0))"
+# TODO: we'll want to checkout those (ideally, using nix)
+# zmkRepo="$(readlink -f $cPWD/zmk)"
+eyeZMK="$(readlink -f $cPWD/new_corne)"
+# cd $zmkRepo/app || exit 1
+cd $eyeZMK/zephyr || exit 1
+# TODO: Need to run west init (and west update, and west zephyr-export ?) if we didn't do it yet
+# source $zmkRepo/.venv/bin/activate
+source ${cPWD}/lib/functions.sh
+
+function flash() {
+	side=${1}
+	id=${2}
+
+	west build -b eyelash_corne_${side} \
+		--build-dir build-${side} \
+		-S studio-rpc-usb-uart -- \
+		-DSHIELD=nice_view \
+		-DCONFIG_ZMK_STUDIO=y \
+		-DCONFIG_ZMK_STUDIO_LOCKING=n \
+		-DZMK_CONFIG=$cPWD/keyboards/eyelash_corne \
+		-DKEYMAP_FILE=$cPWD/keyboards/eyelash_corne/eyelash_corne.keymap #\
+	# -DZMK_EXTRA_MODULES=$eyeZMK
+}
+
+flash left usb-Adafruit_nRF_UF2_D9D14D5F56CF8D6F-0:0
+echo "$(echo_green ) Left side is completed.."
+sleep 2
+
+flash right usb-Adafruit_nRF_UF2_07E2C44920A78BC8-0:0
+echo $(echo_green ) "Right side is completed.. enjoy 🥳"
keyboards/README.org
@@ -0,0 +1,13 @@
+#+title: My Keyboard setup
+
+This folder contains my keyboard setup, and everything required to
+build and flash them.
+
+Today, there is 2 keyboards:
+- ZSA Moonlander, using QMK
+- Eyelash Corne (wireless), using zmk (with some updates)
+
+* Notes
+
+- Clone =zmk=: https://github.com/zmkfirmware/zmk
+- Clone =new_corne=: https://github.com/krisalcordo/zmk-new_corne