How to hold one key to change behavior of another key

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
bananasandwich
Posts: 2
Joined: 12 May 2024, 18:53

How to hold one key to change behavior of another key

Post by bananasandwich » 12 May 2024, 18:57

I want RButton to output MButton only when XButton2 is being held down

User avatar
mikeyww
Posts: 27194
Joined: 09 Sep 2014, 18:38

Re: How to hold one key to change behavior of another key

Post by mikeyww » 12 May 2024, 19:29

Welcome to this AutoHotkey forum!

Code: Select all

#Requires AutoHotkey v2.0
XButton2::XButton2
XButton2 & RButton::Click('M'), SoundBeep(1500)

bananasandwich
Posts: 2
Joined: 12 May 2024, 18:53

Re: How to hold one key to change behavior of another key

Post by bananasandwich » 12 May 2024, 19:33

mikeyww wrote:
12 May 2024, 19:29
Welcome to this AutoHotkey forum!

Code: Select all

#Requires AutoHotkey v2.0
XButton2::XButton2
XButton2 & RButton::Click('M'), SoundBeep(1500)
Worked exactly how I wanted it to thanks!

Post Reply

Return to “Ask for Help (v2)”