Skip to content

Commit

Permalink
Update MIRYOKU_KLUDGE_MOUSEKEYSPR
Browse files Browse the repository at this point in the history
- Remove CONFIG_ZMK_MOUSE=y as no longer required
- Use https://github.com/caksoylar/zmk/tree/feat/mouse-keys-3.2
- Update behavior names, macros, headers, and docs
  • Loading branch information
manna-harbour committed Dec 9, 2023
1 parent d344543 commit 7e46baf
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 35 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-example-corneish_zen-custom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ jobs:
"corneish_zen_v2_left","corneish_zen_v2_right"
]'
custom_config: '["#define MIRYOKU_KLUDGE_MOUSEKEYSPR"]'
kconfig: '["CONFIG_ZMK_DISPLAY_HIDE_MOMENTARY_LAYERS=y\nCONFIG_CUSTOM_WIDGET_LAYER_STATUS_HIDE_HEADING=y\nCONFIG_CUSTOM_WIDGET_LOGO_IMAGE_MIRYOKU=y\nCONFIG_IL0323_INVERT=y\nCONFIG_ZMK_MOUSE=y"]'
branches: '["zmkfirmware/zmk/main caksoylar/zmk/caksoylar/zen-v1+v2 urob/zmk/mouse-3.2"]'
kconfig: '["CONFIG_ZMK_DISPLAY_HIDE_MOMENTARY_LAYERS=y\nCONFIG_CUSTOM_WIDGET_LAYER_STATUS_HIDE_HEADING=y\nCONFIG_CUSTOM_WIDGET_LOGO_IMAGE_MIRYOKU=y\nCONFIG_IL0323_INVERT=y"]'
branches: '["zmkfirmware/zmk/main caksoylar/zmk/caksoylar/zen-v1+v2 caksoylar/zmk/feat/mouse-keys-3.2"]'
3 changes: 1 addition & 2 deletions .github/workflows/build-example-mousekeyspr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ jobs:
board: '["nice_nano"]'
shield: '["corne_left"]'
custom_config: '["#define MIRYOKU_KLUDGE_MOUSEKEYSPR"]'
kconfig: '["CONFIG_ZMK_MOUSE=y"]'
branches: '["zmkfirmware/zmk/main urob/zmk/mouse-3.2"]'
branches: '["zmkfirmware/zmk/main caksoylar/zmk/feat/mouse-keys-3.2"]'
3 changes: 2 additions & 1 deletion miryoku/miryoku.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@
#include <dt-bindings/zmk/rgb.h>
#include <dt-bindings/zmk/outputs.h>
#include <dt-bindings/zmk/ext_power.h>
#include <dt-bindings/zmk/mouse.h>

#include "miryoku.h"

#include <dt-bindings/zmk/mouse.h>

