-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow individual velocity/pan changes with alt #3923
Conversation
@gandalf3 thanks for the PR! This reads like a bug and should be targeted against |
src/gui/editors/PianoRoll.cpp
Outdated
// Under the cursor, when there is no selection | ||
// Selected, and alt is not pressed | ||
// Under the cursor, selected, and alt is pressed | ||
if ( ( isUnderPosition && !isSelection() ) || \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cosmetic but the \
before the newline is not needed since this line is not part of a preprocessor statement. It's also inconsistent with the formatting of this file.
This commit changes the behavior introduced in 6e3d4f4 to allow using alt to change the velocity of multiple *selected* notes by dragging. I believe this was the originally intended behavior, but it never worked for me.
f12e3ac
to
938b50c
Compare
@tresf Thanks, I've removed the |
if ( ( isUnderPosition && !isSelection() ) || | ||
( n->selected() && !altPressed ) || | ||
( isUnderPosition && n->selected() && altPressed ) | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On Linux <Alt>
+ <Left Mouse Button>
by default moves the whole application window. I think this is true on all desktops. This is nothing you've missed here but I had to change
bool altPressed = me->modifiers() & Qt::AltModifier;
to
bool altPressed = me->modifiers() & Qt::ControlModifier;
in order to test this. It works as intended on Linux with this change applied. My suggestion is to simply change <Alt>
for <Ctrl>
. Two issues fixed.
@zonkmachine Isn't Ctrl drag used for selection? When Ctrl+dragging here I get a box selection. I use Super in place of Alt for window manipulations, as many other programs (e.g. Blender, Inkscape) use Alt + drag for stuff. I don't see a problem with programs using Alt. In fact, <rant> I've never met a single program which binds anything to Super by default, which seems to be conventionally reserved for window managers. Why distros bind Alt to the window manager by default (instead of Super), I do not understand. </rant> Regardless, that's a complaint for distribution maintainers. In my opinion, the solution is to choose shortcuts which make sense without worrying about Alt and permit the user to rebind keys as they see fit. Obviously that's a much bigger task, though I see it already exists: #1475 Anyway, I just wanted to put my two cents in. If I'm mistaken and Ctrl doesn't conflict, I'll happily update the PR. |
I agree with @gandalf3, Alt seems to be the right modifier for this. my distro also doesn't have any shortcuts with Alt, they're all with Super. |
It looks like the Alt + Move Window is a Gnome thing and one that many ask how to disable.
It indeed is. |
Merge? |
Yes. I can confirm that on Ubuntu 14.04 (and likely most other Linux desktops), the ALT key will drag the window, but a valid workaround is to simply add the SHIFT modifier and this feature works as expected. So, hold SHIFT + ALT, then keep holding and click. Side note... there's a bit of order-of-operation issues with modifiers and mouse clicks, but those are existing throughout most of LMMS. i.e. If you click first and then add the modifier afterward, the behavior is different. Fixing these other UX issues should be discussed separately but wanted to mention this incase someone testing this gets hung up. :) |
There are supposedly ways to turn this feature off but so far it hasn't worked for me. It's an upstream anyway. I think this should be merged. |
|
Fix regression caused by 6e3d4f4, allow ALT to change the velocity of multiple selected notes.
This commit changes the behavior introduced in 6e3d4f4 to allow using
alt to change the velocity/panning of multiple selected notes by dragging.
I believe this was the originally intended behavior, but it never worked for me.
Fixes #3914