@@ -2403,39 +2403,6 @@ def stop_event_loop_default(self):
2403
2403
self ._looping = False
2404
2404
2405
2405
2406
- def key_press_handler (event , canvas , toolbar = None ):
2407
- """
2408
- Implement the default mpl key bindings for the canvas and toolbar
2409
- described at :ref:`key-event-handling`
2410
-
2411
- *event*
2412
- a :class:`KeyEvent` instance
2413
- *canvas*
2414
- a :class:`FigureCanvasBase` instance
2415
- *toolbar*
2416
- a :class:`NavigationToolbar2` instance
2417
-
2418
- """
2419
- if event .inaxes is None :
2420
- return
2421
-
2422
- elif (event .key .isdigit () and event .key != '0
DA53
39; ) or event .key in all :
2423
- # keys in list 'all' enables all axes (default key 'a'),
2424
- # otherwise if key is a number only enable this particular axes
2425
- # if it was the axes, where the event was raised
2426
- if not (event .key in all ):
2427
- n = int (event .key ) - 1
2428
- for i , a in enumerate (canvas .figure .get_axes ()):
2429
- # consider axes, in which the event was raised
2430
- # FIXME: Why only this axes?
2431
- if event .x is not None and event .y is not None \
2432
- and a .in_axes (event ):
2433
- if event .key in all :
2434
- a .set_navigate (True )
2435
- else :
2436
- a .set_navigate (i == n )
2437
-
2438
-
2439
2406
class NonGuiException (Exception ):
2440
2407
pass
2441
2408
@@ -2461,7 +2428,7 @@ def __init__(self, figure, event=None):
2461
2428
self .activate (event )
2462
2429
2463
2430
def activate (self , event ):
2464
- print ( 'Without action:' , self . name , self . description )
2431
+ pass
2465
2432
2466
2433
2467
2434
class ToolQuit (ToolBase ):
0 commit comments