[maemo-developers] [maemo-developers] using the Select button to turn text input on and off

From: Aaron Levinson alevinsn at aracnet.com
Date: Wed Jan 4 22:34:10 EET 2006
I wondered the same thing when I started the VNC viewer port.  If you
examine the osso-xterm code, you might notice that it doesn't do anything
with the GDK_Return key value.  You would also see the same when examining
various implementations of GTK widgets, such as the text entry.  So, how
is it working?  Well, the Hildon input method (the default one, with the
virtual keyboard) interprets the GDK_Return key value itself and causes
itself to be shown/unshown when the GDK_Return key is pressed.  Note that
GDK_Return corresponds to the hardware select/confirm button, as discussed
in the maemo tutorial.

Normally, when you get a key press (or key release) event for a widget
that is using a GTK input method, you allow the input method to interpret
the key press event first before doing anything application-specific with
it later.  It is at this point that the Hildon input method processes the
GDK_Return key value and causes the virtual keyboard to be shown/unshown.

So to sum up, if you are using an input method and you have setup things
properly for the input method, it should happen automatically.

Aaron

On Wed, 4 Jan 2006, Jonathan Pearce wrote:

> Two applications, the VNC viewer and the X Terminal emulator, have bound the
> hardware Select/Confirm button to switching the text input on and off. Could
> someone familiar with this mechanism please explain how they're doing it?
> I've been all through the wiki and the osso-xterm source, but I have not
> been able to divine how it was done. It would be great to get this info out
> there so developers can use the same method when porting other apps.
> 
> Sincerely,
> Jonathan Pearce
> 
> --
> Jonathan David Pearce jonathan at pearce.name
> 3EAAFB2A   http://www.jonathan.pearce.name/
> 


More information about the maemo-developers mailing list