using a key that is activated with another ahk key
-
- Posts: 25
- Joined: 06 May 2022, 03:16
using a key that is activated with another ahk key
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?
Re: using a key that is activated with another ahk key
SendLevel:
SendLevel allows to trigger hotkeys and hotstrings of another script, which normally would not be the case.
- littlegandhi1199
- Posts: 195
- Joined: 29 Aug 2016, 23:58
Re: using a key that is activated with another ahk key
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.
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
https://www.autohotkey.com/boards/viewtopic.php?f=6&t=75767&p=328155#p328155
Scrabble Solver 4-15 letter word outputs ( # of inputs)
https://www.autohotkey.com/boards/viewtopic.php?f=19&t=34285
https://www.autohotkey.com/boards/viewtopic.php?f=6&t=75767&p=328155#p328155
Scrabble Solver 4-15 letter word outputs ( # of inputs)
https://www.autohotkey.com/boards/viewtopic.php?f=19&t=34285
-
- Posts: 1
- Joined: 29 Dec 2023, 15:15