Processing Ajax...

Title

Message

Confirm

Confirm

Confirm

Confirm

Are you sure you want to delete this item?

Confirm

Are you sure you want to delete this item?

Confirm

Are you sure?

User Image
sss15
31 discussion posts
when I move mouse to other monitor and lock the mouse in current monitor, if I want to move mouse to primary monitor by hotkey, the mouse won't go to the primary monitor. So I have to unlock the mouse and then move it to primary monitor.

Is there a way to move to primary monitor directly, because I use hotkey so that the operation become easy.
Apr 5, 2016  • #1
Keith Lammers (BFS)'s profile on WallpaperFusion.com
You should be able to move the mouse to the primary using the key combination. I've just tested it here using these steps:
  • Assign key combinations to the "Lock/Unlock Mouse Cursor to Current Monitor" and "Move Mouse Cursor to Centre of Primary Monitor" functions on the Settings > Functions tab.
  • Press the "Lock/Unlock..." key combo on one of the non-Primary monitors..
  • Press the "Move Mouse Cursor..." key combo, and the mouse moves to the Primary monitor and is now locked to the Primary.

Did I miss any steps for reproducing your issue?

Thanks!
Apr 6, 2016  • #2
User Image
sss15
31 discussion posts
Thanks for the reply。

I used scripted function as following,

public static class DisplayFusionFunction
{
public static void Run()
{
Rectangle primaryMonitorBounds = BFS.Monitor.GetPrimaryMonitorWorkArea();

//check to see if the mouse is already inside of the window
//if it is inside, exit the function
if (primaryMonitorBounds.Contains(BFS.Input.GetMousePositionX(), BFS.Input.GetMousePositionY()))
return;

//should here be some codes to check if the mouse was locked???

BFS.Input.SetMousePosition(primaryMonitorBounds.Width / 2, primaryMonitorBounds.Height / 2);
}
}
Apr 7, 2016  • #3
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Ok, so if you use the built-in "Move Mouse Cursor to Centre of Primary Monitor" function, it works, but it doesn't if you use your Scripted Function?
Apr 7, 2016  • #4
User Image
sss15
31 discussion posts
yes,because I also want to customized other related functions, for examples, using combination key to go directly to display #1,#2... in the case mouse is locked.

I think there are some code missed in the scripted function, but I can not find how to check and Unlock or Lock the mouse in script.
Apr 8, 2016  • #5
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Ah ok. The script can't currently tell if the mouse cursor is locked or not. I've added an item to our list to make BFS.Input.SetMousePosition unlock the mouse if needed. We'll be sure to let you know when that's been implemented :)

Thanks!
Apr 8, 2016  • #6
User Image
sss15
31 discussion posts
Can I just call the existing DF-built function "Move Mouse to Center of Different Monitor' with the parameter in script?
Apr 11, 2016  • #7
Keith Lammers (BFS)'s profile on WallpaperFusion.com
You sure can! You can call it like this:

BFS.DisplayFusion.RunFunction("Move Mouse Cursor to Center of Primary Monitor");
Apr 11, 2016  • #8
Subscribe to this discussion topic using RSS
Was this helpful?  Login to Vote(-)  Login to Vote(-)