Page 1 of 1

[dominik][for 0.16]Overzealous Hotkey Modifier Matching

Posted: Wed Aug 02, 2017 7:12 pm
by IronCartographer
The Helicopters mod binds hotkeys to Shift-S and Shift-W by default. This means running north or south while holding shift is blocked, but without Shift- pressed the default keybind for running still functions (as it should).

Switching to Ctrl- instead of Shift- correctly changes the point of conflict, but neither is desirable, so I took it one step further.

Rebinding to Ctrl-Shift- should completely remove interference if only one modifier is pressed. However, it actually results in either one (Ctrl- or Shift-) blocking the base keybind, despite not fully matching an alternative (this is inconsistent).

Expected behavior: A partial match for a two-modifier keybind (Ctrl-Shift-) should pass through the keypress of the base key to its binding, as is consistent with a partial match for a single-modifier keybind (Ctrl- or Shift-).

Re: Overzealous Hotkey Modifier Matching

Posted: Thu Aug 03, 2017 4:51 pm
by kovarex
Sorry, but this is not how it should work. For example, build is click and shift-click is alternative build. They can't interfere.

Re: Overzealous Hotkey Modifier Matching

Posted: Thu Aug 03, 2017 6:45 pm
by Optera
I thought shift, ctrl and alt would change the key code of any key pressed alongside them. So ctrl-shift-e, ctrl-e and shift-e result in different key codes.

Edit: seems like I was thinking of character code.

Re: Overzealous Hotkey Modifier Matching

Posted: Fri Aug 04, 2017 8:07 am
by posila
I get what you are saying. I don't want to mess with this code in 0.15 anymore, so I'll fix it for 0.16

Re: [posila][for 0.16]Overzealous Hotkey Modifier Matching

Posted: Fri Aug 11, 2017 5:29 pm
by IronCartographer
Thank you, posila!

Learned my lesson though: Report the issue first, with context afterwards. And always include steps to reproduce. ;)

Sorry for the confusion!

Re: [dominik][for 0.16]Overzealous Hotkey Modifier Matching

Posted: Fri Aug 25, 2017 10:44 am
by Dominik
Now (=0.16) it should work as intended, with multi modifier hotkeys not blocking less modified ones when not appropriate. Thanks for the report :)