Karabiner-elements: React to ScrollWheel in from-event

Created on 19 Apr 2018  Â·  45Comments  Â·  Source: pqrs-org/Karabiner-Elements

Hi,
I got into the habbit using ctrl + left/right scroll to switch desktops. Unfortunately, I still haven't found a way to achieve this with Karabiner Elements.

Does anyone know a way to make this work? I am looking for a way to react to horizontal ScrollWheel events. As to-event this is documented but unfortunately I haven't found anything about a correspondig from-event.

Thank you!

Related Issues:
https://github.com/tekezo/Karabiner-Elements/issues/261#issuecomment-339164627, #579, #1066, #1113, https://github.com/tekezo/Karabiner/issues/814

scrollwheel

In the old days it used to work this way:

<autogen>
    __ScrollWheelToKey__
    ScrollWheel::RIGHT, MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_CONTROL,
    KeyCode::CURSOR_LEFT,  MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_CONTROL,
</autogen>

1066 describes exactly how this was achieved earlier:

The previous version of Karabiner allowed one to reference ScrollWheel::Left and ScrollWheel::Right in the "from" field of mappings. I have not been able to find any documentation on how to do this in Karabiner-Elements.

In Karabiner-EventViewer I just see a "ScrollWheel" event come in along with "misc" data: "dx: -2.10 dy: 0.00 dz: 0:00".

Most helpful comment

To feed the stale bot, I'll chime in that I'd also love for this feature to be implemented.

All 45 comments

Hey I would love to know this as well, using left/right scroll to map to back/forward buttons would be pretty awesome.

Just stumbled upon one more related issue: #1314
There is a simple modification TO a mouse scroll event but not FROM:

from_mouse_key
_From key_

to_mouse_key
_To key_

Also see this (closed) pull request: #1230

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Is there absolutely no solution to remap left/right scrolling? Not even a slight hint? What a pity.

Yes i found that in old versions there is a way to do that which i really need that with my sculpt mouse.

<?xml version="1.0" encoding="UTF-8"?>
<root>
  <devicevendordef>
    <vendorname>MICROSOFT</vendorname>
    <vendorid>0x045e</vendorid>
  </devicevendordef>
  <deviceproductdef>
    <productname>MICROSOFT_SCULPT_MOUSE</productname>
    <productid>0x07a2</productid>
  </deviceproductdef>
  <item>
    <name>Microsoft Sculpt Mouse - Map Windows Button</name>
    <identifier>private.msft_sculpt</identifier>
    <device_only>
        DeviceVendor::MICROSOFT, 
        DeviceProduct::MICROSOFT_SCULPT_MOUSE
    </device_only>
    <autogen>
        __KeyToKey__
        KeyCode::CONTROL_L,
        KeyCode::VK_NONE,
        ModifierFlag::NONE
    </autogen>
    <autogen>
        __KeyOverlaidModifier__
        KeyCode::COMMAND_L,
        KeyCode::COMMAND_L,
        KeyCode::LAUNCHPAD
    </autogen>
    <autogen>
        __KeyToKey__
        KeyCode::DELETE,
        ModifierFlag::COMMAND_L,
        KeyCode::MISSION_CONTROL
    </autogen>
    <autogen>
        __KeyToKey__
        KeyCode::TAB,
        ModifierFlag::COMMAND_L,
        KeyCode::CURSOR_DOWN,
        ModifierFlag::CONTROL_L
    </autogen>
    <autogen>
        __ScrollWheelToKey__
        ScrollWheel::LEFT,
        ModifierFlag::COMMAND_L,
        KeyCode::CURSOR_LEFT,
        ModifierFlag::CONTROL_L
    </autogen>
    <autogen>
        __ScrollWheelToKey__
        ScrollWheel::RIGHT,
        ModifierFlag::COMMAND_L,
        KeyCode::CURSOR_RIGHT,
        ModifierFlag::CONTROL_L
    </autogen>
    <autogen>
        __FlipScrollWheel__
        Option::FLIPSCROLLWHEEL_VERTICAL,
        Option::FLIPSCROLLWHEEL_HORIZONTAL
    </autogen>
  </item>
</root>

Thanks for the hint! Unfortunately this is a configuration for the legacy Karabiner (as one can tell from the XML format) not the current Karabiner Elements. The new version has no obvious support for this and I couldn't find a workaround yet.

