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
Yker
2 discussion posts
Good day all,

I am new to this product, just started using it yesterday and I am liking it so far. But I have a question to see if there is a feature/option that I can enable to be able to move between 2 of the monitors. I have provided a screen shot of my configuration. Right now I am able to move the mouse cursor from monitor 3 to 2 to 1 to 4 with no issues. My question is there an option that can allow me to move the cursor directly between monitors 3 and 4?

Thank you and I am sorry if this question has already been asked and answered.

Stewart
• Attachment: 4 monitors_LI.jpg [297,954 bytes]
4 monitors_LI.jpg
4 monitors_LI.jpg
Oct 11, 2018  • #1
Keith Lammers (BFS)'s profile on WallpaperFusion.com
There isn't a way to have the mouse jump the gap, no. You can enable the horizontal mouse wrapping option on the Settings > Mouse Management tab though, and then you can move your mouse off the right side of the right monitor to have it land on the left side of the left monitor.
Oct 12, 2018  • #2
User Image
Yker
2 discussion posts
Hi Keith,

Thank you for the quick response. I have enabled it and that is pretty close to what I was looking for, I just have to remember to move the mouse in the opposite direction of the other top monitor, lol.

Thanks

Stewart
Oct 12, 2018  • #3
Keith Lammers (BFS)'s profile on WallpaperFusion.com
No worries, glad I could help!
Oct 12, 2018  • #4
User Image
AJ☺llyMusicHead
12 discussion posts
Hello, hope all is well, try this out :D

As you have mentioned you are new, I've tried to type the instructions as clear as possible :)

First you need to download the ZIP attachment to your computer and extract it.
These 2 files will be extracted, extract to whatever folder you want.
_AJC Cursor Cross Over Two Monitors.dfscript
_AJC Cursor Cross Over Two Monitors Reset.dfscript


Once they're extracted, follow the following steps,
  • Open DF Settings
  • Click on <Functions> in the Settings List
  • Click <Scripted Function> button at top of window
  • Select <Import Scripted Function>
  • Navigate to the folder where you downloaded the attachments and import them, one at a time
  • "_AJC Cursor Cross Over Two Monitors.dfscript"

  • "_AJC Cursor Cross Over Two Monitors Reset.dfscript"
  • When both are imported, click <APPLY> at bottom of Settings screen

You should now have 2 new functions in the Scripted Functions List

"_AJC Cursor Cross Over Two Monitors" - the main function to be triggered

"_AJC Cursor Cross Over Two Monitors Reset" - This will allow you to to reset the script settings if needed, either by directly running the script or assigning a hotkey to it. There's no need to worry about uncommenting the line in the previous script then.

Referencing your screenshot, I've assigned
  • Monitor3 to the Left (uiMonitorID_A)
  • Monitor4 to the Right (uiMonitorID_B)
You can change them in the code if you move monitors or something.

Edge Detection Sensitivity is set to 2 and stored in the variable <int iEdgeThreshold = 2>
It's just the number of pixels from the edge that will trigger the cursor crossover. In your setup though, 2 is plenty.
Just move the mouse cursor to the monitor edge until it stops moving and it should jump within a second

Now all that needs to be done is to create a Trigger for the script.
First, let's setup the Trigger Event,
  • Click on <Triggers> in the Settings List
  • Click <ADD> button at bottom of Settings Screen
  • A new Trigger window will open
  • Click <Event> Dropdown button in new window
  • Select <Timer Interval> Event
  • A new value box will appear called <Interval (sec)>
  • Set <Interval (sec)> to 1 or maybe a bit higher if you want more of a delay for some reason.

Now let's setup the Trigger Function,
  • Click <ADD> button underneath listbox at bottom of Trigger Screen
  • Select <Run Function>
  • Select "_AJC Cursor Cross Over Two Monitors" from the list
  • Make sure you didn't select the Reset one! D:
  • "_AJC Cursor Cross Over Two Monitors" should be added to the Trigger list
  • Click <OK>

Click <APPLY> at bottom of Settings screen, until you click <APPLY> the Trigger won't be enabled

