[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: 346
Joined: Tue Jun 28, 2016 2:07 pm
Contact:

[dominik][for 0.16]Overzealous Hotkey Modifier Matching

Post by IronCartographer » Wed Aug 02, 2017 7:12 pm

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: 7424
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: Overzealous Hotkey Modifier Matching

Post by kovarex » Thu Aug 03, 2017 4:51 pm

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: 2277
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: Overzealous Hotkey Modifier Matching

Post by Optera » Thu Aug 03, 2017 6:45 pm

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: 3996
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: Overzealous Hotkey Modifier Matching

Post by posila » Fri Aug 04, 2017 8:07 am

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: 346
Joined: Tue Jun 28, 2016 2:07 pm
Contact:

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

Post by IronCartographer » Fri Aug 11, 2017 5:29 pm

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
Factorio Staff
Factorio Staff
Posts: 657
Joined: Sat Oct 12, 2013 9:08 am
Contact:

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

Post by Dominik » Fri Aug 25, 2017 10:44 am

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”

Who is online

Users browsing this forum: Bing [Bot]