Page 1 of 2

Allow pressing E to confirm number input fields, by dropping support for scientific notation

Posted: Sun Oct 27, 2024 3:32 pm
by Wiwiweb
What?
As of 2.0, if you try to confirm a number input field (such as logistic requests count) by pressing e, it will type an e in the field instead. This is because Factorio now supports scientific notation (e.g. 4e3 = 4000)

I would like to drop this support to return to the original behavior.

Why?
In my future Factorio playtime, I'm going to confirm textfields ten of thousands of times, and I'm going to use numbers above 1000 only hundreds of times.

The convenience of quickly confirming appears much more valuable than the convenience of saving keypresses for numbers above 1000.

It appears so unintuitive to people that it has been reported as a bug multiple times:
viewtopic.php?f=47&t=116616
viewtopic.php?f=47&t=117523
viewtopic.php?f=47&t=117057
viewtopic.php?f=23&t=116339

One last thing to note is that "E to confirm" is so engrained in Factorio UI, that hovering over the confirm button of number fields still says "Press E to confirm".
Screenshot from 2024-10-22 15-02-21~2.png
Screenshot from 2024-10-22 15-02-21~2.png (12.71 KiB) Viewed 2129 times

Re: Allow pressing E to confirm number input fields, by dropping support for scientific notation

Posted: Sun Oct 27, 2024 3:52 pm
by Makka77
1 million hours muscle memory broken, and it means having to look at the keyboard to left hand enter. Breaks the flow for little to no gain.
+1

Re: Allow pressing E to confirm number input fields, by dropping support for scientific notation

Posted: Thu Oct 31, 2024 4:24 am
by vadcx
In Office spreadsheets there's the =A1*42 syntax to enable formula interpretation. That's a good compromise imo. I don't think many folks enter formulas / suffixes on the regular.

Re: Allow pressing E to confirm number input fields, by dropping support for scientific notation

Posted: Thu Oct 31, 2024 5:39 am
by kiwidrew
At the very least, it would be nice if "E" as the first keypress would close the window, because a valid number in scientific notation will never begin with an "e".

Re: Allow pressing E to confirm number input fields, by dropping support for scientific notation

Posted: Thu Oct 31, 2024 8:55 am
by Genhis
It's not only about scientific notation, the field also supports functions. We had similar internal discussion when this option was implemented. This behavior makes things consistent because if you are able to type text to such fields because of k/M/G prefixes and such, confirm key shouldn't take priority if it's a valid input.

Rseding added a hidden setting "use-formulas-in-number-input-fields" in 2.0.12 which reverts to 1.1 behavior if you really don't want to try to get used to this.

Re: Allow pressing E to confirm number input fields, by dropping support for scientific notation

Posted: Thu Oct 31, 2024 9:05 am
by computeraddict
Genhis wrote: Thu Oct 31, 2024 8:55 am It's not only about scientific notation, the field also supports functions. We had similar internal discussion when this option was implemented. This behavior makes things consistent because if you are able to type text to such fields because of k/M/G prefixes and such, confirm key shouldn't take priority if it's a valid input.

Rseding added a hidden setting "use-formulas-in-number-input-fields" in 2.0.12 which reverts to 1.1 behavior if you really don't want to try to get used to this.
Even if you let there be a confirm combination like ctrl+e or tab to unfocus the text field then press e so good old mouse hand doesn't have to get involved and left hand doesn't have to go find an enter key, it'd be nice.

Re: Allow pressing E to confirm number input fields, by dropping support for scientific notation

Posted: Fri Nov 01, 2024 4:05 am
by Wiwiweb
Genhis wrote: Thu Oct 31, 2024 8:55 am It's not only about scientific notation, the field also supports functions.
https://lua-api.factorio.com/latest/con ... ssion.html
abs, log2, sign, max, min.
By chance, no function uses the letter E!
There's also "The property where the expression is used may provide variables.", but I don't think that applies in-game as a player, it seems to be only when defining prototypes as a modder. Let me know if wrong.
Genhis wrote: Thu Oct 31, 2024 8:55 am Rseding added a hidden setting "use-formulas-in-number-input-fields" in 2.0.12 which reverts to 1.1 behavior if you really don't want to try to get used to this.
Appreciated! :D

Re: Allow pressing E to confirm number input fields, by dropping support for scientific notation

Posted: Fri Nov 01, 2024 4:14 am
by vadcx
Wiwiweb wrote: Fri Nov 01, 2024 4:05 am By chance, no function uses the letter E!
Wiwiweb wrote: Sun Oct 27, 2024 3:32 pm ... by pressing e, it will type an e in the field instead. This is because Factorio now supports scientific notation (e.g. 4e3 = 4000)
--------
I will just repeat what I said above: use the equal sign = to begin entering a formula: =3.14159*1337%

EDIT: I just tested. They turned it into a text field, therefore any letters are valid inputs now. No real-time checks like a red outline if the current input is not a valid formula. All that happens when you press the button (mouse-click, CTRL+E, or out of input focus "E")

Hotkey to jump out of textbox

Posted: Thu Nov 21, 2024 9:16 am
by sticklord
Hello.

Love that you now can use formulas in the textbox but now i "E" means some kind of number i guess so you can't exit out of it without pushing the button (when you hover the button it still says confirm(e) ).

Earlier you could press the sequence "1000e" and you would apply 1000 to the box. Would it be possible to bring this back and apply the value when you press a key, perhaps tab?

