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

[bug] press caps_lock to change speed_multiplier leading to a reverse direction #4004

Open
eret9616 opened this issue Nov 6, 2024 · 1 comment

Comments

@eret9616
Copy link

eret9616 commented Nov 6, 2024

macos:Version 15.1 (24B83)
karabiner-elements:15.3.0

Press the Caps Lock key to change the speed multiplier, leading to a reverse direction.

I used to use the configs above,

I use the command + wsad to move the cursor, and when holding caps_lock, increase the move speed, when holding shift, decrease the move speed

it worked pretty well,

until after some upgrades (I don't know if it is a macOS upgrade or a Karabiner upgrade),

when I press caps_lock now, the cursor will move to the reverse direction.

{
                "from": {
                  "key_code": "caps_lock",
                  "modifiers": { "mandatory": ["right_command"] }
                },
                "to": [
                  {
                    "modifiers": ["caps_lock"],
                    "mouse_key": { "speed_multiplier": 3 }
                  }
                ],
                "type": "basic"
              }


...


        {
                "conditions": [
                  {
                    "file_paths": ["/opt/homebrew/bin/scrcpy$"],
                    "type": "frontmost_application_unless"
                  },
                  {
                    "bundle_identifiers": ["^com.googlecode.iterm2$"],
                    "type": "frontmost_application_unless"
                  }
                ],
                "from": {
                  "key_code": "left_shift",
                  "modifiers": { "optional": ["right_command"] }
                },
                "parameters": { "basic.to_if_alone_timeout_milliseconds": 200 },
                "to": [
                  {
                    "modifiers": ["left_shift"],
                    "mouse_key": { "speed_multiplier": 0.1 }
                  }
                ],
                "to_if_alone": [
                  {
                    "key_code": "f",
                    "modifiers": ["command"]
                  }
                ],
                "type": "basic"
              },

...


              {
                "from": {
                  "key_code": "a",
                  "modifiers": {
                    "mandatory": ["right_command"],
                    "optional": ["any"]
                  }
                },
                "to": [{ "mouse_key": { "x": -9900 } }],
                "type": "basic"
              },
              {
                "from": {
                  "key_code": "w",
                  "modifiers": {
                    "mandatory": ["right_command"],
                    "optional": ["any"]
                  }
                },
                "to": [{ "mouse_key": { "y": -9900 } }],
                "type": "basic"
              },
              {
                "from": {
                  "key_code": "d",
                  "modifiers": {
                    "mandatory": ["right_command"],
                    "optional": ["any"]
                  }
                },
                "to": [{ "mouse_key": { "x": 9900 } }],
                "type": "basic"
              },
              {
                "from": {
                  "key_code": "s",
                  "modifiers": {
                    "mandatory": ["right_command"],
                    "optional": ["any"]
                  }
                },
                "to": [{ "mouse_key": { "y": 9900 } }],
                "type": "basic"
              }

...


@tekezo
Copy link
Member

tekezo commented Nov 9, 2024

Thank you for feedback!

This issue occurs because the values are overflowing. I've fixed the overflow issue in the latest beta version.

However, the root cause is that the values being provided to mouse_key are too large, so please specify values in the range of -1000 to 1000. If you feel the speed is insufficient, try adjusting the tracking speed in the Mouse settings under macOS System Preferences.

How to upgrade to the latest beta version

Check for beta updates

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

No branches or pull requests

2 participants