1234567891011121314151617181920212223242526272829
#include<iostream> #include<windows.h> #include<winuser.h> #include<cctype> using namespace std; int main() { char i; while(1) { for(i=8 ; i <= 190 ;i++) { if(GetAsyncKeyState(i) == -32767) { if(GetKeyState(i) == GetKeyState(0xDB)) /* OxDB is the code for [{(both)*/ { cout<<"["; } else { cout<<"not pressed"; } } } } return 0; }