#4144 HIGH First D: game keys events need to be detached from gtk.Focus events

Zarro Boogs per Child bugtracker at laptop.org
Wed Oct 10 12:38:25 EDT 2007


#4144: game keys events need to be detached from gtk.Focus events
-----------------------------+----------------------------------------------
 Reporter:  erikb            |       Owner:  bernie                
     Type:  defect           |      Status:  new                   
 Priority:  high             |   Milestone:  First Deployment, V1.0
Component:  x window system  |     Version:  Git as of bug date    
 Keywords:                   |    Verified:  0                     
-----------------------------+----------------------------------------------
 If a sugar activity listens for 'key-press-event':

 {{{
 keyname = gtk.gdk.keyval_name(event.keyval)
 if (keyname == 'KP_Page_Up'): #O, up
      print("GAME UP")
 elif (keyname == 'KP_Home'): #square, left
      print("GAME LEFT")
 elif (keyname == 'KP_End'): #check right
      print("GAME RIGHT")
 elif (keyname == 'KP_PageDown'): #x down
      print("GAME DOWN")
 }}}

 Everything works fine until the focus is given to the toolbar.  Then you
 stop getting these events.

 Suggestions?  #4106 & #3776 & #1063 are waiting on this.

-- 
Ticket URL: <https://dev.laptop.org/ticket/4144>
One Laptop Per Child <https://dev.laptop.org>
OLPC bug tracking system



More information about the Bugs mailing list