quicktile icon indicating copy to clipboard operation
quicktile copied to clipboard

Display a warning if ModMask and per-binding modifiers overlap in potentially confusing ways

Open MintDja opened this issue 4 years ago • 8 comments

At the moment, at home and at work, I use the LinuxMint 19.3 system on which everything works successfully. At the weekend I decided to try LinuhMint 20.1 XFCE at home after debian 10. Both on one and on the other system, the filmed behavior is observed. Windows move around the hotkey, but do not resize. Regards https://youtu.be/wGqtHBpTUak

MintDja avatar Jan 26 '21 13:01 MintDja

It's probably because you changed ModMask to include <Shift> but didn't delete or change these lines from your config file:

<Shift>KP_1 = move-to-bottom-left
<Shift>KP_2 = move-to-bottom
<Shift>KP_3 = move-to-bottom-right
<Shift>KP_4 = move-to-left
<Shift>KP_5 = move-to-center
<Shift>KP_6 = move-to-right
<Shift>KP_7 = move-to-top-left
<Shift>KP_8 = move-to-top
<Shift>KP_9 = move-to-top-right

I don't have time to double-check right now (I'm about to go to sleep), but those are probably taking precedence.

ssokolow avatar Jan 26 '21 13:01 ssokolow

Yes, I changed ModMask = <Ctrl><Alt> to ModMask = <Ctrl><Shift> Goodnight

MintDja avatar Jan 26 '21 13:01 MintDja

Does removing the <Shift>KP_* lines fix the problem?

...because it looks like it's operating as designed to me. (You specified that <Ctrl><Shift><Shift>KP_1 should be move-to-bottom-left, which is the same as <Ctrl><Shift>KP_1 since you can't set a boolean to "double true", and that's what it's doing.)

I didn't intentionally consider what would happen if you specified a ModMask and a keybinding with overlapping modifier requirements, but "obey the more specific match" behaviour seems reasonable... though I might want to have a future version of QuickTile at least print a warning if it detects that.

ssokolow avatar Jan 27 '21 01:01 ssokolow

yes, the extra lines are to blame! Thank you!

MintDja avatar Jan 27 '21 10:01 MintDja

in this case there are extra lines in the downloaded configuration file

MintDja avatar Jan 27 '21 10:01 MintDja

Yes. The default configuration is to have holding down <Shift> mean "Don't resize, just move."

It's your job to remove the <Shift> lines if you add <Shift> to ModMask.

...though, as I said, now that you've made me aware of that point of confusion, I'll try to remember to add a warning to the next version.

ssokolow avatar Jan 27 '21 11:01 ssokolow

Actually, let's keep this open and rename it as my reminder to add that warning.

ssokolow avatar Jan 27 '21 11:01 ssokolow

It's looking like the solution for this will be the new config GUI I'm working on, where the hotkey editor will not have a ModMask (each binding will be exactly what you pressed to set it) and will highlight any conflicting keybindings in red.

ssokolow avatar Aug 06 '23 18:08 ssokolow