GithubHelp home page GithubHelp logo

Comments (6)

r3a1d3a1 avatar r3a1d3a1 commented on August 15, 2024 1

What works even better than Page Up/Down is sending multiple scroll events!
They get ignored if sent all at once, but with 20ms delay between them, they do the job of Page Up/Down, but more smoothly!
Furthermore, while Paging keys always get delivered to the window in focus, the scroll event simulation gets delivered to the window under the cursor, which IMO is far more desirable.

CGEventRef scroll = CGEventCreateScrollWheelEvent(NULL, kCGScrollEventUnitLine, 1, upwards ? -10 : 10);
CGEventPost(kCGHIDEventTap, scroll);
CFRelease(scroll);

I've used an NSTimer in a for-loop to send 7 of these 20ms apart.

from mac-mouse-fix.

r3a1d3a1 avatar r3a1d3a1 commented on August 15, 2024

My quick hack to do this is to change behavior of "Move between spaces" in InputParser.m as follows:
(Since I personally don't use multiple spaces that often)

Screen Shot 2020-03-20 at 10 48 56 AM

added #include <Carbon/Carbon.h> on top as well (not shown above).

I'm not too familiar with XIBs and Objective-C, otherwise I'd have created a PR with this feature baked in as a 3rd option for side-buttons :)

from mac-mouse-fix.

avh4 avatar avh4 commented on August 15, 2024

I have a trackball with side buttons and no scroll wheel buttons, so having a "Scroll up/down" option for the Side Buttons would also be valuable for me.

from mac-mouse-fix.

pallas avatar pallas commented on August 15, 2024

Can you post a PR? I'm not sure where to add that but I'd love to try it out. A +1 for treating them as swipe up/swipe down instead of page up/page down.

from mac-mouse-fix.

pallas avatar pallas commented on August 15, 2024

Ah, nevermind, I see where you mention that you're not super familiar with ObjC/XIBs.. me either :(

from mac-mouse-fix.

noah-nuebling avatar noah-nuebling commented on August 15, 2024

Hey guys sorry for chiming in so late. You can now assign Page Up and Page Down to a mouse button in the new 2.0.0 Beta 2. Let me know what you think!

from mac-mouse-fix.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.