Karabiner-Elements icon indicating copy to clipboard operation
Karabiner-Elements copied to clipboard

React to ScrollWheel in from-event

Open wedi opened this issue 6 years ago • 68 comments

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".

wedi avatar Apr 19 '18 21:04 wedi

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

nathanko711 avatar May 06 '18 16:05 nathanko711

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

wedi avatar May 29 '18 15:05 wedi

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.

stale[bot] avatar Jul 28 '18 16:07 stale[bot]

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

wedi avatar Aug 02 '18 18:08 wedi

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>

hakanersu avatar Aug 04 '18 13:08 hakanersu

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.

wedi avatar Aug 06 '18 09:08 wedi

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 -.

karlapsite avatar Aug 14 '18 13:08 karlapsite

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

calvinwyoung avatar Oct 06 '18 19:10 calvinwyoung

I'm looking for this, too.

zgeist27 avatar Oct 10 '18 22:10 zgeist27

I miss this feature too.

VVakko avatar Nov 11 '18 16:11 VVakko

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.

stale[bot] avatar Jan 11 '19 03:01 stale[bot]

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

FuegoFro avatar Jan 14 '19 22:01 FuegoFro

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!

chavlji avatar Jan 22 '19 21:01 chavlji

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.

stale[bot] avatar Mar 23 '19 22:03 stale[bot]

Still a pretty significant missing piece of functionality.

sterling avatar Mar 24 '19 03:03 sterling

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

krzysztofwolski avatar Apr 01 '19 12:04 krzysztofwolski

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

RainbowTraveller avatar Apr 12 '19 16:04 RainbowTraveller

Any news?

piotrtobolski avatar May 22 '19 10:05 piotrtobolski

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.

stianhoiland avatar Jul 16 '19 08:07 stianhoiland

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!!

SolusCado avatar Aug 27 '19 17:08 SolusCado

waiting for it....

yanickxia avatar Sep 02 '19 09:09 yanickxia

I'm looking for this, too.

Vxider avatar Sep 09 '19 09:09 Vxider

+1

kpau avatar Sep 13 '19 13:09 kpau

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

fogrid avatar Oct 03 '19 13:10 fogrid

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.

prasskaly avatar Nov 11 '19 02:11 prasskaly

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).

kerryj89 avatar Dec 03 '19 16:12 kerryj89

+1

the-eric-kwok avatar Dec 25 '19 13:12 the-eric-kwok

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

huseyinyagli avatar Jan 10 '20 10:01 huseyinyagli

I'm going crazy trying to do this!

donmurdoc avatar Jan 20 '20 19:01 donmurdoc

+1

catkic avatar Mar 20 '20 02:03 catkic