Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mouse keys #23

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

bryanforbes
Copy link

This pull request contains the following:

  • The original PR to ZMK rebased by ftc
  • Various fixes by @caksoylar and @urob to apply on top of the latest ZMK
  • Update to the HOG indexes to work with Glove80
  • A small refactor to better support Glove80's version of PR1793
  • A change to the Glove80 configuration to enable the functionality for the online editor

@LemonBreezes
Copy link

Would be nice to have diagonal mouse movement keys as well as mouse warp keys like the Kaleidoscope firmware does as well.

@bryanforbes
Copy link
Author

Would be nice to have diagonal mouse movement keys as well as mouse warp keys like the Kaleidoscope firmware does as well.

These are both planned, I believe, but this is just a backport from the ZMK PR to add mouse movement

@caksoylar
Copy link

You can get diagonal movements by combining multiple movement parameters. e.g. to go up-right use &mmv (MOVE_UP | MOVE_RIGHT).

@osa1
Copy link

osa1 commented Jan 22, 2024

With this patch, is there a way to have a modifier to increase mouse move speed? For example, my ZMK_MOUSE_DEFAULT_MOVE_VAL is currently 500 which I like, but it takes a long time to move the mouse from one end of the screen to the other. If I increase the move speed then it becomes difficult to move small distances. If I could have modifier (e.g. shift) to double that would be helpful.

@caksoylar
Copy link

While there isn't a modification functionality to affect the speed or other properties of the keys while held, you can have separate keys to go separate speeds, e.g.

&mmv MOVE_UP // equivalent to MOVE_Y(-500)
&mmv MOVE_Y(-1000) // double speed

You can even define new mouse move instances with different acceleration etc.:

    mmvt: mouse_move_turbo {
            compatible = "zmk,behavior-mouse-move";
            #binding-cells = <1>;
            delay-ms = <0>;
            time-to-max-speed-ms = <100>;  // mmv has 300
            acceleration-exponent = <1>;
        };

@osa1
Copy link

osa1 commented Jan 22, 2024

Separate keys with different move speeds worked, thanks. I would still use a modifier key if it was possible though.

sergey-tihon added a commit to sergey-tihon/glove80-zmk-config that referenced this pull request Feb 11, 2024
@osa1
Copy link

osa1 commented Feb 15, 2024

Would it be possible to rebase this on top of #27 so that we can have BLE fixes and mouse controls in the same firmware?

@osa1
Copy link

osa1 commented Feb 20, 2024

I was able to build with this branch before the last commits, but now it's failing: https://github.com/osa1/glove80-zmk-config/actions/runs/7776017512/job/21774531277.

I'm using the moergo-sc/globa80-zmk-config with the git repo and branch name updated to use this branch: https://github.com/osa1/glove80-zmk-config/blob/main/.github/workflows/build.yml.

@bryanforbes
Copy link
Author

@osa1 Yes, I need to fix the build today. I took some commits from Pete's mouse branch that rely on a feature we don't have here.

@osa1
Copy link

osa1 commented Feb 20, 2024

@bryanforbes thanks for fixing the build. Not sure if you're aware of the issue but with the current version (fbaeb90) mouse controls stopped working. My key map is here: https://github.com/osa1/glove80-zmk-config/blob/main/config/glove80.keymap. It works with the version currently on glove80.com layout editor.

@Andrew15-5
Copy link

I have a different problem. When I'm compiling (nix-build config -o combined) with https://github.com/moergo-sc/zmk.git and v24.02 (2fad527) it all builds successfuly. But when I use https://github.com/bryanforbes/zmk.git and mouse-3.2-moergo (fbaeb90) it errors at some point. I also tried building my outdated config at https://my.glove80.com/#/my_layouts/ with the community.pr23.mouse-keys.20240223.113355 version just now and the mouse keys indeed do work. So the question is, what is the difference between community.pr23.mouse-keys.20240223.113355 and fbaeb90.

logs
╰─ j
set -eu; if [ ! -d 'glove80-zmk-config' ]; then git clone --depth 1 'https://github.com/moergo-sc/glove80-zmk-config.git' 'glove80-zmk-config'; fi
Cloning into 'glove80-zmk-config'...
remote: Enumerating objects: 18, done.
remote: Counting objects: 100% (18/18), done.
remote: Compressing objects: 100% (13/13), done.
remote: Total 18 (delta 0), reused 15 (delta 0), pack-reused 0
Receiving objects: 100% (18/18), 31.83 KiB | 776.00 KiB/s, done.
if [ ! -d 'glove80-zmk-config'/src ]; then cd 'glove80-zmk-config'; git clone --branch 'mouse-3.2-moergo' 'https://github.com/bryanforbes/zmk.git' src; else cd 'glove80-zmk-config/src'; git checkout 'mouse-3.2-moergo'; fi
Cloning into 'src'...
remote: Enumerating objects: 28297, done.
remote: Counting objects: 100% (142/142), done.
remote: Compressing objects: 100% (85/85), done.
remote: Total 28297 (delta 73), reused 99 (delta 57), pack-reused 28155
Receiving objects: 100% (28297/28297), 22.78 MiB | 5.42 MiB/s, done.
Resolving deltas: 100% (20491/20491), done.
mkdir -p 'output'
set -eu; dir=$(basename 'config'); test -d "$dir"; sed -Ei 's/(FIRMWARE_VERSION)(.*)\1.*\1/\1\2\1mouse-3.2-moergo\1/' "$dir/config.c";
set -eu; dir=$(basename 'config'); test -d "$dir"; get_line(){ grep -Fn "$1" "$dir/main.c" | grep -o '[0-9]\+'; }; layers_line=$(get_line '// layers.c'); config_line=$(get_line '// config.c'); keymap_line=$(get_line '// keymap.c'); if [ 'true' = 'true' -a "$(realpath 'config')" != "$(realpath "$dir")" ]; then mkdir -p 'config'; for file in layers config keymap main; do rm -f "config/$file.c"; cp -f "$dir/$file.c" 'config/'; done; fi; sed -e "${layers_line}r $dir/layers.c" -e "${layers_line}a"'\\' -e "${layers_line}d" -e "${config_line}r $dir/config.c" -e "${config_line}d" -e "${keymap_line}r $dir/keymap.c" -e "${keymap_line}d" "$dir/main.c" > 'merged.c';
set -eu; test -f 'merged.c'; test -d 'glove80-zmk-config'; test -n "$(cat 'merged.c')"; mv 'merged.c' 'glove80-zmk-config'/config/glove80.keymap;
set -eu; cd 'glove80-zmk-config'; name=$(basename 'config'); nix-build config -o combined; file_name="$(date -Iseconds | sed 's/+.*//')_mouse-3.2-moergo_$name.uf2"; printf '%s\n%s\n' 'Built file at:' "./output/$file_name"; cp ./combined/glove80.uf2 "../output/$file_name"; # nvim "../output/$file_name";
these 3 derivations will be built:
  /nix/store/i65h03g9dx6ypc21kx4phfs577sc3a6d-zmk_glove80_rh.drv
  /nix/store/pcwjk24zqvg686r7jfl22220bz00i1pb-zmk_glove80_lh.drv
  /nix/store/cal462v1kg74kznsi78i4m8wz0rmiwp0-combined_zmk_glove80_lh_zmk_glove80_rh.drv
