Mouse with extra side buttons while RButton Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
frasiercrane
Posts: 4
Joined: 14 Jun 2021, 10:27

Mouse with extra side buttons while RButton

14 Jun 2021, 10:43

Hi.

I have been searching but I haven't been able to figure out how to do this, sorry first of all if it is too easy and for language mistakes, English is not my native language.

I have a mouse with several side buttons, I use two of them to view the next/previous tab in browsers with buttons mapped to Control + (Shift) + Tab. I would like to use AHK so that if I press that button while right mouse button is holding down, a totally different action would be executed.

Thanks. Bye
User avatar
mikeyww
Posts: 26882
Joined: 09 Sep 2014, 18:38

Re: Mouse with extra side buttons while RButton

14 Jun 2021, 10:49

Code: Select all

XButton1::Send x
RButton::RButton
RButton & XButton1::Send y
frasiercrane
Posts: 4
Joined: 14 Jun 2021, 10:27

Re: Mouse with extra side buttons while RButton

14 Jun 2021, 11:09

Thanks, but XButton1 and XButton2 are for Back and Forward buttons, aren't they?

I have got a mouse with 12 side buttons and I want to remap the ones that are not those two.
User avatar
mikeyww
Posts: 26882
Joined: 09 Sep 2014, 18:38

Re: Mouse with extra side buttons while RButton

14 Jun 2021, 11:14

The buttons are for anything. Some software maps them to various things. AHK recognizes the five standard mouse buttons, plus the wheel, by default. You can check scan codes for additional buttons. See documentation about the scan codes.

https://www.autohotkey.com/docs/KeyList.htm#SpecialKeys
frasiercrane
Posts: 4
Joined: 14 Jun 2021, 10:27

Re: Mouse with extra side buttons while RButton

14 Jun 2021, 11:46

I have tried with #InstallKeybdHook, but it seems these keys do not generate events (Back and Forward do it), I think it is the case of a too low level for AutoHotkey to access.
So, as a workaround, is it possible to use Control + Shift + Tab while Rbutton holding down as a condition/hotkey?
User avatar
mikeyww
Posts: 26882
Joined: 09 Sep 2014, 18:38

Re: Mouse with extra side buttons while RButton  Topic is solved

14 Jun 2021, 12:01

Yes.

Code: Select all

#If GetKeyState("RButton", "P")
^+Tab::Send z
#If
Other software that manages the same buttons or uses a hook can conflict with AHK.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: aitaixy, dipahk, Google [Bot] and 238 guests