Allow enter-key for confirming dialogs

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
Therenas
Long Handed Inserter
Long Handed Inserter
Posts: 67
Joined: Tue Dec 11, 2018 2:10 pm
Contact:

Allow enter-key for confirming dialogs

Post by Therenas » Wed Dec 19, 2018 11:10 am

I would love it if I could confirm a dialog with ENTER. As it currently works, you can detect keyboard shortcuts only when no textfield is selected/in focus, so pressing ENTER directly after typing can't be detected by mods. Now I see how custom shortcuts won't work in a textfield, as for example CTRL+A selects all text, etc. But one set key (ENTER seems suitable) that, when pressed when a textfield is in focus, fires an 'submit-event' to be caught by mods, would really make for a nicer UI experience. As a user, a form that doesn't submit with ENTER really seems broken.

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

Re: Allow enter-key for confirming dialogs

Post by Rseding91 » Wed Jan 09, 2019 7:59 pm

I can implement this for single-line text boxes but it's not going to work for multi-line ones since enter is "add new line" and not "submit".
If you want to get ahold of me I'm almost always on Discord.

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

Re: Allow enter-key for confirming dialogs

Post by Nexela » Thu Jan 10, 2019 12:13 am

Most programs with multi line text boxes use CTRL+ENTER to send it, would it be viable to add this combination to multiline boxes?

User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 6598
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Allow enter-key for confirming dialogs

Post by bobingabout » Fri Jan 11, 2019 10:03 am

Nexela wrote:
Thu Jan 10, 2019 12:13 am
Most programs with multi line text boxes use CTRL+ENTER to send it, would it be viable to add this combination to multiline boxes?
I thought it was Shift + Enter.

Still, I'd probably agree with Rseding, I'd want the default behaviour of a multi-line text box to be new line, not send, where message boxes (like the console) should be (and the console actually is) enter to submit.

that yellow box that appears at the start of a new game that says "Press tab to close", I must admit, I've tried pressing Escape and Enter to close it.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.

zysnarch
Manual Inserter
Manual Inserter
Posts: 4
Joined: Thu Jan 10, 2019 4:26 am
Contact:

Re: Allow enter-key for confirming dialogs

Post by zysnarch » Thu Jan 24, 2019 8:13 am

Just chiming in to support this idea - I was about to ask the same thing.

Therenas
Long Handed Inserter
Long Handed Inserter
Posts: 67
Joined: Tue Dec 11, 2018 2:10 pm
Contact:

Re: Allow enter-key for confirming dialogs

Post by Therenas » Tue Jan 29, 2019 5:56 pm

Yeah I totally agree that in multi-line ones, enter should go to the next line. Implementing a shift-enter or ctrl-enter would be nice, but not as important, as those multi-line boxes aren't used for some quick input typically, thus aren't used as frequently, which makes enter not working less annoying.

Post Reply

Return to “Modding interface requests”

Who is online

Users browsing this forum: No registered users