building '/nix/store/pcwjk24zqvg686r7jfl22220bz00i1pb-zmk_glove80_lh.drv'...
Running phase: unpackPhase
unpacking source archive /nix/store/g0rkd878qj1j1siq2ypdzkarpi2725ww-source
source root is source/app
Running phase: patchPhase
Running phase: updateAutotoolsGnuConfigScriptsPhase
Running phase: configurePhase
fixing cmake files...
cmake flags: -GNinja -DCMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY=OFF -DCMAKE_FIND_USE_PACKAGE_REGISTRY=OFF -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DCMAKE_INSTALL_LOCALEDIR=/nix/store/hpxam4idvdqmw40q3crbjsjmjidndfp1-zmk_glove80_lh/share/locale -DCMAKE_INSTALL_LIBEXECDIR=/nix/store/hpxam4idvdqmw40q3crbjsjmjidndfp1-zmk_glove80_lh/libexec -DCMAKE_INSTALL_LIBDIR=/nix/store/hpxam4idvdqmw40q3crbjsjmjidndfp1-zmk_glove80_lh/lib -DCMAKE_INSTALL_DOCDIR=/nix/store/hpxam4idvdqmw40q3crbjsjmjidndfp1-zmk_glove80_lh/share/doc/zmk -DCMAKE_INSTALL_INFODIR=/nix/store/hpxam4idvdqmw40q3crbjsjmjidndfp1-zmk_glove80_lh/share/info -DCMAKE_INSTALL_MANDIR=/nix/store/hpxam4idvdqmw40q3crbjsjmjidndfp1-zmk_glove80_lh/share/man -DCMAKE_INSTALL_OLDINCLUDEDIR=/nix/store/hpxam4idvdqmw40q3crbjsjmjidndfp1-zmk_glove80_lh/include -DCMAKE_INSTALL_INCLUDEDIR=/nix/store/hpxam4idvdqmw40q3crbjsjmjidndfp1-zmk_glove80_lh/include -DCMAKE_INSTALL_SBINDIR=/nix/store/hpxam4idvdqmw40q3crbjsjmjidndfp1-zmk_glove80_lh/sbin -DCMAKE_INSTALL_BINDIR=/nix/store/hpxam4idvdqmw40q3crbjsjmjidndfp1-zmk_glove80_lh/bin -DCMAKE_INSTALL_NAME_DIR=/nix/store/hpxam4idvdqmw40q3crbjsjmjidndfp1-zmk_glove80_lh/lib -DCMAKE_POLICY_DEFAULT_CMP0025=NEW -DCMAKE_OSX_SYSROOT= -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_STRIP= -DCMAKE_RANLIB= -DCMAKE_AR= -DCMAKE_C_COMPILER= -DCMAKE_CXX_COMPILER= -DCMAKE_INSTALL_PREFIX=/nix/store/hpxam4idvdqmw40q3crbjsjmjidndfp1-zmk_glove80_lh -DZEPHYR_BASE=/nix/store/6p8b3xwjz1w7vijrcysij2f17fn73492-zephyr/zephyr -DBOARD_ROOT=. -DBOARD=glove80_lh -DZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb -DGNUARMEMB_TOOLCHAIN_PATH=/nix/store/mkvk7zrbvp1s74g92kjd4qx60nmclfn3-gcc-arm-embedded-12.3.rel1 -DCMAKE_C_COMPILER=/nix/store/mkvk7zrbvp1s74g92kjd4qx60nmclfn3-gcc-arm-embedded-12.3.rel1/bin/arm-none-eabi-gcc -DCMAKE_CXX_COMPILER=/nix/store/mkvk7zrbvp1s74g92kjd4qx60nmclfn3-gcc-arm-embedded-12.3.rel1/bin/arm-none-eabi-g++ -DCMAKE_AR=/nix/store/mkvk7zrbvp1s74g92kjd4qx60nmclfn3-gcc-arm-embedded-12.3.rel1/bin/arm-none-eabi-ar -DCMAKE_RANLIB=/nix/store/mkvk7zrbvp1s74g92kjd4qx60nmclfn3-gcc-arm-embedded-12.3.rel1/bin/arm-none-eabi-ranlib -DZEPHYR_MODULES=/nix/store/4hppll3pcwx5x9048arz0ak0wdmynn63-zmk-module-cmsis/cmsis;/nix/store/i5fin6gi7q4jh2n1dyrqr5l2ywahw7lz-zmk-module-hal_nordic/hal_nordic;/nix/store/yym0ihp1c5v64rwvzblp74i35vsvk9rq-zmk-module-tinycrypt/tinycrypt;/nix/store/4l05ri90x8v6gbqyg3ayc4nzgpi7i9ma-zmk-module-picolibc/picolibc;/nix/store/8pi1zlp3lvnmc4md6gawlxalqd33bcrq-zmk-module-lvgl/lvgl;/nix/store/4l05ri90x8v6gbqyg3ayc4nzgpi7i9ma-zmk-module-picolibc/picolibc;/nix/store/lsnmdrz772jfxaqmy1ir2r495rgvwdch-zmk-module-segger/segger -DKEYMAP_FILE=/nix/store/k3076071lf6mcszi0cqdl12wbjh920z7-config/glove80.keymap -DEXTRA_CONF_FILE=/nix/store/k3076071lf6mcszi0cqdl12wbjh920z7-config/glove80.conf -DUSER_CACHE_DIR=/build/.cache
Loading Zephyr default modules (Zephyr base (cached)).
-- Application: /build/source/app
-- CMake version: 3.27.8
-- Found Python3: /nix/store/qrrwy165fvfdxcp6yn01yjbi7fsn3zmf-python3-3.11.6-env/bin/python (found suitable version "3.11.6", minimum required is "3.8") found components: Interpreter
-- Cache files will be written to: /build/.cache
-- Zephyr version: 3.5.0 (/nix/store/6p8b3xwjz1w7vijrcysij2f17fn73492-zephyr/zephyr)
-- Using keymap file: /nix/store/k3076071lf6mcszi0cqdl12wbjh920z7-config/glove80.keymap
-- Board: glove80_lh
-- Found toolchain: gnuarmemb (/nix/store/mkvk7zrbvp1s74g92kjd4qx60nmclfn3-gcc-arm-embedded-12.3.rel1)
-- Found Dtc: /nix/store/vrigkjb8pzdc01ggppbfyh6mcnnv2lzw-dtc-1.7.0/bin/dtc (found suitable version "1.7.0", minimum required is "1.4.6")
-- Found BOARD.dts: /build/source/app/boards/arm/glove80/glove80_lh.dts
-- Found devicetree overlay: /nix/store/k3076071lf6mcszi0cqdl12wbjh920z7-config/glove80.keymap
'label' is marked as deprecated in 'properties:' in /build/source/app/dts/bindings/behaviors/zmk,behavior-mouse-move.yaml for node /behaviors/behavior_mouse_move.
'label' is marked as deprecated in 'properties:' in /build/source/app/dts/bindings/behaviors/zmk,behavior-mouse-scroll.yaml for node /behaviors/behavior_mouse_scroll.
'label' is marked as deprecated in 'properties:' in /build/source/app/dts/bindings/behaviors/zmk,behavior-tap-dance.yaml for node /behaviors/lower.
'label' is marked as deprecated in 'properties:' in /build/source/app/dts/bindings/behaviors/zmk,behavior-tap-dance.yaml for node /behaviors/bt_0.
'label' is marked as deprecated in 'properties:' in /build/source/app/dts/bindings/behaviors/zmk,behavior-tap-dance.yaml for node /behaviors/bt_1.
'label' is marked as deprecated in 'properties:' in /build/source/app/dts/bindings/behaviors/zmk,behavior-tap-dance.yaml for node /behaviors/bt_2.
'label' is marked as deprecated in 'properties:' in /build/source/app/dts/bindings/behaviors/zmk,behavior-tap-dance.yaml for node /behaviors/bt_3.
'label' is marked as deprecated in 'properties:' in /build/source/app/dts/bindings/behaviors/zmk,behavior-hold-tap.yaml for node /behaviors/magic.
'label' is marked as deprecated in 'properties:' in /build/source/app/dts/bindings/behaviors/zmk,behavior-macro.yaml for node /macros/rgb_ug_status_macro.
'label' is marked as deprecated in 'properties:' in /build/source/app/dts/bindings/behaviors/zmk,behavior-macro.yaml for node /macros/bt_select_0.
'label' is marked as deprecated in 'properties:' in /build/source/app/dts/bindings/behaviors/zmk,behavior-macro.yaml for node /macros/bt_select_1.
'label' is marked as deprecated in 'properties:' in /build/source/app/dts/bindings/behaviors/zmk,behavior-macro.yaml for node /macros/bt_select_2.
'label' is marked as deprecated in 'properties:' in /build/source/app/dts/bindings/behaviors/zmk,behavior-macro.yaml for node /macros/bt_select_3.
'label' is marked as deprecated in 'properties:' in /build/source/app/dts/bindings/behaviors/zmk,behavior-macro.yaml for node /macros/fmwrv.
-- Generated zephyr.dts: /build/source/app/build/zephyr/zephyr.dts
-- Generated devicetree_generated.h: /build/source/app/build/zephyr/include/generated/devicetree_generated.h
-- Including generated dts.cmake file: /build/source/app/build/zephyr/dts.cmake
/build/source/app/build/zephyr/zephyr.dts:58.25-63.5: Warning (unique_unit_address_if_enabled): /soc/clock@40000000: duplicate unit-address (also used in node /soc/power@40000000)
/build/source/app/build/zephyr/zephyr.dts:329.21-333.5: Warning (unique_unit_address_if_enabled): /soc/acl@4001e000: duplicate unit-address (also used in node /soc/flash-controller@4001e000)

