[SOLVED]EditBox does not respond to Delete/Backspace keys

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

noatom
Just popping in
Just popping in
Posts: 17
Joined: Sat Oct 04, 2014 23:37

[SOLVED]EditBox does not respond to Delete/Backspace keys

Postby noatom » Tue Oct 07, 2014 13:35

So, the problem is in the title. If I type anything, the input is correctly shown in the editbox, however if I press the Backspace/Delete keys, nothing happens.

I use this to forward the input to cegui from the WM_CHAR win32 messages:

CEGUI::System::getSingleton().getDefaultGUIContext().injectChar(key);

Am I supposed to handle backspace key presses in a special way...or?
Last edited by noatom on Tue Oct 07, 2014 14:47, edited 1 time in total.

User avatar
Kulik
CEGUI Team
Posts: 1382
Joined: Mon Jul 26, 2010 18:47
Location: Czech Republic
Contact:

Re: EditBox does not respond to Delete/Backspace keys

Postby Kulik » Tue Oct 07, 2014 13:40

You need to injectKeyDown/Up as well as injectChar. It could be that you are only calling injectChar which is not enough.

Please read http://static.cegui.org.uk/docs/0.8.4/i ... orial.html

noatom
Just popping in
Just popping in
Posts: 17
Joined: Sat Oct 04, 2014 23:37

Re: EditBox does not respond to Delete/Backspace keys

Postby noatom » Tue Oct 07, 2014 14:47

Solved: Apparently you can't delete text only by injecting chars, you need to use the up/down injection methods.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 20 guests