Hey Emiliano,<div><br></div><div>It depends on what value you return from your key_press_event handler. </div><div><br></div><div>If you return False (the default), the event is passed on to other event handlers including the keyboard navigation one. </div>
<div>If you return True, no other event handlers will be processed so keyboard navigation will be avoided.<br><div><div><br></div><div>-Wade</div><div><br><div class="gmail_quote">On Wed, Mar 4, 2009 at 11:22 AM, Emiliano Pastorino <span dir="ltr"><<a href="mailto:epastorino@plan.ceibal.edu.uy">epastorino@plan.ceibal.edu.uy</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi everyone!<br><br>I'm writing an activity that uses left, right, up and down keys<br> and four buttons which I want to associate to a key_press_event.<br>
My problem is that when you press the up arrow a few times, <br>
you get focus on the activity toolbar, and then if you press left or<br>right, you get focus through the activity toolbar buttons.<br><br>I've tried grab_focus() when you press a key, but I'm still getting<br>focus on the activity toolbar for an instant. I've seen that some<br>
activities never get focus on the activity toolbar when you press<br>the arrow keys, but I couldn't find where to set that behaviour.<br><br>Also, related to this, I want to have a button associated to a<br>key_press_event when "Enter" is pressed, but when you press<br>
"Enter", it simulates a click on the button which has focus, and<br>that causes a funny behaviour when you already have focus on<br>the corresponding button.<br><br>Summarizing... I need not to focus ever on any button, is that<br>
possible? I'm using gtk.Button only...<br><br>Thanks!<br clear="all"><font color="#888888"><br>-- <br>Ing. Emiliano Pastorino<br>LATU - Plan Ceibal<br>Av. Italia 6201 CP: 11500, Montevideo, Uruguay<br>Tel: (598 2) 601 5773 int.: 210<br>
</font><br>_______________________________________________<br>
Sugar-devel mailing list<br>
<a href="mailto:Sugar-devel@lists.sugarlabs.org">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>