Page 1 of 1

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

Posted: Thu Nov 12, 2020 3:34 pm
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}

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

Posted: Thu Nov 12, 2020 3:39 pm
by valneq
Considering that none of WASD are numbers, this is kind of expected behavior. Why exactly is this a bug?

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

Posted: Thu Nov 12, 2020 5:52 pm
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.

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

Posted: Thu Nov 12, 2020 7:15 pm
by Rseding91
That is fully intended.