Search
 
SCRIPT & CODE EXAMPLE
 

CPP

cpp get keystroke in console only

HWND hwnd = GetConsoleWindow();


if (GetForegroundWindow() == hwnd){
    if((GetKeyState(VK_SPACE) & 0x8000) != 0)){
      // DO YOUR STUFF HERE
    }
}
Comment

PREVIOUS NEXT
Code Example
Cpp :: digits in c++ 
Cpp :: Missing GL version 
Cpp :: cpp fread 
Cpp :: sjfoajf;klsjflasdkfjk;lasjfjajkf;dslafjdjalkkkjakkkkkkkkkkkkkkkkfaWZdfbhjkkkk gauds 
Cpp :: case 1 or 2 c++ 
Cpp :: c++ vector allocator example 
Cpp :: lru cache gfg 
Cpp :: Hash Sort in C++ 
Cpp :: c++ sort numbers by magnitude/absolute value 
Cpp :: tan trigonometric function 
Cpp :: go to particular place in vector using iterator 
Cpp :: KUNG FU HUSTLE 
Cpp :: c++ abs template 
Cpp :: ubuntu dotnet create blazorserver linux 
Cpp :: 2000pp pp play osu std 
Cpp :: c++20 inizialize a thread 
Cpp :: ue4 execute delegate from blueprint 
Cpp :: second smallest element using single loop 
Cpp :: JAJA 
Cpp :: c++ caps lock key 
Cpp :: 01matrix 
Cpp :: c++ How to not use friend declaration when equipping a class with `operator<<` 
Cpp :: c++ program to use nmap 
Cpp :: Hiring Test codechef solution in c++ 
Cpp :: cpp full form 
Cpp :: 2d stl array 
Cpp :: c++ n in regex 
Cpp :: how to make a goto area in c++ 
Cpp :: assoc-right antlr 
Cpp :: c++ max 
ADD CONTENT
Topic
Content
Source link
Name
1+3 =