This project is read-only.

Keyboard Text Input?

Jan 30, 2011 at 4:46 AM

I am sorry if this question is too simple. I am still a newbie for XNA. I currently have difficulty with the keyboard text input, so I install Nuclex Framework specifically for this. I have followed "Keyboard Text Input" from this link http://nuclexframework.codeplex.com/wikipage?title=Nuclex.Input&referringTitle=Documentation . For some reason, it does not work. Nothing happened when I pressed the keyboard. Did I miss anything? Or, I have to change the code? Thank you very much for the answer!!

Feb 4, 2011 at 10:28 PM

By "Nothing happened when I pressed the keyboard", do you mean the CharacterEntered event was not generated, or did you expect some visual feedback?

If you follow the example in the documentation to the letter, all you'll get is text silently being appended to a string (with lots of garbage generated, too :P).

I've uploaded a demo project that displays entered text on the screen here: http://hotfile.com/dl/101890883/d692842/NuclexKeyboardInputDemo.7z.html.

 

Feb 5, 2011 at 5:06 PM

If you're allergic to hotfile links, I also published a new release today that includes a demonstration project for the Nuclex.Input library, showing how to query game pad states and also demonstrating text input:

Nuclex-Framework-Demos-R1323.7z

Feb 6, 2011 at 6:09 AM
Edited Feb 6, 2011 at 6:14 AM

I tried the hotfile link and it worked. I have no idea why it did not work. It seemed the CharacterEntered event was not generated (but I am not sure about that because I am also new to C#). Anyway, it does right now. Thank you very much, this library makes my life much easier :)