<div dir="ltr">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.<div><br></div>
<div>James Simmons</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Feb 19, 2014 at 2:52 AM, James Simmons <span dir="ltr"><<a href="mailto:nicestep@gmail.com" target="_blank">nicestep@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Alan,<div><br></div><div>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:</div>
<div><br>
</div><div><div>Key KP_Add unrecognized</div><div>Key KP_Add unrecognized</div><div>Key KP_Add unrecognized</div><div>Key KP_Add unrecognized</div><div>Key KP_Add unrecognized</div><div>Key KP_Add unrecognized</div><div>
Key KP_Add unrecognized</div>
<div>Key KP_Add unrecognized</div><div>Key KP_Add unrecognized</div><div>Key KP_Add unrecognized</div><div>Key KP_Add unrecognized</div><div>Key KP_Add unrecognized</div><div>Key KP_Add unrecognized</div><div>Key KP_Add unrecognized</div>
<div>Key KP_Subtract unrecognized</div><div>Key KP_Subtract unrecognized</div><div>Key KP_Subtract unrecognized</div><div>Key KP_Subtract unrecognized</div><div>Key KP_Subtract unrecognized</div><div>Key KP_Subtract unrecognized</div>
<div>Key KP_Add unrecognized</div><div>Key KP_Add unrecognized</div><div>Key KP_Add unrecognized</div><div>Key KP_Add unrecognized</div><div>Key KP_Add unrecognized</div><div>Key KP_Add unrecognized</div><div>Key KP_Add unrecognized</div>
<div>Key KP_Add unrecognized</div><div>Key KP_Add unrecognized</div><div>Key KP_Add unrecognized</div><div>Key Num_Lock unrecognized</div><div>Key KP_Add unrecognized</div><div>Key KP_Add unrecognized</div><div>Key KP_Add unrecognized</div>
<div>Key KP_Add unrecognized</div><div>Key KP_Add unrecognized</div><div>Key KP_Add unrecognized</div><div>Key KP_Subtract unrecognized</div><div>Key KP_Subtract unrecognized</div><div>Key KP_Subtract unrecognized</div><div>
Key KP_Subtract unrecognized</div><div>Key KP_Subtract unrecognized</div><div>Key KP_Subtract unrecognized</div><div>Key KP_Subtract unrecognized</div><div>Key KP_Subtract unrecognized</div><div>Key KP_4 unrecognized</div>
<div>Key KP_4 unrecognized</div><div>Key KP_4 unrecognized</div><div>Key KP_4 unrecognized</div><div>Key KP_4 unrecognized</div><div>Key KP_4 unrecognized</div><div>Key KP_4 unrecognized</div><div>Key KP_4 unrecognized</div>
<div>Key KP_4 unrecognized</div><div>Key KP_4 unrecognized</div><div>Key KP_6 unrecognized</div><div>Key KP_6 unrecognized</div><div>Key KP_6 unrecognized</div><div>Key KP_6 unrecognized</div><div>Key KP_6 unrecognized</div>
<div>Key KP_6 unrecognized</div><div>Key KP_6 unrecognized</div><div>Key KP_6 unrecognized</div><div>Key KP_8 unrecognized</div><div>Key KP_8 unrecognized</div><div>Key KP_8 unrecognized</div><div>Key KP_8 unrecognized</div>
<div>Key KP_8 unrecognized</div><div>Key KP_8 unrecognized</div><div>Key KP_2 unrecognized</div><div>Key KP_2 unrecognized</div><div>Key KP_2 unrecognized</div><div>Key KP_2 unrecognized</div><div>Key KP_2 unrecognized</div>
<div>Key KP_2 unrecognized</div><div>Key KP_8 unrecognized</div><div>Key KP_8 unrecognized</div><div>Key KP_8 unrecognized</div><div>Key KP_8 unrecognized</div><div>Key KP_8 unrecognized</div><div>Key KP_8 unrecognized</div>
<div>Key KP_4 unrecognized</div><div>Key KP_4 unrecognized</div><div>Key KP_4 unrecognized</div><div>Key KP_4 unrecognized</div><div>Key KP_4 unrecognized</div><div>Key KP_4 unrecognized</div><div>Key KP_6 unrecognized</div>
<div>Key KP_6 unrecognized</div><div>Key KP_6 unrecognized</div><div>Key KP_6 unrecognized</div><div>Key KP_6 unrecognized</div><div>Key KP_6 unrecognized</div><div>Key KP_Subtract unrecognized</div><div>Key KP_Subtract unrecognized</div>
<div>Key KP_Subtract unrecognized</div><div>Key KP_Subtract unrecognized</div><div>Key KP_Subtract unrecognized</div><div>Key KP_Subtract unrecognized</div><div>Key KP_Add unrecognized</div><div>Key KP_Add unrecognized</div>
<div>Key KP_Add unrecognized</div><div>Key KP_Add unrecognized</div><div>Key KP_Add unrecognized</div><div>Key KP_Add unrecognized</div><div>Key Scroll_Lock unrecognized</div><div>Key Scroll_Lock unrecognized</div><div>Key Scroll_Lock unrecognized</div>
<div>Key Scroll_Lock unrecognized</div><div>Key KP_8 unrecognized</div><div>Key KP_8 unrecognized</div><div>Key KP_8 unrecognized</div><div>Key KP_8 unrecognized</div><div>Key KP_8 unrecognized</div><div>Key KP_8 unrecognized</div>
<div>Key KP_8 unrecognized</div><div>Key KP_8 unrecognized</div><div>Key KP_2 unrecognized</div><div>Key KP_2 unrecognized</div><div>Key KP_2 unrecognized</div><div>Key KP_2 unrecognized</div><div>Key KP_2 unrecognized</div>
<div>Key KP_2 unrecognized</div><div>Key KP_4 unrecognized</div><div>Key KP_4 unrecognized</div><div>Key KP_4 unrecognized</div><div>Key KP_4 unrecognized</div><div>Key KP_4 unrecognized</div><div>Key KP_4 unrecognized</div>
<div>Key KP_6 unrecognized</div><div>Key KP_6 unrecognized</div><div>Key KP_6 unrecognized</div><div>Key KP_6 unrecognized</div><div>Key KP_6 unrecognized</div><div>Key KP_6 unrecognized</div><div>Key KP_6 unrecognized</div>
<div>Key KP_6 unrecognized</div><div>Key KP_6 unrecognized</div><div>Key KP_6 unrecognized</div><div>Key KP_6 unrecognized</div><div>Key KP_6 unrecognized</div><div>Key KP_Add unrecognized</div><div>Key KP_Add unrecognized</div>
<div>Key KP_Add unrecognized</div><div>Key KP_Add unrecognized</div><div>Key KP_Add unrecognized</div><div>Key KP_Add unrecognized</div><div>Key KP_Subtract unrecognized</div><div>Key KP_Subtract unrecognized</div><div>Key KP_Subtract unrecognized</div>
<div>Key KP_Subtract unrecognized</div><div>Key KP_Subtract unrecognized</div><div>Key KP_Subtract unrecognized</div><div>Key KP_Subtract unrecognized</div><div>Key KP_Subtract unrecognized</div><div>Key KP_Subtract unrecognized</div>
<div>Key KP_Subtract unrecognized</div><div>Key KP_Add unrecognized</div><div>Key KP_Add unrecognized</div><div>Key KP_Add unrecognized</div><div>Key KP_Add unrecognized</div><div>Key KP_Add unrecognized</div><div>Key KP_Add unrecognized</div>
<div>Key KP_Subtract unrecognized</div><div>Key KP_Subtract unrecognized</div><div>Key KP_Subtract unrecognized</div><div>Key KP_Subtract unrecognized</div><div>Key KP_Subtract unrecognized</div><div>Key KP_Subtract unrecognized</div>
<div>Key KP_Subtract unrecognized</div><div>Key KP_Subtract unrecognized</div><div>Key KP_Subtract unrecognized</div><div>Key KP_Subtract unrecognized</div><div>Key KP_Subtract unrecognized</div><div>Key KP_Subtract unrecognized</div>
<div>Key KP_Subtract unrecognized</div><div>Key KP_Subtract unrecognized</div><div>Key KP_Add unrecognized</div><div>Key KP_Add unrecognized</div><div>Key KP_Add unrecognized</div><div>Key KP_Add unrecognized</div><div>Key KP_Add unrecognized</div>
<div>Key KP_Add unrecognized</div><div>Key KP_Subtract unrecognized</div><div>Key KP_Subtract unrecognized</div><div>Key KP_Subtract unrecognized</div><div>Key KP_Subtract unrecognized</div><div>Key KP_Subtract unrecognized</div>
<div>Key KP_Subtract unrecognized</div><div>Key KP_Subtract unrecognized</div><div>Key KP_Subtract unrecognized</div><div>Key KP_Subtract unrecognized</div><div>Key KP_Subtract unrecognized</div><div>Key KP_Subtract unrecognized</div>
<div>Key KP_Subtract unrecognized</div><div>Key KP_Subtract unrecognized</div><div>Key KP_Subtract unrecognized</div><div>Key KP_Subtract unrecognized</div><div>Key KP_Subtract unrecognized</div><div>Key KP_Add unrecognized</div>
<div>Key KP_Add unrecognized</div><div>Key KP_Add unrecognized</div><div>Key KP_Add unrecognized</div><div>Key KP_Add unrecognized</div><div>Key KP_Add unrecognized</div></div><div><br></div><div>This is not coming from my code. I see a Translator class in sugargame/events.py that may be the culprit.</div>
<span class="HOEnZb"><font color="#888888">
<div><br></div><div>James Simmons</div><div><br></div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Feb 18, 2014 at 6:37 PM, Alan Jhonn Aguiar Schwyn <span dir="ltr"><<a href="mailto:alanjas@hotmail.com" target="_blank">alanjas@hotmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div dir="ltr">Hi,<div><br></div><div>The problem of no keyboards events appears in GTK-2 too.</div><div>Maybe you need "grab_focus" to get them. See the function:</div><div><br></div><div>_pygamecanvas.grab_focus()</div>
<div><br></div><div>This is my code for Conozco America activity:</div><div><br></div><div><div>self.actividad = conozco.Conozco(self)</div><div>self._pygamecanvas = sugargame.canvas.PygameCanvas(self)</div><div>self.set_canvas(self._pygamecanvas)</div>
<div>self._pygamecanvas.grab_focus()</div><div>self._pygamecanvas.run_pygame(self.actividad.principal)</div><div><br></div><br><div>> Date: Wed, 19 Feb 2014 09:03:58 +1100<br>> From: <a href="mailto:quozl@laptop.org" target="_blank">quozl@laptop.org</a><br>
> To: <a href="mailto:sugar-devel@lists.sugarlabs.org" target="_blank">sugar-devel@lists.sugarlabs.org</a><br>> Subject: Re: [Sugar-devel] PyGame/ Sugargame issues with GTK 3<div><div><br>> <br>> G'day James,<br>
> <br>> I've not seen this problem myself, nor have I tried, but I shall<br>> speculate:<br>> <br>> - make sure the window has focus; without focus the events may not be<br>> delivered, and I have a vague memory of focus manipulation in one of<br>
> the pygame/gtk toolkits,<br>> <br>> - add code to sugargame temporarily to print received events, in an<br>> attempt to diagnose which half of the stack is misbehaving.<br>> <br>> -- <br>> James Cameron<br>
> <a href="http://quozl.linux.org.au/" target="_blank">http://quozl.linux.org.au/</a><br>> _______________________________________________<br>> Sugar-devel mailing list<br>> <a href="mailto:Sugar-devel@lists.sugarlabs.org" target="_blank">Sugar-devel@lists.sugarlabs.org</a><br>
> <a href="http://lists.sugarlabs.org/listinfo/sugar-devel" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br></div></div></div></div> </div></div>
<br>_______________________________________________<br>
Sugar-devel mailing list<br>
<a href="mailto:Sugar-devel@lists.sugarlabs.org" target="_blank">Sugar-devel@lists.sugarlabs.org</a><br>
<a href="http://lists.sugarlabs.org/listinfo/sugar-devel" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
<br></blockquote></div><br></div>
</div></div></blockquote></div><br></div>