/ {
keymap {
compatible = "zmk,keymap";
Expand Down
2 changes: 1 addition & 1 deletion miryoku/miryoku_kludge_mousekeyspr.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
};

/*
&mwh {
&msc {
acceleration-exponent = <U_MOUSE_SCROLL_EXPONENT>;
time-to-max-speed-ms = <U_MOUSE_SCROLL_TIME>;
delay-ms = <U_MOUSE_SCROLL_DELAY>;
Expand Down
30 changes: 6 additions & 24 deletions miryoku/miryoku_kludge_mousekeyspr.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,42 +3,24 @@

#pragma once

#include <dt-bindings/zmk/mouse.h>
#define ZMK_MOUSE_DEFAULT_MOVE_VAL 1250
#define ZMK_MOUSE_DEFAULT_SCRL_VAL 100

#define U_MOUSE_MOVE_MAX 1250
#define U_MOUSE_MOVE_EXPONENT 1
#define U_MOUSE_MOVE_TIME 1500
#define U_MOUSE_MOVE_DELAY 0
#define U_MOUSE_SCROLL_MAX 100
#define U_MOUSE_SCROLL_EXPONENT 1
#define U_MOUSE_SCROLL_TIME 5000
#define U_MOUSE_SCROLL_DELAY 0

#undef MOVE_UP
#undef MOVE_DOWN
#undef MOVE_LEFT
#undef MOVE_RIGHT
#undef SCROLL_UP
#undef SCROLL_DOWN
#undef SCROLL_LEFT
#undef SCROLL_RIGHT
#define MOVE_UP MOVE_VERT(-U_MOUSE_MOVE_MAX)
#define MOVE_DOWN MOVE_VERT(U_MOUSE_MOVE_MAX)
#define MOVE_LEFT MOVE_HOR(-U_MOUSE_MOVE_MAX)
#define MOVE_RIGHT MOVE_HOR(U_MOUSE_MOVE_MAX)
#define SCROLL_UP SCROLL_VERT(U_MOUSE_SCROLL_MAX)
#define SCROLL_DOWN SCROLL_VERT(-U_MOUSE_SCROLL_MAX)
#define SCROLL_LEFT SCROLL_HOR(-U_MOUSE_SCROLL_MAX)
#define SCROLL_RIGHT SCROLL_HOR(U_MOUSE_SCROLL_MAX)

#define U_BTN1 &mkp MB1
#define U_BTN2 &mkp MB2
#define U_BTN3 &mkp MB3
#define U_MS_D &mmv MOVE_DOWN
#define U_MS_L &mmv MOVE_LEFT
#define U_MS_R &mmv MOVE_RIGHT
#define U_MS_U &mmv MOVE_UP
#define U_WH_D &mwh SCROLL_DOWN
#define U_WH_L &mwh SCROLL_LEFT
#define U_WH_R &mwh SCROLL_RIGHT
#define U_WH_U &mwh SCROLL_UP
#define U_WH_D &msc SCRL_DOWN
#define U_WH_L &msc SCRL_LEFT
#define U_WH_R &msc SCRL_RIGHT
#define U_WH_U &msc SCRL_UP
8 changes: 3 additions & 5 deletions readme.org
Original file line number Diff line number Diff line change
Expand Up @@ -488,13 +488,11 @@ Mouse movement requires [[https://en.wikipedia.org/wiki/Mouse_keys][enabling mou

**** Mousekeys PR

Mouse movement and scroll is supported with https://github.com/zmkfirmware/zmk/pull/778.
Mouse movement and scroll is supported with https://github.com/caksoylar/zmk/tree/feat/mouse-keys-3.2.

As the PR branch is not being maintained, use https://github.com/urob/zmk/tree/mouse-3.2 instead.
To build, add ~#define MIRYOKU_KLUDGE_MOUSEKEYSPR~ to the [[#config-file][config file]], and merge the mousekeys branch.

To build, add ~#define MIRYOKU_KLUDGE_MOUSEKEYSPR~ to the [[#config-file][config file]], add ~CONFIG_ZMK_MOUSE=y~ to the [[#kconfig-configuration][Kconfig configuration]], and merge the mousekeys branch.

For [[#workflow-builds][workflow builds]] using the [[#build-inputs][Build Inputs]] workflow, use ~#define MIRYOKU_KLUDGE_MOUSEKEYSPR~ with the ~custom_config~ option, ~CONFIG_ZMK_MOUSE=y~ with the ~kconfig~ option, and ~zmkfirmware/zmk/main urob/zmk/mouse-3.2~ with the ~branches~ option. For workflow builds using [[#build-examples][Build Example]] workflows, see the [[.github/workflows/build-example-mousekeyspr.yml][Build Example mousekeyspr]] workflow.
For [[#workflow-builds][workflow builds]] using the [[#build-inputs][Build Inputs]] workflow, use ~#define MIRYOKU_KLUDGE_MOUSEKEYSPR~ with the ~custom_config~ option, and ~zmkfirmware/zmk/main caksoylar/zmk/feat/mouse-keys-3.2~ with the ~branches~ option. For workflow builds using [[#build-examples][Build Example]] workflows, see the [[.github/workflows/build-example-mousekeyspr.yml][Build Example mousekeyspr]] workflow.

For local builds, make the changes locally.

Expand Down

0 comments on commit 7e46baf

Please sign in to comment.