[0.15.21] Ignore keys held down after pressing Enter in chat

Bugs that we were not able to reproduce, and/or are waiting for more detailed info.
Post Reply
dgw
Fast Inserter
Fast Inserter
Posts: 197
Joined: Tue Apr 12, 2016 7:06 pm
Contact:

[0.15.21] Ignore keys held down after pressing Enter in chat

Post by dgw »

With the default key bindings, if I type something in chat containing the letter C while my mouse is over an entity in the world, my character will attack that item. Happened a few times over this long weekend, but I just tracked it down after accidentally blowing up a whole section of my low density structure factory (with lv3 modules too, whoops).

I can see both sides of this, as far as being able to attack while chatting just in case, but 1) the spacebar (attack enemy) would be a more natural candidate for this, since it only attacks enemies and 2) none of the other controls do this while chat is focused.

If relevant, this happened in a multiplayer game hosted on my MacBook Pro.
Last edited by dgw on Mon Jun 19, 2017 12:50 am, edited 2 times in total.

dgw
Fast Inserter
Fast Inserter
Posts: 197
Joined: Tue Apr 12, 2016 7:06 pm
Contact:

Re: [0.15.16] Hitting C in chat attacks if cursor over entity

Post by dgw »

Tried to reproduce this in single-player on my Windows 7 desktop. Aside from learning that my hardware is too underpowered to encode game captures while playing (the point was to create a short demo video), I was unable to repro there.

Next tests, for completeness, will be multiplayer hosted on the Windows machine, and single player on the Mac. That should cover all of the bases.

User avatar
Jon8RFC
Filter Inserter
Filter Inserter
Posts: 553
Joined: Tue May 10, 2016 3:39 pm
Contact:

Re: [0.15.16] Hitting C in chat attacks if cursor over entity

Post by Jon8RFC »

I couldn't get this to work, either. I removed my config to ensure that it was all default, and trying a few different weapons on single player couldn't get it to work. I tried the pistol on a multiplayer server and couldn't get it to work. Maybe there's a step we're missing?
Image

dgw
Fast Inserter
Fast Inserter
Posts: 197
Joined: Tue Apr 12, 2016 7:06 pm
Contact:

Re: [0.15.16] Hitting C in chat attacks if cursor over entity

Post by dgw »

I'm back on the OS X machine now, playing multiplayer alone because I initially noticed this in multiplayer, and I can't trigger it now.

Should I figure out precise repro steps in the future, I'll come back to this thread, but for now it can be closed/moved/etc. to mark it as "need more info" or "invalid" or whatever.

This is frustrating, mostly because it happened several times yesterday and now I can't trip it. There was no update, either; I still have the same Steam content BuildID installed…

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

Re: [0.15.16] Hitting C in chat attacks if cursor over entity

Post by kovarex »

Ok, moving to pending.

dgw
Fast Inserter
Fast Inserter
Posts: 197
Joined: Tue Apr 12, 2016 7:06 pm
Contact:

Re: [0.15.21] Sometimes typing in console leaks through

Post by dgw »

I have updated the thread title based on more observations.

While playing multiplayer (happy to provide the server address & password to Factorio staff for testing if it comes to that) on Windows 7, I noticed that sometimes my character would move small amounts while I was typing in chat.

I haven't triggered the original 'C' issue described in the OP, but over the last several hours I confirmed my character moving in all four directions while typing in the console. It's definitely not every time I hit a control letter, or even frequent, but it happened enough times that I am certain it's some kind of intermittent bug. Maybe I type too fast, or something in how the game processes input skips keypresses during certain ticks…or the framerate/UPS drops briefly and allows some edge case to trigger… I don't know enough about the game's structure to speculate meaningfully, but I have reproduced this on a different map from before.

It may or may not be meaningful that this game is modded, whereas I noticed it before on a vanilla install. But this game is hosted on Linux, headless, rather than my MacBook.

For completeness, the mod list:

AutoDeconstruct
Bottleneck
ElectricTrain
even-distribution
EvenMoreLight
EvoGUI
FARL
folk-shuttle
folk-stopthat
FusionTrain
HandyHands
long-reach
ModuleInserter
PavementDriveAssist
Robot_Battery_Research
SmarterBotRecharge
SmartTrains
Squeak Through
TheFatController
TrainSpeedLimit
upgrade-planner
YARM
ZRecycling

Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: [0.15.21] Sometimes typing in console leaks through

Post by Nexela »

Not sure how related it is (and I haven't tested in any of the recent .15x releases)

If typing in the console and you have any key held down while you press enter to send it after you let up on the second key that action will trigger

dgw
Fast Inserter
Fast Inserter
Posts: 197
Joined: Tue Apr 12, 2016 7:06 pm
Contact:

Re: [0.15.21] Sometimes typing in console leaks through

Post by dgw »

I did subconsciously notice some kind of relationship with keystroke overlap. Tried to test it in-game by intentionally "rolling" more keys than I would while typing a few times, but it did not trigger.

However, I pulled up the same server again, intentionally held D too long while submitting a chat message with enter, and my character moved!

Guess I'll be updating the thread title again. Thanks, Nexela!

Rseding91
Factorio Staff
Factorio Staff
Posts: 13250
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.15.21] Ignore keys held down after pressing Enter in chat

Post by Rseding91 »

That's currently how we do button handling: we poll the current state and update the game accordingly. That means if you hold keys regardless of where they started the game reacts to them each tick accordingly.
If you want to get ahold of me I'm almost always on Discord.

dgw
Fast Inserter
Fast Inserter
Posts: 197
Joined: Tue Apr 12, 2016 7:06 pm
Contact:

Re: [0.15.21] Ignore keys held down after pressing Enter in chat

Post by dgw »

Ah, so there's no concept of KeyDown, then KeyUp. That would explain it. If it's not a bug, then that's fine I suppose. I'm just glad I finally figured out why I "magically" shot a rocket at my own production line that one time!

Post Reply

Return to “Pending”