「$」 Prior To Custom Combinations Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
nutnutwin
Posts: 76
Joined: 28 Aug 2019, 07:25

「$」 Prior To Custom Combinations

Post by nutnutwin » 15 May 2022, 17:26

Hi, Thank you for your time

# Background

Let's say I have hotkey(Custom Combinations) like

Code: Select all

F13 & t::			Some Func()
Where I would like to use 「$」 to prevent recursive send

# Problem
I found that the following expression is not accepted(show error on run)

Code: Select all

$F13 & t::	
# My thought
is there some way I can make this happen?
or just add

Code: Select all

#UseHook
somewhere prior to the hotkey definition?
Turning this directive ON is equivalent to using the $ prefix in the definition of each affected hotkey.
# Discussion

Is is correct that, #UseHook has little downside except for using a little bit of RAM?
If so I will add them to all my scripts, and thus solve this problem.

Thank you

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

Re: 「$」 Prior To Custom Combinations  Topic is solved

Post by mikeyww » 15 May 2022, 18:24

There isn't a problem to be solved.

Custom combinations:
Keyboard hook: Custom combinations involving keyboard keys always use the keyboard hook, as do any hotkeys which use the prefix key as a suffix. For example, a & b:: causes ^a:: to always use the hook.

nutnutwin
Posts: 76
Joined: 28 Aug 2019, 07:25

Re: 「$」 Prior To Custom Combinations

Post by nutnutwin » 16 May 2022, 05:25

mikeyww wrote:
15 May 2022, 18:24
There isn't a problem to be solved.

hi thank you so much for your answer.
how careless I am

just one remaining question: except for the memory usage, basically there are no downside for use UserHook?

Thank you

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

Re: 「$」 Prior To Custom Combinations

Post by mikeyww » 16 May 2022, 05:49

Installing the hook differs from using it. Without forcing use,
Keyboard hotkeys which do not require the hook will use the reg method.
I cannot comment on the pros and cons of using the keyboard hook needlessly for every hotkey. Others here may know more. There may also be other posts from the experts describing details. Enjoy!

Post Reply

Return to “Ask for Help (v1)”