Mouse BOokmarks?

Hi All,

I’m very much a newbie to the app, but excited by all the possibilities. My first use case is fairly simple I think, but I’m not sure how best to go about it.

I’m totally blind, and regularly play games which benefit from moving the mouse to specific places on screen, like icons which will display tooltips on hover. Under Windows, I had a screen reader add-on which let me add “bookmarks,” to certain places on screen, depending on the app in question, and route the mouse to them on demand.

I wonder if there’s a way to do this with Keyboard Maestro, and if so, the best way to do so? There are potentially hundreds of bookmarks, so binding each to a unique keystroke is impractical.

I’d love any ideas people might be able to offer. I already use the “Mouse,” action in a limited way to substitute for mouse keys, which seems to work quite well.

Thanks in advance.

Howdy, welcome to the forum! As you might have already figured out, this is a great community full of people who love to help.

This should be doable! One of the nice features about Keyboard Maestro is macro groups that work only in certain applications. So to start off, you could create a separate macro group for each game you play. See the following screenshot for an example using KOTOR (Knights of the Old Republic):

Then, inside that macro group you could have a different macro for each location you want to move the mouse to, activated by whatever trigger is best for you. Each macro could be setup several different ways, and the attached macro and screenshot below show you two. The "challenge" would be how to set the location for each new macro. I say "challenge" because that isn't that complicated in and of itself, but I'm not sure how difficult it would be for a blind person (and forgive me if that sounds rude, I just don't have much experience with how blind folks use their computers).

I hope this gives you some ideas to work with, but if you have further questions don't hesitate to reach out since we're always happy to help more!

-Chris

KOTOR- Move mouse to location 1.kmmacros (5.4 KB)

Macro screenshot (click to expand/collapse)

Hey,

Thanks for confirming that this is indeed a thing. :slight_smile:

I'm afraid I'm totally blind, so I can't very easily read the contents of your screenshot, but I'm curious what methods people use to activate macros like this. When I did this with my Windows screen reader, I basically pulled up a dialog with a list of whatever bookmarks fit the current application, which worked well, but could be a bit slow at times.

It looks like KBM is pretty powerful, so perhaps we can do a bit better than that, though I'm not sure how.

Something else I'm slightly confused by, how do you go about setting the position for a macro to begin with? That is, if I have to bookmark a particular icon, don't I need to use the mouse to click into the KBM UI, thus creating a bit of a chicken and egg situation? I"m probably overthinking this. :slight_smile:
Thanks for the questions, and I will definitely continue exploring.

@Elwin , I have attempted to break down the screenshots to text for you. Hope this helps.

Start of First screenshot:
Keyboard Maestro macro group pop screenshot.
Title: Example macro group
Active Checkbox with label “Enable Macro Group”
First trigger: Available in these applications:

  1. Application name “Knights of the Old Republic”
  2. Second trigger: Available in all windows.
  3. Third Trigger: Always activated.
  4. Fourth Trigger: Do not display in menu bar.
    Inactive Checkbox with label “Disabled on this Mac”

End of First Screenshot.

Second Screenshot Example
Macro titled "KOTOR: Move mouse to location 1"
Inactive checkbox labeled "Triggered by any of the following (when macro is enabled):"

  • New Trigger
    Or by script.
    Or by Execute Macro
    Or via the web server but all remote access is disabled.

Will execute the following actions:
Method 1
Comment "This action will let you move the mouse to a set location indicated in the two number fields"
Execute the following actions
First Action: Move Mouse to (500,500) from the Absolute Position
Just move right 500px down 500px relative to the absolute position.

Method 2
Execute the following actions
Comment "This action will let you move the mouse to a set location indicated in the variable"

First Action: Set Variable "KOTOR_location1" to Text "500,500"
Set variable "KOTOR_location1"
Insert Token to "500,500"

Second Action: Use Variable "KOTOR location'" to Set the Mouse Location
Use variable "KOTOR_location1" to set the mouse location

End Second Screenshot Example.

Oh man my apologies for the screenshot... I didn't even think about it not being able to be read by a screenreader. :man_facepalming: But @Daniel_Willitzer broke it down quite well so hopefully that helps at least.

I want to try and understand your situation better, so bear with me... basically you want to be able to trigger a shortcut that will record the current mouse position and save that as a macro for future execution? But you also want to be able to do that according to whatever app is at the front right? So in other words you could hit one shortcut to make a new macro, am I right? Or am I way off in left field? :sweat_smile:

Because you're right, the normal approach is to set up new macros from within the KM Editor, which if you're blind presents a massive challenge in and of itself. Let me sleep on this and see if I can think of something that might work for you or at least point you in the right direction if it's beyond my skills.

-Chris

@Elwin I have something that MIGHT work for you...

It creates a new macro (as it is right now it places the macro in a group called Test Macros), assigns it a name according to the front application and mouse position when it was triggered, and inserts a click mouse action with the coordinates for the mouse position when it was triggered.

It's a very rough draft just to see if it's something that might work for you. If you think it can, let me know and I or others can polish it even more.

-Chris

PS: Is there a way I can format my responses here to make them easier for you to follow? I imagine you use some sort of screen reader to read things on the computer... please let me know! :grin:

EDIT: I forgot to explain the macro here... it's currently setup with a hotkey trigger of ⇧⌘T. It creates a new macro and selects a hotkey trigger for it, but waits for your input to assign the actual hotkey. Let me make some modifications to it so it gives you verbal confirmation of what it's doing and when it's ready for you to assign a hotkey.

EDIT 2: I added some verbal indications of what the macro is doing throughout the process, and also an AppleScript to read back the hotkey you assigned it. Again, this is a very rough draft and can no doubt be executed a lot better, but let me know if it works or not for you and we can go from there.

Create new macro to click mouse at current position (for @Elwin).kmmacros (31 KB)

Macro screenshot (click to expand/collapse)

1 Like

Hi Chris,

Something like this definitely seems like the kind of thing I can use. I appreciate the work on it. I have been able to test it, or at least the version before your edit, and the core functionality of saving the mouse position in a macro appeared to work as expected. I actually think that just saving the macro is hugely helpful; it was the whole “make sure the mouse stays where i expect it to,” question I wondered about.

I’ll have a poke around KBM in general and see what else I might be able to do. Applescript seems as if it’s going to be very useful.

Thanks for the help :slight_smile:

1 Like

Hey that’s great! I really hope it’s of some use to you. Don’t hesitate to give me feedback on it and let me know what else you may need help with. I don’t have near as much experience as a lot of other folks here but I still really enjoy helping folks figure out how to make something work if I can.

Greetings @Elwin

In addition to the other suggestions posted here - do you use or have you considered using a programmable mouse (such as Logitech MX Master) and/or a Stream Deck? Each (or both) of these would give you quite a number of buttons with tactile feedback to identify each one. You could then use Keyboard Maestro to map each button to move the mouse to a specific location on the screen or to move the mouse a given number of pixels in a specific direction.

Richard,

No, I hadn't considered something like that at all. :slight_smile: Honestly mice in general are something I rarely think about outside of a gaming context just because I almost never need to manually move the pointer around in my productive work. Thanks for the idea, something else to ponder.

1 Like