warning: Deprecated symbol NRF_STORE_REBOOT_TYPE_GPREGRET is enabled.

Parsing /build/source/app/Kconfig
Loaded configuration '/build/source/app/boards/arm/glove80/glove80_lh_defconfig'
Merged configuration '/build/source/app/prj.conf'
Merged configuration '/nix/store/k3076071lf6mcszi0cqdl12wbjh920z7-config/glove80.conf'
Configuration saved to '/build/source/app/build/zephyr/.config'
Kconfig header saved to '/build/source/app/build/zephyr/include/generated/autoconf.h'
-- Found GnuLd: /nix/store/mkvk7zrbvp1s74g92kjd4qx60nmclfn3-gcc-arm-embedded-12.3.rel1/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.bfd (found version "2.40.0")
-- The C compiler identification is GNU 12.3.1
-- The CXX compiler identification is GNU 12.3.1
-- The ASM compiler identification is GNU
-- Found assembler: /nix/store/mkvk7zrbvp1s74g92kjd4qx60nmclfn3-gcc-arm-embedded-12.3.rel1/bin/arm-none-eabi-gcc
CMake Warning at /nix/store/6p8b3xwjz1w7vijrcysij2f17fn73492-zephyr/zephyr/CMakeLists.txt:543 (message):
  ZEPHYR_BASE=/nix/store/6p8b3xwjz1w7vijrcysij2f17fn73492-zephyr/zephyr
  doesn't appear to be a git repository, please specify
  '-DBUILD_VERSION=<version>'


CMake Warning at /nix/store/6p8b3xwjz1w7vijrcysij2f17fn73492-zephyr/zephyr/CMakeLists.txt:1993 (message):


        The CMake build type was set to 'Release', but the optimization flag was set to '-Os'.
        This may be intentional and the warning can be turned off by setting the CMake variable 'NO_BUILD_TYPE_WARNING'


-- Configuring done (6.0s)
-- Generating done (0.1s)
CMake Warning:
  Manually-specified variables were not used by the project:

    BUILD_TESTING
    CMAKE_EXPORT_NO_PACKAGE_REGISTRY
    CMAKE_INSTALL_BINDIR
    CMAKE_INSTALL_DOCDIR
    CMAKE_INSTALL_INCLUDEDIR
    CMAKE_INSTALL_INFODIR
    CMAKE_INSTALL_LIBDIR
    CMAKE_INSTALL_LIBEXECDIR
    CMAKE_INSTALL_LOCALEDIR
    CMAKE_INSTALL_MANDIR
    CMAKE_INSTALL_OLDINCLUDEDIR
    CMAKE_INSTALL_SBINDIR
    CMAKE_POLICY_DEFAULT_CMP0025


-- Build files have been written to: /build/source/app/build
cmake: enabled parallel building
cmake: enabled parallel installing
Running phase: buildPhase
build flags: -j16
[1/362] Preparing syscall dependency handling

