The WM_KEYDOWN gets the ctrl key. The WM_CHAR gets the TAB key. But I can`t do it simultaneously.
I am out of ideas and I`d like to use the Alt key too...
Thanks
Posted on 2005-05-22 17:12:33 by ola_dina
WM_KEYDOWN tells you when CTRL key is pressed down, and WM_KEYUP tells you when CTRL key is pressed up.
Set a boolean flag accordingly.
Use WM_CHAR to track TAB key. In conjunction with that boolean flag mentioned above, you will be able to detect when user presses TAB and CTRL+TAB.
Posted on 2005-05-22 23:03:32 by comrade
Thx your help. I don`t know what happened, but yesterday it didn`t work. Today it works. I think i`ve missed something. :shock:
Posted on 2005-05-23 11:05:18 by ola_dina
"WM_KEYDOWN tells you when CTRL key is pressed down, and WM_KEYUP tells you when CTRL key is pressed up.
Set a boolean flag accordingly.
Use WM_CHAR to track TAB key. In conjunction with that boolean flag mentioned above, you will be able to detect when user presses TAB and CTRL+TAB."

It seems to me that my application first gets WM_CHAR message from the system`s message queue.. So when it knows about Ctrl, it`s too late...
I`m really out of ideas  :sad: :sad: :sad:
Posted on 2005-06-02 15:09:52 by ola_dina
WM_KEYDOWN and WM_KEYUP give complete information about keypresses.  In fact, WM_CHAR is derived from these messages via TranslateMessage.

The shift, control, and ALT keys show up as modifier bits in the WM_KEYDOWN and WM_KEYUP messages. ALT never creates keydown or keyup messages. One of Petzold's example programs displays the keyboard messages received by a target window. I don't know if anyone ever translated that to ASM.
Posted on 2005-06-03 00:20:06 by tenkey
Learn how to fly "GetAsyncKeyState()" and you will solve the problem.
Posted on 2005-06-03 03:34:21 by hutch--
getting hot this topic... :)
So, begin at the very beginning.

"WM_KEYDOWN
Return Values
An application should return zero if it processes this message. "

What does this mean?
I think:
.
.
    .elseif uMsg == WM_KEYDOWN
        blah
        blah
    mov eax,0
    ret
    .elseif
.
.
Posted on 2005-06-03 12:15:47 by ola_dina
I had tryed that:
{
.elseif uMsg == WM_CHAR
                    ....
                  .if wParam==27d      ;ha kilep az exam-bol:
                    ....
                  .elseif wParam==9d
                        invoke GetAsyncKeyState,VK_LCONTROL
}
But when I pressed and hold down the ctrl button I didn`t get the wm_char message!
Posted on 2005-06-03 14:37:00 by ola_dina
Quote by Tenkey
One of Petzold's example programs displays the keyboard messages received by a target window. I don't know if anyone ever translated that to ASM.


I do, I did. Ratch
Posted on 2005-06-04 12:12:09 by Ratch
Is it true that until I release the ctrl button, I don`t get more WM_CHAR msg?
Posted on 2005-06-04 13:38:43 by ola_dina
ONLY for the ctrl button.  :shock:
Well, I`ll use the keydown meesage.
Thx  4 your attention
Posted on 2005-06-04 14:58:18 by ola_dina