Qbasicnews.com

Full Version: Future Library INKEY$?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
anyone got sumthing that i could sue usith future lib while I have future lib's keyboard installed?

Oz~
Why can't you just call KbhOff, get the input and then call KbhOn?
i tried doing that, but the keyboard didn't do anything...mayb its how i have everything setup.....

but anyways, qbasic's INKEY$ is slow and pathetic, so i'd prefer another method.

Oz~
Use FutureLib's key handler and build an array for scancode -> ascii code conversion.
And how would i go about implimenting it?

Oz~
I just did it, and it's a pain in the butt. First, you have to make a file of all the scancodes and the corresponding ASCII character. Then, you have to create an array, like DRV said and load the indexed scancodes into the array. I just made a function called DumbKey$ that loops through the total number of scancodes until GetKey matches it. When it matches, it returns DumbKey$ as the character. I would reccomend using another method. To me, this way is alot worse than inkey$.
Happy Bday Dr. Daveneinstein!
Yay! Happy birthday Big Grin
Dr_Davenstien, I've already tried this method, and it slowed the program down alot. If anyone has access to futurelibs source, can u tell me where abouts in memory the keyhandler is...then i could just steal that and easily create a INKEY$ function.

Happy B-day to u, again...lol

Oz~
Quote:Dr_Davenstien, I've already tried this method, and it slowed the program down alot. If anyone has access to futurelibs source, can u tell me where abouts in memory the keyhandler is...then i could just steal that and easily create a INKEY$ function.

Happy B-day to u, again...lol

Oz~

Err, you'd have to know ASM to convert their code. Dr. D's ways is the practical one.
Pages: 1 2