set_keybindings#
- stellarphot.gui_tools.set_keybindings(image_widget, scroll_zoom=False)[source]#
Set image widget keyboard bindings. The bindings are:
Pan by click-and-drag or with arrow keys.
Zoom by scrolling or using the
+/-keys.Adjust contrast by Ctrl-right click and drag
Reset contrast with shift-right-click.
Any existing key bindings are removed.
- Parameters:
- image_widget
astrowidgets.ImageWidget Image widget on which to set the key bindings.
- scroll_zoombool, optional
If True, zooming can be done by scrolling the mouse wheel. Default is False.
- image_widget
- Returns:
- None
Adds key bindings to the image widget.