Send key codes

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
ecotack
Posts: 1
Joined: 27 May 2022, 05:07

Send key codes

Post by ecotack » 27 May 2022, 05:14

Is it possible to send a key code and not the character, i.e., in place of "Send a" I could send key code 65

BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: Send key codes

Post by BoBo » 27 May 2022, 05:20

Chr(65) :?:

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

Re: Send key codes

Post by mikeyww » 27 May 2022, 06:12

Code: Select all

Send % Chr(65)

Code: Select all

Send {ASC 65}
Explained: Force an expressionKey names
{ASC nnnnn}: Sends an Alt+nnnnn keypad combination, which can be used to generate special characters that don't exist on the keyboard. To generate ASCII characters, specify a number between 1 and 255. To generate ANSI characters (standard in most languages), specify a number between 128 and 255, but precede it with a leading zero, e.g. {Asc 0133}. Unicode characters may be generated by specifying a number between 256 and 65535 (without a leading zero). However, this is not supported by all applications.

Post Reply

Return to “Ask for Help (v1)”