Click here to Skip to main content
15,881,852 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Windows code C/C++
VK_SYSKEYUP
VK_SYSKEYDOWN
Is the 'alt' key the only recognized virtual system key in windows?
I have looked through WinUsers.h
I can only catch alt keys with this code.<big></big>

IS THE alt KEY THE ONLY WINDOWS SYSTEM KEY?

C++
//***************************************************
case WM_SYSKEYDOWN:
foo_1;
break;
case WM_SYSKEYUP:
foo_2;
break;
//****************************************************
Posted
Comments
Sergey Alexandrovich Kryukov 16-Feb-15 23:27pm    
Who told you so? Everything can be recognized, starting with physical keyboard codes.
—SA

 
Share this answer
 
Is the 'alt' key the only recognized virtual system key in windows?
 
Share this answer
 
Comments
Richard MacCutchan 17-Feb-15 13:38pm    
Why have you posted this? It is not a Solution, and you obviously have not bothered to follow the link I provided and read the documentation.
I dugout my old Petzold Win32 API book and Ch 6. has all the answers.
Try his “Keyboard Message Viewer #2” demonstration app.
It's on Petzold site.
'alt' key sends WM_SYSKEY* msg + holding down the 'alt' key and pressing any other key will make that key combination a system command.
So 'x' is WM_CHAR x, but 'alt'+'x' can be read as WM_SYSKEYDOWN + WM_SYSCHAR.
Output from Petzold “Keyboard Message Viewer #2”

Message Key Char
WM_SYSKEYDOWN 18 Alt
WM_SYSKEYDOWN 18 Alt
WM_SYSKEYDOWN 88 X
WM_SYSCHAR 0X0078 x
WM_SYSKEYUP 88 X
WM_SYSKEYUP 18 Alt

Always look to Petzold for any Window questions.
Thanks.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900