Shift+Arrow key events not detected in osx backend · Issue #9835 · matplotlib/matplotlib · GitHub
Skip to content

Shift+Arrow key events not detected in osx backend #9835

Description

@cbrnr

Consider the following example code:

import matplotlib.pyplot as plt
fig = plt.figure()

def on_key(event):
    print('you pressed', event.key, event.xdata, event.ydata)

fig.canvas.mpl_connect('key_press_event', on_key)

Now when I run this code and press Shift+Left Arrow, the qt5 backend correctly detects this event as shift+left. However, the osx backend (which AFAIK is the default backend on macOS) doesn't register the shift key at all, I only get left. Is it possible to fix this somehow?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions