Alternative to GetAsyncKeyState on linux

Home / Uncategorized / Alternative to GetAsyncKeyState on linux

Question:
lately I’ve been struggling with finding alternative to ‘GetAsyncKeyState’ on linux… here is my code:bool key_pressed(char key)
{
#ifdef _WIN32
if(GetAsyncKeyState(key) & 0x8000)
{
return 1;
}
else
{
return 0;
}
#endif

#ifdef __linux__
//What to add Here//
#endif

}

i searched the web and all i can find is using librarys and couldn’t understand it… can someone give an example?


Answer:

Read more

Leave a Reply

Your email address will not be published. Required fields are marked *