"Shift" getting stuck when placing pipes and belts

Fixed
Gottchar [github] · 3 years ago

Issue description

Sometimes when building pipes/belts and holding shift, the shift mode can get stuck into being the default, meaning you now have to hold shift to allow the belt to do a corner, and let go of shift to force it to be straight.

Expected behavior

What I said above, but not.

Reproduction steps

  1. Start building a belt (or pipe)
  2. Alt+tab out of the game
  3. Mouse over wherever you want to continue your belt, without yet having made COI the active window again
  4. Shift+LMB to continue your belt

meaning this bug is mostly triggered by people with a multi screen setup who like to alt+tab out of the game to chat or whatever while building their belts, and then just continue to play, without using alt+tab first to make COI the active window again.

Video uploaded to discord, issues discussion channel, https://discord.com/channels/803508556325584926/883590993063051275/1076823794309672980

Game version

0.4.14a(154)

RealisticOptimist · 3 years ago

It seems, COI only checks on state change of shift, but ignores the status of shift as such.

I can reproduce it. In at least two additional ways:

  1. Start a transport, hold [shift], leave the COI window (e.g. go to windows explorer). release [shift], return to COI.
    Ignores the shift state, as the shift release event got processed by another window. on return of focus, the shift state is not updated.

  2. Start a transport, press and hold [alt], press and hold [shift], release [alt], release [shift]. Same with [ctrl] instead of [alt].
    Shift during alt gets ignored. Only when I release shift, the event gets processed. It ignores the shift state, only toggling the ingame shift status.

RealisticOptimist · 3 years ago
  1. Press and hold [shift] before starting the transport.
    Shift state is inverted from start. Same reason, but does not need other keys nor need to leave COI window.

Closed as ✅ Fixed

8 Showing 1–3 of 3