Open jaketothepast opened 10 months ago
Sorry, I need to get my hands on a mouse. Will check it out soon!
Okay I did some testing. Some new information:
com.apple.scrollwheel.scaling
is already accounted by macOS. On higher setting, Chrome scrolls much faster, so I guess your app just starts receiving higher deltaY-sI need you to change some calculations though. Roughly this:
Trackpad.
[event hasPreciseScrollingDeltas] == true
Mouse
[event hasPreciseScrollingDeltas] == true
EventMouseScroll::deltaX/Y
from [event deltaX/Y] * 40
EventMouseScroll::deltaLines
from [event deltaY] * 4
(≈ [event deltaY] * 40 / CGEventSourceGetPixelsPerLine
)As a side effect, this will let JWM clients distinguish trackpad from the mouse
Let me know if you have better ideas or questions
Of course, sorry about that. I'll change the calculations!
I promise I haven't forgotten about this! I have a lot of work at my full-time job this week, but when it clears up I will make the changes.
Calculate
deltaLines
from the existing scroll delta. Use the accessibility scaling in calculations.Related to #115