Hi Ben,
thanks for the tip!
I nevertheless hit another snag:
In [12]: [(k,p.rcParams[k]) for k in p.rcParams.keys() if 'keymap' in k]
Out[12]:
[('keymap.all_axes', ['a']),
('keymap.back', ['left', 'c', 'backspace']),
('keymap.forward', ['right', 'v']),
('keymap.fullscreen', ['f']),
('keymap.grid', ['g']),
('keymap.home', ['h', 'r', 'home']),
('keymap.pan', ['p']),
('keymap.save', ['s']),
('keymap.xscale', ['k', 'L']),
('keymap.yscale', ['l']),
('keymap.zoom', ['o'])]
Meaning that up and down ar not in the mapping... Any clue?
Thanks again
Cheers
JF
-
Helmholtz Zentrum Geesthacht
Institut für Werkstoffforschung
Abteilung WPN, Instrument REFSANS
Lichtenbergstr. 1
85747 Garching FRM II
Tel.: +49 (0)89 289 10762
Internet: http://www.frm2.tum.de
[email protected] schrieb: -----
An: [email protected]
Von: Benjamin Root
Gesendet von: [email protected]
Datum: 07/03/2012 06:29PM
Kopie: [email protected]
Betreff: Re: [Matplotlib-users] conflicts with navigation bar events
On Mon, Jul 2, 2012 at 4:33 AM, <[email protected]> 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
Helmholtz-Zentrum Geesthacht
Zentrum für Material- und Küstenforschung GmbH
Max-Planck-Straße 1 I 21502 Geesthacht I Deutschland/Germany
Geschäftsführer/Board of Management: Prof. Dr. Wolfgang Kaysser, Dipl.-Ing.
Michael Ganß
Vorsitzender des Aufsichtsrates/Chairman of the Supervisory Board: MinDirig
Wilfried Kraus
Amtsgericht Lübeck HRB 285 GE (Register Court)
Internet: http://www.hzg.de
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users