[Interest] Change modifier for horizontal scrolling with mousewheel

Volker Hilsheimer volker.hilsheimer at qt.io
Fri May 20 22:41:36 CEST 2022



> On 20 May 2022, at 21:05, Thorsten Glaser <t.glaser at tarent.de> wrote:
> 
> On Fri, 20 May 2022, Volker Hilsheimer wrote:
> 
>> sending a synthesized wheel event with the Alt modifier set to the
>> QWidget will not trigger this behavior, as that never exercises that
> 
> Hmm. I’m on a laptop without scroll wheel, so I bound two keys
> to emulate a mouse wheel:
> 
> https://musescore.org/en/node/165936#comment-1043340
> 
> Does this mean that synthetisising those events would also not work?


That synthesization happens on X11 level, before Qt sees the event in QXcbConnection::xi2HandleScrollEvent (or, if no XInput I suppose, in QXcbWindow::handleButtonPressEvent).

> (I have not tried; I didn’t know that Alt+scroll scrolls horizontally
> for Qt — that being said, which Alt… I use Alt to enter umlauts… so I
> hope this works with Alt_L as defined by xmodmap(1), not by Alt as on
> the physical keyboard / scancodes…)

Only one way to find out :)

Volker




More information about the Interest mailing list