topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday March 28, 2024, 5:15 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: IDEA: use key to constrain mouse movements to horizontal/vertical  (Read 58700 times)

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,959
    • View Profile
    • Donate to Member
in some image programs, if you're resizing something you can press a qualifier key & it will "constrain proportions" or only allow vertical or horizontal resizing
Also in some programs you can constrain how objects are moved

I'm wondering if possible to do the same with mouse movements in general
Say,
using Control key + Click/drag the mouse pointer will only move along a vertical line
and I presume a different key would be necessary for horizontal
(diagonal/45° movement isnt of interest to me but may be to others?)

Useful for panning images where you want to be reasonably accurate about what you're seeing/showing -
 i.e. this is on exactly the same level as that
Could be useful if printing large(-er than page size) image & you have the option to pan the print-view

FWIW could there be problems with the programmes that already do something similar (as described above)?
I'm just throwing this out there as an idea that I would use but I guess I'm not sure how much energy it would be worth putting into
Anyone else think this could be useful?
Tom

cranioscopical

  • Friend of the Site
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 4,776
    • View Profile
    • Donate to Member
FWIW, until what you want appears...

Floating ruler from Renegade, right here on DoCo
Numpad mouse from Kalvin Au

Help me to sort out some finicky positioning stuff from time to time.

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,959
    • View Profile
    • Donate to Member
FWIW, until what you want appears...

Floating ruler from Renegade, right here on DoCo
Numpad mouse from Kalvin Au

Help me to sort out some finicky positioning stuff from time to time.
-cranioscopical (July 10, 2008, 07:36 AM)

will try those out, they may even satisfy my needs
not sure what a ruler does :-[ but will ask again after I've had a look at it :)
Tom

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 933
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
 :) Try DragLock!

DragLock - Press the windows key to lock the mouse movement along one axis.

Features:
- Locks to the axis you start to move along.
- Rightclick the tray menu to change hotkey.

You'll find the downloads and more info at 1 Hour Software by Skrommel.

Skrommel
« Last Edit: August 02, 2008, 04:48 PM by skrommel »

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,959
    • View Profile
    • Donate to Member
:) Try DragLock!

:D wow :D
I completely missed your post Skrommel  :up:
(I think it didint show up in unread posts because I had left the tab open & restarted FF)
it's late now so looking forward to trying that out tomorrow
it's sort of like getting a nice unexpected christmas present :-* thanks! 
Tom
Tom

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,959
    • View Profile
    • Donate to Member
go on, I had to give it a quick try :D

I tried it on resizing windows but starting at the corner where you can pretty much move in any direction


initial impressions are that -

East/West works very well - it "snaps" nicely to the horizontal line

North/South is not so good at snapping to the vertical line, it does snap a little so if careful you can follow the window edge but if there's no window you'd probably be lost
funny,
with Media Player Classic it constrains movement to a 45°/diagonal movement (without Control key this doesnt happen)

:up: again Skrommel :)
Tom

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,959
    • View Profile
    • Donate to Member
Control wasnt the best choice of keys :-[

If I was to try shift could I simply chance all instances of "ctrl" in the script to "shift" ?
hmm,
I tried that, it works along the horizontal axis but not on vertical -
will see how I get on with shift (it may also be a poor key choice for me :-\)

could the win key be used here I wonder?
Tom

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 933
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
 :) Try the code above, I've changed it to use the Windows key.

Skrommel

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,959
    • View Profile
    • Donate to Member
:) Try the code above, I've changed it to use the Windows key.

Skrommel

works perfekt both ways, thanks Skrommel :Thmbsup:
Tom

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,959
    • View Profile
    • Donate to Member
well I'm using this occasionally but only today I've noticed it stops the winkey from launching the start menu -
it works normally but doesnt work when draglock is running :(

So far I've used it as I was saying above, when printing for panning "large(-er than page size) image & you have the option to pan the print-view" - so that the prints will line up.
For this I can start & close script after so this problem doesnt actually bother me much
Tom

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 933
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
Re: IDEA: use key to constrain mouse movements to horizontal/vertical
« Reply #10 on: August 02, 2008, 04:50 PM »
 :) I've just updated DragLock to work properly with the Windows key, and also added options to change the hotkey.

Skrommel

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,959
    • View Profile
    • Donate to Member
Re: IDEA: use key to constrain mouse movements to horizontal/vertical
« Reply #11 on: August 03, 2008, 02:50 PM »
:) Try DragLock!

DragLock - Press the windows key to lock the mouse movement along one axis

nice icon too Skrommel :up: - looks a bit like a medieval church floor tile ...
will give it a run across the tiles tomorrow :-)
Tom
« Last Edit: August 03, 2008, 02:51 PM by tomos »

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,959
    • View Profile
    • Donate to Member
Re: IDEA: use key to constrain mouse movements to horizontal/vertical
« Reply #12 on: August 08, 2008, 04:40 AM »
apologies for delay - that works a treat
Thanks Skrommel

btw, I like the icon so much I use the exe instead of the AHK file ;D
Tom

hdynasty23

  • Participant
  • Joined in 2009
  • *
  • default avatar
  • Posts: 1
    • View Profile
    • Donate to Member
Re: IDEA: use key to constrain mouse movements to horizontal/vertical
« Reply #13 on: September 20, 2009, 06:26 PM »
This AHK script is nearly perfect, but it doesn't for my intended purposes in MS OneNote. Basically, this is exactly the software I'm looking for so that in MS OneNote I can do straight underlines and highlights in the horizontal axis with my wacom pen tablet.

