using a key that is activated with another ahk key

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Archie2022
Posts: 25
Joined: 06 May 2022, 03:16

using a key that is activated with another ahk key

Post by Archie2022 » 20 Jun 2022, 02:33

When I try to use proxy keys I have set to a keyboard key, lets say ESC is set to be send bey CAPSLOCK & Space, I cant use them in another ahk script meaning if I have an script and I call some action by ESC key I can't get it by using CAPSLOCK & Space. Is there a solution to this?

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

Re: using a key that is activated with another ahk key

Post by mikeyww » 20 Jun 2022, 05:17

SendLevel:
SendLevel allows to trigger hotkeys and hotstrings of another script, which normally would not be the case.

User avatar
littlegandhi1199
Posts: 195
Joined: 29 Aug 2016, 23:58

Re: using a key that is activated with another ahk key

Post by littlegandhi1199 » 26 Jun 2022, 01:33

And if I understand you correctly this information will be of help to you.
There are a couple ways that you can modify hotkeys to make them more or less forgiving.

~LButton::
This will still let the key be used normally while silently triggering the hotkey in your script. This may allow multiple scripts to have same hotkeys?

*LButton::
This allows modifiers like ctrl+shift+alt etc to also be pressed and still activate the hotkey

$LButton:: Send, {LButton}
This PREVENTS a hotkey from triggering itself and forming an infinite loop while hijacking the first press and sending the button again after a delay for example.

Final note : Order matters.
LButton&RButton::
RButton&LButton::
Without any of the above mentioned modifiers these two function differently. You probably noticed that pressing the first key will do nothing while the second key can be pressed without issue. So one will not allow regular left clicks and the other won't allow right clicks by themself however you have to press them in the order that is specified.
Script Backups on every Execution :mrgreen:
https://www.autohotkey.com/boards/viewtopic.php?f=6&t=75767&p=328155#p328155

Scrabble Solver 4-15 letter word outputs ( :crazy: # of inputs)
https://www.autohotkey.com/boards/viewtopic.php?f=19&t=34285

cplusplushater
Posts: 1
Joined: 29 Dec 2023, 15:15

Re: using a key that is activated with another ahk key

Post by cplusplushater » 29 Dec 2023, 15:25

mikeyww wrote:
20 Jun 2022, 05:17
SendLevel:
SendLevel allows to trigger hotkeys and hotstrings of another script, which normally would not be the case.
The answer is perfect
Thank you
It also helped me in this case :superhappy:

Post Reply

Return to “Ask for Help (v1)”