Keyboard handling of held keys

Blitz3D Forums/Blitz3D Programming/Keyboard handling of held keys

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Make sure this is in user32.DECLS :
api_OemKeyScan% (wOemChar%) : "OemKeyScan" 


It returns the scancode from an ascii code corresponding to the application that is running, and it is based on the windows system that determined the keyboard layout in the first place, and it is specially for the applic ation running (from my understanding of the MSDN info). So it is as reliable as windows, in a way. LOL!

But this code should work on all Blitz3D versions, and OemKeyScan should be in all versions of windows from Win95 and up (I hope). I'm taking a slight chance thoe, but I have a good feeling on this.

The worst that could happen IMHO is that the key won't repeat. What I noticed, is that most keys that won't repeat are keys that are of character code greater than 127, such as éèä£ù³ÌýÃæ×® ... I don't think I can do anything about that, and I don't think it really is a big issue.