Search Home Members Contacts
About Us
Products
Downloads
Community
Support
Pages: [1]
  Print  
Author Topic: Of Input  (Read 1347 times)
Raine
Customers
Community Member
*****
Posts: 1212


« on: December 11, 2007, 11:00:06 AM »

Apologies if this has been written elsewhere already, but I think it still deserves attention. This is the result I'm having from coding my own textbox.

 * The app still gets keystrokes even though it is unfocused. This shouldn't happen.

 * There should be a built in way to obtain ascii characters from the input. Tried other solutions but they won't work properly. I don't know much about Unicode at the moment, but I can tell it would be cool to obtain unicode characters, in order to support many languages.
We could have a "string GetTextBufferChar()" method to call every update cycle. Non-printable chars should be left out. Aggregating text characters is then up to the user, depending on their needs.

Logged

Raine
Customers
Community Member
*****
Posts: 1212


« Reply #1 on: December 14, 2007, 10:32:22 AM »

Quote
Bump of Sorrow
Instant

100 mana
Logged

Raine
Customers
Community Member
*****
Posts: 1212


« Reply #2 on: December 18, 2007, 07:34:35 PM »

The bump of sorrow worked!

And my myopia is definitely getting worse!

TVInput.GetASCIIFromKey(CONST_TV_KEY) might help me out. I found it while having a look at the bugtracker, funny Cheesy

Edit: while it's surely handy and I don't really know why I missed it before, it doesn't take account of international keyboard layouts. Oh well. Smiley
« Last Edit: December 18, 2007, 07:44:07 PM by RaineC » Logged

SylvainTV
Administrator
Community Member
*****
Posts: 4946


WWW
« Reply #3 on: December 19, 2007, 07:16:00 AM »

Yea usually you don't use TVInput when you want complicated stuff like edit boxes with special characters etc.. TVInput is very low level and only works with Scan codes.
It's good to have low latency keyboard input for arrows, letters and other things like that though.

For speical characters and special handling, you should go back at the Windows message level (WM_CHAR message or your language events such as KeyPressed/KeyUp/KeyDown)

The engine can't really intercept the messages from the HWND itself, it would need subclassing of your form which is maybe not good for stability.
Logged

Regards

Sylvain Dupont
TrueVision3D Developer
sylvain@truevision3d.com

TV3D IRC at http://chat.truevision3d.com or on server irc.truevision3d.com #Truevision3D. Come talk with us !
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks