topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • Friday October 11, 2024, 5:52 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: hotkey to toggle left/right mouse buttons  (Read 19771 times)

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,963
    • View Profile
    • Donate to Member
IDEA: hotkey to toggle left/right mouse buttons
« on: August 22, 2008, 04:00 AM »
From this thread using 2 mice - can I have different settings for each? it looks like I cant have different settings for each. Deozaan & nite_monkey came up with this idea:

... Would there be some way that you could make an AHK program that would send the left mouse click when you physically right clicked, and vice verso

it would have to be able to differentiate between the two mouses which I suspect might be impossible but it would be great
Any takers out there ?? or ideas on the subject ??

Another idea would possibly be an AHK shortcut that would toggle the mouse settings to be lefty or righty.

IDEA is: to have a hotkey that would toggle settings for left and right mouse buttons
Ideally one hotkey would toggle settings but if that's not possible two different hotkeys would be fine
I was thinking RightAlt+M would be good (this is usually, but in my experience not always, same as Control+Alt+M but I'm sure you all willknow better than me :))

So I suppose, hotkey makes LeftButton=Right, Right Botton=Left, & then vice-versa
Could call it Ambidexterous-Mouser (seeing as "mouser" is hot-topic at the moment :p) or something like that :D
Tom

cranioscopical

  • Friend of the Site
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 4,776
    • View Profile
    • Donate to Member
Re: IDEA: hotkey to toggle left/right mouse buttons
« Reply #1 on: August 22, 2008, 08:45 AM »
Could call it Ambidexterous-Mouser (seeing as "mouser" is hot-topic at the moment)
-tomos
Hmmm... would it need a randomizer in order to cut out for unannounced periods?  ;)

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: IDEA: hotkey to toggle left/right mouse buttons
« Reply #2 on: August 22, 2008, 10:17 AM »
i haven't read the the other thread yet but is this what you're looking for?

Mouse key swap-over?

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 933
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
Re: IDEA: hotkey to toggle left/right mouse buttons
« Reply #3 on: August 22, 2008, 06:15 PM »
 :) Try SwapMouseButtons!

Just press Windows-S to swap the left and right mouse buttons.

Skrommel

;SwapMouseButtons.ahk
; Press Windows-S to swap mouse buttons
;Skrommel @ 2008

#SingleInstance,Force
SendMode,Input
SetWindelay,0
SetKeyDelay,0

#s::
RegRead,swapped,HKEY_CURRENT_USER,Control Panel\Mouse,SwapMouseButtons
If swapped<>1
{
  Run,RUNDLL32 USER32.DLL`,SwapMouseButton
  RegWrite,REG_SZ,HKEY_CURRENT_USER,Control Panel\Mouse,SwapMouseButtons,1
}
Else
{
  Run,RUNDLL32.EXE SHELL32.dll`,Control_RunDLL main.cpl @0`,0
  WinWait,ahk_class #32770
  WinActivate,ahk_class #32770
  WinWaitActive,ahk_class #32770
  Send,%A_Space%{Enter}
  RegWrite,REG_SZ,HKEY_CURRENT_USER,Control Panel\Mouse,SwapMouseButtons,0
}
Return

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,963
    • View Profile
    • Donate to Member
Re: IDEA: hotkey to toggle left/right mouse buttons
« Reply #4 on: August 29, 2008, 06:35 AM »
:) Try SwapMouseButtons!

thanks Skrommel  :up:  :D

I've only gotten round to trying that today - I had to give my left arm a rest so was just using right mouse for the last week (I'm left-handed)

Anyways,
when I click Win+S first a small "0" in a box shows just SE of cursor,
when I click again, a "1" shows again just below/right of cursor
These dont go away, I mean there's always one of them there ..

But a bigger problem is that on second click the mouse settings box opens - it opens the logitech tab with a wizard to help you asking which side of keyboard the mouse is etc.

I will try uninstalling the logitech soft - only installed it to see could I get around this problem some way - and see if that helps
Was thinking maybe it using this hotkey too but can find no indication othat - but you never can tell !
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: hotkey to toggle left/right mouse buttons
« Reply #5 on: August 29, 2008, 12:55 PM »
 :tellme: Some software must be detecting the change my script is making, 'cause there's no gui element in there except it shows the mouse settings dialog to force an update when swapping back.

Skrommel

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,963
    • View Profile
    • Donate to Member
Re: IDEA: hotkey to toggle left/right mouse buttons
« Reply #6 on: August 29, 2008, 03:24 PM »
except it shows the mouse settings dialog to force an update when swapping back.

do you mean it should be showing the mouse settings box ? (not sure...)
still havent uninstalled the logitech, will shortly
Tom

this-is-me

  • Participant
  • Joined in 2008
  • *
  • default avatar
  • Posts: 7
    • View Profile
    • Donate to Member
Re: IDEA: hotkey to toggle left/right mouse buttons
« Reply #7 on: December 14, 2008, 01:15 PM »
You probably don't know this, but there is a much easier way to do this. You can do this with no user interface by setting "HKCU\Control Panel\Mouse", "SwapMouseButtons" to 1 or 0 and using DllCall user32.dll SwapMouseButton 1 or 0.

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,963
    • View Profile
    • Donate to Member
Re: IDEA: hotkey to toggle left/right mouse buttons
« Reply #8 on: December 14, 2008, 05:45 PM »
You probably don't know this, but there is a much easier way to do this. You can do this with no user interface by setting "HKCU\Control Panel\Mouse", "SwapMouseButtons" to 1 or 0 and using DllCall user32.dll SwapMouseButton 1 or 0.

much easier way to toggle mouse buttons ?? - maybe your post is aimed at Skrommel? - me, I dont understand it - I mean I dont mind messing with the registry just not sure what you're saying exactly ...
Tom

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,626
    • View Profile
    • Donate to Member
Re: IDEA: hotkey to toggle left/right mouse buttons
« Reply #9 on: December 29, 2008, 07:54 AM »
Just found tool MouseMixer on this page: http://www.fxc.btint...t.co.uk/software.htm