Bump: wouldn't mind being able to rebind scroll wheel to perform certain actions.

I'm trying to zoom in and out using a scroll wheel in Zeplin, so I need to rebind wheel up to ⌘ + and wheel down to ⌘ -.

Has anyone found a workaround for this? I'm also looking for a solution right now.

I'm looking for this, too.

I miss this feature too.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

To feed the stale bot, I'll chime in that I'd also love for this feature to be implemented.

I also desperately need wheel up/down as from key. I need it to:

  • switch tabs with right mouse button down + wheel
  • switch apps with mouse button 4 down + wheel
    I'm begging you please!

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Still a pretty significant missing piece of functionality.

As a new MS Sculpt user I'm also interested in this func.

Yes. Need ability to scroll using scroll wheel....!

Any news?

I would like to see this, too! I'm looking to change what happens when the scroll wheel is scrolled up or down, for example to remove acceleration.

Are there plans to implement this support?

I used to use Razer's Synapse software with my Razer Nostromo to - among other things - control the system volume from the scroll wheel. As of now (in Catalina's latest beta), Razer Synapse doesn't work - so I'm finally getting around to remapping everything with Karabiner Elements instead. This ALMOST works great (better than Synapse, in terms of speed and reliability).

The problem of course is that Karabiner Elements doesn't seem to support scroll wheel events. Is there a technical reason for that? In the meantime, I'm using BetterTouchTool to at least let me control volume through a scroll wheel+modifer key combination, but it isn't as smooth as what I had before, and what I would imagine we would get from KE.

So, for what it's worth... +1 on this request!!

waiting for it....

I'm looking for this, too.

+1

Yea, I would like this feature too - I really want to be able to zoom with the mouse

I would like to have the feature of Ctrl+scroll up/down to zoom in/zoom out. Firefox supports this mode for macOS, but I want it to natively run in all apps that will be only possible with a tool like Karabiner.

Since it's already understood in the to-event it should be trivial to understand from the from-event, no? Of course you and I both know things aren't always as simple as they seem. Still, some acknowledgement from the maintainer would be nice as to whether or not support for this will be coming. As of now I'm using BetterTouchTool which works for me (was already running it).

+1

I'm missing this feature to reverse my mouse scroll without reversing trackpad scroll.

I'm going crazy trying to do this!

+1

+1... looks like the old version of Karabiner was more versatile than current one...

+1

+1

for people needing versatile Mouse events, I would recommend USB Overdrive. I'm new to mac (2 years) and started using that before discovering Karabiner, as I needed to keep natural scroll on the trackpad and not on the mouse. Now I'm using both: Karabiner for keyboard, USB Overdrive for mouse.

While it is not free, it is nag-ware. You have to wait 30 seconds when you want to enter the settings panel. I've used it like that for 2 years without a problem (I paid it now that I have a decent salary).

Still waiting for this functionality in 2020...

This ticket is getting close to the top in the most commented list. 😆

@tekezo Could you give an estimate if you are planning to implement this at some time or if we should just use an alternative like USB Overdrive for this particular feature?

Please get me right, this is an open source project you do in your spare time and I am really grateful for what I get right now. It's just for us/me to know.

really miss this functionality

bump

bump

Yes. I do need to have a react to Scroll_Wheel in from-event too.
Now it just has "event type" with misc. No "name" or "code". can not control it.

This would be awesome if this functionality was implemented :)

I've found my way here too, want to be able to map the mouse wheel + a modifier to zoom apps in and out. Hopefully there's time to look at this feature at some point :)

@radman0x I understand your need :D. Most apps can already do that (web brosers, code editors, etc). This is great because they can zoom in "smartly" depending on their content.

Otherwise, on mac, you can enable an accessibility feature that zoom the whole screen: Settings > Accessibility > Zoom > _Use scroll gesture with modifier keys to zoom_ . Enable this, and select the modifier you want (Ctrl, Option, Cmd). There are also 2 styles of zoom, see which one you like better.

+1

+1, trying to find any method at all to remap scrolls on Mac, and Karabiner is the closest thing I've found (USB Overdrive doesn't cut it since I'm not using a USB/BT mouse)...would really love to see this implemented!

Was this page helpful?
0 / 5 - 0 ratings