Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 846864e

Browse filesBrowse files
authored
Merge pull request #23079 from greglucas/dep-canvas-keypress
MNT: Remove key_press and button_press from FigureManager
2 parents 2117b5e + 32835b2 commit 846864e
Copy full SHA for 846864e

File tree

Expand file treeCollapse file tree

2 files changed

+5
-17
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+5
-17
lines changed
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
``key_press`` and ``button_press`` have been removed from FigureManager
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
4+
Trigger the events directly on the canvas using
5+
``canvas.callbacks.process(event.name, event)`` for key and button events.

‎lib/matplotlib/backend_bases.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backend_bases.py
-17Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2816,23 +2816,6 @@ def full_screen_toggle(self):
28162816
def resize(self, w, h):
28172817
"""For GUI backends, resize the window (in physical pixels)."""
28182818

2819-
@_api.deprecated(
2820-
"3.4", alternative="self.canvas.callbacks.process(event.name, event)")
2821-
def key_press(self, event):
2822-
"""
2823-
Implement the default Matplotlib key bindings defined at
2824-
:ref:`key-event-handling`.
2825-
"""
2826-
if rcParams['toolbar'] != 'toolmanager':
2827-
key_press_handler(event)
2828-
2829-
@_api.deprecated(
2830-
"3.4", alternative="self.canvas.callbacks.process(event.name, event)")
2831-
def button_press(self, event):
2832-
"""The default Matplotlib button actions for extra mouse buttons."""
2833-
if rcParams['toolbar'] != 'toolmanager':
2834-
button_press_handler(event)
2835-
28362819
def get_window_title(self):
28372820
"""
28382821
Return the title text of the window containing the figure, or None

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.