Check for a valid shortcut to be displayed. - GTK will never send 'cmd+' (see `FigureCanvasGTK4._get_key`). - The shortcut window only shows keyboard shortcuts, not mouse buttons.
(self, key)
| 568 | return ''.join(mods) + key |
| 569 | |
| 570 | def _is_valid_shortcut(self, key): |
| 571 | """ |
| 572 | Check for a valid shortcut to be displayed. |
| 573 | |
| 574 | - GTK will never send 'cmd+' (see `FigureCanvasGTK4._get_key`). |
| 575 | - The shortcut window only shows keyboard shortcuts, not mouse buttons. |
| 576 | """ |
| 577 | return 'cmd+' not in key and not key.startswith('MouseButton.') |
| 578 | |
| 579 | def trigger(self, *args): |
| 580 | section = Gtk.ShortcutsSection() |