[1.0.0] Numeric only textfields allow character movement when using WASD

Bugs that are actually features.
Post Reply
Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

[1.0.0] Numeric only textfields allow character movement when using WASD

Post by Choumiko »

Clicking in a numeric only textfield (e.g. setting the request/trash amount in the character gui) and then typing any of the movement keys (or in fact any key that has a game control linked) executes that movement. For unbound keys the input is ignored (as expected)

To reproduce:
- Add item to logistics requests
- Click in one of the textfields
- Press any movement key/linked key

Same with mod guis:

Code: Select all

/c game.player.gui.screen.add{type = "textfield", numeric = true}

User avatar
valneq
Smart Inserter
Smart Inserter
Posts: 1150
Joined: Fri Jul 12, 2019 7:43 am
Contact:

Re: [1.0.0]Numeric only textfields allow character movement when using WASD

Post by valneq »

Considering that none of WASD are numbers, this is kind of expected behavior. Why exactly is this a bug?

User avatar
atomizer
Long Handed Inserter
Long Handed Inserter
Posts: 79
Joined: Sat Sep 22, 2018 3:18 pm
Contact:

Re: [1.0.0] Numeric only textfields allow character movement when using WASD

Post by atomizer »

Input fields seem to consume only those keypresses that can change the content or cursor position, anything else falls through to the game. For example, in the same way you describe, a normal text field doesn't consume F keys.
The only inconsistency I could find is that up/down keys are consumed in single-line inputs, even though they don't do anything.

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

Re: [1.0.0] Numeric only textfields allow character movement when using WASD

Post by Rseding91 »

That is fully intended.
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Not a bug”