Click here to Skip to main content
15,884,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want to access the windows key in the c programming i already have the following code to access 4 arrow keys
C++
#include <stdio.h>
#include <bios.h>
#include <ctype.h>
int main(void)
{
   int key;
    clrscr();
   key = bioskey(0);
   printf("%x",key);
   if(key==0x4d00)
     printf("right");
   if(key==0x4b00)
     printf("left");
   if(key==0x4800)
     printf("up");
   if(key==0x5000)
     printf("down");
   getch();
}

but i am unable to access the window key in c...
Posted

1 solution

Those codes are called Scancodes. The Codes for the Windows keys should be 0x5b (for the left windows key) and 0x5c (for the right windows key).

On this page you can find a good overview of many scancodes:
http://www.quadibloc.com/comp/scan.htm[^]
 
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