napari: 'Alt' modifier key not being detected when used alone on linux
🐛 Bug
The ‘Alt’ modifier key is not being detected in a mouse callback on a Linux system here, printing event.modifiers
shows an empty tuple. This works as expected on my mac.
Interestingly, ‘Control’ + ‘Alt’ is working absolutely fine on the same linux box
To Reproduce
import napari
def callback(viewer, event):
print(event.modifiers)
viewer = napari.Viewer()
viewer.mouse_drag_callbacks.append(callback)
napari.run()
Expected behavior
Environment
lg7-1g_vchandra> napari --info napari: 0.4.17 Platform: Linux-4.18.0-425.13.1.el8_7.x86_64-x86_64-with-glibc2.28 Python: 3.10.7 (main, Sep 9 2022, 12:08:13) [GCC 12.1.0] Qt: 5.15.2 PyQt5: 5.15.9 NumPy: 1.24.2 SciPy: 1.10.1 Dask: 2023.2.0 VisPy: 0.11.0 magicgui: 0.6.1 superqt: unknown in-n-out: 0.1.6 app-model: 0.1.1 npe2: 0.6.2
OpenGL:
- GL version: 4.6.0 NVIDIA 470.86
- MAX_TEXTURE_SIZE: 16384
Screens:
- screen 1: resolution 1920x1080, scale 1.0
Plugins:
- napari: 0.4.17 (77 contributions)
- napari-console: 0.0.7 (0 contributions)
- napari-svg: 0.1.6 (2 contributions)
- napari-threedee: 0.0.3 (18 contributions)
Additional context
reported by Vish Chandrasekaran @ichbintux
About this issue
- Original URL
- State: open
- Created a year ago
- Comments: 22 (11 by maintainers)
True, neither registered alone - only the left registered when pressed with ‘Control’
lol, On my machine both left and right
Alt
work just fine xD