Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Virtual keyboard in Symbian S60 5th edition: Which API to use?

How (i.e. using which API) is the virtual keyboard opened on Symbian S60 5th edition? The documentation seems to lack information about this.

like image 250
user39684 Avatar asked Nov 21 '08 15:11

user39684


2 Answers

You are right, this should obviously be a published API and it should be highlighted in the documentation. No such luck.

  • If you are using one of the platform native controls, the virtual keyboard will automatically popup when the user accesses a text-editing control.

  • If you are making a custom control, you need to deal with its selection by adding your own version of the virtual keyboard: make a new text-editing, window-owning virtual keyboard look-alike custom control with the right buttons. Reuse it accross all your applications. One day, Nokia will realize they have made an obvious mistake and make the API publicly available.

  • If you are using direct screen access, well, you wouldn't exactly expect the very s60-looking virtual keyboard to popup out of nowwhere. Again, draw a nice image on the screen to let the user know where the virtual keys are and react to pointer events. This is going to be less reusable unless you build a good amount of customization (background, button edges...) into it.

EDIT: Nokia may be relying on Qt to fix this issue. I would expect the control to be part of the current 4.7 version of Qt.

like image 152
michael aubert Avatar answered Sep 20 '22 02:09

michael aubert


Tinkering with focus on a QLineEdit inside custom coded kinetic scroll area, I've had a simmilar problem (how to open virtual keyboard manually). Then, I found it, this obviously works in Qt 4.6.3 on a C7 Symbian^3 phone:

// lineEdit is an instance of QLineEdit    
QApplication::postEvent(lineEdit, new QEvent(QEvent::RequestSoftwareInputPanel));

Before that, I also had to post a QEvent::FocusIn event to that same lineedit, otherwise the QLineEdit did not update the content from virtual keyboard.

Hope this is helpful. I lost hours.

like image 37
tihi Avatar answered Sep 17 '22 02:09

tihi