Using the wacom mouse, it works. Higlights and lines are drawn straight.
Using the wacom pen, it doesn't. The cursor moves along a horizontal or vertical axis, but the line/highlight that is ultimately drawn is all over the place.

Any ideas?

Rekrul

  • Participant
  • Joined in 2006
  • *
  • default avatar
  • Posts: 20
    • View Profile
    • Donate to Member
Re: IDEA: use key to constrain mouse movements to horizontal/vertical
« Reply #14 on: November 19, 2009, 02:55 PM »
:) I've just updated DragLock to work properly with the Windows key, and also added options to change the hotkey.

You neglected to list any system requirements for this (or any of your programs), so I tried using it on my old Windows 98SE system. It ran and there were no errors, but it does absolutely nothing. I tried changing it to every possible hotkey and none of them affect the mouse movement in any way.

IainB

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 7,540
  • @Slartibartfarst
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: IDEA: use key to constrain mouse movements to horizontal/vertical
« Reply #15 on: November 19, 2009, 04:00 PM »
I only just now saw this discussion thread, so my contribution might be a bit belated and I don't know if it will help.
I do not use a proper mouse. I was an early Apple Mac user in the '80s, and learned to use a mouse then. However, I now use only Intel X86-based PCs and I favour keyboard navigation over mouse navigation, but the mouse is essential on the modern Windows GUI. I forcibly trained myself to use a pressure-sensitive motion lever, and then a touchpad mouse on my laptops years ago, and would now rather use the touchpad as it is ergonomically superior and far easier to use compared to either a motion lever or a conventional mouse (better ergonomics and especially no RSI). My current Toshiba laptop has a Synaptics PS/2 port touch pad. The software is version 6.2, and is full-featured, offering many useful options including:

(a) Constrained motion: You use this to enable a vertical/horizontal plane lock for the pointer. You can select which of the various keys or key combinations you want to activate it with, and I selected the Shift key. The lock is enabled by pressing and holding down the Shift key before you start a moving the pointer. The plane is then locked in whatever plane approximates vertical or horizontal where you first start moving the pointer, and stays that way for as long as you keep the Shift key depressed. This is quite a handy feature, and is very easy to use.

(b) Slow motion: To select slow pointer for precision pointing. You can select which of the various keys or key combinations you want to activate it with, and I selected the Ctrl key. Slow motion is enabled by pressing and holding down the Ctrl key, effective immediately (whether you are moving the pointer or not) and is then locked for as long as the Ctrl key is kept depressed. I set the pointer on my laptop to accelerate and move at "fastest" speed normally, so as to be able to navigate across the screen as quickly as possible. Even though the pointer is usually pretty accurate when moving it at speed, I very occasionally may need to use slow motion when the pixel-sensing area for an object is small. This too is quite a handy feature, and is very easy to use.

These are the sorts of features that you might need per this discussion. If it was tricky to emulate them using AHK, then I wondered: if you have a PS/2 port connected mouse or pen, then might it be worthwhile experimenting by installing the Synaptics PS/2 port touch pad drivers, to see if these features would work for those devices too? I know it works for non-Synaptics touchpads where the Synaptics touchpad drivers are not part of the OEM installation (because I have tried it), so I presume it is using standard port connections at the PS/2 interface.

TaoPhoenix

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 4,642
    • View Profile
    • Donate to Member
Re: IDEA: use key to constrain mouse movements to horizontal/vertical
« Reply #16 on: December 14, 2011, 05:18 PM »
Sorry for the Thread Bump, (Yell at me if that's a NoNo!) I like to sometimes bring an old program back from the dead of thread death -

Now with a wink and a smile, DragLock ... doesn't, on my (XP) system, it's far from pristine to really keep the mouse stable.

So when you are faced with a new event, do something! So I used it as a quick art tool and made a modern art piece playing around for 30 seconds. What I get is that before DragLock notices the mouse has been moved, well, it moved. Then it yanks back. The result is that in paint, you get a triangle effect, but holistically along a line! So I used it as a new shading concept.

I'm sure my betters can do something more devastating with it, like help Brain take over the world, or help Pinky organize his fridge. ("Look Brain, all the tv dinners are in a row now!")

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,959
    • View Profile
    • Donate to Member
Re: IDEA: use key to constrain mouse movements to horizontal/vertical
« Reply #17 on: December 15, 2011, 05:19 AM »
@TaoPhoenix, that's actually a really nice effect :D -
also looks good reduced (or enlarge the thumbnail onscreen), it gets nice and blurry then...

I've never actually used it for drawing (only for dragging :p) and true, it "doesn't" :)
Tom

Curt

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 7,566
    • View Profile
    • Donate to Member
Re: IDEA: use key to constrain mouse movements to horizontal/vertical
« Reply #18 on: February 27, 2012, 08:52 AM »
I just came by to say that DragLock is a fine application! :-)
I have used it almost every day, with the Windows' key.

But that was on XP and on Vista, both 32-bits...
I am exited to see how it will do on my coming 64-bits W7.

Curt

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 7,566
    • View Profile
    • Donate to Member
Re: IDEA: use key to constrain mouse movements to horizontal/vertical
« Reply #19 on: June 14, 2012, 05:19 PM »
I just came by to say that DragLock is a fine application! I have used it almost every day, with the Windows' key. But that was on XP and on Vista, both 32-bits... I am exited to see how it will do on my coming 64-bits W7.

-and the answer is that it does just as well as on Vista and XP.
I have placed it in ...\Program Files (x86)\...

But of course it still doesn't paint.