Advertisement

GetAsyncKeyState equivalent under X

Started by April 29, 2005 05:23 PM
1 comment, last by Mawww 19 years, 7 months ago
Hi, i continue on porting my engine to linux and I am seeking for a easy way to see if a key is down or up. In the Xlib documentation, it looks like i need to grab the keyboard, setup a callback and all that sort of things but what i want is only to do "is_key_down('A')" any ideas ?
Tchou kanaky ! tchou !
Xlib is a relatively low-level interface. I haven't used it, but I wouldn't be surprised if it couldn't do that. You might want to look into a higher-level library such as SDL or Allegro.
Advertisement
well i do not want to use any high level libs, i just want to translate my win32 api calls to XLib ones.
Perhaps i can use some stdio funcs but i do not know any that permit to see if a key is pressed (i used to call kbhit or keypressed back in the days where i used djgpp but i think it's a dos only function).
Tchou kanaky ! tchou !

This topic is closed to new replies.

Advertisement