Hopefully all should be good now, there is a slight delay and there's nothing I can do about that using this method.
Happy mouse cursor monitor jumping :D

!!! I've included the code here so others can see it's not dodgy or anything :) !!!

Code

// !!!!! UNCOMMENT next line to reinitialise script !!!!! Rememeber to RECOMMENT line if script is reinitialised !!!!!
        //BFS.ScriptSettings.WriteValueBool("CursorCrossOverTwoMonitors_bScriptIsInitialised", false);
        bool bScriptIsInitialised = BFS.ScriptSettings.ReadValueBool("CursorCrossOverTwoMonitors_bScriptIsInitialised");

        // Set these to whatever monitor ID's are needed
        // Based on the screenshot, these should be correct
        uint uiMonitorID_A = 3;
        uint uiMonitorID_B = 4;

        // Amount of pixels from edges to detect if cursor needs to cross over
        // i.e. Edge Detection Sensitivity
        // No need to store this as a script setting
        int iEdgeThreshold = 2;

        // As the script will be triggered once every second,
        // we don't want to be constantly reading monitor bounds values
        // so just read them once and store them in script settings
        if (!bScriptIsInitialised) {
            // Initialise script settings
            // Get monitors bounds and store them
            Rectangle rectMonitorA = BFS.Monitor.GetMonitorBoundsByID(uiMonitorID_A);
            Rectangle rectMonitorB = BFS.Monitor.GetMonitorBoundsByID(uiMonitorID_B);

            // We could store all the values but we don't need to 
            // Just the left side monitor's Right Edge value and
            // the right side monitor's left edge value are required
            BFS.ScriptSettings.WriteValueInt("CursorCrossOverTwoMonitors_iMonitorA_Right",rectMonitorA.Right);
            BFS.ScriptSettings.WriteValueInt("CursorCrossOverTwoMonitors_iMonitorB_Left",rectMonitorB.Left);

            // Set script is initialised flag
            BFS.ScriptSettings.WriteValueBool("CursorCrossOverTwoMonitors_bScriptIsInitialised", true);
        } else {
            // Script is initialised
            // Read the stored monitor edge values
            int iMonitorA_Right = BFS.ScriptSettings.ReadValueInt("CursorCrossOverTwoMonitors_iMonitorA_Right");
            int iMonitorB_Left = BFS.ScriptSettings.ReadValueInt("CursorCrossOverTwoMonitors_iMonitorB_Left");

            // Get the monitor ID at the current mouse cursor position
            int iMouseX = BFS.Input.GetMousePositionX();
            int iMouseY = BFS.Input.GetMousePositionY();
            uint uiCurrentid = BFS.Monitor.GetMonitorIDByXY(iMouseX, iMouseY);

            // Only check mouse cursor position when on a monitor that needs to be checked
            if ((uiCurrentid == uiMonitorID_A) && (iMouseX > (iMonitorA_Right - iEdgeThreshold)))
                BFS.Input.SetMousePosition(iMonitorB_Left, iMouseY);
            else if ((uiCurrentid == uiMonitorID_B) && (iMouseX < (iMonitorB_Left + iEdgeThreshold)))
                BFS.Input.SetMousePosition(iMonitorA_Right, iMouseY);
        } // end if !bScriptIsInitialised


Code

// reinitialise Mouse Cursor Cross Over Two Monitors script 
        BFS.ScriptSettings.WriteValueBool("CursorCrossOverTwoMonitors_bScriptIsInitialised", false);
• Attachment: _AJC Cursor Cross Over Two Monitors.zip [2,265 bytes]
Oct 12, 2018 (modified Oct 12, 2018)  • #5
User Image
Kevin Kuhle
6 discussion posts
It seems like the Mouse Management > "Prevent mouse cursor from snagging on unaligned monitor edges" and "Prevent mouse cursor from sticking in Sticky Corners (Windows 10 only)" makes the fact that this isn't possible significantly easier to deal with. At least for me.
Mar 16, 2020  • #6
Subscribe to this discussion topic using RSS
Was this helpful?  Login to Vote(1)  Login to Vote(-)