qlcplus icon indicating copy to clipboard operation
qlcplus copied to clipboard

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

Open Pac72 opened this issue 1 year ago • 9 comments
trafficstars

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

Pac72 avatar Jun 13 '24 00:06 Pac72

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

yestalgia avatar Jun 13 '24 08:06 yestalgia

@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.

mcallegari avatar Jun 16 '24 07:06 mcallegari

Coverage Status

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

coveralls avatar Jun 16 '24 07:06 coveralls

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

Pac72 avatar Jun 16 '24 12:06 Pac72

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 avatar Jun 16 '24 16:06 qfulmina

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

In the scope of inputting to a Duration Widget:

  • PgUp and PgDown never bubble up (not even when reaching the end).
  • Numbers are always consumed completely by the text inputs without ever bubbling up.
  • Space is always consumed completly by each input.
  • Return always bubbles through.

qfulmina avatar Jun 16 '24 16:06 qfulmina

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 avatar Jun 16 '24 18:06 Pac72

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

Pac72 avatar Jun 18 '24 22:06 Pac72

Coverage Status

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

coveralls avatar Jun 19 '24 09:06 coveralls

Development is going on with #1586, we can close this.

Pac72 avatar Jun 08 '25 08:06 Pac72