From: Benjamin R. <ben...@ou...> - 2012-07-03 16:29:01
|
On Mon, Jul 2, 2012 at 4:33 AM, <Jea...@hz...> wrote: > Hi all! > > How can I use the keyboard events up/down/right/left without starting an > interaction with the navigation toolbar? > I connected to the keypress events and everything looks ok until I press > the down key: my connected method gets called once and the navigation > toolbar then gets the focus. From that point on it catches all of my arrow > presses. > I noticed that using shifted keys could be a workaround but I really do > not like it... > > > Thanks in advance for help! > > cheers JF > > > Yeah, this is annoying. A quick way out is to hit the ESC button. Took me forever to figure that out. The more permanent fix is to remove the 'up' and 'down' events from the default key maps. I have some code that needed their own keymap and I checked for collisions with the default keymap: https://github.com/WeatherGod/BRadar/blob/master/lib/BRadar/plotutils.py#L408 Might be overkill for what you need, but you should get the idea. Cheers! Ben Root |