[maemo-developers] selectively disabling virtual keyboard

From: Julius Luukko julle.luukko at quicknet.inet.fi
Date: Mon Nov 26 23:00:10 EET 2007
Austin Che wrote:
>> On Sat, Nov 24, 2007 at 10:28:28AM -0500, Austin Che wrote:
>>>     Is is possible to create a text box that doesn't show the virtual
>>>     keyboard when it receives the focus?
>> Make it read-only.
>     I don't think this is exactly the effect I need. I want something
>     like the "device lock" screen (e.g. control panel->device
>     lock->change lock code). The text box doesn't seem to be read-only
>     because the text in it doesn't get grayed out. I guess it is
>     simply unable to receive the focus. However, the buttons somehow
>     also emulate a key press for the text box. The buttons don't just
>     set the text directly as the number that is entered shows up for a
>     brief moment then turns into an * which doesn't happen if I just
>     programmatically change the text in the box.
>     So assuming that disabling a text box from receiving the focus is
>     sufficient to prevent the on-screen keyboard from showing up,
>     what's the best way to send a synthetic key press to the text box?

Hello Austin and all,

I don't think that synthetizing key presses is the way to go. You can 
get a similar effect as is in the device lock screen  by setting your 
GTK_ENTRY's editable property to FALSE:

   gtk_editable_set_editable(GTK_EDITABLE(myentry), FALSE);

Then use gtk_editable_set_text, gtk_editable_insert_text etc. to set to 
text in your text box according to your button presses.


More information about the maemo-developers mailing list