[dominik][for 0.16]Overzealous Hotkey Modifier Matching

This subforum contains all the issues which we already resolved.
Post Reply
IronCartographer
Filter Inserter
Filter Inserter
Posts: 454
Joined: Tue Jun 28, 2016 2:07 pm
Contact:

[dominik][for 0.16]Overzealous Hotkey Modifier Matching

Post 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-).

kovarex
Factorio Staff
Factorio Staff
Posts: 8078
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: Overzealous Hotkey Modifier Matching

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

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2915
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: Overzealous Hotkey Modifier Matching

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

posila
Factorio Staff
Factorio Staff
Posts: 5201
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: Overzealous Hotkey Modifier Matching

Post 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

IronCartographer
Filter Inserter
Filter Inserter
Posts: 454
Joined: Tue Jun 28, 2016 2:07 pm
Contact:

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

Post 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!

Dominik
Former Staff
Former Staff
Posts: 658
Joined: Sat Oct 12, 2013 9:08 am
Contact:

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

Post 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 :)

Post Reply

Return to “Resolved Problems and Bugs”