Sign in to follow this  
Jesse Connell

Optionally lock cursor if mouse button is down

1 post in this topic

How about only passing a barrier if no mouse buttons are depressed? ([u]Optionally[/u], of course - I'm sure future awesome features like dragging stuff between computers will excite other people, but not me.) Here are two specific cases I can think of where this would help me enjoy my purchase of Synergy more fully: Annoyance #1: Dragging windows to the side edge of a monitor is supposed to "snap" the window in a half-width/full height arrangement. Using synergy, I have to stop on the very edge pixel or I lose the snap (and the window dragging state, on Windows). Annoyance #2: If I'm selecting text, and want to shift+drag the mouse to select, and want to be a little sloppy and just drag right past the window boundary, it would be nice if it didn't pass through to the other OS's UI and screw up the state of the original app. The only case where I can imagine wanting to hold a button down between computers is if Synergy has a file-dragging mode. But even then, Synergy should be aware of the file-dragging state when the border is hit, so it could intelligently decide whether to allow passing the barrier.

Share this post


Link to post
Share on other sites
If you're using Windows, Synergy already has that feature -- but for mouse button #5 (also known as xbutton2), a button not found on the normal 3-button mouse. I haven't found any mention of this in the documentation, but it's in the code and it works. I found it the hard way -- one of my machines defaults to xbutton2 down, which kept Synergy from switching screens. Fortunately, I found a workaround. Synergy actually gets the mouse state from Windows rather than from the hardware. Windows normally gets it from the BIOS, where it's set by the hardware. But you can also change the state in Windows by sending Windows an event. I do this in the free AutoHotKey scripting language (http://www.autohotkey.com): GetKeyState,state1,Xbutton2 ifequal,state1,U sendevent {xbutton2 down} else sendevent {xbutton2 up} GetKeystate,state2,Xbutton2 Msgbox,xbutton 2 was %state1% and now is %state2% exit Lines 6 and 7 are optional -- they only show you the before and after state as set in Windows.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this