Mouse position trigger

I'm using Synergy with two Macs and having keyboard language issues.


When the main Mac's keyboard language is Korean, the keyboard doesn't work properly when I move to the other Mac.
The keyboard works fine after switching the keyboard language to English on the main Mac.
What I want to achieve:

I want to automatically change the keyboard language to English before moving to the other Mac using Keyboard Maestro (KM).

What I've tried:

I looked for a "Mouse Position" trigger, but I couldn't find one.


How can I achieve what I want?

Additional information:

I'm using two Macs with Synergy.
I use both English and Korean keyboard languages.
I want to use KM to change the keyboard language to English before moving to the other Mac.
I couldn't find a "Mouse Position" trigger in KM.
I hope someone can help me with this issue.

I'm unfamiliar with Synergy; what do you mean by "before moving to the other Mac." What does that involve?


It's kind of a software KVM: Synergy - Share one mouse & keyboard across computers

Is there anything else you can hook in to? Does it cause a change in active window, does KM detect a different screen, or similar?

You could have constantly running macro that monitors the pointer position using %CurrentMouse% and reacts accordingly, but that seems a bit wasteful. Could you do things the other way around and instead of mousing to the other screen have a KM macro that, when triggered, set your keyboard and then moved the pointer for you?

May I suggest that you write two macros using a hot key trigger, use the KM "set keyboard layout action".
The first hot key e.g. CTL+E gets your English layout and the second (CTL+K) gets Korean layout.

Get those working and then reconsider if you need to worry about the mouse position.

Ah thanks—I get that via my keyboard and mouse directly (Logitech Flow) :).

Even if a mouse position trigger existed, the problem is that it would be CPU intensive, as it'd need to constantly compare the mouse position to your macro's trigger locations. If it were me, I'd probably use a combined approach, starting with @ jonathonl's method of creating a macro that sets the language. You could probably even do it with one macro, not two: Just change the setting from whatever it is to the other language.

The second part of the macro would depend on how Synergy works—if it's just by dragging the mouse to a screen edge and hovering there for a bit, then I'd have the macro do that: Move the mouse to that edge.

This would, in theory, switch the language and activate the other Mac. In theory :).


1 Like

The following sentences are translated using a translator.

Thank you for your response.

Most people are probably unfamiliar with the program called Synergy,
and I was not considerate enough.

I'm sorry.

As someone else explained,
the description "software KVM" is the closest.

When you move the mouse cursor to the edge of the main screen PC's monitor,
it behaves as if the cursor is moving to the monitor of another PC.

As you mentioned,
continuously checking the position of the mouse cursor
does seem inefficient.

In the Synergy program,
when transferring control of the keyboard and mouse to another PC,
it would be a good idea to check if Synergy provides any triggers
for doing so.

Thank you for your explanation.

Using the Synergy program,
all keyboard and mouse events are transferred from the main PC to the sub PC.

As a result,
regardless of which shortcut key is pressed,
the corresponding shortcut functions on the sub PC instead of the main PC.

when the keyboard layout on the main PC is set to Korean,
and I move to the sub PC where the keyboard input doesn't work,
I have to return to the main PC,
change the keyboard layout to English,
and then move to the sub PC again.

CTL+E = English
CTL+K = Korean

Even if I set this up,
when control of the keyboard and mouse is transferred from the main PC to the sub PC,
the CTL+E shortcut doesn't work on the main PC
and instead, it's sent to the sub PC.

This seems to happen because the Synergy program intercepts all keyboard input events
and mouse events and forwards them to the sub PC.

Yes, once you're on the sub PC, you won't be able to use any Keyboard Maestro macros, unless that sub PC also runs Keyboard Maestro. So this would only help you switching to the sub PC.


1: Since it is just you

Keyboard Maestro is engineered by Stairways Software Pty Ltd and fulfilled by FastSpring. Keyboard Maestro is licensed on a per-user basis and individual users may use it on up to five Macs.

So you can install Keyboard Maestro. On BOTH computers, and each can have its own custom macros

2: This may be of interest

Then PM the two KM users in that thread

3: Forget about KM, once you are on the subPC , how do you get back to main PC?

4: Suggest you raise a support ticket with Synergy help and just take my approach to start to keep it simple

5: It may be a question of doing TWO steps

Transfer back from subPC , then switch keyboard layout?

6: I cannot access any manual or detailed documentation on the synergy website. Is there a pdf you can send/link to?

  1. I have Keyboard Maestro installed on both of my Macs.
  2. I will also take a look at it.
  3. Simply moving the cursor to the edge of the monitor causes the mouse cursor to move between the main PC and the sub PC. I drew a picture of it below: link to the image
  4. It might be better to seek help from the Synergy forum.
  5. I am currently manually implementing the method you suggested.
  6. I'm not sure about this either.

Thank you for your response.

The trick is to have a macro do the following, in this order:

  1. The first action changes the language to English, as @jonathonl suggested, triggered with a hotkey (or a spare USB device key on your mouse?)

  2. The second action moves the mouse. Use the "absolute position" option and set co-ordinates that suit the physical arrangement of your Macs. If a co-ordinate is set to go beyond the boundary of your main Mac's screen, the mouse pointer will be moved over to the second Mac (I am an occasional user of Synergy, and this does work).

To return to the main Mac, move the mouse pointer back to the main screen (as usual with Synergy), and then press a key for a macro that changes the input language back to Korean.

So returning control to the main Mac does require you to do two things (move the mouse; press a key).*

* I would find that acceptable, but if you need it to be just one action, you could perhaps have a key-operated macro on your second Mac which:

  1. moves the mouse pointer back to the main Mac's screen;

  2. sends a trigger to the main Mac (which would need to be running a Web server) for another Set keyboard layout action, to change the language back to Korean.

1 Like

It might be convenient to use a gesture trigger instead of a hot key.

1 Like