Re: Allow pressing E to confirm number input fields, by dropping support for scientific notation

Posted: Sat Nov 23, 2024 9:30 am
by Koub
[Koub] Merged into an older thread with the same suggestion.

Re: Allow pressing E to confirm number input fields, by dropping support for scientific notation

Posted: Sat Nov 23, 2024 9:35 am
by IsaacOscar
Wiwiweb wrote: Fri Nov 01, 2024 4:05 am There's also "The property where the expression is used may provide variables.", but I don't think that applies in-game as a player, it seems to be only when defining prototypes as a modder. Let me know if wrong.
You can have a blueprint parameter define a variable "e" and then use it in formulas for subsequent paramaters.

Re: Allow pressing E to confirm number input fields, by dropping support for scientific notation

Posted: Sat Nov 23, 2024 9:36 am
by IsaacOscar
I think an alt-e or something would be good for all text fields, not just numbers.

Re: Allow pressing E to confirm number input fields, by dropping support for scientific notation

Posted: Sat Nov 23, 2024 11:36 am
by Noah235
What is the fastest way to confirm without using the mouse now? I found pressing escape twice, followed by e works, but there might be better options. This applies to writing text in a display panel as well (I use them for notes sometimes).

Re: Allow pressing E to confirm number input fields, by dropping support for scientific notation

Posted: Sat Nov 23, 2024 9:22 pm
by Tooster
The simplest way is to just use Enter... I don't see a need to go back to E as confirm. The only drawback is that enter is on the right of the keyboard, while E was right next to WASD. Tab would be nice to change focus, then space for confirmation, just like in the web browser. Would allow for even better keyboard only navigation.

Re: Allow pressing E to confirm number input fields, by dropping support for scientific notation

Posted: Sat Nov 23, 2024 9:35 pm
by BlueTemplar
Except in some cases where you are next to a vehicle...

----

There doesn't seem to be a dire need in Factorio for this specific notation,
especially not when it also supports Engineering (!) notation
(also other letters perhaps could be used for it, if it's good enough for FORTRAN and Matlab ??).

So this use for 'e' could be dropped...

... or can it ? :
IsaacOscar wrote: Sat Nov 23, 2024 9:35 am
Wiwiweb wrote: Fri Nov 01, 2024 4:05 am There's also "The property where the expression is used may provide variables.", but I don't think that applies in-game as a player, it seems to be only when defining prototypes as a modder. Let me know if wrong.
You can have a blueprint parameter define a variable "e" and then use it in formulas for subsequent paramaters.
How bad is the situation for this ? I guess forbidding 'e', an extremely common vowel (and 'd' isn't that much better), to be used in variables, while even for a niche (?) use, would be quite infuriating to the players that stumbled on it ?

Re: Allow pressing E to confirm number input fields, by dropping support for scientific notation

Posted: Sat Nov 23, 2024 9:42 pm
by its a me
another solution would be to have scientific notation be with a capital E and have the confirm key be with a lowercase e

Re: Allow pressing E to confirm number input fields, by dropping support for scientific notation

Posted: Sun Nov 24, 2024 12:17 am
by Tooster
Any "solution" proposing some weird hacks for letter E or removing the (objectively superior) functionality og inputs accepting formulas/variables etc miss the crucial insight: E is just a bad key for the Accept action. It was good befory, but requirements changed, so it is no longer a viable option. The only advantage it has is being close to to WSAD. Sadly muscle memory and habits must be adjusted.

Re: Allow pressing E to confirm number input fields, by dropping support for scientific notation

Posted: Sun Nov 24, 2024 1:41 am
by IsaacOscar
Tooster wrote: Sun Nov 24, 2024 12:17 am Any "solution" proposing some weird hacks for letter E or removing the (objectively superior) functionality og inputs accepting formulas/variables etc miss the crucial insight: E is just a bad key for the Accept action. It was good befory, but requirements changed, so it is no longer a viable option. The only advantage it has is being close to to WSAD. Sadly muscle memory and habits must be adjusted.
Yes! I would be very confused if I tried to type e into an input field and the window closed!

Re: Allow pressing E to confirm number input fields, by dropping support for scientific notation

Posted: Sun Nov 24, 2024 10:59 am
by BlueTemplar
Well, it's not just any input field, it's specifically the number ones.
computeraddict wrote: Thu Oct 31, 2024 9:05 am [...]
Even if you let there be a confirm combination like ctrl+e or tab to unfocus the text field then press e so good old mouse hand doesn't have to get involved and left hand doesn't have to go find an enter key, it'd be nice.
Sadly, Tab is now used for Remote View.

Still, <modifier_key>+'e' might be the least bad option here ??

(Including Shift+'e' for the scientific notation instead, like its a me suggested, though this leaves issues for formulas ??)

Please consider having "e" confirm a number entry instead of entering "e"

Posted: Tue Nov 26, 2024 12:28 pm
by Locane
I really like the usability enhancement you guys introduced with "e" to confirm on many menus. It's been great to learn as a muscle memory when I'm done editing something.

It bites me though when I'm entering numbers for constant values in circuits or space ship runs - instead of closing the interface since I'm happy with the number, it enters an "e" in to the "1500" I just set.

Image

Would be great if "e" closed the window when entering in to a field that can only accept numbers or icons.


PS would also be great if we could copy/paste condition settings within the ship platform windows; often times I want the same set of items to be checked at source and destination and I have to manually select each condition for each stop...