Archived

This topic is now archived and is closed to further replies.

NumbChucks

WM_SYSKEYDOWN, for Alt

Recommended Posts

Hello, I need help in sending a WM_SYSKEYDOWN message to a window. I know how to do it with PostMessage, and Ex. VK_A, but how do I send Alt-F ? I am coding in c++. Thanks for any help or leads.

Share this post


Link to post
Share on other sites
Mmmmm,

look for shortcuts key or modifier key.
modifier are ALT and/or CTRL.

Maybe windows implements a WM_MODIFIERKEYDOWN message ?

try to put in the wparam or lparam VK_A | VK_ALT

I''m not sure about the synthax.

Share this post


Link to post
Share on other sites
Thanks for the info, I tried that, and it did not work.
I did more research, and found out, that 33 is the scan-code
for the Alt-Key, put, I need to put this 33 in a lKeyData object.

Does anyone know, how, I can fill this lKeyData, several
different values.


Thanks for your help
NumbChucks

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
the breakdown of the 32bits that define the layout of the lKeyData are all defined in the documentation for the WM_SYSKEYDOWN msg.

it looks like bit 29 is a 1 if the ALT key was down when the associated key was pressed. i *think* there''s either a bitfield or set of macros that will isolate that bit for you, but i could be wrong (maybe i created them for myself a long time ago.) just look through the docs in the "keyboard input" section.

well i went ahead and "thumbed" through the docs myself and found KF_ALTDOWN. you should be able to use that to isolate bit 29 during a bitwise test to tell you if the bit value is 1 or 0.

Share this post


Link to post
Share on other sites