Hi all,
I looked a the sniped provided with PureBasic that uses DirectX (sprite.pb). I had a question about ExamineKeyboard(). If the key press happens when the program is busy doing something else, will I receive the event the next time I call ExamineKeyboard()?
It's just that when I was programming on my good ol' Macintosh, we had two functions. One, slow, that was bufferized and remembered the events, and a fast one that did not remember.
I hope I was clear about this...
Thanks for your help,
Tony
ExamineKeyboard() and timing question
-
tony_bruguier
- User

- Posts: 11
- Joined: Mon Jun 21, 2004 11:38 pm
- Location: Pasadena, CA
- Contact:
the short answer is NO.
It does not remember keypresses.
However, keep this in mind:
ExamineKeyboard()
examines the keyboard state at that time,
All keypress() calls are checked against this state.
So, if you never ExamineKeyboard() again,
the state will apear to remain the same.
Sorta annoying when tracing in debug mode, because I don't think
ExamineKeyboard() actually examines the keyboard on
subsequent checks while in debug mode and stepping your app.
It does not remember keypresses.
However, keep this in mind:
ExamineKeyboard()
examines the keyboard state at that time,
All keypress() calls are checked against this state.
So, if you never ExamineKeyboard() again,
the state will apear to remain the same.
Sorta annoying when tracing in debug mode, because I don't think
ExamineKeyboard() actually examines the keyboard on
subsequent checks while in debug mode and stepping your app.
Code is good... Its an international language.
