| Summary: | iphone keyboard doesn't send 'return' and 'backspace' events | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Vittorio Giovara <vitto.giova> |
| Component: | video | Assignee: | Vittorio Giovara <vitto.giova> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | drago.ruzman |
| Version: | HG 2.0 | ||
| Hardware: | iPhone/iPod touch | ||
| OS: | iOS (All) | ||
| Attachments: |
fix the missing return event
fix the missing return event (and a compiler warning) fix return, backspace and multiple calls to keyboards |
||
Created attachment 518 [details]
fix the missing return event (and a compiler warning)
sorry, i uploaded a corrupted patch; here is the one working against latest hg revision.
upon further inspection, also the RETURN event I added is sent only the first time the keyboard appears. My guess is that there must be some kind of corruption in sending the RETURN and BACKSPACE event (the event is not really generated, so the problem shouldn't be in receiving events) It seems that textField (SDL_uikitview.m) doesn't call it's delegate when backspace key is pressed, but the keypress DOES erase content from textField (can be easily checked if you assign dummy text to textField.text property). It always happens after the second call to showKeyboard during the application runtime. Created attachment 564 [details]
fix return, backspace and multiple calls to keyboards
i have attached an updated patch that fixes this behaviour
Thanks for the patch! http://hg.libsdl.org/SDL/rev/c63b901d97ab |
Created attachment 517 [details] fix the missing return event my application builds a chat system so that users write and send their messages by pressing ENTER. however i noticed that the ENTER event does never get sent from an iphone/ipad keyboard, thus no message can be sent. I've attached a small patch that fixes this, i used the 13th slot because it's the "carriage return" value in the ashii table. another issue, also the BACKSPACE has problems: when the keyboard appears it works fine, but if it gets hidden no more backspace are sent. Unfortunately i don't have a patch to fix this, but i hope that it can be fixed.