[Bugs] #4054 sugar UNSP: OSK opened by keyboard frame device does not send key events

Sugar Labs Bugs bugtracker-noreply at sugarlabs.org
Thu Nov 1 17:14:45 EDT 2012


#4054: OSK opened by keyboard frame device does not send key events
------------------------------------------+---------------------------------
    Reporter:  garycmartin                |          Owner:  dsd        
        Type:  defect                     |         Status:  assigned   
    Priority:  Unspecified by Maintainer  |      Milestone:  0.98       
   Component:  sugar                      |        Version:  0.97.x     
    Severity:  Unspecified                |       Keywords:  13.1.0     
Distribution:  Unspecified                |   Status_field:  Unconfirmed
------------------------------------------+---------------------------------

Comment(by dsd):

 This is harder than it might sound.

 The OSK normally works as follows: certain GTK+ input elements (e.g.
 GtkInput) have special code that calls into the input method when the
 focus happens. The maliit IM then contacts the maliit server over dbus
 saying "I'm an active input field!".

 Maliit server responds by recording that the client is active, then when
 the user clicks on the OSK keys, it sends dbus messages back to the active
 client. The maliit IM in receives those messages, and since it is an IM
 for an active text field, it has the ability to ask GTK+ to insert
 characters.

 The case when the OSK is manually triggered is very different. In this
 case, the maliit server has no idea which app has the active text input
 field, so it doesn't know where to send the messages. The app is probably
 not even listening for those messages - if the OSK has to be pulled up
 manually we can assume that we don't have a GTK IM context (because we're
 not working with a GtkEntry or something).

 This situation must be handled with some different approach to simulating
 keyboard events. One option would be for maliit-server to detect the
 situation where it doesn't have an active IM client, and in such case, use
 XSendEvent or XTest to inject a regular keypress to the active window at
 the X level.

 I will try to follow up on this diagnosis and idea with maliit upstream
 before continuing.

-- 
Ticket URL: <http://bugs.sugarlabs.org/ticket/4054#comment:2>
Sugar Labs <http://sugarlabs.org/>
Sugar Labs bug tracking system


More information about the Bugs mailing list