Remapping with and without Send (which is better for performance?)

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
john_c
Posts: 493
Joined: 05 May 2017, 13:19

Remapping with and without Send (which is better for performance?)

24 Nov 2017, 13:44

We can use two different ways for simple remappings. First:

Code: Select all

Tab:: ^Tab
Or second:

Code: Select all

SendMode, Input
Tab:: Send, ^{Tab}
Which one is better for performance?
User avatar
Nextron
Posts: 1391
Joined: 01 Oct 2013, 08:23
Location: Netherlands OS: Win10 AHK: Unicode x32

Re: Remapping with and without Send (which is better for performance?)

24 Nov 2017, 18:06

I'd doubt performance it an issue here. I'd first start by determining which behavior you require, because these scripts do different things (The first is a remapping, the second is a hotkey). For example, pressing Shift+Tab will output Ctrl+Shift+Tab in the first script, but the second script won't be triggered, resulting in unaltered output.
Helgef
Posts: 4709
Joined: 17 Jul 2016, 01:02
Contact:

Re: Remapping with and without Send (which is better for performance?)

24 Nov 2017, 18:19

Hello.
From the documentation,
a::b actually contains the following two hotkeys instead:

Code: Select all

*a::
SetKeyDelay -1   ; If the destination key is a mouse button, SetMouseDelay is used instead.
Send {Blind}{b DownTemp}  ; DownTemp is like Down except that other Send commands in the script won't assume "b" should stay down during their Send.
return

*a up::
SetKeyDelay -1  ; See note below for why press-duration is not specified with either of these SetKeyDelays.
Send {Blind}{b Up}
return
Note, the remapping uses the scripts default sendmode, as set in the auto-execute section.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: filipemb, Google [Bot], LRRUNB, OrangeCat and 168 guests