[Sugar-devel] PyGame/ Sugargame issues with GTK 3

James Simmons nicestep at gmail.com
Wed Feb 19 04:26:45 EST 2014


It occurs to me to ask if sugargame is still something you need to copy the
code into your activity to use or if it is part of sugar proper. I'm still
taking the latest code and copying it in.

James Simmons



On Wed, Feb 19, 2014 at 2:52 AM, James Simmons <nicestep at gmail.com> wrote:

> Alan,
>
> Grabbing focus definitely helped. I get the arrow keys now. However, I
> also use the plus and minus keys and I still don't get them. In the logs I
> see these messages:
>
> Key KP_Add unrecognized
> Key KP_Add unrecognized
> Key KP_Add unrecognized
> Key KP_Add unrecognized
> Key KP_Add unrecognized
> Key KP_Add unrecognized
> Key KP_Add unrecognized
> Key KP_Add unrecognized
> Key KP_Add unrecognized
> Key KP_Add unrecognized
> Key KP_Add unrecognized
> Key KP_Add unrecognized
> Key KP_Add unrecognized
> Key KP_Add unrecognized
> Key KP_Subtract unrecognized
> Key KP_Subtract unrecognized
> Key KP_Subtract unrecognized
> Key KP_Subtract unrecognized
> Key KP_Subtract unrecognized
> Key KP_Subtract unrecognized
> Key KP_Add unrecognized
> Key KP_Add unrecognized
> Key KP_Add unrecognized
> Key KP_Add unrecognized
> Key KP_Add unrecognized
> Key KP_Add unrecognized
> Key KP_Add unrecognized
> Key KP_Add unrecognized
> Key KP_Add unrecognized
> Key KP_Add unrecognized
> Key Num_Lock unrecognized
> Key KP_Add unrecognized
> Key KP_Add unrecognized
> Key KP_Add unrecognized
> Key KP_Add unrecognized
> Key KP_Add unrecognized
> Key KP_Add unrecognized
> Key KP_Subtract unrecognized
> Key KP_Subtract unrecognized
> Key KP_Subtract unrecognized
> Key KP_Subtract unrecognized
> Key KP_Subtract unrecognized
> Key KP_Subtract unrecognized
> Key KP_Subtract unrecognized
> Key KP_Subtract unrecognized
> Key KP_4 unrecognized
> Key KP_4 unrecognized
> Key KP_4 unrecognized
> Key KP_4 unrecognized
> Key KP_4 unrecognized
> Key KP_4 unrecognized
> Key KP_4 unrecognized
> Key KP_4 unrecognized
> Key KP_4 unrecognized
> Key KP_4 unrecognized
> Key KP_6 unrecognized
> Key KP_6 unrecognized
> Key KP_6 unrecognized
> Key KP_6 unrecognized
> Key KP_6 unrecognized
> Key KP_6 unrecognized
> Key KP_6 unrecognized
> Key KP_6 unrecognized
> Key KP_8 unrecognized
> Key KP_8 unrecognized
> Key KP_8 unrecognized
> Key KP_8 unrecognized
> Key KP_8 unrecognized
> Key KP_8 unrecognized
> Key KP_2 unrecognized
> Key KP_2 unrecognized
> Key KP_2 unrecognized
> Key KP_2 unrecognized
> Key KP_2 unrecognized
> Key KP_2 unrecognized
> Key KP_8 unrecognized
> Key KP_8 unrecognized
> Key KP_8 unrecognized
> Key KP_8 unrecognized
> Key KP_8 unrecognized
> Key KP_8 unrecognized
> Key KP_4 unrecognized
> Key KP_4 unrecognized
> Key KP_4 unrecognized
> Key KP_4 unrecognized
> Key KP_4 unrecognized
> Key KP_4 unrecognized
> Key KP_6 unrecognized
> Key KP_6 unrecognized
> Key KP_6 unrecognized
> Key KP_6 unrecognized
> Key KP_6 unrecognized
> Key KP_6 unrecognized
> Key KP_Subtract unrecognized
> Key KP_Subtract unrecognized
> Key KP_Subtract unrecognized
> Key KP_Subtract unrecognized
> Key KP_Subtract unrecognized
> Key KP_Subtract unrecognized
> Key KP_Add unrecognized
> Key KP_Add unrecognized
> Key KP_Add unrecognized
> Key KP_Add unrecognized
> Key KP_Add unrecognized
> Key KP_Add unrecognized
> Key Scroll_Lock unrecognized
> Key Scroll_Lock unrecognized
> Key Scroll_Lock unrecognized
> Key Scroll_Lock unrecognized
> Key KP_8 unrecognized
> Key KP_8 unrecognized
> Key KP_8 unrecognized
> Key KP_8 unrecognized
> Key KP_8 unrecognized
> Key KP_8 unrecognized
> Key KP_8 unrecognized
> Key KP_8 unrecognized
> Key KP_2 unrecognized
> Key KP_2 unrecognized
> Key KP_2 unrecognized
> Key KP_2 unrecognized
> Key KP_2 unrecognized
> Key KP_2 unrecognized
> Key KP_4 unrecognized
> Key KP_4 unrecognized
> Key KP_4 unrecognized
> Key KP_4 unrecognized
> Key KP_4 unrecognized
> Key KP_4 unrecognized
> Key KP_6 unrecognized
> Key KP_6 unrecognized
> Key KP_6 unrecognized
> Key KP_6 unrecognized
> Key KP_6 unrecognized
> Key KP_6 unrecognized
> Key KP_6 unrecognized
> Key KP_6 unrecognized
> Key KP_6 unrecognized
> Key KP_6 unrecognized
> Key KP_6 unrecognized
> Key KP_6 unrecognized
> Key KP_Add unrecognized
> Key KP_Add unrecognized
> Key KP_Add unrecognized
> Key KP_Add unrecognized
> Key KP_Add unrecognized
> Key KP_Add unrecognized
> Key KP_Subtract unrecognized
> Key KP_Subtract unrecognized
> Key KP_Subtract unrecognized
> Key KP_Subtract unrecognized
> Key KP_Subtract unrecognized
> Key KP_Subtract unrecognized
> Key KP_Subtract unrecognized
> Key KP_Subtract unrecognized
> Key KP_Subtract unrecognized
> Key KP_Subtract unrecognized
> Key KP_Add unrecognized
> Key KP_Add unrecognized
> Key KP_Add unrecognized
> Key KP_Add unrecognized
> Key KP_Add unrecognized
> Key KP_Add unrecognized
> Key KP_Subtract unrecognized
> Key KP_Subtract unrecognized
> Key KP_Subtract unrecognized
> Key KP_Subtract unrecognized
> Key KP_Subtract unrecognized
> Key KP_Subtract unrecognized
> Key KP_Subtract unrecognized
> Key KP_Subtract unrecognized
> Key KP_Subtract unrecognized
> Key KP_Subtract unrecognized
> Key KP_Subtract unrecognized
> Key KP_Subtract unrecognized
> Key KP_Subtract unrecognized
> Key KP_Subtract unrecognized
> Key KP_Add unrecognized
> Key KP_Add unrecognized
> Key KP_Add unrecognized
> Key KP_Add unrecognized
> Key KP_Add unrecognized
> Key KP_Add unrecognized
> Key KP_Subtract unrecognized
> Key KP_Subtract unrecognized
> Key KP_Subtract unrecognized
> Key KP_Subtract unrecognized
> Key KP_Subtract unrecognized
> Key KP_Subtract unrecognized
> Key KP_Subtract unrecognized
> Key KP_Subtract unrecognized
> Key KP_Subtract unrecognized
> Key KP_Subtract unrecognized
> Key KP_Subtract unrecognized
> Key KP_Subtract unrecognized
> Key KP_Subtract unrecognized
> Key KP_Subtract unrecognized
> Key KP_Subtract unrecognized
> Key KP_Subtract unrecognized
> Key KP_Add unrecognized
> Key KP_Add unrecognized
> Key KP_Add unrecognized
> Key KP_Add unrecognized
> Key KP_Add unrecognized
> Key KP_Add unrecognized
>
> This is not coming from my code. I see a Translator class in
> sugargame/events.py that may be the culprit.
>
> James Simmons
>
>
>
> On Tue, Feb 18, 2014 at 6:37 PM, Alan Jhonn Aguiar Schwyn <
> alanjas at hotmail.com> wrote:
>
>> Hi,
>>
>> The problem of no keyboards events appears in GTK-2 too.
>> Maybe you need "grab_focus" to get them. See the function:
>>
>> _pygamecanvas.grab_focus()
>>
>> This is my code for Conozco America activity:
>>
>> self.actividad = conozco.Conozco(self)
>> self._pygamecanvas = sugargame.canvas.PygameCanvas(self)
>> self.set_canvas(self._pygamecanvas)
>> self._pygamecanvas.grab_focus()
>> self._pygamecanvas.run_pygame(self.actividad.principal)
>>
>>
>> > Date: Wed, 19 Feb 2014 09:03:58 +1100
>> > From: quozl at laptop.org
>> > To: sugar-devel at lists.sugarlabs.org
>> > Subject: Re: [Sugar-devel] PyGame/ Sugargame issues with GTK 3
>>
>> >
>> > G'day James,
>> >
>> > I've not seen this problem myself, nor have I tried, but I shall
>> > speculate:
>> >
>> > - make sure the window has focus; without focus the events may not be
>> > delivered, and I have a vague memory of focus manipulation in one of
>> > the pygame/gtk toolkits,
>> >
>> > - add code to sugargame temporarily to print received events, in an
>> > attempt to diagnose which half of the stack is misbehaving.
>> >
>> > --
>> > James Cameron
>> > http://quozl.linux.org.au/
>> > _______________________________________________
>> > Sugar-devel mailing list
>> > Sugar-devel at lists.sugarlabs.org
>> > http://lists.sugarlabs.org/listinfo/sugar-devel
>>
>> _______________________________________________
>> Sugar-devel mailing list
>> Sugar-devel at lists.sugarlabs.org
>> http://lists.sugarlabs.org/listinfo/sugar-devel
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20140219/9526a229/attachment-0001.html>


More information about the Sugar-devel mailing list