I thought it was just Right Alt, I made sure that 1. AltGr key still works as expected, when pressed with other keys, it outputs accent characters,
and 2. when AltGr is pressed for a long time (more than 150 milliseconds) it doesn't send an ESC press
Code: Select all
time := -1
~LControl & ~RAlt::
if (time = -1)
time := A_TickCount
return
~LControl & ~RAlt Up::
var := A_TickCount - time
if (instr(A_PriorKey, "RAlt") || instr(A_PriorKey, "LCtrl")) && var <= 150
send {esc}
time := -1
return