[2/362] Generating include/generated/version.h
-- Zephyr version: 3.5.0 (/nix/store/6p8b3xwjz1w7vijrcysij2f17fn73492-zephyr/zephyr)
[3/362] Generating misc/generated/syscalls_subdirs.trigger
[4/362] Generating misc/generated/syscalls.json, misc/generated/struct_tags.json
[5/362] Generating include/generated/syscall_dispatch.c, include/generated/syscall_list.h
[6/362] Generating include/generated/driver-validation.h
[7/362] Generating include/generated/kobj-types-enum.h, include/generated/otype-to-str.h, include/generated/otype-to-size.h
[8/362] Building C object zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj
[9/362] Generating include/generated/offsets.h
[10/362] Building C object CMakeFiles/app.dir/src/stdlib.c.obj
[11/362] Building C object CMakeFiles/app.dir/src/mouse/main.c.obj
[12/362] Building C object CMakeFiles/app.dir/src/events/activity_state_changed.c.obj
[13/362] Building C object CMakeFiles/app.dir/src/events/mouse_tick.c.obj
[14/362] Building C object CMakeFiles/app.dir/src/events/mouse_move_state_changed.c.obj
[15/362] Building C object CMakeFiles/app.dir/src/events/position_state_changed.c.obj
[16/362] Building C object CMakeFiles/app.dir/src/matrix_transform.c.obj
[17/362] Building C object CMakeFiles/app.dir/src/events/sensor_event.c.obj
[18/362] Building C object CMakeFiles/app.dir/src/events/mouse_button_state_changed.c.obj
[19/362] Building C object CMakeFiles/app.dir/src/mouse/tick_listener.c.obj
[20/362] Building C object CMakeFiles/app.dir/src/activity.c.obj
[21/362] Building C object CMakeFiles/app.dir/src/kscan.c.obj
[22/362] Building C object CMakeFiles/app.dir/src/behavior.c.obj
[23/362] Building C object CMakeFiles/app.dir/src/sensors.c.obj
[24/362] Building C object CMakeFiles/app.dir/src/event_manager.c.obj
[25/362] Building C object CMakeFiles/app.dir/src/ext_power_generic.c.obj
[26/362] Building C object CMakeFiles/app.dir/src/mouse/key_listener.c.obj
[27/362] Building C object CMakeFiles/app.dir/src/events/mouse_scroll_state_changed.c.obj
[28/362] Building C object CMakeFiles/app.dir/src/events/usb_conn_state_changed.c.obj
[29/362] Building C object CMakeFiles/app.dir/src/behaviors/behavior_reset.c.obj
[30/362] Building C object CMakeFiles/app.dir/src/behaviors/behavior_key_repeat.c.obj
[31/362] Building C object CMakeFiles/app.dir/src/behaviors/behavior_key_press.c.obj
[32/362] Building C object CMakeFiles/app.dir/src/behaviors/behavior_ext_power.c.obj
[33/362] Building C object CMakeFiles/app.dir/src/behaviors/behavior_outputs.c.obj
[34/362] Building C object CMakeFiles/app.dir/src/behaviors/behavior_momentary_layer.c.obj
[35/362] Building C object CMakeFiles/app.dir/src/behaviors/behavior_caps_word.c.obj
[36/362] Building C object CMakeFiles/app.dir/src/behaviors/behavior_toggle_layer.c.obj
[37/362] Building C object CMakeFiles/app.dir/src/behaviors/behavior_sticky_key.c.obj
[38/362] Building C object CMakeFiles/app.dir/src/behaviors/behavior_to_layer.c.obj
[39/362] Building C object CMakeFiles/app.dir/src/hid.c.obj
[40/362] Building C object CMakeFiles/app.dir/src/behaviors/behavior_transparent.c.obj
[41/362] Building C object CMakeFiles/app.dir/src/behaviors/behavior_mod_morph.c.obj
[42/362] Building C object CMakeFiles/app.dir/src/behaviors/behavior_none.c.obj
[43/362] Building C object CMakeFiles/app.dir/src/behaviors/behavior_mouse_scroll.c.obj
[44/362] Building C object CMakeFiles/app.dir/src/behaviors/behavior_mouse_key_press.c.obj
[45/362] Building C object CMakeFiles/app.dir/src/events/endpoint_changed.c.obj
[46/362] Building C object CMakeFiles/app.dir/src/conditional_layer.c.obj
[47/362] Building C object CMakeFiles/app.dir/src/behaviors/behavior_mouse_move.c.obj
[48/362] Building C object CMakeFiles/app.dir/src/behavior_queue.c.obj
[49/362] Building C object CMakeFiles/app.dir/src/behaviors/behavior_hold_tap.c.obj
[50/362] Building C object CMakeFiles/app.dir/src/events/layer_state_changed.c.obj
[51/362] Building C object CMakeFiles/app.dir/src/events/modifiers_state_changed.c.obj
[52/362] Building C object CMakeFiles/app.dir/src/behaviors/behavior_macro.c.obj
FAILED: CMakeFiles/app.dir/src/behaviors/behavior_macro.c.obj
/nix/store/mkvk7zrbvp1s74g92kjd4qx60nmclfn3-gcc-arm-embedded-12.3.rel1/bin/arm-none-eabi-gcc -DKERNEL -DNRF52840_XXAA -D__PROGRAM_START -D__ZEPHYR__=1 -I/build/source/app/include -I/nix/store/6p8b3xwjz1w7vijrcysij2f17fn73492-zephyr/zephyr/include -I/build/source/app/build/zephyr/include/generated -I/nix/store/6p8b3xwjz1w7vijrcysij2f17fn73492-zephyr/zephyr/soc/arm/nordic_nrf/nrf52 -I/nix/store/6p8b3xwjz1w7vijrcysij2f17fn73492-zephyr/zephyr/soc/arm/nordic_nrf/common/. -I/nix/store/6p8b3xwjz1w7vijrcysij2f17fn73492-zephyr/zephyr/subsys/usb/device -I/nix/store/6p8b3xwjz1w7vijrcysij2f17fn73492-zephyr/zephyr/subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/nrfx_glue -I/nix/store/6p8b3xwjz1w7vijrcysij2f17fn73492-zephyr/zephyr/subsys/bluetooth -I/nix/store/6p8b3xwjz1w7vijrcysij2f17fn73492-zephyr/zephyr/subsys/settings/include -I/nix/store/4hppll3pcwx5x9048arz0ak0wdmynn63-zmk-module-cmsis/cmsis/CMSIS/Core/Include -I/nix/store/6p8b3xwjz1w7vijrcysij2f17fn73492-zephyr/zephyr/modules/cmsis/. -I/nix/store/i5fin6gi7q4jh2n1dyrqr5l2ywahw7lz-zmk-module-hal_nordic/hal_nordic/nrfx -I/nix/store/i5fin6gi7q4jh2n1dyrqr5l2ywahw7lz-zmk-module-hal_nordic/hal_nordic/nrfx/drivers/include -I/nix/store/i5fin6gi7q4jh2n1dyrqr5l2ywahw7lz-zmk-module-hal_nordic/hal_nordic/nrfx/mdk -I/nix/store/6p8b3xwjz1w7vijrcysij2f17fn73492-zephyr/zephyr/modules/hal_nordic/nrfx/. -I/nix/store/n4xjlyn5hk979p2ywqpajw7dq5y94q1g-tinycrypt/lib/include -I/build/source/app/module/include -I/build/source/app/module/drivers/sensor/battery/. -isystem /nix/store/6p8b3xwjz1w7vijrcysij2f17fn73492-zephyr/zephyr/lib/libc/minimal/include -isystem /nix/store/mkvk7zrbvp1s74g92kjd4qx60nmclfn3-gcc-arm-embedded-12.3.rel1/bin/../lib/gcc/arm-none-eabi/12.3.1/include -isystem /nix/store/mkvk7zrbvp1s74g92kjd4qx60nmclfn3-gcc-arm-embedded-12.3.rel1/bin/../lib/gcc/arm-none-eabi/12.3.1/include-fixed -O3 -DNDEBUG -fno-strict-aliasing -Os -imacros /build/source/app/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mfp16-format=ieee --sysroot=/nix/store/mkvk7zrbvp1s74g92kjd4qx60nmclfn3-gcc-arm-embedded-12.3.rel1/arm-none-eabi -imacros /nix/store/6p8b3xwjz1w7vijrcysij2f17fn73492-zephyr/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-pic -fno-pie -fno-asynchronous-unwind-tables -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=/build/source/app=CMAKE_SOURCE_DIR -fmacro-prefix-map=/nix/store/6p8b3xwjz1w7vijrcysij2f17fn73492-zephyr/zephyr=ZEPHYR_BASE -ffunction-sections -fdata-sections -std=c99 -nostdinc -Wfatal-errors -MD -MT CMakeFiles/app.dir/src/behaviors/behavior_macro.c.obj -MF CMakeFiles/app.dir/src/behaviors/behavior_macro.c.obj.d -o CMakeFiles/app.dir/src/behaviors/behavior_macro.c.obj -c /build/source/app/src/behaviors/behavior_macro.c
In file included from /nix/store/6p8b3xwjz1w7vijrcysij2f17fn73492-zephyr/zephyr/include/zephyr/sys/util_macro.h:34,
                 from /nix/store/6p8b3xwjz1w7vijrcysij2f17fn73492-zephyr/zephyr/include/zephyr/sys/util.h:17,
                 from /nix/store/6p8b3xwjz1w7vijrcysij2f17fn73492-zephyr/zephyr/include/zephyr/devicetree.h:25,
                 from /nix/store/6p8b3xwjz1w7vijrcysij2f17fn73492-zephyr/zephyr/include/zephyr/device.h:12,
                 from /build/source/app/src/behaviors/behavior_macro.c:7:
/nix/store/6p8b3xwjz1w7vijrcysij2f17fn73492-zephyr/zephyr/include/zephyr/toolchain/gcc.h:87:36: error: static assertion failed: "DEVICE_NAME_GET(\"FIRMWARE_VERSIONmouse-3.2-moergoFIRMWARE_VERSION\") too long"
   87 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, "" MSG)
      |                                    ^~~~~~~~~~~~~~
/nix/store/6p8b3xwjz1w7vijrcysij2f17fn73492-zephyr/zephyr/include/zephyr/sys/util_internal.h:72:26: note: in definition of macro '__DEBRACKET'
   72 | #define __DEBRACKET(...) __VA_ARGS__
      |                          ^~~~~~~~~~~
/nix/store/6p8b3xwjz1w7vijrcysij2f17fn73492-zephyr/zephyr/include/zephyr/sys/util_internal.h:64:9: note: in expansion of macro '__GET_ARG2_DEBRACKET'
   64 |         __GET_ARG2_DEBRACKET(one_or_two_args _if_code, _else_code)
      |         ^~~~~~~~~~~~~~~~~~~~
