Mne-python: ENH: Add ctrl+key or alt+key as another way to move in large steps.

Created on 21 May 2020  路  4Comments  路  Source: mne-tools/mne-python

Problem

There is a bug that can occur in the matplotlib tkinter backend that can prevent shift+key combo events from being correctly passed. A shift+key combo is used in mne interactive plots to move in large steps, and the tkinter backend bug can break this feature.

Solution

A good enhancement would be to add the additional keybind ctrl+key or alt+key which performs the same functionality as shift+key in case a user has this bug.

Alternative

Alternatively, using the pyqt5 backend for matplotlib also fixes this bug, but this would require pyqt5 to be installed.

Additional context

This issue was discussed on gitter before posting here.

Most helpful comment

This is slightly off topic (so maybe I should open another issue?), but if someone is reorganising that section of the code it would be really handy to be able to use the modifier key to also make large changes in the time shown per view. e.g. if currently pressing end increases the time shown from 10 to 11 seconds, presssing ctrl+end would double the time view from 10 to 20 seconds.

All 4 comments

Good idea!

+0.5 for ctrl+key over alt+key

This is slightly off topic (so maybe I should open another issue?), but if someone is reorganising that section of the code it would be really handy to be able to use the modifier key to also make large changes in the time shown per view. e.g. if currently pressing end increases the time shown from 10 to 11 seconds, presssing ctrl+end would double the time view from 10 to 20 seconds.

Also +0.5 for ctrl+key. I think this change and @rob-luke's suggestions can be tackled with one PR.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hoechenberger picture hoechenberger  路  6Comments

annesodub picture annesodub  路  3Comments

DanielvdC picture DanielvdC  路  6Comments

SophieHerbst picture SophieHerbst  路  4Comments

SophieHerbst picture SophieHerbst  路  7Comments