Giter Site home page Giter Site logo

Comments (7)

caksoylar avatar caksoylar commented on July 16, 2024 3

It is probable that the scrolling signal sent isn't enough for the computer to translate to an actual scroll, since the duration that encoder sends a tap event is very short by default.
You should add tap-ms to the sensor rotate behavior with a larger value, see https://zmk.dev/docs/config/behaviors#sensor-rotation

If that isn't enough to scroll, you might want to increase the max speed of the scroll behavior; e.g. define a larger ZMK_MOUSE_DEFAULT_SCRL_VAL before #includeing the mouse header or use MOVE_Y(...) (see https://github.com/zmkfirmware/zmk/pull/2027/files#diff-96b6a313b7b2d798a719c2c62671b1244ad8a8830f1b716c7612dc4c92462dc3R47)

from zmk.

pmalecka avatar pmalecka commented on July 16, 2024 1

Thanks for the help!

Had to both to make it work:
tap-ms = <20>;
and
#define ZMK_MOUSE_SCRL_VAL 140

from zmk.

tominabox1 avatar tominabox1 commented on July 16, 2024

Would this feature also include general implementation of mouse keys?

from zmk.

petejohanson avatar petejohanson commented on July 16, 2024

Would this feature also include general implementation of mouse keys?

This and mouse keys would both rely on some of the same underlying HID changes needed, but would be implemented slightly differently, likely.

However, there is distinct API for behaviours reacting to key positions versus sensor events, so we could choice to use one behavior for both if we wanted.

from zmk.

el-oso avatar el-oso commented on July 16, 2024

Hi all, are there any advances on this request? If there is some test code I would like to try it.

from zmk.

t4corun avatar t4corun commented on July 16, 2024

I was able to leverage what was in Nick's repo: compatible = "zmk,behavior-sensor-rotate-var" to make my own behavior that will let me use &mwh and &mmv on a rotary encoder. Got mouse scroll wheel working well on my Rollow's thumb horizontal encoders. You are more than welcome to review it in my zmk-config.

Happy to try to submit a PR but I have very limited knowledge here and don't want to mess something up

from zmk.

pmalecka avatar pmalecka commented on July 16, 2024

Trying to make this work on the new PR (#2027) as well as on top of Nick's repo (linked by @t4corun above), but the scroll wheel binding does not seem to work for me..

Here's the behavior I'm using

scroll_up_down: behavior_sensor_rotate_mouse_wheel_up_down {
	compatible = "zmk,behavior-sensor-rotate";
	#sensor-binding-cells = <0>;
        bindings = <&msc SCRL_UP>, <&msc SCRL_DOWN>;
};

then it's defined in the keymap:

sensor-bindings = <&scroll_up_down>;

I'm obviously missing something, as the scroll works when mapped to a key, but does not work when mapped to the encoder.

from zmk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.