mcallegari / qlcplus

Q Light Controller Plus (QLC+) is a free and cross-platform software to control DMX or analog lighting systems like moving heads, dimmers, scanners etc. This project is a fork of the great QLC project written by Heikki Junnila that aims to continue the QLC development and to introduce new features.
Apache License 2.0
918 stars 349 forks source link

Let cursor keys and PgUp/PgDown work as key combination on VCButtons #1584

Open Pac72 opened 3 weeks ago

Pac72 commented 3 weeks ago

As stated on #1443, PgUp, PgDown and cursor keys do not work when configured as key combination on VCButtons. This happens because the QScrollArea hosting the controls intercepts these keys to move around the scroll area.

This change lets the mentioned keys pass through to the buttons when the user chooses them, but, of course, the keys chosen as key combinations will not be used to move around on the scroll area, since it would be way confusing to keep both functions.

Closes #1443

yestalgia commented 3 weeks ago

Nice work - When a build becomes available I'll give it a test.

mcallegari commented 3 weeks ago

@Pac72 thanks for this. For now I have just one comment. Please stick to the rest of the project code indentation: parenthesis go to new line.

coveralls commented 3 weeks ago

Coverage Status

coverage: 32.052% (+0.02%) from 32.034% when pulling dcd746bdecffad136d50416c751dcc68d99e73a2 on Pac72:issue-1443 into 3424652e0e7faddfb564c60c0c806e6df1fd5465 on mcallegari:master.

Pac72 commented 3 weeks ago

@mcallegari sure, sorry for that. Now the indentation should be ok.

qfulmina commented 3 weeks ago

Hi, thanks for your contribution (indeed one I could make use of).

I tested a bit using the generated AppImage. As you state, it (unfortunately) only works for VCButtons (yet) and not for e.g. Cue Lists.

Speaking of which, PgUp and PgDown are consumed by Cue Lists if in focus up until the upper or lower end of the list is reached. Only then PgUp and PgDown bubble up and trigger any key combination event.

I think it would be best if Cue Lists were supported as well. (For e.g. being able to trigger the next Cue with PgDown etc.)

qfulmina commented 3 weeks ago

Interestingly special keys like Space, Return, PgUp/PgDown, or Numbers are treated differently.

In the scope of inputting to a Duration Widget:

Pac72 commented 3 weeks ago

Hi @qfulmina

I tested a bit using the generated AppImage. As you state, it (unfortunately) only works for VCButtons (yet) and not for e.g. Cue Lists.

@me guilty again. I did not understand the issue was general and so I specifically selected the VCButtons :-/

I think it would be best if Cue Lists were supported as well. (For e.g. being able to trigger the next Cue with PgDown etc.)

I'll try to cover also the other controls.

Pac72 commented 2 weeks ago

Hi everyone. I tried a different approach with #1586 If you like it better, this pull request can be closed.

coveralls commented 2 weeks ago

Coverage Status

coverage: 32.052% (+0.02%) from 32.034% when pulling 782aec473da2a89838dd1fd9044194baa423338c on Pac72:issue-1443 into 3424652e0e7faddfb564c60c0c806e6df1fd5465 on mcallegari:master.