Alt key not recognized Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
NachoG19
Posts: 4
Joined: 28 Sep 2022, 02:23

Alt key not recognized

20 Sep 2023, 11:21

I want to access the shortcuts feature with the "alt" key in Office, particularly OneNote, but the problem spreads to all programs

If I send, either: ! or {Alt} or {LAlt} or {LAlt down}{LAlt up} does not work

My code to access a specific function:

Code: Select all

^r:: 
Send, {LAlt}
Sleep, 200
Send, o
Sleep, 200
Send, y
Sleep, 200
Send, 2
Sleep, 200
Send, i
Return
#if
what it does is write "oy2i"


[Mod edit: Added [code][/code] tags. Please use them yourself when posting code.]
User avatar
andymbody
Posts: 995
Joined: 02 Jul 2017, 23:47

Re: Alt key not recognized  Topic is solved

20 Sep 2023, 17:59

I suspect that the Ctrl+R is still held down when Alt is fired (a timing issue)....
Use KeyWait below

Code: Select all

$^r::
Keywait, Control					; wait for Ctrl to be released
Keywait, r							; wait for r to be released	
Send, {LAlt down}oy2i{LAlt up}		; try this, if it doesn't work, then use the individual steps below
;Send, {LAlt}
;Sleep, 200
;Send, o
;Sleep, 200
;Send, y
;Sleep, 200
;Send, 2
;Sleep, 200
;Send, i
return


Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: apeironn, Mateusz53, mikeyww, Spawnova and 161 guests