[maemo-developers] [maemo-developers] VirtualKeyboard service/API

From: Aaron Levinson alevinsn at aracnet.com
Date: Mon Jan 30 23:44:33 EET 2006
First off, vte is just another Gtk widget, and it uses a Gtk input method.  
It just so happens that vte is the widget that provides most of the
functionality for xterm.  You can examine the source code for vte for more
information.

There is no "delete" key on the virtual keyboard, so I would have to 
assume that you are getting that from your keyboard.  When the virtual 
keyboard is used to send a backspace, it will result in a key-press and 
key-release event (since there is no simple way to represent this 
character using the GtkIMContext's "commit" event).  So, you'll need to 
handle these special keys in your key-press and key-release event 
handlers.  Basically, if the GtkIMContext doesn't handle the key-press or 
key-release in the calls to gtk_im_context_filter_keypress(), then you may 
want to handle certain key events or just blindly handle all that get 
through the filter.

You can build vncviewer in debug mode (use ./configure --help to determine
the proper option) and debug it to see how it handles a virtual keyboard
backspace.

And finally, I will again refer you to the GtkEntry class, which is a
relatively simple class that demonstrates how to properly use input
methods.  In getting input methods working properly in vncviewer, I 
studied the source code of xterm, vte, GtkEntry, and other input-driven 
widgets.

Aaron

On Mon, 30 Jan 2006, Antonio Gomes wrote:

> Some keys are not recognized, though. Actually, mainly those related to
> deleting actions (like delete, backspace virtual keyboard keys and so on).
> As far as I can see/understand, xterm also had to handle them in a proper
> way, using "vte" [1] for that. Is it ? Is there other GtkIMContext singal to
> handle actions like these ?
> 
> [1]
> http://developer.gnome.org/doc/API/2.0/vte/vteterminal.html#VTETERMINALERASEBINDING


More information about the maemo-developers mailing list