Supress key or remove the key from the message queue

73 Views Asked by At

i want to use the down arrow to send {tab 6} to a gui for skipping 5 controls and go to the 6th control.

the down from the keyboard was send to the gui but should suppressed and the {tab 6} does not arrive the gui

OnMessage(0x100, "OnKey")  ; Key is pressed

OnKey(wParam)
{
    if (A_Gui = 2)
    {
        ; MsgBox %A_Gui% ScanCode = %wParam%
        if (wParam = 40) ; DOWN
        {
            send, {tab 6}
        }
    }    
}

the event fires, when i uncomment the msgbox it shows the keycode.

1

There are 1 best solutions below

0
On

I ended up here:

  1. removing all then onmessage stuff

  2. using the "#IfWin" directives

Solution