/nix/store/6p8b3xwjz1w7vijrcysij2f17fn73492-zephyr/zephyr/include/zephyr/sys/util_internal.h:59:9: note: in expansion of macro '__COND_CODE'
   59 |         __COND_CODE(_XXXX##_flag, _if_1_code, _else_code)
      |         ^~~~~~~~~~~
/nix/store/6p8b3xwjz1w7vijrcysij2f17fn73492-zephyr/zephyr/include/zephyr/sys/util_macro.h:180:9: note: in expansion of macro 'Z_COND_CODE_1'
  180 |         Z_COND_CODE_1(_flag, _if_1_code, _else_code)
      |         ^~~~~~~~~~~~~
/nix/store/6p8b3xwjz1w7vijrcysij2f17fn73492-zephyr/zephyr/include/zephyr/devicetree.h:2916:9: note: in expansion of macro 'COND_CODE_1'
 2916 |         COND_CODE_1(DT_HAS_COMPAT_STATUS_OKAY(compat),                  \
      |         ^~~~~~~~~~~
/nix/store/6p8b3xwjz1w7vijrcysij2f17fn73492-zephyr/zephyr/include/zephyr/device.h:877:9: note: in expansion of macro 'BUILD_ASSERT'
  877 |         BUILD_ASSERT(sizeof(Z_STRINGIFY(name)) <= Z_DEVICE_MAX_NAME_LEN,       \
      |         ^~~~~~~~~~~~
/nix/store/6p8b3xwjz1w7vijrcysij2f17fn73492-zephyr/zephyr/include/zephyr/device.h:998:9: note: in expansion of macro 'Z_DEVICE_NAME_CHECK'
  998 |         Z_DEVICE_NAME_CHECK(name);                                             \
      |         ^~~~~~~~~~~~~~~~~~~
/nix/store/6p8b3xwjz1w7vijrcysij2f17fn73492-zephyr/zephyr/include/zephyr/device.h:181:9: note: in expansion of macro 'Z_DEVICE_DEFINE'
  181 |         Z_DEVICE_DEFINE(node_id, Z_DEVICE_DT_DEV_ID(node_id),                  \
      |         ^~~~~~~~~~~~~~~
/build/source/app/include/drivers/behavior.h:79:5: note: in expansion of macro 'DEVICE_DT_DEFINE'
   79 |     DEVICE_DT_DEFINE(node_id, __VA_ARGS__);                                                        \
      |     ^~~~~~~~~~~~~~~~
/build/source/app/src/behaviors/behavior_macro.c:227:5: note: in expansion of macro 'BEHAVIOR_DT_DEFINE'
  227 |     BEHAVIOR_DT_DEFINE(inst, behavior_macro_init, NULL, &behavior_macro_state_##inst,              \
      |     ^~~~~~~~~~~~~~~~~~
/build/source/app/build/zephyr/include/generated/devicetree_generated.h:120284: note: in expansion of macro 'MACRO_INST'
120284 | #define DT_FOREACH_OKAY_zmk_behavior_macro(fn) fn(DT_N_S_macros_S_rgb_ug_status_macro) fn(DT_N_S_macros_S_bt_select_0) fn(DT_N_S_macros_S_bt_select_1) fn(DT_N_S_macros_S_bt_select_2) fn(DT_N_S_macros_S_bt_select_3) fn(DT_N_S_macros_S_linux_magic_sysrq) fn(DT_N_S_macros_S_select_none) fn(DT_N_S_macros_S_select_word_right) fn(DT_N_S_macros_S_select_word_left) fn(DT_N_S_macros_S_extend_word_right) fn(DT_N_S_macros_S_extend_word_left) fn(DT_N_S_macros_S_select_line_right) fn(DT_N_S_macros_S_select_line_left) fn(DT_N_S_macros_S_extend_line_right) fn(DT_N_S_macros_S_extend_line_left) fn(DT_N_S_macros_S_world_degree_sign) fn(DT_N_S_macros_S_world_section_sign) fn(DT_N_S_macros_S_world_paragraph_sign) fn(DT_N_S_macros_S_world_o_ordinal) fn(DT_N_S_macros_S_world_a_ordinal) fn(DT_N_S_macros_S_world_exclaim_left) fn(DT_N_S_macros_S_world_question_left) fn(DT_N_S_macros_S_world_currency_crypto) fn(DT_N_S_macros_S_world_currency_cent) fn(DT_N_S_macros_S_world_currency_sign) fn(DT_N_S_macros_S_world_c_cedilla_lower) fn(DT_N_S_macros_S_world_c_cedilla_upper) fn(DT_N_S_macros_S_world_i_acute_lower) fn(DT_N_S_macros_S_world_i_acute_upper) fn(DT_N_S_macros_S_world_i_diaeresis_lower) fn(DT_N_S_macros_S_world_i_diaeresis_upper) fn(DT_N_S_macros_S_world_i_circumflex_lower) fn(DT_N_S_macros_S_world_i_circumflex_upper) fn(DT_N_S_macros_S_world_i_grave_lower) fn(DT_N_S_macros_S_world_i_grave_upper) fn(DT_N_S_macros_S_world_e_acute_lower) fn(DT_N_S_macros_S_world_e_acute_upper) fn(DT_N_S_macros_S_world_e_diaeresis_lower) fn(DT_N_S_macros_S_world_e_diaeresis_upper) fn(DT_N_S_macros_S_world_e_circumflex_lower) fn(DT_N_S_macros_S_world_e_circumflex_upper) fn(DT_N_S_macros_S_world_e_grave_lower) fn(DT_N_S_macros_S_world_e_grave_upper) fn(DT_N_S_macros_S_world_e_ae_lower) fn(DT_N_S_macros_S_world_e_ae_upper) fn(DT_N_S_macros_S_world_a_acute_lower) fn(DT_N_S_macros_S_world_a_acute_upper) fn(DT_N_S_macros_S_world_a_diaeresis_lower) fn(DT_N_S_macros_S_world_a_diaeresis_upper) fn(DT_N_S_macros_S_world_a_circumflex_lower) fn(DT_N_S_macros_S_world_a_circumflex_upper) fn(DT_N_S_macros_S_world_a_grave_lower) fn(DT_N_S_macros_S_world_a_grave_upper) fn(DT_N_S_macros_S_world_a_tilde_lower) fn(DT_N_S_macros_S_world_a_tilde_upper) fn(DT_N_S_macros_S_world_a_ring_lower) fn(DT_N_S_macros_S_world_a_ring_upper) fn(DT_N_S_macros_S_world_y_acute_lower) fn(DT_N_S_macros_S_world_y_acute_upper) fn(DT_N_S_macros_S_world_y_diaeresis_lower) fn(DT_N_S_macros_S_world_y_diaeresis_upper) fn(DT_N_S_macros_S_world_o_acute_lower) fn(DT_N_S_macros_S_world_o_acute_upper) fn(DT_N_S_macros_S_world_o_diaeresis_lower) fn(DT_N_S_macros_S_world_o_diaeresis_upper) fn(DT_N_S_macros_S_world_o_circumflex_lower) fn(DT_N_S_macros_S_world_o_circumflex_upper) fn(DT_N_S_macros_S_world_o_grave_lower) fn(DT_N_S_macros_S_world_o_grave_upper) fn(DT_N_S_macros_S_world_o_tilde_lower) fn(DT_N_S_macros_S_world_o_tilde_upper) fn(DT_N_S_macros_S_world_o_slash_lower) fn(DT_N_S_macros_S_world_o_slash_upper) fn(DT_N_S_macros_S_world_u_acute_lower) fn(DT_N_S_macros_S_world_u_acute_upper) fn(DT_N_S_macros_S_world_u_diaeresis_lower) fn(DT_N_S_macros_S_world_u_diaeresis_upper) fn(DT_N_S_macros_S_world_u_circumflex_lower) fn(DT_N_S_macros_S_world_u_circumflex_upper) fn(DT_N_S_macros_S_world_u_grave_lower) fn(DT_N_S_macros_S_world_u_grave_upper) fn(DT_N_S_macros_S_world_n_tilde_lower) fn(DT_N_S_macros_S_world_n_tilde_upper) fn(DT_N_S_macros_S_world_quotes_left_angle_lower) fn(DT_N_S_macros_S_world_quotes_left_angle_upper) fn(DT_N_S_macros_S_world_quotes_left_curly_lower) fn(DT_N_S_macros_S_world_quotes_left_curly_upper) fn(DT_N_S_macros_S_world_quotes_left_low_lower) fn(DT_N_S_macros_S_world_quotes_left_low_upper) fn(DT_N_S_macros_S_world_quotes_left_corner1_lower) fn(DT_N_S_macros_S_world_quotes_left_corner1_upper) fn(DT_N_S_macros_S_world_quotes_left_corner2_lower) fn(DT_N_S_macros_S_world_quotes_left_corner2_upper) fn(DT_N_S_macros_S_world_quotes_left_grave) fn(DT_N_S_macros_S_world_quotes_right_angle_lower) fn(DT_N_S_macros_S_world_quotes_right_angle_upper) fn(DT_N_S_macros_S_world_quotes_right_curly_lower) fn(DT_N_S_macros_S_world_quotes_right_curly_upper) fn(DT_N_S_macros_S_world_quotes_right_corner1_lower) fn(DT_N_S_macros_S_world_quotes_right_corner1_upper) fn(DT_N_S_macros_S_world_quotes_right_corner2_lower) fn(DT_N_S_macros_S_world_quotes_right_corner2_upper) fn(DT_N_S_macros_S_world_quotes_right_grave) fn(DT_N_S_macros_S_world_currency_dollar_lower) fn(DT_N_S_macros_S_world_currency_yen) fn(DT_N_S_macros_S_world_currency_euro) fn(DT_N_S_macros_S_world_currency_won) fn(DT_N_S_macros_S_world_currency_pound) fn(DT_N_S_macros_S_emoji_zwj) fn(DT_N_S_macros_S_emoji_male_sign) fn(DT_N_S_macros_S_emoji_female_sign) fn(DT_N_S_macros_S_emoji_right_arrow) fn(DT_N_S_macros_S_emoji_left_arrow) fn(DT_N_S_macros_S_emoji_rainbow) fn(DT_N_S_macros_S_emoji_cloudy) fn(DT_N_S_macros_S_emoji_mostly_cloudy) fn(DT_N_S_macros_S_emoji_partly_cloudy) fn(DT_N_S_macros_S_emoji_mostly_sunny) fn(DT_N_S_macros_S_emoji_sunny) fn(DT_N_S_macros_S_emoji_sunrise) fn(DT_N_S_macros_S_emoji_sunrise_mountains) fn(DT_N_S_macros_S_emoji_cityscape) fn(DT_N_S_macros_S_emoji_cityscape_dusk) fn(DT_N_S_macros_S_emoji_cityscape_night) fn(DT_N_S_macros_S_emoji_light_skin_tone) fn(DT_N_S_macros_S_emoji_medium_light_skin_tone) fn(DT_N_S_macros_S_emoji_medium_skin_tone) fn(DT_N_S_macros_S_emoji_medium_dark_skin_tone) fn(DT_N_S_macros_S_emoji_dark_skin_tone) fn(DT_N_S_macros_S_emoji_baby_bottle) fn(DT_N_S_macros_S_emoji_baby) fn(DT_N_S_macros_S_emoji_boy) fn(DT_N_S_macros_S_emoji_girl) fn(DT_N_S_macros_S_emoji_man) fn(DT_N_S_macros_S_emoji_woman) fn(DT_N_S_macros_S_emoji_old_man) fn(DT_N_S_macros_S_emoji_old_woman) fn(DT_N_S_macros_S_emoji_white_hair) fn(DT_N_S_macros_S_emoji_curly_hair) fn(DT_N_S_macros_S_emoji_red_hair) fn(DT_N_S_macros_S_emoji_bald) fn(DT_N_S_macros_S_emoji_new_moon) fn(DT_N_S_macros_S_emoji_waxing_crescent_moon) fn(DT_N_S_macros_S_emoji_first_quarter_moon) fn(DT_N_S_macros_S_emoji_waxing_gibbous_moon) fn(DT_N_S_macros_S_emoji_full_moon) fn(DT_N_S_macros_S_emoji_waning_gibbous_moon) fn(DT_N_S_macros_S_emoji_last_quarter_moon) fn(DT_N_S_macros_S_emoji_waning_crescent_moon) fn(DT_N_S_macros_S_emoji_tada) fn(DT_N_S_macros_S_emoji_heart) fn(DT_N_S_macros_S_emoji_fire) fn(DT_N_S_macros_S_emoji_muscle) fn(DT_N_S_macros_S_emoji_person_climbing) fn(DT_N_S_macros_S_emoji_lab_coat) fn(DT_N_S_macros_S_emoji_rocket) fn(DT_N_S_macros_S_emoji_joy) fn(DT_N_S_macros_S_emoji_rofl) fn(DT_N_S_macros_S_emoji_star_struck) fn(DT_N_S_macros_S_emoji_love_struck) fn(DT_N_S_macros_S_emoji_saluting_face) fn(DT_N_S_macros_S_emoji_shocked_face) fn(DT_N_S_macros_S_emoji_cold_sweat) fn(DT_N_S_macros_S_emoji_monocle_face) fn(DT_N_S_macros_S_emoji_snap_fingers) fn(DT_N_S_macros_S_emoji_ok_hand) fn(DT_N_S_macros_S_emoji_pray) fn(DT_N_S_macros_S_emoji_sweat_smile) fn(DT_N_S_macros_S_emoji_disappointed) fn(DT_N_S_macros_S_emoji_thinking) fn(DT_N_S_macros_S_emoji_person_tipping_hand) fn(DT_N_S_macros_S_emoji_person_gesturing_ok) fn(DT_N_S_macros_S_emoji_person_bowing) fn(DT_N_S_macros_S_emoji_person_raising_hand) fn(DT_N_S_macros_S_emoji_person_gesturing_no) fn(DT_N_S_macros_S_emoji_person_shrugging) fn(DT_N_S_macros_S_emoji_checkoff) fn(DT_N_S_macros_S_emoji_100) fn(DT_N_S_macros_S_emoji_warning) fn(DT_N_S_macros_S_emoji_x) fn(DT_N_S_macros_S_emoji_question) fn(DT_N_S_macros_S_emoji_astronaut) fn(DT_N_S_macros_S_emoji_nerd) fn(DT_N_S_macros_S_emoji_sparkles) fn(DT_N_S_macros_S_emoji_raised_hands) fn(DT_N_S_macros_S_emoji_point_up) fn(DT_N_S_macros_S_emoji_thumbs_up) fn(DT_N_S_macros_S_emoji_face_smile_up) fn(DT_N_S_macros_S_emoji_face_smile_down) fn(DT_N_S_macros_S_emoji_face_joke_wink) fn(DT_N_S_macros_S_emoji_face_joke_tounge) fn(DT_N_S_macros_S_emoji_face_fear_scared) fn(DT_N_S_macros_S_emoji_face_fear_scream) fn(DT_N_S_macros_S_emoji_face_surprise_dizzy) fn(DT_N_S_macros_S_emoji_gesture_attention_wave) fn(DT_N_S_macros_S_emoji_gesture_approval_cool) fn(DT_N_S_macros_S_emoji_gesture_despair_cry) fn(DT_N_S_macros_S_xall) fn(DT_N_S_macros_S_qall) fn(DT_N_S_macros_S_cyrillic_yo) fn(DT_N_S_macros_S_cyrillic_y) fn(DT_N_S_macros_S_cyrillic_ts) fn(DT_N_S_macros_S_cyrillic_u) fn(DT_N_S_macros_S_cyrillic_k) fn(DT_N_S_macros_S_cyrillic_ye) fn(DT_N_S_macros_S_cyrillic_n) fn(DT_N_S_macros_S_cyrillic_g) fn(DT_N_S_macros_S_cyrillic_sh) fn(DT_N_S_macros_S_cyrillic_sch) fn(DT_N_S_macros_S_cyrillic_z) fn(DT_N_S_macros_S_cyrillic_kh) fn(DT_N_S_macros_S_cyrillic_hard_sign) fn(DT_N_S_macros_S_cyrillic_f) fn(DT_N_S_macros_S_cyrillic_hard_i) fn(DT_N_S_macros_S_cyrillic_v) fn(DT_N_S_macros_S_cyrillic_a) fn(DT_N_S_macros_S_cyrillic_p) fn(DT_N_S_macros_S_cyrillic_r) fn(DT_N_S_macros_S_cyrillic_o) fn(DT_N_S_macros_S_cyrillic_l) fn(DT_N_S_macros_S_cyrillic_d) fn(DT_N_S_macros_S_cyrillic_zh) fn(DT_N_S_macros_S_cyrillic_e) fn(DT_N_S_macros_S_cyrillic_ya) fn(DT_N_S_macros_S_cyrillic_ch) fn(DT_N_S_macros_S_cyrillic_s) fn(DT_N_S_macros_S_cyrillic_m) fn(DT_N_S_macros_S_cyrillic_i) fn(DT_N_S_macros_S_cyrillic_t) fn(DT_N_S_macros_S_cyrillic_soft_sign) fn(DT_N_S_macros_S_cyrillic_b) fn(DT_N_S_macros_S_cyrillic_yu) fn(DT_N_S_macros_S_cyrillic_period) fn(DT_N_S_macros_S_ru_grave) fn(DT_N_S_macros_S_ru_lbrc) fn(DT_N_S_macros_S_ru_rbrc) fn(DT_N_S_macros_S_ru_sqt) fn(DT_N_S_macros_S_ru_hash) fn(DT_N_S_macros_S_ru_caret) fn(DT_N_S_macros_S_ru_dllr) fn(DT_N_S_macros_S_ru_at) fn(DT_N_S_macros_S_ru_lt) fn(DT_N_S_macros_S_ru_gt) fn(DT_N_S_macros_S_ru_tilde) fn(DT_N_S_macros_S_ru_amps) fn(DT_N_S_macros_S_ru_lbkt) fn(DT_N_S_macros_S_ru_rbkt) fn(DT_N_S_macros_S_numero_sign) fn(DT_N_S_macros_S_comma_space) fn(DT_N_S_macros_S_ru_comma_space) fn(DT_N_S_macros_S_ru_os_layout) fn(DT_N_S_macros_S_en_os_layout) fn(DT_N_S_macros_S_thumb_switch_to_ru) fn(DT_N_S_macros_S_thumb_switch_to_en) fn(DT_N_S_macros_S_fmwrv)
       |
/nix/store/6p8b3xwjz1w7vijrcysij2f17fn73492-zephyr/zephyr/include/zephyr/sys/util_internal.h:105:36: note: in expansion of macro 'DT_FOREACH_OKAY_zmk_behavior_macro'
  105 | #define UTIL_PRIMITIVE_CAT(a, ...) a##__VA_ARGS__
      |                                    ^
/build/source/app/src/behaviors/behavior_macro.c:231:1: note: in expansion of macro 'DT_FOREACH_STATUS_OKAY'
  231 | DT_FOREACH_STATUS_OKAY(zmk_behavior_macro, MACRO_INST)
      | ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated due to -Wfatal-errors.
[53/362] Building C object CMakeFiles/app.dir/src/behaviors/behavior_tap_dance.c.obj
[54/362] Building C object CMakeFiles/app.dir/src/combo.c.obj
[55/362] Building C object CMakeFiles/app.dir/src/hid_listener.c.obj
[56/362] Building C object CMakeFiles/app.dir/src/events/keycode_state_changed.c.obj
[57/362] Building C object CMakeFiles/app.dir/src/endpoints.c.obj
[58/362] Building C object CMakeFiles/app.dir/src/events/ble_active_profile_changed.c.obj
[59/362] Building C object CMakeFiles/app.dir/src/hid_indicators.c.obj
[60/362] Building C object CMakeFiles/app.dir/src/events/battery_state_changed.c.obj
[61/362] Building C object CMakeFiles/app.dir/src/behaviors/behavior_bt.c.obj
[62/362] Building C object CMakeFiles/app.dir/src/behaviors/behavior_backlight.c.obj
[63/362] Building C object CMakeFiles/app.dir/src/behaviors/behavior_rgb_underglow.c.obj
[64/362] Building C object CMakeFiles/app.dir/src/keymap.c.obj
[65/362] Building C object CMakeFiles/app.dir/src/hog.c.obj
[66/362] Building C object CMakeFiles/app.dir/src/battery.c.obj
[67/362] Building C object CMakeFiles/app.dir/src/ble.c.obj
ninja: build stopped: subcommand failed.
error: builder for '/nix/store/pcwjk24zqvg686r7jfl22220bz00i1pb-zmk_glove80_lh.drv' failed with exit code 1;
       last 10 log lines:
       > [59/362] Building C object CMakeFiles/app.dir/src/hid_indicators.c.obj
       > [60/362] Building C object CMakeFiles/app.dir/src/events/battery_state_changed.c.obj
       > [61/362] Building C object CMakeFiles/app.dir/src/behaviors/behavior_bt.c.obj
       > [62/362] Building C object CMakeFiles/app.dir/src/behaviors/behavior_backlight.c.obj
       > [63/362] Building C object CMakeFiles/app.dir/src/behaviors/behavior_rgb_underglow.c.obj
       > [64/362] Building C object CMakeFiles/app.dir/src/keymap.c.obj
       > [65/362] Building C object CMakeFiles/app.dir/src/hog.c.obj
       > [66/362] Building C object CMakeFiles/app.dir/src/battery.c.obj
       > [67/362] Building C object CMakeFiles/app.dir/src/ble.c.obj
       > ninja: build stopped: subcommand failed.
       For full logs, run 'nix log /nix/store/pcwjk24zqvg686r7jfl22220bz00i1pb-zmk_glove80_lh.drv'.
error: 1 dependencies of derivation '/nix/store/cal462v1kg74kznsi78i4m8wz0rmiwp0-combined_zmk_glove80_lh_zmk_glove80_rh.drv' failed to build
error: Recipe `build` failed on line 83 with exit code 1

@Andrew15-5
Copy link

A small update. My compilation error was caused by this: ZMK_MACRO(fmwrv, label = FIRMWARE_VERSION; bindings = <&kp W>;). And the problem was that the label had a string longer than 45 chars (because I used mouse-3.2-moergo instead of v24.02). Apparently there is a limit. So when I cut off the rest, the build was successful! But, unfortunately, I now faced the same problem as @osa1 did: locally compiled firmware doesn't enable the mouse keys feature (otherwise works normally), but when the exact same `.keymap' file is built using the website, then suddenly the cursor is moving and the buttons are clicking.

@Andrew15-5
Copy link

Andrew15-5 commented Jun 24, 2024

The mystery is partially solved. The website uses one of the deleted commits. They all were overwritten by the force-pushed commits. Thankfully, there is a way to checkout an orphan commit from the GitHub. Here is an automation recipe for that:

recipe
default:
  read -r url; \
  hash=$(basename "$url"); \
  archive="$hash.zip"; \
  rm -rf src && \
  wget "https://github.com/moergo-sc/zmk/archive/$archive" && \
  unzip "$archive" && \
  rm "$archive" && \
  mv "zmk-$hash" src && \
  cd .. && just || true; \
  echo "$hash"

After that, I just run j and insert URLs copied from this page. It will automatically replace src directory with a specified commit and then run the normal nix-build.

Now, I literally copied every single URL one by one from top to bottom and from left to right. Here are my notes:

notes

prelatest successful #2fad527c

all:

  1. 3ef0506
  2. b050936
  3. a164626
  4. e87dc9f
  5. e87dc9f
  6. 893c4a0
  7. 1488522
  8. e3bf640
  9. 893c4a0
  10. 1a700dd
  11. e3bf640
  12. 8883773
  13. 1a700dd
  14. 3111d42
  15. 8883773
  16. 2fad527
  17. ac78a5e
  18. c54ada7
  19. bd7b361
  20. 3111d42
  21. bd7b361
  22. fbaeb90

not compilable:

  1. 3ef0506
  2. b050936
  3. 1488522
  4. ac78a5e
  5. c54ada7
  6. bd7b361

compilable:

  1. a164626
  2. e87dc9f
  3. 893c4a0
  4. e3bf640
  5. 1a700dd
  6. 8883773
  7. 3111d42
  8. 2fad527
  9. fbaeb90

works:

  1. a164626 (only right works normally)
  2. e87dc9f (only right works normally)
  3. 893c4a0 (only right works normally)
  4. 1a700dd (RH only worked after restart + only right works normally)
  5. 3111d42 (only right works normally)

doesn't work:
e3bf640 (no-op)
8883773 (no-op)
2fad527 (no-op)
fbaeb90 (alpha-trans & buttons-no-op)

notes (raw)
prelatest successful #2fad527c

all:
https://github.com/moergo-sc/zmk/commit/3ef050674c62c291c15decd9d733502dbc8a4802
https://github.com/moergo-sc/zmk/commit/b050936091b3515611b58fc0a4c811f25d027a38
https://github.com/moergo-sc/zmk/commit/a164626d9ed2cfe4da79415f03b7b5f9c1cc86d6
https://github.com/moergo-sc/zmk/commit/e87dc9f9611426e0a99aba97ab83c1eefb6f8394
https://github.com/moergo-sc/zmk/commit/e87dc9f9611426e0a99aba97ab83c1eefb6f8394
https://github.com/moergo-sc/zmk/commit/893c4a0aed8d519792ec8d1a9413eda0278f85a4
https://github.com/moergo-sc/zmk/commit/14885227ebf757cb5fb36ee77a789ddbb08f40ed
https://github.com/moergo-sc/zmk/commit/e3bf640ffff6235540082e7236dd46cb51ba9d54
https://github.com/moergo-sc/zmk/commit/893c4a0aed8d519792ec8d1a9413eda0278f85a4
https://github.com/moergo-sc/zmk/commit/1a700dda1132195b8faff33c5ee82a21f740a612
https://github.com/moergo-sc/zmk/commit/e3bf640ffff6235540082e7236dd46cb51ba9d54
https://github.com/moergo-sc/zmk/commit/888377369fa92c3c27e421f466166ac6301d08f3
https://github.com/moergo-sc/zmk/commit/1a700dda1132195b8faff33c5ee82a21f740a612
https://github.com/moergo-sc/zmk/commit/3111d4200d87662097dd67061174689c5a1625eb
https://github.com/moergo-sc/zmk/commit/888377369fa92c3c27e421f466166ac6301d08f3
https://github.com/moergo-sc/zmk/commit/2fad527cc5abed5bb59b4d4a4b0ee511d0e514e9
https://github.com/moergo-sc/zmk/pull/23/commits/ac78a5e961cb5de898d7f5836af3c4132ffd6a5e
https://github.com/moergo-sc/zmk/pull/23/commits/c54ada7af9c8354c6b5920eed23cfef1c251de2c
https://github.com/moergo-sc/zmk/pull/23/commits/bd7b361c4eb446caed290393a99bdede79c90833
https://github.com/moergo-sc/zmk/commit/3111d4200d87662097dd67061174689c5a1625eb
https://github.com/moergo-sc/zmk/commit/bd7b361c4eb446caed290393a99bdede79c90833
https://github.com/moergo-sc/zmk/pull/23/commits/fbaeb9079c4f37d766bdaa6055250c94cd6ea5a2

not compilable:
https://github.com/moergo-sc/zmk/commit/3ef050674c62c291c15decd9d733502dbc8a4802
https://github.com/moergo-sc/zmk/commit/b050936091b3515611b58fc0a4c811f25d027a38
https://github.com/moergo-sc/zmk/commit/14885227ebf757cb5fb36ee77a789ddbb08f40ed
https://github.com/moergo-sc/zmk/pull/23/commits/ac78a5e961cb5de898d7f5836af3c4132ffd6a5e
https://github.com/moergo-sc/zmk/pull/23/commits/c54ada7af9c8354c6b5920eed23cfef1c251de2c
https://github.com/moergo-sc/zmk/pull/23/commits/bd7b361c4eb446caed290393a99bdede79c90833

compilable:
https://github.com/moergo-sc/zmk/commit/a164626d9ed2cfe4da79415f03b7b5f9c1cc86d6
https://github.com/moergo-sc/zmk/commit/e87dc9f9611426e0a99aba97ab83c1eefb6f8394
https://github.com/moergo-sc/zmk/commit/893c4a0aed8d519792ec8d1a9413eda0278f85a4
https://github.com/moergo-sc/zmk/commit/e3bf640ffff6235540082e7236dd46cb51ba9d54
https://github.com/moergo-sc/zmk/commit/1a700dda1132195b8faff33c5ee82a21f740a612
https://github.com/moergo-sc/zmk/commit/888377369fa92c3c27e421f466166ac6301d08f3
https://github.com/moergo-sc/zmk/commit/3111d4200d87662097dd67061174689c5a1625eb
https://github.com/moergo-sc/zmk/commit/2fad527cc5abed5bb59b4d4a4b0ee511d0e514e9
https://github.com/moergo-sc/zmk/pull/23/commits/fbaeb9079c4f37d766bdaa6055250c94cd6ea5a2

works:
https://github.com/moergo-sc/zmk/commit/a164626d9ed2cfe4da79415f03b7b5f9c1cc86d6 (only right works normally)
https://github.com/moergo-sc/zmk/commit/e87dc9f9611426e0a99aba97ab83c1eefb6f8394 (only right works normally)
https://github.com/moergo-sc/zmk/commit/893c4a0aed8d519792ec8d1a9413eda0278f85a4 (only right works normally)
https://github.com/moergo-sc/zmk/commit/1a700dda1132195b8faff33c5ee82a21f740a612 (RH only worked after restart + only right works normally)
https://github.com/moergo-sc/zmk/commit/3111d4200d87662097dd67061174689c5a1625eb (only right works normally)

doesn't work:
https://github.com/moergo-sc/zmk/commit/e3bf640ffff6235540082e7236dd46cb51ba9d54 (no-op)
https://github.com/moergo-sc/zmk/commit/888377369fa92c3c27e421f466166ac6301d08f3 (no-op)
https://github.com/moergo-sc/zmk/commit/2fad527cc5abed5bb59b4d4a4b0ee511d0e514e9 (no-op)
https://github.com/moergo-sc/zmk/pull/23/commits/fbaeb9079c4f37d766bdaa6055250c94cd6ea5a2 (alpha-trans & buttons-no-op)

All URLs are listed under "all:". The ones that did compile under "compilable:", the others — under "not compilable:". Among compilable there are the ones that do enable the feature from this PR ("works:"), and the others that did not ("doesn't work:").

There are 3 deleted and 3 on-branch commits that did not compile (6), 8 deleted and one (last) on-branch commit (9) that did compile. The same (last) on-branch commit and 3 deleted commits didn't enable the feature and mostly mouse keys worked as no-op (some/all keys from fbaeb90 worked as transparent keys). 5 deleted commits worked. One of them (1a700dd) requires a both-halves restart, because initially the right half doesn't work for some reason.

Now for the sad result. Even though cursor movements and mouse keys did work for those 5 deleted commits, it only worked (as expected) when the keyboard was connected over the wire. When connected wirelessly (basically how it always connected), only the right cursor movement works as expected. "Move up" works as a hyper-sensitive "move left", "down" — as "right", "left" as — as "right". Basically the speed is as unusable as it can get and decreasing max speed didn't change a thing. And the scrolling keys don't work either, apparently. They weirdly move the cursor up and down but some constant (?) amount. The LMB, MMB, RMB keys do work in both modes. So for me the current 5 commits only allow for the 3 mouse buttons and very 99% unusable cursor movement (probably much easier and faster would be to still use touchpad for that).

I haven't checked the diffs between these commits, so I don't know how easy it would be to re-enable the feature on at least one on-branch commit, and also have no idea why only right movement is correctly working wirelessly. But hopefully this mini-research will help move this PR further. BTW, same issue with the '.uf2' from the website.

P.S. I forgot to re-attach the right half after trying out the first working commit, so after another flash I broke the syncing link. Thought that I have to manually but the RH into the bootloader mode, but soon realized that I can just roll back to the previous version on the LH. Had to use another keyboard for that. Then they successfully linked, and I was able to move through versions normally.

Update № 1

It was confirmed that the web community.pr23.mouse-keys.20240223.113355 version uses 3111d42 under the hood (the last working commit). Here is the diff with the fbaeb90: 3111d42..fbaeb90.

Update № 2

After doing some stuff the cursor manipulation keys started to work properly (wirelessly). It may be due to restarting of the machine or something unknown. In any case, I'm loving this feature so far. I physically removed my trusty touchpad away from the desk and now I only have the keyboard with me. I definitely use this feature everyday (in certain apps it's the only way) and it's pretty damn good. The only problem I faced is that the horizontal scrolling kicks in with a delay and/or its speed is very slow (can this be tweaked?), but also that the vertical scroll sometimes stops working for a moment. I don't think that happens with regular scroll.

@krishnatoshniwal
Copy link

Any reason why this is not being merged? Would be nice to use the keyboard with the latest firmware and mouse as well!

@Andrew15-5
Copy link

Andrew15-5 commented Sep 3, 2024

My guess is that it's incomplete. And that the last commit broke the feature. I don't think that reverting to previous commit is a great idea as some progress will probably be lost.

So the first thing should be to fix the feature on this branch.

You can already use this feature by using 3111d42 if you build yourself. Or use community.pr23.mouse-keys.20240223.113355 version in the Layout Editor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants