New, improved text entry userlib! (B3D / B+)

Community Forums/Showcase/New, improved text entry userlib! (B3D / B+)

DrakeX(Posted 2004) [#1]
some of you might remember that i made a text entry userlib that had some problems. well thanks to sweenie (and some suggestions from some other users) the problems have been fixed and it works wonderfully now!

what this userlib does is emulates dark basic's Entry() function. basically you can use this function to do very simple and accurate text input. it does this by intercepting character messages that are sent to the blitz program window.

how is this better than homemade input functions? for one, it includes key autorepeat based on the user's settings. so how you type in any other windows text box is how it will work with the userlib. secondly, all the input is handled by windows in a message buffer, so the input is more accurate at slower framerates. lastly, it's just so easy to use.

here is a feature list:

- get perfect, accurate, autorepeating text input
- no longer causes errors when the program crashes or if you forget to uninitialize it
- works with B3D and B+ 1.34 or higher (untested with B+ but should work fine - please tell me if it doesn't)
- gets special keys - up, down, left, right, home, end, ins, del, pgup, pgdn
- fixed a problem where you were able to initialize more than once, freezing the program and crashing - now initializations after the first one have no effect

included in the archive are four files - a readme, the DLL, the decls, and a small test program.

you can download it here: http://fivetwelve.dbspot.com/bbentry.zip

i hope SOMEONE finds this useful!


jfk EO-11110(Posted 2004) [#2]
Thanks a lot for sharing! Does it also support Copy/Paste?


fredborg(Posted 2004) [#3]
Very good! Can you make it support non US keyboards and accent (like ä, á, à, â, or ã) charaters?


DrakeX(Posted 2004) [#4]
jfk - nope. to tell the truth i'm not real sure how to use the clipboard.. would be a good idea for another plugin!

fredborg - there's a reason why it doesn't right now. for some reason it doesn't let me use the windows TranslateMessage() to turn key messages into character messages. this would greatly simplify things, but no.. i have to do the translation myself, by using a big switch/case statement to look at the scancode and the status of the shiftkey and stuff.. i'll look into getting it working. if i CAN get the TranslateMessage() function working, it will be much more internationally-friendly. otherwise, it's more CASE entries :P